Provision a PostgreSQL inside your Rock8Cloud project and connect it to your app in one click - credentials are generated for you, accessible as environment variables, and your app redeploys connected. No external vendor, no separate bill.
Provision and connect in one click#
- Add a service. In your project, click Add Service → Database → PostgreSQL, pick a version (14–17), storage (1–100 GB), and optionally a high-availability replica.
- Link it. Open your app’s Env vars tab and add the connection variables under the names your framework expects.
- Save. Your app automatically redeploys - connected. Secrets never touch your repo.
Connect from your app#
When you link the database, you name the variable yourself. Most frameworks expect DATABASE_URL, so link the Connection URL under that name:
# You choose the name when linking - e.g.
DATABASE_URL # → postgres://USER:PASSWORD@HOST:PORT/NAME?sslmode=require
Linking a connection URL also adds its building blocks automatically - DB_HOST, DB_PORT, DB_NAME, DB_USER, and DB_PASSWORD appear alongside it, ready to use individually.
When you link, you pick what the variable maps to - PostgreSQL offers:
| Link option | Maps to |
|---|---|
| Host | auto-generated hostname |
| Port | 5432 |
| Database name | your database name |
| Username | auto-generated, kept secret |
| Password | auto-generated, kept secret |
| Connection URL | postgres://USER:PASSWORD@HOST:PORT/NAME?sslmode=require |
| Connection URL (libpq-compatible) | the same URL with &uselibpqcompat=true appended |
Standards-only clients (Prisma, Spring, Rails, sqlx…) take Connection URL. Pick the libpq-compatible variant when your client understands uselibpqcompat (e.g. Bun’s built-in SQL). The database is network-isolated to your project: reachable by your services, never exposed publicly.
Full reference and troubleshooting in the PostgreSQL docs.
Also provision: Dragonfly (Redis) · S3 object storage.