Databases
Create a managed Postgres, MySQL, MariaDB, MongoDB or Redis on one of your servers and connect an app to it.
A managed database on one of your servers: PostgreSQL, MySQL, MariaDB, MongoDB or Redis. Deplo creates it and gives it logs, metrics, backups and a console. They live under Storage -> Databases. For ClickHouse, use the ClickHouse template.
Create a database
Pick the engine
Storage -> Databases -> New Database. Type a Name, then pick the Engine and the Version.

Set the password
Leave the credentials blank to get generated ones, or click Generate. The username and the database name never change afterwards.
Pick the server and the environment
Environment is where the apps that use it live. Pick No environment if they are not in a project.
Optional: host port
Turn on Expose publicly only if something outside the server needs it. It needs Publish ports, and can wait.
Click Create database.
Connect an app to it
On the database's Overview, click Connected apps -> Connect app, or on the app, Environment -> Add -> Database. The app gets a variable with the connection string, kept up to date on every deploy:
DATABASE_URL = postgres://app:••••••@db-orders:5432/ordersIt is DATABASE_URL for PostgreSQL, MySQL and MariaDB, MONGODB_URI for MongoDB and REDIS_URL
for Redis. Environment -> Add -> Database -> New database creates one next to the app and
connects it in one go.
The overview
The Connection card holds the connection string (click to reveal) and two addresses:
- Internal: for apps in the same environment, on the same server.
- Public:
203.0.113.10:25432, once Expose publicly is on. The password is its only protection.
Logs, Monitoring and Backups work as for an app. Console opens the engine's own
shell, like psql or redis-cli.
Actions, and which ones delete data
| Action | What it does | Data |
|---|---|---|
| Start / Stop / Restart | Container lifecycle | kept |
| Redeploy | Recreates the container with the same data | kept |
| Rebuild | Settings -> Advanced -> Danger Zone. Starts over with an empty database, same credentials | erased |
| Delete | Removes the database, its data and every backup it has stored | erased |
Rebuild is a factory reset
The connection string keeps working, so everything looks fine and the data is gone.
Settings
| Page | What is there |
|---|---|
| General | Logo, display name, and the Server card |
| Connection | Expose publicly with the Host port, and Rotate password |
| Resources | CPU and memory limits |
| Advanced | Version, custom image, config files like postgresql.conf, cron jobs, Danger Zone |
To move a database to another server or team, see Move.
Good to know
- An app reaches a database by name only in the same environment, on the same server. Anywhere else, turn on Expose publicly.
- Pull request previews do not get the variable. Give them a preview override.
- A major version upgrade needs a dump and a restore. PostgreSQL refuses to start a new major version on older data.
Something wrong? See Data, storage and backups.
Did this page help you?