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)
# 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 locationLinux (x64)
# 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)
# 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:
# Show versions
npgsqlrest --version
npgsqlrest -v- See some help information:
# Show help
npgsqlrest --help
npgsqlrest -hNPM Installation
# Install globally
npm install -g npgsqlrest
# Or install locally in the project
npm install npgsqlrestTo check versions or see help information, use the NPX runner:
# Show versions
npx npgsqlrest --version
npx npgsqlrest -v
# Show help
npx npgsqlrest --help
npx npgsqlrest -hNote: The NPM package automatically downloads the appropriate executable for your operating system during installation.
Docker Installation
Standard Image (AOT)
# 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:latestBun Runtime Image
A Docker image variant with pre-installed Bun JavaScript runtime is available:
# 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-bunThis 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 Bunvbilopav/npgsqlrest:3.2.2-bun- Specific version with Bun
Building From Source
Before building NpgsqlRest from source, ensure you have the following installed:
- Latest .NET SDK (from https://dotnet.microsoft.com/download)
- Git (to clone the repository)
- PostgreSQL 13+ (for testing the build)
Clone the Repository
git clone https://github.com/vb-consulting/NpgsqlRest.git
cd NpgsqlRest- Standard Build
dotnet build- AOT (Ahead-of-Time) Compilation
NpgsqlRest supports AOT compilation for native executables:
# 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 ./distFor 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
- Quick Start - Create your first endpoint
- Comment Annotations Guide - Use SQL comments to configure endpoints
- Annotations Reference - Complete reference of all annotations
- Configuration Reference - Complete reference for all configuration options