Database Provisioning
Create cloud PostgreSQL databases.
Quick Start
# Create a project first
postbase cloud projects create myapp
# Provision a database
postbase cloud provision production -p myapp
# Get connection string
postbase cloud url production -p myappProvisioning Options
Basic Provisioning
postbase cloud provision production -p myappUses default configuration:
- Region:
us-west1 - CPU: 1 vCPU
- Memory: 1024 MB
- Storage: 10 GB
Custom Configuration
postbase cloud provision production -p myapp \
--region us-west1 \
--cpu 2 \
--memory 4096 \
--storage 50Configuration Options
Regions
| Region | Location | Latency |
|---|---|---|
us-west1 | Oregon, USA | Best for US West |
us-east1 | Virginia, USA | Best for US East |
eu-west1 | Ireland | Best for Europe |
ap-southeast1 | Singapore | Best for Asia |
CPU
| Option | Description | Use Case |
|---|---|---|
1 | 1 vCPU | Development, low traffic |
2 | 2 vCPU | Production, moderate traffic |
4 | 4 vCPU | High traffic |
8 | 8 vCPU | Enterprise |
Memory
| Option | Description |
|---|---|
1024 | 1 GB RAM |
2048 | 2 GB RAM |
4096 | 4 GB RAM |
8192 | 8 GB RAM |
Storage
| Option | Description |
|---|---|
10 | 10 GB |
25 | 25 GB |
50 | 50 GB |
100 | 100 GB |
250 | 250 GB |
Provisioning Process
1. Create Railway project [10s]
2. Deploy PostgreSQL [30s]
3. Configure networking [10s]
4. Generate credentials [5s]
5. Initialize database [15s]
───────
~70s totalProvisioning Status
Check Status
postbase cloud databases info production -p myappOutput:
Database: production
Status: provisioning (45%)
Region: us-west1
Created: 2026-01-25 14:30:00
Configuration:
CPU: 2 vCPU
Memory: 4096 MB
Storage: 50 GB
Estimated completion: ~30 secondsWait for Ready
postbase cloud provision production -p myapp --waitBlocks until database is ready.
Connection Details
Get Connection String
postbase cloud url production -p myappOutput:
postgresql://postgres:YfF6Yfeqaf66IHSGLzhPcIAQ5Bs3Ayxa@xxx.proxy.rlwy.net:12345/railway?sslmode=disableCopy to Clipboard
postbase cloud url production -p myapp --copyDetailed Connection Info
postbase cloud url production -p myapp --verboseConnection Details
Host: containers-xxx.railway.app
Port: 12345
Database: railway
User: postgres
Password: YfF6Yfeqaf66IHSGLzhPcIAQ5Bs3Ayxa
Connection String:
postgresql://postgres:YfF6Yfeqaf66IHSGLzhPcIAQ5Bs3Ayxa@containers-xxx.railway.app:12345/railway?sslmode=disable
psql Command:
psql "postgresql://postgres:YfF6Yfeqaf66IHSGLzhPcIAQ5Bs3Ayxa@containers-xxx.railway.app:12345/railway?sslmode=disable"PostgreSQL Image
Cloud databases use the custom Postbase PostgreSQL image:
ghcr.io/zeroexcore/postbase:postgres-15-pitrBased on supabase/postgres:15.14.1.072 with:
- PostgreSQL 15
- WAL streaming support
- 50+ extensions
Included Extensions
| Extension | Purpose |
|---|---|
pg_cron | Job scheduling |
pgvector | Vector embeddings |
PostGIS | Geospatial data |
uuid-ossp | UUID generation |
pgcrypto | Encryption |
pg_stat_statements | Query analysis |
Environment-Based Provisioning
Development
postbase cloud provision development -p myapp \
--cpu 1 --memory 1024 --storage 10Staging
postbase cloud provision staging -p myapp \
--cpu 1 --memory 2048 --storage 25Production
postbase cloud provision production -p myapp \
--cpu 2 --memory 4096 --storage 50Destroying Databases
# With confirmation
postbase cloud destroy production -p myapp
# Force destroy
postbase cloud destroy production -p myapp --forceScaling (Coming Soon)
Scale existing databases:
postbase cloud scale production -p myapp \
--cpu 4 --memory 8192 --storage 100API
Provision Database
POST /projects/:project_id/databases
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "production",
"region": "us-west1",
"config": {
"cpu": 2,
"memory": 4096,
"storage": 50
}
}Get Database
GET /projects/:project_id/databases/:name
Authorization: Bearer <token>Delete Database
DELETE /projects/:project_id/databases/:name
Authorization: Bearer <token>