Skip to content

Add a managed Postgres database

Goal: Give an app a dedicated managed PostgreSQL instance with DATABASE_URL injection.

Prerequisites:

  • A project.
  • An app in that project (optional — you can also create the DB first and attach later).
  1. In the project detail page, click New database.
  2. Choose a tier (see Managed Postgres reference for sizes).
  3. Give the database a name.
  4. Click Create. Provisioning takes about a minute.
  5. Once the database is Ready, open the app that should use it.
  6. Scroll to the Database card and select the database from the Attach database… dropdown. See Attach a database to an app for the full flow.
  7. Click Attach. Uploy injects the connection URI as the DATABASE_URL environment variable and restarts the app.

Note: Databases are not attached to apps automatically. Each app must be attached explicitly via the Database card on the app detail page.

  • The Database card on the app page shows the attached database name.
  • The app’s Environment tab shows DATABASE_URL marked injected.
  • Application logs show a successful connection to the database.

Automated nightly backups are enabled by default. See Managed Postgres reference for retention.