Rock8Cloud
Databases & Storage

PostgreSQL

Add a PostgreSQL relational database to your project

PostgreSQL is a powerful, open-source relational database. Rock8Cloud supports versions 14 through 17.

Every service also ships with pgvector installed, so you can store and search embeddings in the same database. See Vector Search.

Create a PostgreSQL Service

  1. Click Add Service in your project
  2. Select Database
  3. Choose PostgreSQL
  4. Select a version (14, 15, 16, or 17) and storage size
  5. Enter a name (e.g., postgres-main, postgres-api)
  6. Click Create

Rock8Cloud provisions the database with secure credentials and networking handled automatically.


Environment Variables

After creation, Rock8Cloud exposes these variables for your application to connect:

VariableDescriptionExample
HOSTDatabase hostname(auto-generated)
PORTDatabase port5432
NAMEDatabase namepostgres-main
USERUsernameapp
PASSWORDPassword(auto-generated)
URLFull connection URLpostgresql://app:pass@host:5432/dbname

Linking to Your Application

  1. Go to your application service → DeploymentsEnv Vars
  2. Add the database variables using the names expected by your framework

Common framework patterns:

# Node.js / Prisma / Drizzle
DATABASE_URL=<URL>

# Django
DATABASE_HOST=<HOST>
DATABASE_PORT=<PORT>
DATABASE_NAME=<NAME>
DATABASE_USER=<USER>
DATABASE_PASSWORD=<PASSWORD>

# Rails
DATABASE_URL=<URL>

After saving, your application automatically redeploys with the new configuration.


Logs and History

A database service has two tabs of its own:

  • Logs - live runtime logs streamed from the database pods. Click Start Logs to stream, scroll up to load older lines, and use copy or export to pull them out
  • History - every deployment of this database with its status, version, storage size, and replica count. The current one is highlighted at the top

Use History to see when a version or storage change actually landed.


Features

  • Versions 14-17 - choose the version that matches your requirements
  • Vector search built in - pgvector is preinstalled for embeddings, semantic search, and agent memory
  • Persistent storage - data survives restarts and redeployments
  • Network-isolated - only accessible from services within the same project
  • Secure credentials - auto-generated usernames and passwords
  • Production-grade - managed with automated failover and monitoring

Troubleshooting

Connection refused

  • Verify the HOST variable is correct - use the auto-generated hostname provided by Rock8Cloud
  • Ensure your application service is in the same project as the database
  • Check that the database deployment completed successfully

Authentication failed

  • Double-check USER and PASSWORD variables match what was provisioned
  • If using URL, ensure it's the complete connection string with all components

Database not found

  • Verify the NAME variable matches the provisioned database name
  • The database name is typically the same as the service name you chose during creation

On this page