Docs/Candor Deploy
Databases
Install PostgreSQL, MariaDB, MongoDB or Valkey from the Apps catalog, connect it to your app, and keep your own copies of the data.
Databases are installed from the Apps catalog. Each one runs as its own project, in its own container, on one of your servers.
What is in the catalog
| Catalog entry | What you get |
|---|---|
| PostgreSQL + pgAdmin | A PostgreSQL server and the pgAdmin web interface |
| MariaDB + Adminer | A MariaDB server (MySQL-compatible) and the Adminer web interface |
| MongoDB | A MongoDB server and Mongo Express |
| Valkey (Redis) | A Valkey server, which speaks the Redis protocol |
The catalog has other entries too. These four are the ones these docs cover.
There is no plan limit on how many databases you install. Each one uses memory, CPU and disk on the server it runs on, alongside your apps. See Where your apps run.
Install one
- Press New Project and stay on the Apps tab.
- Choose the database and follow the install screen.
- When the install finishes, the database is a project in your list.
Connect it to your app
- Open the database project. Its connection card shows the connection details.
- Press Use in a project and choose your app.
- Pick the variable to inject, for example
DATABASE_URLfor PostgreSQL,REDIS_URLfor Valkey orMONGODB_URIfor MongoDB. - Choose how the app reaches it:
- Internal (recommended): over a private network shared by the two projects. The database has no public port.
- Public: through a published host and port. Use this only if something outside Candor Deploy must connect.
- The variable is set on your app. It takes effect the next time the app deploys. If the app is already deployed, the dashboard tries to redeploy it straight away.
In your code, read the variable:
const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL });
Size and limits
Your plan does not set a memory or CPU limit for a database. It shares the server’s memory, CPU and disk with the other projects on that server. If a database needs more than the server has left, grow the server (managed servers), move other projects to another server, or add a server.
The data is stored in a named volume on the server the database runs on.
Keeping your own copies
Nothing is copied off the server for you. There is no automatic export of your databases or volumes. A rollback restores your app’s code and settings; it does not restore data.
Keep copies of anything you cannot afford to lose. Two ways:
- Export it yourself. Use the database’s usual tool on a schedule that suits you:
pg_dumpfor PostgreSQL,mysqldumpfor MariaDB,mongodumpfor MongoDB. pgAdmin and Adminer can export from the browser. - Use the dashboard’s Backup tab. A project’s Backup tab can send database dumps and volumes to a destination you provide: S3-compatible storage or an SFTP server. You add and verify the destination first, then create a policy and choose a schedule. Nothing runs until you have set that up, and the destination is yours to pay for and look after.
Whichever you choose, test a restore before you need one.
Deleting a database
Deleting a database project can delete its data with it. The dashboard shows what will be removed before you confirm. Export first.
Something here wrong, unclear or missing? Tell us. Docs get fixed like bugs.
Not a customer yet? Start a free trial, or see plans and limits.