Goldenhost

Data

Create and connect a database

Add Postgres or MySQL from the dashboard, attach it to an app, and copy the connection details.

Create a database

  1. 1

    Open Databases

    Go to Databases and press New database, or use the button on the project page.
  2. 2

    Choose the engine and size

    Postgres or MySQL. Paid databases start at 256 MB; demo databases are capped at 64 MB.
  3. 3

    Attach it to an app

    Choose the app. The connection variables are added to that app automatically.
  4. 4

    Redeploy the app

    Redeploy so the container receives the new environment variables.

Connection details

On the Databases page, press Credentials to reveal the host, port, database name, username, password, and full connection string. Each value has a copy button.

Postgres variables added to the app
DATABASE_URL=postgres://goldenhost:<password>@your-db.internal:5432/your_db
MySQL variables added to the app
DATABASE_URL=mysql://goldenhost:<password>@your-db.internal:3306/your_db
DB_HOST=your-db.internal
DB_PORT=3306
DB_DATABASE=your_db
DB_USERNAME=goldenhost
DB_PASSWORD=<password>

The database hostname is internal. It is reachable from your app, not from the public internet, so do not expect to connect to it from a laptop.

Limits and backups

  • • Demo: 64 MB, 5 connections, no backups.
  • • Paid: from 256 MB up to 50 GB per database.
  • • Up to 10 databases per workspace.
  • • Paid databases receive a nightly backup with seven-day retention.
Attaching a database adds variables to the app, but it does not migrate your schema. Run your app's migration command as part of startup or a release step.
Deleting a database removes its data immediately. Demo databases have no restore. Download a copy before deleting anything important.

Using an external database

You can skip provisioning and set the connection variables yourself. Goldenhost will not back up or firewall an external database, and traffic to it counts as egress.