Managed Databases
Provision and manage PostgreSQL, MySQL, MariaDB, MongoDB, and Redis with automated backups.
Comparing HostStack PostgreSQL against Aiven, Neon, RDS, and others? Read our 2026 buyer's guide to managed PostgreSQL in Europe.
Supported Engines
PostgreSQL 18
Full-featured relational database. Default 18, also 17 / 16 / 15. Extensions, daily off-site backups, optional 3-node Patroni HA.
MySQL 8.4
Widely-deployed relational database with full-text search and JSON columns. Default 8.4, also 8.0; 5.7 legacy (EOL Oct 2023, gated for new provisions).
MariaDB 11.4
Drop-in MySQL replacement with extra storage engines. Default 11.4, also 10.11 LTS. Automated daily backups.
MongoDB 7
Document store with replica-set provisioning. Default 7, also 6. Automated daily backups.
Redis 8
In-memory data store for caching, queues, and real-time features. Default 8, also 7 / 6. AOF persistence enabled by default.
Creating a Database
- Go to Databases in your dashboard
- Click New Database
- Choose engine, version, size, and project
- Your database is provisioned in seconds
You can also create databases via the CLI or SDK:
hoststack db create --project prj_abc123 --name my-db --engine postgres --version 18High availability (Patroni HA Postgres)
HostStack ships a 3-node Patroni cluster for managed PostgreSQL on the Standard and Pro tiers — 1 leader plus 2 synchronous replicas, with an HAProxy in front of all three so the connection URL stays valid across an automatic failover. Worst-case failover detection ≈5 seconds.
HA Postgres is included at the same €15 (Standard) and €50 (Pro) base price — there is no HA add-on charge.
Enabling HA (currently a per-team opt-in beta)
- Ask HostStack support to flip the HA beta flag on your team (or, if you're an admin, toggle it under Admin → Teams → Feature flags).
- New Standard / Pro PostgreSQL databases are then provisioned as 3-node clusters automatically.
- Existing standalone databases can be migrated via the Upgrade to HA button on the database detail page. The migration runs
pg_dump→ bootstrap cluster →pg_restoreand takes a brief read-only window (a few minutes for databases up to 1 GB). The standalone container stays running (read-only) for 24 hours after cutover as a rollback target.
Observing the cluster
The database detail page gains a Cluster tab listing the live cluster members, retired members, and a failover history feed pulled from the activity log. Leader changes also fire an activity-log entry of the form database.failover.complete.
Limitations
- All three members run in a single Hetzner region. A full region outage would take the cluster offline — cross-region replication is on the roadmap.
- Online migration is capped at 1 GB
pg_database_size(the dump transfers through the agent in memory). Contact support if you need a larger move. - starter and micro tiers stay single-node — the 3× resource footprint doesn't fit the price.
Connecting
Connection details are available in the database detail page. Click Show Credentials to reveal the password. Credentials are encrypted in transit and at rest.
postgresql://user:password@host:5432/dbname
mysql://user:password@host:3306/dbname
mariadb://user:password@host:3306/dbname
mongodb://user:password@host:27017/dbname
redis://default:password@host:6379# Opens psql / mysql / mongosh / redis-cli with credentials pre-filled
hoststack db connect <database-id>Linked Databases
When you link a database to a service you give the link an alias, and HostStack injects alias-prefixed connection vars on every deploy: <ALIAS>_URL, <ALIAS>_HOST, <ALIAS>_PORT, <ALIAS>_DATABASE, <ALIAS>_USERNAME, <ALIAS>_PASSWORD. On top of that, the first linked database of each engine also gets the canonical name apps already expect:
DATABASE_URL— for PostgreSQL, MySQL, and MariaDB databasesREDIS_URL— for Redis databasesMONGO_URL— for MongoDB databases
These are set automatically on every deploy. No manual configuration needed.
You can also reference linked-database fields by alias in any environment variable using ${{databases.<alias>.<field>}} templates. Available fields: connectionString, host, port, username, password, database. Unknown placeholders are left intact so a typo surfaces in the deploy log instead of silently becoming an empty string.
Backups
Databases are automatically backed up daily at 02:00 UTC using engine-native dumps: pg_dump for Postgres, mysqldump for MySQL/MariaDB, mongodump for MongoDB, and a BGSAVE-driven RDB snapshot for Redis. Backups are retained for 7 days. You can restore any backup from the database detail page in your dashboard — select a snapshot in the Backups card and click Restore. The restore replaces the current database contents with the chosen snapshot. The database is briefly unavailable (typically <10 seconds) while the engine reloads the dump, and any writes between the snapshot and the restore are lost. The Activity feed records both the restore start and its completion / failure.
Scaling
You can upgrade your database plan at any time from the database settings. The upgrade is applied with minimal downtime (typically under 30 seconds). Downgrades require that your current storage usage fits within the target plan's limits.
Troubleshooting
Connection refused
Databases are only accessible from services within the same project. External connections are blocked by default. Check that your service and database are in the same project and region.
Too many connections
If you see "too many connections" errors, your application may be opening connections without closing them. Use a connection pool in your application code (e.g., pg-pool for Node.js, SQLAlchemy for Python) and size it conservatively.
Disk full
Your database has exceeded its plan's storage limit. Upgrade your plan or clean up unused data. Check for large tables with SELECT pg_size_pretty(pg_total_relation_size('table_name')).
Next: Billing & Plans