All docs

Databases

Managed Postgres, MySQL, Redis and SQLite, wired into your app with one command.

marina db create store --engine postgres
marina db attach store

attach restarts the app with the connection URL already set, so your code reads it from the environment and there is nothing to copy anywhere.

The engines

EngineStorageNotes
postgres--storage-gbCan be reached from outside your apps.
mysql--storage-gbCan be reached from outside your apps.
redis--storage-gbReachable from your apps only.
sqlite--storage-mbFree to 200 MB, then billed per 100 MB. Can grow on its own.

SQLite is the cheapest way to start: the first 200 MB is free and permanent, and it has its own page.

marina db create notes --engine sqlite --autoscale --autoscale-max-mb 2000

With --autoscale it grows as it fills, up to the ceiling you set, and you are billed for what it actually uses.

Connecting from outside

By default a database is reachable only by your own apps: no public port, nothing exposed. When you need psql from a laptop or a migration from your machine, ask for it:

marina db create store --engine postgres --external
marina db url store

db url prints the connection details and needs db:credentials, which is a scope of its own. A token that can deploy your app does not get to read your database password by default, because those are different powers and one of them is much harder to undo.

TLS is available and optional. The connection string you are given is plain and simply works; add sslmode=require if you want the connection encrypted, or sslmode=verify-full&sslrootcert=system to verify it too, since the certificate is publicly trusted.

Growing

Resizing a database is a dashboard action for now: the CLI can create, connect and attach one, but not change its storage. Storage goes up rather than down, and the difference is settled immediately rather than at the end of the month.

A SQLite database created with --autoscale is the exception, and grows on its own.

Suspension keeps your data

If the wallet runs dry, apps and databases stop. Stopping is not deleting: your data is still there, and a top-up brings the database back with it. Deletion comes much later and is its own step, never a side effect of being late. What things cost has the timings.