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
- Click Add Service in your project
- Select Database
- Choose PostgreSQL
- Select a version (14, 15, 16, or 17) and storage size
- Enter a name (e.g.,
postgres-main,postgres-api) - 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:
| Variable | Description | Example |
|---|---|---|
HOST | Database hostname | (auto-generated) |
PORT | Database port | 5432 |
NAME | Database name | postgres-main |
USER | Username | app |
PASSWORD | Password | (auto-generated) |
URL | Full connection URL | postgresql://app:pass@host:5432/dbname |
Linking to Your Application
- Go to your application service → Deployments → Env Vars
- 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
HOSTvariable 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
USERandPASSWORDvariables match what was provisioned - If using
URL, ensure it's the complete connection string with all components
Database not found
- Verify the
NAMEvariable matches the provisioned database name - The database name is typically the same as the service name you chose during creation
Related
- Vector Search - store and query embeddings with pgvector
- Dragonfly - Redis-compatible in-memory datastore
- S3 Object Storage - S3-compatible object storage
- Environment Variables - Configure secrets and settings