Skip to content

NpgsqlRest Installation Guide

Download Executable

Manual Installation

You can always manually download the latest version executable from the official Release page.

Release page downloads include builds for:

The optional default configuration file is also included, but this is just for convenience; it works with the same default values without this configuration file.

New builds are also possible in future (JIT, MacOS x64, etc).

Command Line Download

Windows (x64)

powershell
# Download using PowerShell
Invoke-WebRequest -Uri "https://github.com/NpgsqlRest/NpgsqlRest/releases/latest/download/npgsqlrest-win64.exe" -OutFile "npgsqlrest.exe"

# Optionally add to PATH or move to desired location

Linux (x64)

bash
# Download the executable
wget https://github.com/NpgsqlRest/NpgsqlRest/releases/latest/download/npgsqlrest-linux64 -O npgsqlrest

# Make it executable
chmod +x npgsqlrest

# Optionally move to the system path
sudo mv npgsqlrest /usr/local/bin/

macOS (ARM64)

bash
# Download the executable
curl -L https://github.com/NpgsqlRest/NpgsqlRest/releases/latest/download/npgsqlrest-osx-arm64 -o npgsqlrest

# Make it executable
chmod +x npgsqlrest

# Optionally move to the system path
sudo mv npgsqlrest /usr/local/bin/

Command Line Basic Commands

You can run some basic commands to test your installation. Assuming that the binary name is npgsqlrest, you can

  • Check versions. This includes the client version and all included components:
bash
# Show versions
npgsqlrest --version
npgsqlrest -v
  • See some help information:
bash
# Show help
npgsqlrest --help
npgsqlrest -h

NPM Installation

bash
# Install globally
npm install -g npgsqlrest

# Or install locally in the project
npm install npgsqlrest

To check versions or see help information, use the NPX runner:

bash
# Show versions
npx npgsqlrest --version
npx npgsqlrest -v

# Show help
npx npgsqlrest --help
npx npgsqlrest -h

Note: The NPM package automatically downloads the appropriate executable for your operating system during installation.

Docker Installation

Standard Image (AOT)

bash
# Pull the latest image (optional, docker run will do this if the image is not pulled)
docker pull vbilopav/npgsqlrest:latest

# Check versions for all components
docker run --name npgsqlrest -it vbilopav/npgsqlrest:latest --version

# See help
docker run --name npgsqlrest -it vbilopav/npgsqlrest:latest --help

# Run with configuration file and with default port exposed
docker run --name npgsqlrest -it -p 8080:8080 -v ./appsettings.json:/app/appsettings.json vbilopav/npgsqlrest:latest

Bun Runtime Image

A Docker image variant with pre-installed Bun JavaScript runtime is available:

bash
# Pull the Bun image variant
docker pull vbilopav/npgsqlrest:latest-bun

# Run with Bun runtime available
docker run --name npgsqlrest-bun -it -p 8080:8080 -v ./appsettings.json:/app/appsettings.json vbilopav/npgsqlrest:latest-bun

This image includes the Bun JavaScript runtime alongside NpgsqlRest, enabling proxy endpoints to execute Bun scripts within the same container. Useful for scenarios where you need lightweight proxy handlers without external service calls.

Available Bun image tags:

  • vbilopav/npgsqlrest:latest-bun - Latest version with Bun
  • vbilopav/npgsqlrest:3.2.2-bun - Specific version with Bun

Building From Source

Before building NpgsqlRest from source, ensure you have the following installed:

Clone the Repository

bash
git clone https://github.com/vb-consulting/NpgsqlRest.git
cd NpgsqlRest
  • Standard Build
bash
dotnet build
  • AOT (Ahead-of-Time) Compilation

NpgsqlRest supports AOT compilation for native executables:

bash
# Windows (x64)
dotnet publish -r win-x64 -c Release --output ./dist

# Linux (x64) - must be run on Linux
dotnet publish -r linux-x64 -c Release --output ./dist

# macOS (ARM64)
dotnet publish -r osx-arm64 -c Release --output ./dist

For more information on build targets for specific OS, see the .NET RID Catalog

The AOT-compiled executable will be approximately 20MB and is self-contained with no runtime dependencies. The built executable will have the same functionality as the pre-compiled releases available on the GitHub releases page.

Next Steps

Released under the MIT License.