Databases & storage

How to provision PostgreSQL on Rock8Cloud

Provision a PostgreSQL inside your project and connect it to your app in one click - credentials generated, variables accessible, app redeployed.

Updated June 4, 2026
How to provision PostgreSQL on Rock8Cloud

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#

Pick the engine and provision it in one click
  1. 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.
  2. Link it. Open your app’s Env vars tab and add the connection variables under the names your framework expects.
  3. Save. Your app automatically redeploys - connected. Secrets never touch your repo.
Link environment variables in one click

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 optionMaps to
Hostauto-generated hostname
Port5432
Database nameyour database name
Usernameauto-generated, kept secret
Passwordauto-generated, kept secret
Connection URLpostgres://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.

Frequently asked questions

Do I manage database credentials myself?
No. Credentials are auto-generated at provisioning, encrypted at rest, and accessible to your app as environment variables when you link the service.
Which PostgreSQL versions are available?
Versions 14 through 17, with 1–100 GB storage and an optional high-availability replica.
How does my app connect?
Link the ready-made URL variable as DATABASE_URL (or map HOST, PORT, NAME, USER, PASSWORD individually). Your app redeploys and the values become accessible.

More guides

Ship today

Your database, one click away.Ship today.

PostgreSQL provisioned and connected to your app in one click. No DevOps, no surprise bills.

60 days free. No credit card required to start.