--- title: "Migrate from Railway to Miget" description: "Move your Railway services, databases, and variables to Miget's fixed-price plan with unlimited deployments." --- Railway bills usage-based, charging per-second for every service you run. Miget works differently: you buy a fixed-price [Resource plan](/overview/resource-plans) and deploy unlimited services into it. The [Fair Scheduler](/overview/fair-scheduler) shares CPU across everything you run, so adding another service never changes your bill. If you have been watching your Railway usage meter climb, this guide walks you through moving your project over. ## What maps to Miget | Railway | Miget | | --- | --- | | Service | App | | Plugin / Database | Managed addon (PostgreSQL, Valkey) | | Variables | Environment variables | | Usage-based billing | Fixed-price plan | Your Railway apps read the injected `$PORT` variable. Miget sets an immutable `PORT=5000` and routes public traffic there, so apps that already bind to `$PORT` need no code change. ## Migration steps For each Railway service, create an app in a single Miget Resource. Railway auto-detects your build with Nixpacks; Miget's [buildpacks](/deployments/git-push-to-builder) similarly auto-detect the language from marker files (like `package.json`, `requirements.txt`, or `go.mod`). If you already have a `Dockerfile`, bring it and Miget will use it instead. Deploy with a `git push miget`, or connect the GitHub integration to build automatically on every push. See [Git push to builder](/deployments/git-push-to-builder) for details. Provision a managed [PostgreSQL](/databases/postgresql) addon to replace Railway Postgres - Miget injects `DATABASE_URL` automatically. Migrate your data with `pg_dump` from Railway and `pg_restore` into Miget. For Railway Redis, add a [Valkey](/databases/valkey) addon, which injects `REDIS_URL`. ```bash # Dump from Railway (use your Railway database's connection string) pg_dump "$RAILWAY_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 ``` Copy your Railway variables over as Miget [environment variables](/deployments/using-secrets). Database connection strings are injected for you, so you only need to move your own app config. Add your custom domain and Miget provisions TLS automatically. Update your DNS records as described in [Custom domains](/networking/custom-domains/overview). Running a multi-service Railway project? On Railway each service adds to your usage bill. On Miget you deploy every service as an app in one Resource for a single fixed price - or define the whole project in a `compose.yaml` and deploy it as a [Compose Stack](/deployments/docker-compose-stacks). Either way, the Fair Scheduler shares CPU across all of them and your price stays the same. ## Next steps See how a fixed-price plan hosts unlimited services. Understand how CPU is shared across your apps. Deploy a whole multi-service project from one file. Compare plans and find the right fit. What happens to a usage-based bill when your app never sleeps.