AW3 - Multi-Cloud Hosting Platform
    Migrate · Railway → Fly.io

    Migrate from Railway to Fly.io
    service by service.

    Both run containers and bill per second, so the move is mostly packaging and data: a Dockerfile Fly can deploy, your variables, your Postgres and any volume data.

    Facts checked against each provider's own pages

    The short answer

    Make sure each service builds from a Dockerfile or image, run fly launch to generate fly.toml[1], load variables with fly secrets import[2], restore Postgres into Fly Managed Postgres from a pg_dump[3], copy volume data across, then add the domain with fly certs add[4] and shift traffic.

    Mapping

    What maps to what

    On RailwayOn Fly.ioNotes
    Railway service (repo, Dockerfile or image)Fly app + Machinesfly launch uses an existing Dockerfile, generates one, or deploys a prebuilt image with --image[1].
    railway.json / railway.tomlfly.tomlRailway's file is deprecated (cutoff 1 Dec 2026)[5]; Fly's is fly.toml[6].
    Service variablesfly secretsfly secrets set restarts Machines (use --stage to defer); bulk import via stdin with fly secrets import[2].
    Railway PostgresFly Managed PostgresFrom $38/month with HA and backups[7].
    Railway volumeFly Volume ([mounts] in fly.toml)One volume per Machine, per region, not replicated automatically[8].
    Serverless (app sleeping)autostop / autostartmin_machines_running = 0; fly launch writes these settings by default[9].
    PR environmentsReview apps via GitHub ActionsFly's official blueprint deploys per-PR review apps[10].
    Steps

    The migration, step by step

    1. 01

      Collect your variables before you need them

      Railway's sealed variables aren't returned by railway variables or railway run[11], so gather those values from wherever they originated (your secret manager or the issuing service) before the move.

    2. 02

      Package each service

      If a service builds with Railway's builder, add a Dockerfile, or push an image to a registry. Then run fly launch in the repo; it uses the Dockerfile or generates one, and writes fly.toml[1].

    3. 03

      Load secrets

      Pipe a KEY=value file into fly secrets import, or set them one by one with fly secrets set[2].

    4. 04

      Move Postgres

      To reach Railway Postgres from outside, enable Public Access, which creates a TCP proxy and a DATABASE_PUBLIC_URL; egress through it is billed[12]. Run pg_dump --no-owner --no-acl, then load the file with fly mpg connect <CLUSTER_ID> -f dump.sql[3].

    5. 05

      Move volume data

      Download volume files with railway volume files download[13], create a Fly Volume per Machine with a [mounts] section in fly.toml, and copy the data in.

    6. 06

      Add the domain

      Run fly certs add for your hostname and create the A/AAAA or CNAME records Fly shows; validation can use AAAA, an _acme-challenge CNAME or a _fly-ownership TXT record[4].

    Gotchas

    Things the docs warn about

    • Fly Managed Postgres runs inside Fly's private network and isn't reachable over the public internet; the import uses fly mpg connect[3].
    • Dumps made with pg_dump 17 or newer need the SET transaction_timeout line removed before importing into Postgres 16[3].
    • Fly volumes are local to one Machine and region and aren't replicated automatically[8]; run two Machines with two volumes if you need redundancy, and design replication yourself.
    • Fly has no free allowance for egress on new organizations[14], but its $0.02/GB rate in North America and Europe is below Railway's $0.05/GB[15].
    • Egress through Railway's TCP proxy is billed[12], so a large pg_dump has a cost on the way out.
    Where AW3 Host fits

    Run both during cutover, then switch

    AW3 Host connects both your Railway and Fly.io accounts, so the old and new deployments run side by side from one dashboard and API instead of a big-bang switch.

    Weighted routing sends a small share of traffic to Fly.io first (for example 5%, then 25%, 50% and 100%) while Railway serves the rest. Health checks every 60 seconds watch both; if the Fly.io side fails, failover moves traffic back automatically, and rollback to the previous release is one step. Daily cost sync shows what each provider costs during the overlap, and budget policies alert you if the double-running period gets expensive. Secrets for both are stored encrypted per environment.

    When Fly.io has carried all traffic cleanly for long enough that you no longer need the fallback, point DNS at it for good and decommission Railway.

    Reference

    Railway vs Fly.io at a glance

    Railway vs Fly.io at a glance
    RailwayFly.io
    CategoryApp platform (PaaS)App platform (PaaS)
    Pricing modelPlan fee that counts toward usage, plus per-resource usage (RAM, CPU, egress, volumes)[15]Pay for resources used, no monthly platform fee[14]
    Compute billing granularityPer second: $0.00000386 per GB-second of memory, $0.00000772 per vCPU-second[16]Machines billed per second while running; stopped Machines pay $0.15/GB/mo for root filesystem only[14]
    Internet egress (first paid tier)$0.05/GB, all regions and plans[15]$0.02/GB North America and Europe; $0.04/GB Asia Pacific, Oceania, South America; $0.12/GB Africa and India[14]
    Regions / locations4 regions: US West, US East, EU West, Southeast Asia (counted from list)[17]17 regions (counted from list)[19]
    Deploy modelGitHub repo, Dockerfile, Docker image, or railway up from the CLI[18]fly launch (uses or generates a Dockerfile, or --image) then fly deploy; Machines API[1]
    Persistent volumesYes: volumes at $0.15/GB/mo; Hobby up to 5 GB, Pro up to 1 TB[13]Yes: Fly Volumes (local NVMe) $0.15/GB/mo, one per Machine, not replicated automatically[8]
    Config filerailway.json / railway.toml are deprecated (stop being read 2026-12-01); replacement is .railway/railway.ts[5]fly.toml[6]
    FAQ

    Frequently asked questions

    How do I move environment variables from Railway to Fly.io?
    Export them to a KEY=value file and pipe it into fly secrets import. Railway's sealed variables can't be read back through the CLI, so source those values from wherever they were created.
    How do I migrate a Railway Postgres database to Fly.io?
    Enable Public Access on the Railway database to get an external connection string, run pg_dump --no-owner --no-acl, then import the dump into Fly Managed Postgres with fly mpg connect <CLUSTER_ID> -f dump.sql.
    Does Fly.io have an equivalent of Railway's app sleeping?
    Yes. Fly Proxy's autostop and autostart stop idle Machines and start them on the next request; set min_machines_running = 0. fly launch writes these settings by default.
    Sources

    Sources

    1. Fly.io Docs: Create an app with fly launch. https://docs.fly.io/launch/create (checked 2026-11-16)
    2. Fly.io Docs: Secrets. https://docs.fly.io/apps/secrets (checked 2026-11-16)
    3. Fly.io Docs: Import into Managed Postgres. https://docs.fly.io/postgres/import (checked 2026-11-16)
    4. Fly.io Docs: Custom domains. https://docs.fly.io/networking/custom-domain (checked 2026-11-16)
    5. Railway Docs: Config as code. https://docs.railway.com/config-as-code (checked 2026-11-16)
    6. Fly.io Docs: App configuration (fly.toml). https://docs.fly.io/reference/configuration (checked 2026-11-16)
    7. Fly.io Docs: Managed Postgres. https://docs.fly.io/postgres (checked 2026-11-16)
    8. Fly.io Docs: Volumes overview. https://docs.fly.io/volumes/overview (checked 2026-11-16)
    9. Fly.io Docs: Autostop/autostart. https://docs.fly.io/launch/autostop-autostart (checked 2026-11-16)
    10. Fly.io Docs: Review apps blueprint. https://docs.fly.io/blueprints/review-apps-guide (checked 2026-11-16)
    11. Railway Docs: Variables. https://docs.railway.com/variables (checked 2026-11-16)
    12. Railway Docs: PostgreSQL. https://docs.railway.com/databases/postgresql (checked 2026-11-16)
    13. Railway Docs: Volumes. https://docs.railway.com/volumes (checked 2026-11-16)
    14. Fly.io Docs: Pricing. https://fly.io/docs/about/pricing/ (checked 2026-11-16)
    15. Railway Docs: Plans. https://docs.railway.com/reference/pricing/plans (checked 2026-11-16)
    16. Railway: Pricing. https://railway.com/pricing (checked 2026-11-16)
    17. Railway Docs: Regions. https://docs.railway.com/deployments/regions (checked 2026-11-16)
    18. Railway Docs: Migrate from Render. https://docs.railway.com/platform/migrate-from-render (checked 2026-11-16)
    19. Fly.io Docs: Regions. https://fly.io/docs/reference/regions/ (checked 2026-11-16)
    Public beta

    Your next deploy
    goes everywhere.

    Connect a provider, point a service at it, and ship. Add the second provider when you're ready.

    No card needed · Free tier · Pay as you go after that