PostgreSQL
Runsite Platform provides fully managed PostgreSQL — provisioned in seconds, with automatic backups, point-in-time recovery and both private and public connection URLs.
Supported versions
Section titled “Supported versions”PostgreSQL 14, 15, 16 (default) and 17.
You can pick the major version at creation time. Minor version updates are applied automatically during scheduled maintenance windows.
Creating a database
Section titled “Creating a database”POST /api/databasesContent-Type: application/json
{ "name": "production-db", "postgres_version": "16", "storage_gb": 10}The response includes the credentials and both connection URLs — copy the secret immediately, it is shown only once.
Connection URLs
Section titled “Connection URLs”Every database exposes two connection URLs:
| URL | When to use it |
|---|---|
| Internal | From other Runsite services in the same project. Traffic stays on the private network — no public exposure, lower latency. |
| External | From anywhere on the internet. Encrypted with TLS. Use this for local development, third-party tools or services that run outside Runsite. |
Both URLs are standard PostgreSQL connection strings:
postgres://user:password@host:5432/dbnameYou can find them on the database detail page, in the Connect tab.
From a Runsite Web Service
Section titled “From a Runsite Web Service”Inside another Runsite service in the same project, reference the internal URL:
DATABASE_URL=postgres://user:password@db-internal.runsite.local:5432/dbnameSet it as an environment variable in your web service settings, and your app reads it normally.
From your laptop
Section titled “From your laptop”Use the external URL with the psql CLI:
psql "postgres://user:password@db.runsite.app:5432/dbname"Lifecycle
Section titled “Lifecycle”| Operation | Endpoint |
|---|---|
| Start | POST /api/databases/{id}/start |
| Stop | POST /api/databases/{id}/stop |
| Status | GET /api/databases/{id}/status |
| Update | PATCH /api/databases/{id} |
| Delete | DELETE /api/databases/{id} |
Stopping a database releases its compute. Storage and data are preserved and available the moment you start it again.
Storage
Section titled “Storage”Configure storage size at creation time. You can resize up at any moment without downtime; resize down requires a brief restart.
| Field | Description |
|---|---|
storage_gb | Storage size in GB. |
storage_autoscale | Optional. Automatically grows storage when usage approaches the limit. |
Metrics & logs
Section titled “Metrics & logs”| Endpoint | Description |
|---|---|
GET /api/databases/{id}/metrics | Current CPU, memory and storage usage. |
GET /api/databases/{id}/metrics/history?period=3600 | Historical metrics. |
GET /api/databases/{id}/logs?tail=100 | Recent server logs. |
WS /api/databases/{id}/logs/stream | Live log stream. |
Backups
Section titled “Backups”Every database is backed up automatically on a daily schedule, with point-in-time recovery within the retention window. You can also trigger an on-demand backup at any time.
See Backups for the full reference.
Versions and upgrades
Section titled “Versions and upgrades”Choose your major version at creation time. To upgrade later, create a new database on the desired version, restore from a backup or migrate using pg_dump/pg_restore, and switch your application’s DATABASE_URL.
Connection pooling
For high-concurrency workloads, a connection pooler is bundled with every database. Use the pooled connection URL (also shown in the Connect tab) to avoid running into PostgreSQL’s per-connection limits.