An always-on web app with a Postgres database costs about $14 a month on Railway when it's small, $62 when it's medium and $218 when it's busy. The $5 Hobby plan covers about half a gigabyte of RAM running all month, and nothing else. The same three apps cost $16 to $28 a month on a rented Hetzner server, including $9 for custom domains on Ployz Cloud.
Prices checked 2026-10-01 on Railway's pricing page and pricing docs, and on Hetzner's own pages, all linked next to each number. Railway bills in USD.
I paid Railway $500+ a month at one point, and the bill went up every month. Most of it was the database: it was hit hard and held a lot of gigabytes in memory, and a busy database on Railway isn't cheap. Today one dedicated server at €80 a month runs more than I ever ran there. So I'm biased, and I'll show the maths so you can check it.
What would your app and database cost on Railway?
Railway charges for the CPU and memory your services use, every minute they run. Open each service's Metrics tab, read the average CPU and memory, and set the sliders. The defaults are my "small" app below.
- Railway usage before the included credit
- $14.15
- Share of usage from Postgres
- 43%
- Railway Hobby (Pro once the volume passes 5 GB)$14/mo
$20/vCPU-month, $10/GB-month RAM, $0.05/GB egress, $0.15/GB-month volume. The plan fee is credit, so you pay the larger of the fee and your usage.
- Railway Pro$20/mo
$20 a month per workspace with $20 of usage included. Same rates.
- Your own server + Ployz$16/mo
Smallest Hetzner CX23, CX33, CX43 or CX53 with room to spare, about $0.60 for IPv4, and $9 for Ployz custom domains. 20 TB traffic included.
How does Railway pricing work?
Railway charges a monthly plan fee, and that fee is also your usage credit. Hobby is $5 a month and includes $5 of usage; Pro is $20 a month and includes $20. Everything your services use is metered: CPU, RAM, public egress and volume storage. If your usage stays under the credit, you pay the fee. If it goes over, you pay the usage.
The docs give the example: "If your resource usage is $7, your total bill for the cycle will be $7 ($5 subscription fee + $2 of usage)" (pricing docs). The credit "is reset at the end of every billing cycle and does not accumulate over time."
| Plan | Monthly fee | Usage included | Per-service max | Volumes | Source |
|---|---|---|---|---|---|
| Free Trial | $0 | $5 one-time credit, 30 days | 2 vCPU, 1 GB RAM | Railway pricing | |
| Free | $0 | $1 a month | 1 vCPU, 0.5 GB RAM | 0.5 GB | Pricing docs |
| Hobby | $5 | $5 a month | 48 vCPU, 48 GB RAM, 6 replicas | 5 GB | Railway pricing |
| Pro | $20 per workspace | $20 a month | 1,000 vCPU, 1 TB RAM, 42 replicas | 1 TB | Railway pricing |
| Enterprise | Custom | Custom | Custom | Custom | Railway pricing |
The one thing to understand: Railway bills for a service while it runs, not while it serves traffic. In Railway's words, "you pay for allocated resources, not traffic," and "a server running idle still uses memory to stay loaded" (understanding your bill). An app with no visitors at 3 a.m. still costs the same RAM as at noon.
What does Railway charge per vCPU, GB of RAM and egress?
Railway's usage rates are $20 per vCPU per month, $10 per GB of RAM per month, $0.05 per GB of public egress and $0.15 per GB of volume storage per month. They're billed by the second or minute, so a service that averages 0.1 vCPU and 0.5 GB of RAM for a whole month costs $2 plus $5. These rates are the same on Hobby and Pro.
| Resource | Rate | Per month, running all month | Source |
|---|---|---|---|
| CPU | $0.000463 per vCPU-minute | $20 per vCPU | Pricing docs |
| RAM | $0.000231 per GB-minute | $10 per GB | Pricing docs |
| Public egress | $0.05 per GB | Pricing docs | |
| Volume storage | $0.15 per GB-month | Pricing docs | |
| Object storage (buckets) | $0.015 per GB-month, free egress | Railway pricing |
Some third-party guides still quote $0.10 per GB of egress and $0.25 per GB of storage. Those aren't the rates on Railway's pages today.
RAM is the line that adds up. A vCPU is twice the price of a gigabyte, but most web apps and databases sit at a small fraction of a vCPU while holding their memory all month. In all three worked bills below, RAM is the biggest line.
What does the $5 Hobby plan really run?
$5 of Railway usage buys about 0.5 GB of RAM running all month and nothing else, or a quarter of a vCPU and nothing else. In practice that's one small, quiet app and a small Postgres, each idling at a few hundred megabytes. Anything with steady traffic or a database that holds real data in memory goes past $5.
Here's a mix that fits, using assumed averages for a quiet app. Your Metrics tab shows the real numbers.
| Line | Usage | Cost |
|---|---|---|
| Node app RAM | 0.2 GB average | $2.00 |
| Postgres RAM | 0.15 GB average | $1.50 |
| CPU, both services | 0.03 vCPU average | $0.60 |
| Public egress | 5 GB | $0.25 |
| Postgres volume | 0.5 GB | $0.08 |
| Usage | $4.43 | |
| Hobby bill | $5.00 |
Double either service's memory and you're past the credit. Two more Hobby limits matter for a database: volumes are capped at 5 GB, and the docs say "Pro users and above can self-serve to increase their volume." Hobby also allows 2 custom domains and 3 members (pricing page).
Railway also "waives the monthly Hobby plan subscription fee" for some active users, decided automatically (pricing docs FAQ). You can't count on it.
Is Railway free to use?
Only for a short trial or a very small service. New accounts get a one-time $5 credit for 30 days with no credit card. After that, the Free plan gives $1 of usage a month, with 0.5 GB of RAM and a 0.5 GB volume per service. $1 buys about 100 MB of RAM for a month, so an always-on app plus Postgres doesn't fit.
The trial details are on the pricing page: "$5 one-time credit (30 days)" and "No credit card required." When the credit runs out, the FAQ says subscriptions cancel and deployments stop until you add credit. There's no slow-down mode; your app stops.
Railway does have Serverless, which puts a service to sleep "somewhere between 5 and 10 minutes after its last outbound traffic" (Serverless docs). That can stretch a free credit for a side project. But the same docs warn that an open database connection or a connection pooler keeps a service awake, and that "the first request sent to a slept service may return a 502 Bad Gateway response." It's for demos, not for an app with a database behind it.
What does an always-on web app + Postgres cost on Railway?
With my assumptions, a small app and Postgres cost $14.15 a month on Hobby, a medium one $61.50 on Pro and a busy one $217.50 on Pro. RAM is the biggest line every time, and Postgres is more than half the busy bill. Once usage passes $20, Hobby and Pro cost the same, because the plan fee is only credit.
The three sizes, as average usage over a 30-day month:
- Small: a side project with some users. App 0.1 vCPU and 0.5 GB; Postgres 0.05 vCPU and 0.5 GB; 20 GB egress; 1 GB volume.
- Medium: a small business app. App 0.5 vCPU and 1 GB; Postgres 0.5 vCPU and 2 GB; 200 GB egress; 10 GB volume.
- Busy: a SaaS with a database that works all day. App 1 vCPU and 2 GB; Postgres 2 vCPU and 8 GB; 1 TB egress; 50 GB volume.
These are assumptions, not measurements. Plug your own into the calculator above.
| Line | Small | Medium | Busy |
|---|---|---|---|
| App CPU | $2.00 | $10.00 | $20.00 |
| App RAM | $5.00 | $10.00 | $20.00 |
| Postgres CPU | $1.00 | $10.00 | $40.00 |
| Postgres RAM | $5.00 | $20.00 | $80.00 |
| Public egress | $1.00 | $10.00 | $50.00 |
| Postgres volume | $0.15 | $1.50 | $7.50 |
| Usage | $14.15 | $61.50 | $217.50 |
| Plan | Hobby | Pro (volume over 5 GB) | Pro |
| Monthly bill | $14.15 | $61.50 | $217.50 |
Postgres is 43% of the small bill, 51% of the medium one and 59% of the busy one. Add a staging environment that copies production and you pay for its RAM too, every minute it runs. Add a Redis or a background worker and each one is another always-on line.
Why does the database drive the Railway bill?
Because a database's job is to hold data in memory, all the time, and memory is the meter Railway charges most for in practice. Postgres that caches a 16 GB working set costs $160 a month in RAM alone on Railway, before any CPU, storage or app. On a rented server, that RAM is part of a fixed price.
That's what happened to me. My app wasn't the problem. The database was hit hard, it grew, Postgres used more memory to keep up, and the bill climbed every month to $500+ without me changing a plan. Usage billing is fair in the sense that you pay for what you use. It also means a successful database gets more expensive every month, with no ceiling except the one you set.
For comparison, $160 a month is 8.7 times the price of a Hetzner CX43 with 8 vCPU and 16 GB of RAM ($18.49, Hetzner price list).
Is Railway cheaper than Vercel?
For a full-stack app, usually yes. Railway runs your database and workers on the same bill, while Vercel only runs the frontend and functions, so you'd pay someone else for Postgres. For a mostly static frontend with heavy traffic, Vercel's flat CDN tiers can win: Railway's egress alone is $50 a terabyte.
The numbers from my Vercel pricing breakdown: a Next.js app at 100 GB of traffic costs $21 to $40 on Vercel Pro, and $120 at 1 TB on Flat Rate CDN. On Railway, a small always-on Next.js server at 0.25 vCPU and 0.5 GB costs $10 in compute, plus $5 of egress at 100 GB or $50 at 1 TB, so about $15 and $60. Add Postgres on Railway and you get the bills above; add it next to Vercel and you're paying a second provider, like Supabase.
The difference in shape matters more than the totals. Vercel charges per request and per seat. Railway charges per minute of RAM. A quiet app with a big database is cheap on Vercel and expensive on Railway; a busy frontend with a tiny backend is the other way round. If you're comparing more than these two, Render's pricing works out differently again because it sells fixed instance sizes.
Is Railway cheaper than running your own server?
No, not past the smallest size. The small app costs $14 on Railway and $16 on a Hetzner CX23 with Ployz custom domains, so Railway wins there by $2. The medium app is $62 against $20 on a CX33, and the busy app is $218 against $28 on a CX43. Without custom domains, the server alone is $7 to $19.
| Server | Specs | Monthly price | Source |
|---|---|---|---|
| Hetzner CX23 | 2 vCPU, 4 GB RAM, 40 GB NVMe, 20 TB traffic | $6.49 | Price list, plans |
| Hetzner CX33 | 4 vCPU, 8 GB RAM, 80 GB NVMe, 20 TB traffic | $9.99 | Same |
| Hetzner CX43 | 8 vCPU, 16 GB RAM, 160 GB NVMe, 20 TB traffic | $18.49 | Same |
| Primary IPv4 | about $0.60 (€0.50) | Hetzner docs | |
| Netcup VPS 500 | 2 vCPU, 4 GB RAM, 64 GB SSD, traffic included | €8.26 incl. VAT on a 12-month term | netcup VPS |
Hetzner prices are after its 15 June 2026 price adjustment, before VAT, for Germany and Finland. Netcup is often the better deal, especially if you want a US datacenter (it has one in Manassas); its VPS 1000 (4 vCPU, 8 GB, 128 GB) is €14.50 incl. VAT.
| Small | Medium | Busy | |
|---|---|---|---|
| Railway | $14.15 (Hobby) | $61.50 (Pro) | $217.50 (Pro) |
| Hetzner server + Ployz | $16.09 (CX23) | $19.59 (CX33) | $28.09 (CX43) |
I picked servers with room to spare: the busy app uses 10 GB of 16 and 3 vCPU of 8. A shared Hetzner vCPU isn't the same as a Railway vCPU, so don't read the CPU columns as one-to-one. And 1 TB of egress is a twentieth of the included 20 TB, so it isn't a line on the server bill at all.
What the server price doesn't include, so you can weigh it honestly:
- Backups are yours. On your own server,
pg_dumpto object storage on a schedule is your job. Ployz doesn't back up databases. - Upkeep is yours. OS updates, disk space and the 3 a.m. outage.
- No autoscaling. One server has a ceiling. On Railway, the bill goes up instead.
I build Ployz, which runs this setup on a server you rent: push to GitHub and it builds on your server, deploys with zero downtime once you set a health check, gives every pull request a preview environment, and has one-click Postgres. It's free on your own servers; custom domains are $9 a month. Docker and Caddy by hand get you to the same server bill.
How do you stop a Railway bill from climbing?
Set a hard usage limit, keep database traffic on the private network, and watch RAM, not requests. A hard limit stops the bill but takes every workload offline when it's reached, so set a soft limit email well below it. Moving to Pro doesn't lower your rates; it only raises the credit and the limits.
- Usage limits. Railway lets every plan set a soft limit (an email) and a hard limit, which is at least $10. At the hard limit, "all your workloads will be taken offline" (usage limits docs). That protects your card, not your users.
- Private networking. Railway says high bills often come from "not using private networking for databases" (understanding your bill). Use the private
DATABASE_URLso app-to-database traffic isn't public egress. - Right-size memory. A Node process with a large heap or a Postgres with generous
shared_buffersholds that memory all month. On Railway you pay $10 per GB of it. - Delete idle environments. Every preview or staging copy with its own database is billed while it runs.
For the bigger picture of where hosting platforms add fees (seats, egress, per-service minimums), see the hidden costs of PaaS pricing.
Railway or your own server?
Pick Railway if your app is small and quiet enough to stay near the $5 credit, you want a database next to your app without touching a server, or your services can sleep most of the time. Under about $15 a month of usage, it's cheaper than a server plus a custom domain, and the setup is very good.
Pick your own server if your database holds more than a gigabyte or two in memory, your usage is past $20 a month, or you want a bill that doesn't grow with your success. A $16 to $28 server covers what costs $62 to $218 on Railway. You take on backups and OS updates in exchange.
Ployz deploys your app and one-click Postgres to a server you rent, with preview environments and zero-downtime deploys, and it's free on your own servers.