Databases
A database is an app of its own, managed by apps, on the node of its project environment.
| Engine |
Versions |
| PostgreSQL |
18, 17, 16 |
| MariaDB |
11.8, 11.4, 10.11 |
| Valkey |
8, 7.2 |
| Redis |
7.4, 7.2 |
| MongoDB |
8.0, 7.0 |
The engine and its major version are fixed when the database is created; a deploy pulls the newest patch
of that version.
Create one
In the apps panel, open a project environment → Add database, or with the API
(POST /api/v1/databases). User and database are both app; the password is generated and sealed.
Connect an app
apps writes the connection string into the environment's env set:
- always as
<NAME>_URL (for a database called main, MAIN_URL);
- as
DATABASE_URL, REDIS_URL or MONGODB_URL too, when the set doesn't have that variable yet.
Apps of the same environment pick it up on their next deploy. The host in the URL is the database's id,
reachable only inside the team's network on that node. Deleting the database removes these variables.
Apps of one environment run on one node so that they reach each other and their databases over that
node's private network. A database stays on the node that holds its volume.
Dumps and restores
Team admins can download a dump from the database's page (pg_dump -Fc, mariadb-dump, an RDB file, a
mongodump archive) and restore one in place. A restore replaces the data: stop writers first and keep a
fresh dump.
Backups
The backups service takes every running database in plans that include all sources, or the ones you pick
(app:<id>): the node streams the dump into restic, so no copy lands on the control plane's disk. Restores
from the backups panel go back the same way. See Backups and restores.
Valkey and Redis persistence
Valkey and Redis write an RDB snapshot every minute when there were changes. Use them for caches, queues
and sessions; keep data you can't lose in PostgreSQL.
Public access
Databases have no public port by default. Adopted projects that published database ports keep them as
TCP access with an allow list. Prefer reaching a database from your laptop through an app, a dump, or an
SSH tunnel to the node.
Limits
A database counts against apps.apps and apps.memory like any app.