A multi-database PostgreSQL REST API gateway that installs with a single command.
Installation • Services • API Usage • Management
Postgrify manages multiple PostgreSQL databases through a single HTTP/REST API. Each project uses its own isolated database — no direct PostgreSQL connection required.
- Multi-database support — single API, per-request DB selection
- JWT-based auth — per-DB scoped tokens + admin token
- Web GUI — table editor, schema management, SQL editor
- Automatically restarts after reboot
No configuration files to edit. All secrets are auto-generated. The only user input happens in the browser after installation.
curl -fsSL https://raw.githubusercontent.com/parsherr/postgrify/main/install.sh | bashRequirements: curl (everything else — git, Docker — is installed automatically if missing), sudo access.
irm https://raw.githubusercontent.com/parsherr/postgrify/main/install.ps1 | iexRequirements: Windows 10/11, PowerShell 5.1+. Docker Desktop and git are installed automatically via winget.
Note: If Docker Desktop needs to be installed, a system restart may be required. After restarting, run the command again — the existing installation will be detected and the process will continue.
WSL2 alternative: If you have WSL2 installed, you can use the Linux command inside WSL instead — it is faster and more reliable.
- Checks for Docker (installs if missing)
- Clones the repo into
~/.postgrify/(Linux/macOS) or%USERPROFILE%\.postgrify\(Windows) - Auto-generates all secrets (
JWT_SECRET,ADMIN_SECRET,PG_PASSWORD) — no prompts - Starts all services (PostgreSQL, Redis, API, GUI)
- Opens http://localhost:5173/setup in your browser
After installation, create your admin account at http://localhost:5173/setup. That is the only step requiring user input.
All generated secrets are saved in
packages/.envinside the install directory. Keep this file safe — deleting it will break the installation.
| Service | URL |
|---|---|
| GUI | http://localhost:5173 |
| API | http://localhost:3000 |
| API Docs | http://localhost:3000/api-docs |
curl -X POST http://localhost:3000/auth/token/admin \
-H "Content-Type: application/json" \
-d '{"secret": "YOUR_ADMIN_SECRET"}'curl -X POST http://localhost:3000/admin/databases \
-H "Authorization: Bearer ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "myproject"}'# Get a scoped token
curl -X POST http://localhost:3000/auth/token \
-H "Content-Type: application/json" \
-d '{"database": "myproject", "secret": "YOUR_ADMIN_SECRET", "scopes": ["read","write"]}'
# List tables
curl http://localhost:3000/db/myproject/tables \
-H "Authorization: Bearer DB_TOKEN"For all endpoints: http://localhost:3000/api-docs
# First-time start (or after code update)
cd ~/.postgrify/packages && docker compose up -d --build
# Restart (config change, no rebuild needed)
cd ~/.postgrify/packages && docker compose restart
# Stop (keep all data)
cd ~/.postgrify/packages && docker compose down
# Fresh start — WIPES ALL DATA (databases, users, setup)
cd ~/.postgrify/packages && docker compose down -v && docker compose up -d --build
# Follow logs
cd ~/.postgrify/packages && docker compose logs -f
# Update to latest version
cd ~/.postgrify && git pull && cd packages && docker compose up -d --build# First-time start (or after code update)
cd "$env:USERPROFILE\.postgrify\packages"; docker compose up -d --build
# Restart (config change, no rebuild needed)
cd "$env:USERPROFILE\.postgrify\packages"; docker compose restart
# Stop (keep all data)
cd "$env:USERPROFILE\.postgrify\packages"; docker compose down
# Fresh start — WIPES ALL DATA (databases, users, setup)
cd "$env:USERPROFILE\.postgrify\packages"; docker compose down -v; docker compose up -d --build
# Follow logs
cd "$env:USERPROFILE\.postgrify\packages"; docker compose logs -f
# Update to latest version
cd "$env:USERPROFILE\.postgrify"; git pull; cd packages; docker compose up -d --buildNote:
docker compose down -vremoves all volumes — this permanently deletes your PostgreSQL data, user accounts, and setup configuration. You will need to run the setup wizard again. Use this only to start completely fresh.
All settings are in packages/.env inside the install directory. After making changes, restart the services:
# Linux/macOS
cd ~/.postgrify/packages && docker compose up -d
# Windows
cd "$env:USERPROFILE\.postgrify\packages"; docker compose up -d| Variable | Description | Default |
|---|---|---|
PG_PASSWORD |
PostgreSQL password | auto-generated |
JWT_SECRET |
Token signing key (32+ chars) | auto-generated |
ADMIN_SECRET |
Admin token password | auto-generated |
JWT_EXPIRY |
Token validity duration | 24h |
RATE_LIMIT_GLOBAL |
Requests per minute per IP | 1000 |
For all variables: exampleenv.md
MIT
