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

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

Building From Source

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

  • .NET 9 SDK or later
  • Git (to clone the repository)
  • PostgreSQL 13+ (for testing the build)

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.

Released under the MIT License.