Managed databases
Provision PostgreSQL, connect from your app, rotate credentials, and manage access.
Provision
From a project → Databases, create a PostgreSQL instance. The control plane enqueues work; the provisioner creates cluster resources and credentials. Only the provisioner holds admin Postgres credentials.
Connect from your app
Prefer the internal URL from web/worker/cron services so traffic stays on the private network (db-<id>.internal.bytstack-style hosts).
Typical flow:
- Create the database.
- Copy the internal connection string into service env as
DATABASE_URL(or your ORM's name). - Redeploy so pods pick up the new env.
External access
Optional external endpoints use TLS (for example *.postgres.bytstack.app) and an IP allowlist. Use them for local psql, migrations from CI, or break-glass access — not for app-to-db traffic in production.
bytstack db connection <databaseId>
bytstack db psql <databaseId>Rotate, backups, allowlist
From the database detail page you can:
- Rotate credentials (then update env and redeploy consumers)
- Manage backups / restore
- Edit the external IP allowlist
Previews
PR previews may attach isolated or branched databases so preview apps do not share production data. See Preview deployments.