Overview
Managed Postgres with APIs your app can call directly.
Each database project is its own Postgres database. Use it with any Postgres client, or call its APIs from your app without writing a backend.
Create one
clouzark db create my-app-db # creates the database and links this directory to it
clouzark db ls
clouzark db link # link an existing database insteadConnect
clouzark db url # direct postgres:// connection string (port 5432)
clouzark db url --pooled # through the connection pooler (port 6543)
clouzark db keys # REST URL, anon key, and service keyUse a connection string from server code, ORMs, and migration tools:
| Connection | Port | Use it for |
|---|---|---|
| Pooled | 6543 | Your app, especially serverless and edge functions, which open a connection per request |
| Direct | 5432 | Migrations, pg_dump, LISTEN/NOTIFY, and long-lived sessions |
The pooler shares connections per transaction, so thousands of app connections use a handful of real ones. Session state doesn't carry between transactions: LISTEN, session-level SET, and advisory locks held across transactions need the direct connection. Both are in Settings → Connection.
Use the keys with the REST API, Auth, Storage, and Realtime.
| Key | Where it's safe | Row-level security |
|---|---|---|
| Anon key | Browsers and mobile apps | Applies |
| Service key | Server-side only | Bypassed |
Never ship the service key or the connection string to a browser.
Run SQL
clouzark db query "select count(*) from orders"
clouzark db query -f report.sql --json
cat seed.sql | clouzark db querydb query runs as the database owner, so it bypasses row-level security. The dashboard also has an SQL editor, a table editor, and CSV import and export.
Backups
Every database is backed up nightly, and backups are kept for 7 days. A backup is the whole database: every schema, its data, and its grants and policies.
clouzark db backups ls # newest first
clouzark db backups create # back up now
clouzark db backups download <id> # a pg_dump archive; restore locally with pg_restore
clouzark db backups restore <id> # replace the database with a backupThe same is in the dashboard under Database → Backups. A restore replaces every table and row, including tables created after the backup was taken. A safety backup is taken first, so restoring that one undoes the restore. If anything goes wrong mid-restore, nothing is changed.
To take your own copy with your local pg_dump:
clouzark db dump -f schema.sql # schema only
clouzark db dump --full -f backup.sql # schema and data
clouzark db dump --data-only -f data.sqlPausing
On the Free plan, a database with no API requests, dashboard use, or connections for 7 days is paused. The team's owners get an email 3 days before, and again when it happens. A paused database keeps all its data. It resumes on its own with its next API request (REST, GraphQL, Auth, Storage, or Realtime), or from Settings → Resume database. Direct Postgres connections are refused while it's paused, so resume it first if you only connect directly. Scheduled cron jobs don't count as activity. Pro databases are never paused.
Size
On the Free plan each database includes 500 MB. The dashboard shows the current size under Usage, and the team's owners get an email when a database reaches 80% of that and again if it goes over. Nothing is blocked for being over; delete data you don't need (VACUUM FULL returns the space) or upgrade to Pro.