Skip to content

Databases & storage

Provision a managed database and S3-compatible object storage for any project — credentials are minted per project and wired into the environment before the first build runs.

Postgres + storage — live MySQL / MongoDB / Redis, backups, PITR, branching — phase 2

What works today

  • Live: One-click managed PostgreSQL with per-project credentials, auto-wired as DATABASE_URL. S3-compatible object storage buckets.
  • Phase 2 (pending): MySQL, MongoDB, and Redis engines; automated backups; point-in-time restore (PITR); and database branching.

PostgreSQL

Create a database and Cantila provisions a dedicated Postgres database with a per-project user, then injects the connection string as DATABASE_URL into the project secrets — marked cantila-managed and ready before your first build.

# Create a managed Postgres database for a project
curl -X POST https://api.cantila.app/v1/databases \
  -H "Authorization: Bearer $CANTILA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "projectId": "proj_123", "engine": "postgres" }'
# List databases
curl https://api.cantila.app/v1/databases \
  -H "Authorization: Bearer $CANTILA_API_KEY"

Your app reads it straight from the environment:

const db = new Pool({ connectionString: process.env.DATABASE_URL });

MySQL, MongoDB, and Redis are accepted as an engine value on the roadmap but are Phase 2. Today, postgres is the only live engine.

Object storage

Each project can provision S3-compatible buckets. Buckets are isolated to the project and expose standard S3 endpoints, so any S3 SDK works unchanged.

# Create a bucket
curl -X POST https://api.cantila.app/v1/storage/buckets \
  -H "Authorization: Bearer $CANTILA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "projectId": "proj_123", "name": "uploads" }'
# List buckets
curl https://api.cantila.app/v1/storage/buckets \
  -H "Authorization: Bearer $CANTILA_API_KEY"

The endpoint, bucket name, and access key land in the project env as STORAGE_ENDPOINT, STORAGE_BUCKET, and STORAGE_KEY.

API reference

MethodPathStatusNotes
GET/v1/databasesLiveList databases
POST/v1/databasesLiveProvision (Postgres live)
GET/v1/storage/bucketsLiveList buckets
POST/v1/storage/bucketsLiveCreate a bucket

Sleep & teardown

Hobby project databases sleep with the project (connections close, data retained); storage buckets stay live. Deleting a project drops its database and empties + drops its buckets. See Platform services for the full lifecycle.