Managed Postgres
aloof pg plans aloof pg create shop-db --plan pg-basic aloof pg attach shop-db api # injects DATABASE_URL into api and redeploys it aloof pg backup shop-db ; aloof pg backups shop-db ; aloof pg restore shop-db pgb_… aloof pg url shop-db # prints the connection URL (audited)
Postgres 16 runs next to your apps in the EU and is reachable only over a private network that its attached apps join (hostname pg-<name>). It's never exposed on the public edge. Data lives on a volume.
Backups: a pg_dump runs daily; the last 7 are kept on the edge host's disk, with on-demand backups and restore whenever you need them. Backup storage costs $0.22 per GB-month. These local copies are logical backups, not point-in-time recovery.
Off-site: once a day each database is also encrypted on our side (AES-256-GCM) and uploaded to S3-compatible object storage in a different location. Retention is 7 daily, 4 weekly and 3 monthly copies, and the newest copy is test-restored into a scratch Postgres every week. List and restore with aloof pg offsite shop-db and aloof pg offsite-restore shop-db <id>, or from Dashboard → Postgres.
| Plan | CPU / RAM | Disk | Price |
|---|---|---|---|
pg-dev | 1 shared vCPU / 0.25 GB | 1 GB | $2.99/mo |
pg-basic | 1 shared vCPU / 1 GB | 10 GB | $9.99/mo |
pg-standard | 2 shared vCPU / 2 GB | 40 GB | $28.99/mo |
pg-perf | 1 dedicated vCPU / 2 GB | 100 GB | $60.99/mo |
Not yet: high availability/replicas, point-in-time recovery, extensions beyond the official image, or attaching to apps on remote nodes.
Connecting from your laptop
Databases are never on the public internet. Open a tunnel with the CLI, then connect to localhost:
aloof pg url shop-db # user, password and database name (audited) aloof proxy 5432 -a pg-shop-db # forwards localhost:5432 to the database; leave it running psql "postgres://aloof:<password>@localhost:5432/<database>"
The tunnel runs over your API key, and each session is written to the audit log. If port 5432 is taken locally, use aloof proxy 15432:5432 -a pg-shop-db and connect to port 15432.
Connections and limits
Each database runs the stock Postgres 16 configuration, so max_connections is Postgres's default of 100, shared by every app and tunnel connected to it. On the smaller plans memory runs out well before that, so use a connection pool in your app (most frameworks have one) and keep it to a few connections per instance. Storage is the plan's disk size, listed above.
Changing plan or disk size
Support will resize it for you. Send a request through the Support page with the database name, the plan you want (see the table above) and a time window that suits you. The move involves a short write pause while the data is copied to the new size, and the new plan is billed from the switch.
Or do it yourself: resizing in place isn't self-serve yet, and backups restore only into the database they came from, so copy the data over a tunnel. Create the new database (aloof pg create shop-db2 --plan pg-standard), run pg_dump against the old one through aloof proxy, pg_restore into the new one the same way, then attach the new database to your app (which updates DATABASE_URL and redeploys it). Destroy the old one when you're happy.