Server GTM Hosting has moved to its own platform.

Visit TagLinc(opens in a new tab)
Applications

Add a Database to Your App

Create MySQL, MariaDB, PostgreSQL, MongoDB or Redis next to a Custom app, import a dump and download a backup.

4 min readUpdated Oct 30, 2026FlyNode docs
Browse documentation

Need a hand?

Can't find your answer? Our team replies fast.

Contact support

You can also create a database on its own, without an app, and connect to it from your computer: see Create a Database on Its Own and Connect From Your Computer.

An app deployed from Git can have its own databases. FlyNode creates them next to the app, sets the connection variables for you, and keeps them private: by default they have no public address, and only your own apps on FlyNode can reach them. If you need to connect from your own computer you can turn on remote access, with a list of allowed addresses.

What you can add

  • MySQL and MariaDB, for Laravel and similar apps.
  • PostgreSQL, for Next.js with Prisma or Drizzle, Django and Rails.
  • MongoDB, for the MERN stack.
  • Redis, for cache, sessions and queues.

An app can use one SQL database (MySQL, MariaDB or PostgreSQL), plus MongoDB and Redis. Databases do not count toward your Workspace's app limit; they share its memory, CPU and storage. A database needs a Workspace with at least 1 GB of memory (512 MB for Redis).

Add one when you deploy

In the Custom app form, the Database section has a preset for common stacks (Laravel, Next.js, MERN, Django or Rails) and a checkbox for each database. Pick what your app uses and press Deploy. The databases are created first and their variables are set before the app starts, so the first build already has them.

The Custom app form with the Database section: presets for common stacks and a checkbox for each database

Add one to a running app

Open the app, go to the Database tab and press the database you want. FlyNode creates it, sets the variables on your app and redeploys it.

The Add a database card on the Database tab, with MySQL and Redis already added

The variables FlyNode sets

  • MySQL, MariaDB, PostgreSQL: DATABASE_URL, DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME and DB_PASSWORD.
  • MongoDB: MONGODB_URI and MONGO_URL.
  • Redis: REDIS_URL, REDIS_HOST, REDIS_PORT and REDIS_PASSWORD.

Each database card on the Database tab also shows the host, port, user, password and database name. The host name only works from your own apps on FlyNode.

With Claude or the command line

  1. New app: add --db postgresql (or another type) to flynode deploy.
  2. App already running: tell Claude Add a PostgreSQL database to my-app.
  3. FlyNode sets the variables for you. The password is never shown in the chat.

Import a dump

On the database card, press Choose a file under Import a dump. The limit is 500 MB. The file is loaded in the background and the result appears under the button.

  • MySQL and MariaDB: a .sql or .sql.gz file from mysqldump.
  • PostgreSQL: a .sql, .sql.gz or custom-format .dump file from pg_dump. It loads as one transaction, so a file that fails leaves the database as it was.
  • MongoDB: a .archive or .archive.gz file from mongodump --archive.
  • Redis: a .rdb or .rdb.gz file (the dump.rdb of your old Redis, or one made with redis-cli --rdb). It replaces everything in the Redis, and the database is read-only for a short while during the copy.

Tick Replace everything in the database first to make the database match the file exactly. Without it the file is added to what is already there and may clash with existing tables.

Download a backup

Press Download to get a gzipped dump of the database, made at that moment. Keep it, or load it somewhere else with the database's own tools.

Backups

FlyNode backs up every database of your app each night, together with the app's files, and keeps the backups for up to 7 days. They are saved encrypted in Cloudflare R2 storage, away from your server. Open the app's Backup tab to see them, restore the database from one (choose Database only), or download the database of any backup as a compressed file.

Delete a database

Press Delete database on its card and confirm. The database and all its data are removed for good, and the app stops counting it. The variables stay on your app until you change or remove them.

Good to know

  • A database is created with a fixed memory allowance (512 MB, or 256 MB for Redis). It shares your Workspace's RAM and CPU like your apps do.
  • If your data is bigger than 500 MB, or you want to keep a managed service, deploy with No database and set the connection variables yourself.

Next steps

Still stuck?

Open a support ticket from your dashboard and include the container name.

Contact support