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
- 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 yourfly.toml. - 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 theinternal_portof your[http_service]. When[processes]gives the group a command, enter it as the Entrypoint, after your Dockerfile'sENTRYPOINTscript if it has one, as in/rails/bin/docker-entrypoint ./bin/rails server. - 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 outPORTand the database URL, because Tenkai sets them. - Stop the writes. Stop the process groups and scheduled Machines that write to the database, with
fly scale count 0for a group. - Copy Postgres. Open a tunnel to your database with
fly mpg proxy, then runpg_dump -Fc --no-owner "postgres://user:password@localhost:16380/fly-db" > app.dumpwith 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. - Bind the database. Bind the PostgreSQL to the web application, so it receives
DATABASE_URL. - 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. Therelease_commandbecomes 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 insh -c '…'. Bind the database to each of them. - 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 addgave 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.
- Fly.io, App configuration (fly.toml)
- Fly.io, Secrets and fly ssh console
- Fly.io, Managed Postgres
- Fly.io, Volumes and Task scheduling
- Fly.io, Custom domains
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.