Skip to main content

That $5–10 Hetzner + Coolify Next.js Stack: A Line-by-Line Recompute Against Vercel, Railway, and Fly.io

12 min readDora NodaDora Noda
Share
On this page

In March 2026, Kapil Khatik published “Escaping PaaS Pricing: Deploying a Next.js Full-Stack App on Hetzner with Coolify”, a field report on running Brain Rivals — a production Next.js full-stack app with PostgreSQL and Prisma — on a Hetzner Cloud VPS managed by Coolify for roughly $5 to $10 a month. The piece makes two claims worth a reader's scrutiny: the arithmetic (is the managed-PaaS alternative really that much more expensive?) and the overhead (what does the $5–10 number leave out?).

I recomputed both. Here is the answer up front, for one defined three-service workload priced at 2026 list rates:

PlatformMonthly totalMultiple of Hetzner
Hetzner CX22 + Coolify≈ $5.50
Fly.io≈ $30≈ 5×
Vercel + managed Postgres≈ $40≈ 7×
Railway (3 services)≈ $80≈ 15×

The $5–10 claim survives the recompute — and the PaaS side of the ledger is uglier than the headline suggests once bandwidth and per-service multiplication kick in. But the second half of this post is the part the headline skips: the backup bloat, the node image, the pager, and the second machine. The flat price is real. It is also not the whole price.

The workload we're pricing (so you can check my math)

A cost comparison without stated inputs is marketing, so here are mine — a typical small production Next.js stack, deliberately boring:

  • App: Next.js SSR (App Router), always on, sized at 1 vCPU / 1 GB RAM
  • Worker: one background worker (queues, cron), 0.5 vCPU / 512 MB RAM
  • Database: PostgreSQL, ~10 GB of data, always on
  • Egress: 300 GB/month (a content-heavy app doing roughly half a million page views)
  • Builds: 300 build-minutes/month (≈100 Next.js builds at ~3 minutes each)
  • Team: one developer (seat sensitivity comes later)

Every line below uses 2026 published meter rates. Where platforms bundle small free allowances, I price at list rates and say so — allowances shift small bills by a few dollars, but list rates are what the bill converges to as you grow, which is the comparison that matters.

The line-by-line recompute

Vercel: the $20 seat plus the bandwidth meter

Vercel Pro is $20 per seat per month and includes 1 TB of bandwidth; overage bills at $40 per 100 GB. Vercel has no built-in Postgres, so the database is a managed add-on (Neon/Supabase scale tier) at roughly $20/month. Builds at 300 minutes sit inside the plan's included quota, so the marginal build line is $0.

LineMath$/mo
Pro seat × 1$20 × 1$20
Bandwidth, 300 GB (inside 1 TB included)$0$0
Managed Postgres add-onflat$20
Builds, 300 min (inside plan quota)$0$0
Total≈ $40

At this traffic level Vercel is civilized. The meter that matters is bandwidth: at $40 per 100 GB, every terabyte past the included one adds $400. That is the line that turns a quiet app into a spike story.

Railway: a 5floor,nota5 floor, not a 5 cap

Railway's Hobby plan is $5/month including $5 of usage, and everything else meters per second: $20 per vCPU/month, $10 per GB of RAM/month, $0.05 per GB of egress, $0.15 per GB/month of volume storage. The gotcha the source article gestures at is real: three services means three sets of CPU/RAM lines, and Postgres is just another metered service plus a volume.

LineMath$/mo
Hobby plan (incl. $5 usage credit)$5 − $5 credit + usage$5 base
App: 1 vCPU + 1 GB$20 + $10$30
Worker: 0.5 vCPU + 0.5 GB$10 + $5$15
Postgres: 0.5 vCPU + 1 GB + 10 GB vol$10 + $10 + $1.50$21.50
Egress: 300 GB300 × $0.05$15
Total$5 + ($81.50 − $5 credit)≈ $81.50

Railway's per-unit rates are honest — CPU, RAM, and egress priced as themselves — but they are also the highest per unit in this comparison, and per-service multiplication means the bill scales with architecture, not just traffic.

Fly.io: per-second machines meet the egress meter

Fly.io bills Machines per second: a shared-cpu-1x with 1 GB runs about $5.70/month always on, a 256 MB machine about $1.94. Managed Postgres is available as a first-class add-on, volumes run $0.15/GB/month, and egress lists around $0.05/GB. (Fly.io's newer 2026 billing lines — per-second granularity, managed Postgres tiers, and the $75/month FKS cluster product — all push the same direction: pay for machines and meters, not seats.)

LineMath$/mo
App: shared-1x, 1 GB, always onflat-ish$5.70
Worker: shared-1x, 256 MB, always onflat-ish$1.94
Postgres: 1 GB machine + 10 GB volume$5.70 + $1.50$7.20
Egress: 300 GB300 × $0.05$15
Total≈ $30

Fly.io lands cheapest of the three managed options because its compute unit is a small machine rather than a seat or a vCPU-GB bundle — but note that half the bill is egress, the same meter that punishes Vercel and Railway.

Hetzner CX22 + Coolify: the flat $5–10

The Hetzner CX22 is 2 shared vCPU, 4 GB RAM, 40 GB NVMe, and 20 TB of included traffic for about €4.59/month (≈ $5 after 2026's price adjustments). Coolify is free open-source software installed with one curl command; it contributes GitHub deploys, Docker builds, and Let's Encrypt TLS. Backups follow the source article's pattern: local retention plus Cloudflare R2 cold storage for pennies.

LineMath$/mo
CX22 (2 vCPU / 4 GB / 40 GB / 20 TB)flat≈ $5
Coolify (self-hosted, OSS)$0$0
R2 cold backup storage≈ $0.015/GB≈ $0.50
Builds, 300 min (run on the box)$0 marginal$0
Total≈ $5.50

Two things to notice. First, 300 GB of egress is 1.5% of the included 20 TB — the meter that dominates every PaaS bill above simply does not exist here. Second, builds are “free” only in dollars: they run on the same 2 vCPU serving production, so every deploy contends with live traffic. That is not a billing line. It is still a cost, and it belongs in the next two sections.

Sensitivity: where each price breaks

One workload is one data point. The honest version of this table shows the range across the variables that actually drive bills — traffic, seats, and service count:

ScenarioVercelRailwayFly.ioHetzner CX22
Baseline (above)≈ $40≈ $80≈ $30≈ $5.50
10× egress (3 TB)≈ $840≈ $215≈ $165≈ $5.50
5 seats (solo → team)≈ $120≈ $80 + Pro seats≈ $30 (no seat meter)≈ $5.50
6 services (3 → 6, + previews)rises (builds/functions)≈ $140≈ $45second box ≈ $11

Read the rows, not just the columns. Vercel's bandwidth line is a cliff: 2 TB of overage at $40/100 GB is $800, which single-handedly exceeds every other option's entire bill. Railway doubles with architecture: six services means six CPU/RAM line sets, and preview environments multiply it further. Seats punish Vercel ($20 each) while Fly.io and Hetzner don't meter humans at all. And Hetzner is flat across every row until the workload outgrows one box — at which point the price doubles to a second $5 box, which is still the cheapest cell in the table.

That last row is where the dollar math ends and the real accounting begins.

Where the $5–10 price eats you back

Khatik's piece is admirably honest about this, and the details deserve more attention than the headline number. Within four days of launch, Brain Rivals' Postgres backups ballooned to 2.5 GB: a write-intensive workload (millisecond reaction-time tracking) generating dead tuples and WAL faster than anyone expected. The fix was Coolify's retention policy (keep 3), a VACUUM ANALYZE routine, and aging backups out to R2. Nothing exotic — but notice what happened: a PaaS backup default became a week of someone's attention, a retention policy to own, and a storage lifecycle to monitor.

An unmanaged disk that fills up doesn't page anyone. It just crashes the server.

That pattern generalizes into the checklist the $5.50 total omits:

  • The node image is yours. OS patching, Docker upgrades, Coolify upgrades, and the 2 a.m. reboot after a kernel update have no vendor queue to sit in. There is only you.
  • Backups are a system you operate, not a checkbox you tick. Retention counts, restore drills, off-box copies, and the VACUUM schedule for a write-heavy Postgres are recurring work with silent failure modes.
  • The pager has your name on it. No status page, no SLA, no incident commander. Monitoring, alerting, and the runbook are all built by whoever owns the box — and “whoever” is whoever set it up.
  • The second machine is the seam. Coolify manages the box it sits on. The day you need box number two — for staging that mirrors prod, for a region closer to users, for headroom — there is no fleet primitive: no declarative machine lifecycle, no node provisioning API, no second Coolify that knows about the first. Teams cross this seam by hand-rolling a second install, then a third, until “the fleet” is a spreadsheet of SSH hosts.

The source article's most forward-looking detail is the “solo DevOps cheat code”: pointing Claude Code at the production database to run Prisma migrations and refresh the Next.js build cache. That works, and it will keep working for an expanding slice of ops toil.

But an agent issuing commands is not an owner absorbing responsibility. Somebody still decides the retention policy, approves the restore drill, owns the node image, and answers the page. The agent compresses the toil; it does not sign the pager. Price that person's attention at whatever your on-call hour costs, and the $5.50 line gets honest company fast.

Who should pay which bill

With both ledgers on the table, the decision is workload-shaped, not ideological:

  • Pay Vercel when the team is the expensive part: many seats shipping a frontend-heavy product with light API egress, where preview environments and zero ops process are worth $20 a head. Leave the moment bandwidth becomes the bill.
  • Pay Railway when architecture velocity beats unit economics: early builds adding services weekly, where one deploy flow for app, worker, and Postgres is worth premium per-unit rates. Revisit once the service count stabilizes.
  • Pay Fly.io when you want machines without the box: small always-on footprints, multi-region ambitions, and a team that reads fly.toml more happily than a runbook. Watch the egress line past the first terabyte.
  • Pay Hetzner + Coolify when the workload is steady, single-region-tolerant, and bandwidth-heavy — and someone on the team genuinely owns the node image, the backups, and the pager. The $5.50 is real exactly when that last condition holds.

None of these is the wrong answer in its window. The expensive mistake is paying a metered bill for a flat workload — or paying a flat bill while pretending the ops ledger is empty.

The flat price is real; the whole price is a practice

Recomputed line by line, the March 2026 claim holds: a realistic three-service Next.js workload costs roughly $5.50/month on a Hetzner CX22 under Coolify against $30–$80 on managed platforms at baseline traffic — and the gap widens toward 100× the day bandwidth spikes, because 20 TB of included traffic is a fundamentally different product than a $40-per-100-GB meter. That is not a trick of cherry-picked inputs; the sensitivity table above shows the flat line winning every row until the workload needs a second machine.

But the second machine is the point where single-box self-hosting ends and fleet operations begin, and nothing in the $5.50 covers it: no declarative provisioning, no machine lifecycle, no pager but yours. The teams that thrive on the flat price are the ones that budget the practice alongside the box — retention policies, restore drills, node images, and an on-call rotation with a name in it. Own that ledger honestly, and the cheapest cell in the table is also the calmest. Ignore it, and the $800 bandwidth spike you escaped will look cheap next to the outage nobody was paged for.

Bex.co is the open-source, AI-native Render alternative — push a git repo, get a running HTTPS service on machines you own. Star the repo on GitHub or deploy your first app today.

Related articles

Run this on infrastructure you own

bex is the open-source, AI-native Render alternative — push a git repo and get a running HTTPS service on your own machines.

Get started with bex