stage-pg
Run one small PostgreSQL database for staging, give it private access, and make backups you can restore.
stage-pg is a command-line tool for a PostgreSQL database on a machine you control.
It gives you:
- one PostgreSQL database for staging;
- a stable port for that database;
- Cloudflare Workers access through Hyperdrive and Workers VPC;
- administrator access through Tailscale;
- local backups, optional S3-compatible uploads, and safe restore into a new database.
It is intentionally small. It is not a production database platform.
How it fits together
Both private access paths use the same local PostgreSQL port:
Cloudflare and Tailscale resources are created outside stage-pg. The tool manages the PostgreSQL process and, when configured, the local cloudflared process.
Start here
Important limits
stage-pg does not provide high availability, replication, point-in-time recovery, host backup, or automatic machine setup. A logical dump is useful, but it is not the same as a full database backup.
For a production database, use a service or architecture designed for production availability and recovery.