Skip to content

Database

Add to embra.toml:

[deploy]
database = true

On the first build with this line, Embra sets up a dedicated Postgres for the environment, then deploys the app. Turning it on from the start or after the first deploy both work.

Item Detail
Version PostgreSQL 18
Connection string Env var DATABASE_URL. Don’t set it yourself
Network Only the app in the same environment can connect; not exposed to the internet
App permissions Only read/write data (SELECT, INSERT, UPDATE, DELETE), no creating or altering tables. The schema only changes through migrations
Size, RAM Follow your plan
Extensions Not supported yet (CREATE EXTENSION)

Every environment with Postgres is backed up automatically; nothing to turn on.

Item Detail
Continuous WAL records every change, pushed to backup at least every minute
Full backup Every 7 days, the 2 latest kept. After each one, Embra test-restores it
Location On the server, on a separate disk from the database, plus a copy on Cloudfly object storage in Hanoi (synced about every minute)
Restore To a point in time, previewed first, then approved by an Owner or Admin. Not to a moment before a migration that has already run

Restore and export details: Rollback and restoring backups.