Migrate from Fly.io to your own servers

Move a Fly.io app to Tenkai with its process groups, release command, secrets and Postgres database, step by step.

Last verified on 2 November 2026 against Fly.io's documentation. Report a mistake.

Your Fly.io app keeps its Dockerfile, its process groups and its Postgres data. It now runs on a cluster of servers you own. Your fly.toml maps almost line by line to Tenkai. Your team pays one price, whatever the number of apps.

What each part becomes

On Fly.io On Tenkai
Process group behind [http_service] Web application
Other process groups Workers
internal_port Runtime port
[deploy] release_command Pre-deploy commands
Secrets Sensitive variables
[env] Variables
[mounts] Kept directory
Scheduled Machines or supercronic Scheduled jobs
Managed Postgres or Fly Postgres PostgreSQL
fly certs add Custom domains

Before you start

You need a cluster with a project on it, as projects and clusters explains. Your CI builds your app's image, so the cluster needs no Git builds. Keep your fly.toml open, because most of what follows reads from it.

Move your app

  1. Build the image in your CI. Your Dockerfile builds in your CI as it is. Add the workflow that publishes an image to GHCR on each push, and give it the [build.args] of your fly.toml.
  2. Create the web application. Add a web application, choose Container image and enter your image, such as ghcr.io/acme/app:main. Set its runtime port to the internal_port of your [http_service]. When [processes] gives the group a command, enter it as the Entrypoint, after your Dockerfile's ENTRYPOINT script if it has one, as in /rails/bin/docker-entrypoint ./bin/rails server.
  3. Copy the variables. Run fly ssh console -C "printenv" to read your secrets from a running Machine. Wrap each value in single quotes, then paste the secrets and the [env] section in the project's Variables with Edit as .env…. Mark the secrets Sensitive. Leave out PORT and the database URL, because Tenkai sets them.
  4. Stop the writes. Stop the process groups and scheduled Machines that write to the database, with fly scale count 0 for a group.
  5. Copy Postgres. Open a tunnel to your database with fly mpg proxy, then run pg_dump -Fc --no-owner "postgres://user:password@localhost:16380/fly-db" > app.dump with the direct connection string of the database's Connection tab. Upload the file to your storage bucket, add a PostgreSQL and choose From dump under Initial data.
  6. Bind the database. Bind the PostgreSQL to the web application, so it receives DATABASE_URL.
  7. Add the workers, the release command and the scheduled tasks. Each other group of [processes], except the one that runs supercronic, becomes a worker from the same image, with its command as the entrypoint. The release_command becomes a pre-deploy command. Each scheduled Machine or supercronic line becomes a scheduled job with a cron expression in UTC, and a crontab command goes in sh -c '…'. Bind the database to each of them.
  8. Deploy and point your domain. Deploy the web application, then the workers and scheduled jobs, and check the default address. Add each deploy hook to your workflow, as deploy from GitHub Actions explains. Then add your domain and replace the records that fly certs add gave you with the one Tenkai shows.

A group with a volume

That group becomes a web application that keeps a directory at the same destination. Deploy it once, then bring the files over. Put an archive of them at an HTTPS address and download it into the directory from the application's terminal.

Sources

We read these pages on 2 November 2026.

Something wrong in this guide?

Fly.io and Tenkai both change, so a step can go out of date. If a command fails or a step does not match what you see, tell us at [email protected]. Once you have an account, you can also choose “Report a bug” in your user menu, as the account guide explains. We fix the guide and reply to you.

Bring your apps home

Enroll a server you already rent and deploy your first application. Free for one server, no credit card.

Start for free