---
title: "Fly.io vs Railway: Which One to Host Your App Backend On"
author: "Nate Laquis"
author_role: "Founder & CEO"
date: "2026-11-30"
category: "Technology"
tags:
  - fly.io vs railway
  - backend hosting
  - Railway pricing
  - Fly.io managed Postgres
  - startup infrastructure
excerpt: "Railway is the better home for most small SaaS backends that serve one region, now that its Postgres has failover and point-in-time recovery. Fly.io wins when users are spread across continents or you want machines that stop and start with traffic."
reading_time: "13 min read"
canonical_url: "https://kanopylabs.com/blog/fly-io-vs-railway-which-one-to-host-your-app-backend-on"
---

# Fly.io vs Railway: Which One to Host Your App Backend On

## The short answer

For most founders hosting a SaaS backend (an API, a Postgres database and a background worker, with customers in one country), pick Railway. It is faster to set up, bills for what your services use, and its Postgres now has failover and point-in-time recovery. Pick Fly.io if your users sit on several continents and need low latency, if you want machines that stop when idle and wake on the next request, or if your team is happy working from a CLI and a config file.

The gap between them moved this year. Railway shipped a proper managed Postgres in November and now runs its regions on its own hardware. Fly retired its GPUs, changed CEOs and told the world its main focus is now Sprites, its sandboxes for AI agents. Prices below come from each vendor's own pages as of November 2026.

![Rows of black and white server cabinets under blue network cables in a data center](https://images.unsplash.com/photo-1564457461758-8ff96e439e83?w=800&q=80)

## How deploying feels on each

Railway starts in the browser. You connect a GitHub repo, Railway detects the language and builds it with Railpack, its default builder, or with your own Dockerfile. Add Postgres with one click and it appears on the project canvas next to your API. Every service in the project can see the database over a private network, and variables like the connection string are shared by reference. A push to main redeploys. A pull request can get its own copy of the environment.

The canvas is the part people remember. When your backend grows to an API, a worker, a cron job, Redis and Postgres, a new engineer sees all five and the lines between them in a minute.

Fly starts in the terminal. You run **fly launch** in your repo, it writes a fly.toml file and a Dockerfile if you lack one, and **fly deploy** builds an image and starts Machines, which are small Firecracker virtual machines. Deploys from GitHub go through a GitHub Action you add yourself. You can SSH into a running Machine, which is handy at 2 AM when a process is stuck.

Fly gives you more knobs. You choose the exact CPU type and memory for each process group, which regions it runs in, and whether idle Machines stop or suspend. Railway hides most of that and lets each service grow into its plan limits on its own. If you like infrastructure you can see and script, Fly feels right. If you want to ship the product and look at the hosting twice a month, Railway does.

Our [Railway vs Render comparison](/blog/railway-vs-render-startup-backend-hosting) covers Railway's dashboard and preview environments in more depth.

## What each one costs in November 2026

The billing model matters more than any single rate. Fly charges for the size of each Machine for every second it runs. A 1 GB Machine costs the same whether it sits at 2 percent CPU or 90. Stop it and you pay only for its disk. Railway charges for the CPU and memory your service uses, measured per second, on top of a small monthly plan fee that counts as usage credit.

### Fly.io list prices

From Fly's pricing page, for Ashburn and Secaucus, its cheapest regions:

- **Shared CPU Machines:** $2.19 a month for 256 MB, $3.69 for 512 MB, $6.70 for 1 GB, $13.39 for 2 shared CPUs and 2 GB.

- **Performance Machines:** $33 a month for 1 dedicated CPU and 2 GB, $66 for 2 CPUs and 4 GB. Extra RAM is $6 per GB.

- **Other regions cost more.** The same 1 GB Machine is $7.73 in Frankfurt and $8.50 in Singapore.

- **Volumes:** $0.15 per GB a month, charged on the size you provision, running or not.

- **Outbound bandwidth:** $0.02 per GB in North America and Europe, $0.04 in Asia Pacific and South America, $0.12 in Africa and India.

- **Support:** community forum free, Standard email support $29 a month, Premium $199.

Pay Fly a year upfront for regional compute and you get 30 percent off.

### Railway list prices

From Railway's pricing page:

- **Plans:** Free with $1 of usage a month (services sleep after a few idle minutes), Hobby at $5 a month including $5 of usage, Pro at $20 a month per workspace including $20 of usage, with unlimited seats.

- **Usage:** about $20 per vCPU a month and $10 per GB of RAM a month, prorated to the second.

- **Volumes:** about $0.15 per GB a month. Hobby caps a volume at 5 GB, Pro at 1 TB.

- **Egress:** $0.05 per GB. Object storage is $0.015 per GB a month with free egress.

Railway does not list a paid support tier below Enterprise, which adds SLAs, SSO and dedicated support at a custom price.

![Paper bills and a calculator next to an open laptop on a desk](https://images.unsplash.com/photo-1753955900083-b62ee8d97805?w=800&q=80)

### A worked example

Take a typical small SaaS backend: a Node or Python API with two copies for safety, one background worker for emails and webhooks, a Postgres database with 10 GB of data, and 50 GB of outbound traffic a month. US East region, list prices as of November 2026.

**Fly.io:**

- Two shared CPU, 1 GB Machines for the API: $13.40

- One shared CPU, 512 MB Machine for the worker: $3.69

- Managed Postgres Basic (2 shared CPUs, 1 GB, failover and backups included): $38, plus 10 GB of storage at $0.28 per GB, so $40.80

- Bandwidth: $1

About $59 a month. Add $29 if you want someone at Fly to answer your email.

**Railway on Pro:** here I have to assume usage, because that is what you pay for. Say each API replica averages a quarter of a vCPU and 512 MB, the worker averages a tenth of a vCPU and 256 MB, and a single Postgres node averages a quarter of a vCPU and 1 GB.

- API, two replicas: $20

- Worker: $4.50

- Postgres compute $15, plus a 10 GB volume at $1.50

- Egress: $2.50

About $43.50 of usage. The $20 Pro fee is part of that, not on top, so the bill is about $43.50. Turn on Railway's high availability Postgres and you run three database members instead of one. Railway bills those on the same usage meters and does not publish a flat HA price, so my estimate is that the database line roughly triples and the total lands near $75 to $80.

So, single database node against single node, Railway is cheaper for a quiet app. With failover on both, Fly comes out a little cheaper and far more predictable. The bigger swing is behavior. A memory leak on Railway shows up on the invoice. On Fly the Machine runs out of memory and restarts, and the bill stays put. Our breakdown of [what it costs to build a SaaS product](/blog/how-much-does-it-cost-to-build-a-saas-product) shows how small these numbers are next to design and engineering.

## Regions and latency

Fly runs in 17 regions across North America, Europe, South America, Asia, Africa and Australia. Its anycast network sends each request to the closest region where your app is running. You can put an API Machine in Sydney and one in Frankfurt with two commands.

Railway runs in four: California, Virginia, Amsterdam and Singapore, all on Railway Metal, the hardware Railway moved onto from Google Cloud. You can place replicas of a service in more than one of those regions, and public traffic goes to the closest one.

Here is the catch for a typical SaaS app. Your database lives in one region. An API Machine in Sydney that has to query Postgres in Virginia for every request is slower than one sitting in Virginia, because each query crosses the Pacific. Multi-region only helps when the work near the user does not need the main database every time: a cache, read replicas, a realtime connection server, an edge API that serves mostly static or per-region data.

For a B2B product selling in the US, both give you the same latency. Pick Virginia and move on. Fly pulls ahead when you have users in Brazil, South Africa, Japan or Australia, regions Railway does not serve, and a product built to use them.

## Databases

Until this year this section was an easy win for Fly. That is no longer true.

### Fly Managed Postgres

Fly now sells Managed Postgres as its own product, with six plans. Developer is $4 a month with 256 MB of RAM and storage included, capped at 5 GB. Basic is $38 with 1 GB, Starter $72 with 2 GB, Launch $282 with 8 GB on dedicated CPUs, and the plans run up to $1,922 a month for 64 GB. Storage on every plan above Developer is $0.28 per GB a month, up to 1 TB. Fly says all plans include high availability and backups, and every plan except Developer includes connection pooling. pgvector is supported, and PostGIS if you turn it on when you create the cluster.

If a tutorial tells you to run **fly postgres create** and patch the cluster yourself, it predates Managed Postgres.

### Railway Postgres

On November 5 Railway published what it calls managed Postgres. A database can now run as a high availability cluster: streaming replicas managed by Patroni, etcd for leader election and HAProxy in front, so when the primary fails a replica takes over behind the same address. Point-in-time recovery archives every write-ahead log segment to a Railway bucket and keeps about four weeks of history. PgBouncer is one toggle away. Snapshots run daily, weekly and monthly.

Two catches. Point-in-time recovery only covers the time after you switch it on, so switch it on the day you create the database. And a restore from an HA cluster comes back as a single node, which you then convert back to HA.

### Which is better

Fly's is easier to budget: a plan, a storage rate, failover included. Railway's is easier to start with and sits on the same canvas as your API. For payments or health records I would still look hard at Neon, Supabase or RDS. For a typical SaaS app, either built-in option is fine.

## Scaling and cold starts

Fly's scaling is about Machines starting and stopping. You set how many Machines exist in each region, and the Fly proxy stops the extras when traffic drops and starts them when it rises. A stopped Machine takes about two seconds or more to come back for a typical app, by Fly's own docs. A suspended Machine resumes in a few hundred milliseconds. Neither is billed for CPU or RAM while idle, only for its disk. Keep at least one Machine running in your main region and users never see a cold start.

Railway scales the other way. Each service can use more CPU and memory, up to the plan limit, without you doing anything, and you pay for it. More replicas are a number you change in settings. Railway does not add replicas for you when traffic rises. On Pro, each replica can grow to 24 vCPU and 24 GB.

Railway's version of scale to zero is called Serverless. A service with no outbound traffic for five to ten minutes goes to sleep and wakes on the next request. Railway's docs warn that the first request can be slow or even return a 502. That is fine for an internal tool or a staging environment. Leave it off for anything a paying customer hits.

Fly suits traffic that comes in bursts, since idle capacity costs almost nothing. Railway suits a steady service that sometimes needs more memory, since it grows without a redeploy.

## Reliability and vendor risk

Neither platform had a quiet year.

Railway's worst day this year was May 19. Google Cloud suspended Railway's account by mistake in an automated action, and because Railway's edge routing still depended on a control plane hosted there, every workload in every region became unreachable for about eight hours. Apps on Railway's own hardware kept running but could not receive traffic. Railway published a detailed postmortem the next day and committed to removing that dependency. Earlier, on February 11, a misconfigured abuse system terminated legitimate deployments for around 3 percent of services. Railway also reported a major outage in one US East zone on July 2.

Fly's 2026 status history shows a run of control plane and regional incidents: periods where running apps kept serving but deploys, the dashboard or the Machines API were down for hours, plus network trouble in single regions. Your app usually stays up, but you cannot ship a fix until the API comes back.

The vendor risk question is sharper for Fly this year. Fly told GPU customers in February that GPU Machines would be retired at the end of July. Then it named Scott Johnston as CEO and said its focus is now Sprites. Outgoing CEO Kurt Mackey wrote that Fly Machines and the platform features "aren't going anywhere", and in August Fly's engineering lead told users on the forum that there is no sunset date for Machines and that Fly has formed a platform reliability team. I take them at their word, and I would still keep a tested way out.

![A laptop screen full of source code in a dark editor, with a keyboard in the foreground](https://images.unsplash.com/photo-1488590528505-98d2b5aba04b?w=800&q=80)

## Lock-in and leaving

Both platforms run ordinary containers, so leaving is a project of days, not months, if you built the app the plain way.

On Fly, your app is a Dockerfile plus a fly.toml file. The Dockerfile runs anywhere. The fly.toml is Fly-specific but short, and it maps neatly to a service definition on ECS, Cloud Run or Kubernetes. The parts that tie you in are the ones you choose: Fly's private network names between apps, volumes pinned to one Machine in one region, and the Machines API if you start and stop VMs from your own code.

On Railway, a service built with Railpack has no Dockerfile until you write one. Do that early. Railway's shared variable references and private hostnames need replacing with plain environment variables elsewhere. The canvas does not export, but it only ever drew services you can describe in a page of config.

The database is the real move in both cases. Both run standard Postgres, so **pg_dump** and restore works, and for anything large you set up logical replication to the new host and cut over. Plan for a short write freeze and test the restore once before the day.

Keep a Dockerfile in the repo, config in environment variables and no platform SDK in your app code, and either exit stays easy.

## Side by side

All prices from the vendors' pricing pages and docs as of November 2026, in US regions.

ItemFly.ioRailway
**How you are billed**Machine size, per second while runningCPU and RAM actually used, per second, plus a plan fee that counts as credit
**Entry plans**Pay as you go, small free allowance with a three Machine limitFree ($1 usage), Hobby $5, Pro $20 per workspace
**Small always-on service**$6.70 a month for 1 GBAbout $10 a month at a quarter vCPU and 512 MB average
**Managed Postgres**Plans from $4 (Developer) and $38 (Basic) to $1,922, plus $0.28 per GB, HA and backups includedBilled on usage, HA with Patroni, point-in-time recovery with about four weeks of history
**Volumes**$0.15 per GB, one Machine, one regionAbout $0.15 per GB, 5 GB cap on Hobby, 1 TB on Pro
**Egress**$0.02 per GB in North America and Europe, more elsewhere$0.05 per GB
**Regions**17 on six continents4: California, Virginia, Amsterdam, Singapore
**Idle and cold starts**Stop (about 2 seconds to wake) or suspend (a few hundred milliseconds)Serverless sleep after 5 to 10 idle minutes, slow first request
**Scaling**Proxy starts and stops Machines you have createdAutomatic vertical growth to plan limits, manual replicas
**GPUs**Retired at the end of July 2026None listed
**Paid support**$29 or $199 a month, Enterprise from $2,500Enterprise only
**Deploy style**CLI and fly.toml, GitHub Actions for CIDashboard and GitHub, Railpack or Dockerfile

If Render is also on your list, our [Fly vs Render vs Koyeb comparison](/blog/fly-vs-render-vs-koyeb) covers how Fly stacks up against fixed instance pricing.

## Which one for your product

How I would pick for the backends founders bring us most often:

- **A B2B SaaS app selling in the US or Europe, API plus Postgres plus a worker:** Railway on Pro. You will have the whole thing on one canvas in an afternoon, and HA Postgres is a setting.

- **A consumer app with users in Brazil, Australia or Japan who notice lag:** Fly. Run the API in the regions your users live in and put read replicas or a cache next to it.

- **A chat, multiplayer or live collaboration server holding WebSockets open:** Fly. Long-lived connections close to the user are what its network was built for.

- **A pre-launch MVP that a dozen testers use:** Railway Hobby at $5. It will likely stay inside the included credit.

- **Internal tools and staging environments that sit idle most of the day:** Fly with suspend, which wakes in a few hundred milliseconds. Railway's sleep works too if a slow first request is fine.

- **An AI product that calls hosted models from a Python service and runs batch jobs:** Railway. The worker is billed for the CPU it uses, and nothing about it needs Fly's regions.

- **A product that needs its own GPUs:** neither. Put inference on a GPU provider and keep the API on whichever host fits the rest.

- **A team with an ops engineer who wants to script every VM:** Fly. The Machines API and SSH access give that person what they want.

Take [Dropify](/work/dropify), which we built: a Next.js web app, a Python ML backend doing the heavy work, and PostgreSQL holding everything the business runs on. That shape fits either platform. The choice comes down to where your users are and how much infrastructure your team wants to touch.

Kanopy helps founders pick a stack and build the product on it, from the first API route to the database you will still trust in three years. If you are deciding where your backend should live, [book a free strategy call](/get-started).

---

*Originally published on [Kanopy Labs](https://kanopylabs.com/blog/fly-io-vs-railway-which-one-to-host-your-app-backend-on)*
