Prerequisites
scry-proxy supports PostgreSQL 12 and later, including cloud-hosted variants (Amazon RDS, Aurora, Supabase, Neon).
To build from source, you need Rust 1.75+ installed.
Option 1: Build from Source
The recommended approach. You can audit the code before building.
cargo install scry-proxy
Or clone and build directly:
git clone https://github.com/scrydata/scry-proxy.git
cd scry-proxy
cargo build --release
# Binary is at target/release/scry-proxy
./target/release/scry-proxy --help
Option 2: Docker
docker run -p 6432:6432 ghcr.io/scrydata/scry-proxy
With configuration via environment variables:
docker run -p 6432:6432 \
-e SCRY_BACKEND__HOST=your-db-host \
-e SCRY_BACKEND__PORT=5432 \
-e SCRY_BACKEND__DATABASE=mydb \
-e SCRY_BACKEND__USER=postgres \
-e SCRY_BACKEND__PASSWORD=secret \
-e SCRY_BACKEND__POOL_SIZE=50 \
ghcr.io/scrydata/scry-proxy
Or with a config file mounted in:
docker run -p 6432:6432 \
-v /path/to/scry.toml:/etc/scry-proxy/scry.toml:ro \
ghcr.io/scrydata/scry-proxy
Verify the Installation
scry-proxy --version
You should see output like:
scry-proxy 0.1.0
Minimal Configuration
Create a scry.toml file or use environment variables. At minimum, scry-proxy needs to know where your PostgreSQL database is:
# scry.toml
[proxy]
listen_address = "0.0.0.0:6432"
[backend]
host = "localhost"
port = 5432
database = "mydb"
user = "postgres"
password = "secret"
pool_size = 50
Then start the proxy:
scry-proxy
# or with explicit config path:
scry-proxy --config /path/to/scry.toml
Your application can now connect to localhost:6432 instead of directly to PostgreSQL. No application code changes required.
Migrating from PgBouncer
If you have an existing PgBouncer configuration, scry-proxy can import it directly:
scry-proxy --pgbouncer-config /etc/pgbouncer/pgbouncer.ini
See the full migration guide for details on compatibility and the recommended migration path.
Next Steps
- Quick Start — end-to-end walkthrough with query metrics
- Configuration Reference — all available settings
- Connection Pooling — hybrid mode, pool sizing
- Observability — query fingerprinting, Prometheus metrics