Managed databases on blitz.cloud - PostgreSQL, MariaDB, Redis
Create managed PostgreSQL 17, MariaDB 11.4 or Redis (Valkey 8) databases on blitz.cloud, connected to your app automatically and backed up every night.
blitz.cloud offers managed PostgreSQL 17, MariaDB 11.4 and Redis, served by Valkey 8. A database is created for you when an app needs one, or from the Databases page, and its connection details are injected into the app as environment variables. Databases are only reachable from your own apps and are backed up every night.
Engines
| Engine | Version | Port | Connection string |
|---|---|---|---|
| PostgreSQL | 17 | 5432 | postgresql://user:password@host:5432/name |
| MariaDB | 11.4 | 3306 | mysql://user:password@host:3306/name |
| Redis (Valkey) | 8 | 6379 | redis://:password@host:6379/0 |
Redis is served by Valkey, the open-source fork. It speaks the same protocol, so Redis clients and redis:// URLs work unchanged.
MongoDB is not offered. Its licence, the SSPL, is written to stop exactly the kind of hosted offering blitz.cloud would be. An app that needs MongoDB says so before you install it.
Not sure which one to pick? PostgreSQL is the right answer for almost everything.
Creating a database
There are four ways a database gets created:
- You install an App Store app that needs one. Nextcloud gets MariaDB, for example.
- You deploy a Docker image and blitz.cloud detects that it needs one, or you turn on "Needs a database" under Advanced settings in the wizard.
- On an app's page, "Give it a database" opens the same form with that app already chosen.
- You create one on the Databases page by choosing an engine and a name, then connect it to an app.
A new database is usually ready in under a minute. It only reports ready once the database server really answers. The card shows the engine, how much data it holds and which app uses it. The connection details are separate rows, each with a Copy button: connection string, host, port, database name, user and password. The password and the connection string stay hidden until you click Show.
How the app gets the connection details
When an app's variable names are known, blitz.cloud fills them in. Nextcloud gets MYSQL_HOST, MYSQL_DATABASE, MYSQL_USER and MYSQL_PASSWORD, for example. The wizard lists these before it applies anything.
Connecting a database to an app always leaves the app with a DATABASE_URL holding the full connection string, and the page says which settings it filled in. Many tools read that name by convention, among them Rails, Prisma schemas and Django with dj-database-url.
The host in the connection string is a short internal name. It resolves inside your account and nowhere else.
One database per app
Each database belongs to one app, and each app has at most one database. Two apps sharing a database would overwrite each other's tables; two WordPress sites on one database destroy each other's posts. The database is named after the app and renamed along with it.
Caches that come with store apps
Some App Store apps bring a small cache next to their database: Paperless-ngx and Docmost do. It is Valkey, like the Redis above, but it belongs to the app. It sleeps and wakes with the app, is deleted with it, keeps nothing and has no backup. It doesn't count as one of your plan's databases, but its 48 MB of memory does count. The store lists the cache before you install.
Sleeping with your apps
A database that holds data sleeps once every app linked to it is asleep or paused, and starts again before the app does on the next wake. The database's page says "Sleeping" while this is happening. A database with no app linked to it keeps running. After a full day asleep, your account's disk is put away too, so the first wake after that can take a minute or two longer, the same as for an app that keeps its own files. Nothing changes while a database sleeps, and nobody but your own apps could reach it anyway.
Network access
Databases have no public address and no open port on the internet. Only apps in your own account can connect to them. That also means you can't connect from your laptop with psql or a GUI client today.
Deleting
A database that an app uses can't be deleted on its own. It goes when the app goes. When you delete the app, after typing its name, you are asked what to do with the database: keep it for another app, or delete it together with every nightly copy. There is no default answer.
Backups
Every running database is copied off our servers every night: 7 nights are kept on the free plan, 30 on Pro. Restoring a PostgreSQL or MariaDB database to a night is one button, and the restore can be undone: before anything is replaced, we copy the database as it is right now, and Undo puts that copy back. Details in backups.
A sleeping database isn't copied every night, since its data can't change while it sleeps. Its last copy was taken just before it went to sleep.
"Download my data" in Settings doesn't include what is inside your databases. To take the data itself with you, use Download a copy.
Bring your data
Moving from another host? You can upload a PostgreSQL or MariaDB dump into an empty database.
- PostgreSQL: make a dump with
pg_dump -Fc --no-owner -d "<old connection string>" -f app.dump(pg_dump 17 or older). MySQL or MariaDB: make a dump withmysqldump --single-transaction --routines --triggers <database> > app.sql(ormariadb-dump), and gzip it if you like. - On Databases, open Upload a dump on the database.
- Drop the file onto the panel, or choose it from your computer.
The file goes from your browser straight to our storage, and the panel shows how far it got. Keep the page open until it says the import has started. Once the upload is done, we check that the database has no tables and import the file in one go. If anything fails, nothing is kept. Owners, grants and subscriptions in the dump are left out, and we delete the file once the import is done. For MySQL or MariaDB, USE and CREATE DATABASE lines and DEFINER clauses are left out too, so the data lands in this database; MariaDB can't import in one transaction, so if the import stops on an error we remove the tables it made.
Files that work: the pg_dump custom format (.dump), tar, plain .sql and .sql.gz for PostgreSQL; a mysqldump or mariadb-dump .sql or .sql.gz for MariaDB. Limits: PostgreSQL and MariaDB, an empty database only, and a file up to the database's storage (1 GB today), never more than 2 GB.
Download a copy
Open Download a copy on a database and press Make a copy. It takes a few minutes. When it's ready, the download starts by itself, and the panel keeps a Download button for 24 hours. After that we delete the copy, and you can make a new one. You can make 10 copies of a database a day.
What you get depends on the database:
- PostgreSQL: a
.dumpfile in pg_dump's custom format. Put it back withpg_restore --no-owner -d "<connection string>" app.dump, or upload it into an empty database here. - MariaDB: a
.sql.gzfile. Load it withgunzip -c app.sql.gz | mariadb -h <host> -u <user> -p <database>. - Redis: a
.rdbfile, which Redis and Valkey read when they start.
Limits
The free plan includes one database, Pro five. Each database reserves 1 GB of storage (Redis: 0.5 GB) and some memory from your pool: 128 MB for PostgreSQL, 192 MB for MariaDB, 64 MB for Redis. See limits.
Database versions are fixed at the versions above. There are no automatic major-version upgrades.
Read next
Backups and restore on blitz.cloud
blitz.cloud copies every database off-site every night, and on Pro the files your apps keep too. How long copies are kept, how restore works, and what is not backed up.
App Store - one-click open-source apps on blitz.cloud
The blitz.cloud App Store has 119 open-source apps. What they need in memory, space and databases, and how installing works.
Addresses, subdomains and HTTPS on blitz.cloud
How your blitz.cloud address and app subdomains work, the naming and rename rules, automatic HTTPS, your own DNS records, and connecting a domain you own.
Room for a second database.
The free plan has one database. Pro has 5, each backed up every night and kept 30 nights, for 7 EUR a month for your whole account.