Databases
Managed PostgreSQL and Redis-compatible key–value storage, created next to your services and connected through environment variables.
What you can create#
| Field | Description |
|---|---|
| PostgreSQL | Relational database for application data: users, orders, content. Supports schemas, indexes, extensions and SQL migrations. |
| Key–value (Redis-compatible) | In-memory storage for caching, sessions, rate limiting and lightweight queues. |
| Self-hosted in a container | Any other engine (MySQL, MongoDB, ClickHouse) can run as a private service with a persistent disk attached. |
Creating a database#
- 1Open the control panelGo to console.muerte.cloud → Create service → Database.
- 2Pick the engine and versionChoose PostgreSQL or a key–value store and the version your app expects.
- 3Choose resources and storage sizevCPU, RAM and disk size can be raised later; storage is where your data lives, so leave headroom.
- 4Copy the connection stringAfter creation the panel shows the internal and external connection strings, plus host, port, user and database name.
Connecting a service#
Put the connection string in an environment variable rather than in code. Use the internal connection string when the service and the database live in the same project — traffic stays inside the private network and is faster.
DATABASE_URL=postgres://user:password@internal-host:5432/appdb
REDIS_URL=redis://internal-host:6379import { Pool } from "pg";
export const pool = new Pool({
connectionString: process.env.DATABASE_URL,
max: 10,
});Migrations#
Run migrations in the pre-deploy command so they execute once per release, before the new version starts serving traffic. See how deploys work.
# pre-deploy command
npm run migrate:deployExternal access
The external connection string lets you connect from a local client (psql, DBeaver, TablePlus) for debugging and one-off queries. Prefer the internal address for anything running in production.
Backups and recovery#
Databases are covered by the same backup system as volumes: scheduled or manual copies with configurable retention, restored from any stored copy. Set a schedule before you have real users — see backups.