---
title: "Migrate from Fly.io to Miget"
description: "Move your Fly.io Machines, databases, and volumes to Miget with your existing Dockerfile."
---
Fly.io and Miget both run containerized apps, so most of your setup carries over. The biggest practical difference: on Miget your app must listen on port **5000**, and there is no `fly.toml` importer - you recreate your app configuration in the Miget dashboard. Your Dockerfile, databases, and volumes all have direct equivalents.
## What maps to Miget
| Fly.io | Miget |
| --- | --- |
| Machine / App | [App](/deployments/how-it-works) |
| Dockerfile | Dockerfile (Docker Engine builder) |
| `fly.toml` | App settings (recreate manually) |
| Fly Postgres | [Managed PostgreSQL](/databases/postgresql) |
| Fly Volume | [Volume](/persistent-storage/volumes) |
| Fly secrets | [Environment variables](/deployments/using-secrets) |
Miget builds your app from the **same Dockerfile** Fly uses, via its Docker Engine builder. If you'd rather skip the Dockerfile, Miget's buildpacks can auto-detect and build your app from source.
## Migration steps
Fly's `fly.toml` defines an `internal_port` for your service. Miget sets an immutable `PORT=5000` and only routes public traffic to port 5000, so update your app or Dockerfile to bind there.
Read the port value from the `PORT` environment variable rather than hardcoding it. See [Ports](/networking/ports) for details.
You have two paths:
- **Buildpacks / Dockerfile:** push your repo with `git push miget` and Miget builds it - using your existing Dockerfile if present, or auto-detecting via buildpacks. See [Git push to builder](/deployments/git-push-to-builder).
- **Image-based:** deploy a prebuilt container image from a registry or through the GitHub integration.
Provision a [managed PostgreSQL](/databases/postgresql) database on Miget. Miget injects the connection string as `DATABASE_URL`.
Migrate your data with `pg_dump` from Fly Postgres and `pg_restore` into the Miget database. If you use Redis, Miget exposes it via `REDIS_URL`.
```bash
# Dump from Fly Postgres (proxy the connection with `fly proxy` if needed)
pg_dump "$FLY_DATABASE_URL" -Fc -f dump.pgdump
# Restore into Miget (DATABASE_URL is injected by the addon)
pg_restore --no-owner --dbname="$MIGET_DATABASE_URL" dump.pgdump
```
Fly secrets become Miget [environment variables](/deployments/using-secrets). Copy each secret over in the dashboard. `DATABASE_URL` and `REDIS_URL` are injected automatically by their managed services, so you don't need to set them by hand.
If your app relies on persistent files, recreate your Fly volumes as Miget [volumes](/persistent-storage/volumes).
Add your custom domain and let Miget issue TLS certificates automatically. See [Custom domains](/networking/custom-domains/overview). Update your DNS to cut traffic over once you've verified the deployment.
Your app **must** listen on port **5000** on Miget. `PORT` is fixed at `5000` and cannot be changed, and only port 5000 receives public traffic. Whatever `internal_port` you used in `fly.toml` will not carry over - update your app or Dockerfile before deploying.
There is no `fly.toml` import. Treat your `fly.toml` as a reference and recreate its settings - regions, scaling, health checks, env - through the Miget dashboard.
## Next steps
Understand Miget's build and deploy model.
Deploy straight from your Git repo.
Provision a database with an injected `DATABASE_URL`.
Add persistent storage for your app.
Bring your domain with automatic TLS.
See how Miget shares compute across your apps.
A side-by-side look at pricing and the deployment model.