Databases
Provisioning a Postgres or MySQL database, or a data service like Redis or MongoDB, for your project, connecting to it, and how it's billed.
Raklane can provision a database for you — Postgres or MySQL — as a managed add-on. A database belongs to a Project, not to any single App, so every App in that project can connect to it. It isn't tied to any app's build/deploy cycle: it keeps running independently of your deploys.
Creating a database
From your Project's Databases page, choose:
- Engine —
postgresormysql. - Version — an engine version/image tag (e.g.
16for Postgres,8.0for MySQL). Leave it unset to get a recent stable default. - Name — the database name created inside the instance.
- Connection pooling (Postgres only) — front the instance with a PgBouncer sidecar in transaction pooling mode. Recommended if your app opens many short-lived connections.
Creating a database returns immediately with status pending; the instance itself is created in the background, usually within a few seconds. Watch the Databases page for status to move to ready (or failed, with a reason — Raklane retries automatically, so a transient failure isn't the end of the story).
Connecting to it
Once ready, the Databases page shows a host, port, username, and database name. The password is shown only once, at creation time — copy it somewhere safe immediately, the same way a managed cloud database's master password works everywhere else. If you lose it, you'll need to recreate the database rather than retrieve it.
By default (network_scope: local), a database is reachable only by apps belonging to the same owner on the same network the instance runs on — this is the right choice for an app connecting to its own project's database. Set network_scope: external at creation time if you need to reach it from outside that network (e.g. a local development machine) — this additionally exposes an external host/port. That external host may be an address on Raklane's own domain (starting with db-), in which case Raklane relays connections to the database for you, or the server's own address.
Store the connection string as an environment variable on any App that needs it (Raklane doesn't inject it automatically).
Where it runs, and how it's billed
- On a Bring Your Own Compute server — no hosting charge, sized directly by the CPU/memory/storage you request at creation time. It counts toward your BYOC management fee, if one applies. Its data lives on your server's disk and isn't backed up by Raklane yet (built-in backups are coming soon) — see Running Apps & Databases on BYOC.
- On Raklane's managed infrastructure (coming soon with Raklane Cloud) — billed as dedicated hosting: pick a plan from the database dedicated-hosting catalog and a billing cycle (hourly or monthly), and Raklane charges your wallet immediately. The database's resources come from the plan you chose, not from a value you set yourself.
If a monthly/hourly subscription lapses without being renewed, the database is automatically suspended (data untouched) — renew it and start it again to bring it back.
Redis, MongoDB and other data services
Besides Postgres and MySQL, choose Other service to run a data service from its image: Redis, Valkey, MongoDB, Elasticsearch, RabbitMQ, MinIO, Meilisearch or Memcached ready-made, or any image with data to keep. Raklane:
- keeps its data on a volume
- checks it's healthy and restarts it when it isn't
- backs it up on the same schedule as a database: Redis and MongoDB are flushed first, any other image is paused for the few seconds the copy takes
- on a Version change, backs it up, starts the new version, and rolls back to the old one if the new one isn't healthy
Any app in the project reaches it by its name, like redis:6379. A Docker Compose file's Redis or MongoDB becomes one of these automatically.
Stopping and starting
Stop a database to shut it down gracefully while keeping its data on disk — useful if you don't need it running around the clock. Start brings it back; Raklane re-verifies it's actually healthy before marking it ready again rather than assuming the resume worked.
Deleting
Deleting a database records the intent and tears it down shortly after. By default, its underlying storage is kept on disk (so a fresh database can be provisioned against the same data) — choose "purge" if you want it destroyed permanently along with the containers. There's no way to purge after the fact, so choose carefully.
See also
- Docker Compose — deploy a Compose file's databases and apps together.
- Billing & Wallet — how wallet credit, dedicated hosting, and pay-as-you-go pricing work.
- Bring Your Own Compute — run a database on your own server, with no hosting charge.
- Environment Variables — where to put the connection string for your apps.