DEV Community

Cover image for Next.js hosting cost in 2026: Vercel vs Netlify vs Railway vs VPS
Nayan Kyada
Nayan Kyada

Posted on Originally published at nayankyada.com

Next.js hosting cost in 2026: Vercel vs Netlify vs Railway vs VPS

Next.js hosting cost is one of those things that looks simple until your first invoice arrives. This post puts a realistic monthly number on five categories of host for the same mid-traffic site: ~80 k page views/month, ~4 GB egress, ISR on ~200 routes, and next/image serving ~300 k image transforms/month. No free-tier demos — actual production numbers as of August 2026.

The reference site I'm pricing against

Before comparing, here's what I'm assuming so the numbers are comparable:

  • Next.js 15 App Router, Sanity CMS backend
  • ~80 k page views/month, peak ~500 concurrent
  • ISR with revalidate tags; roughly 50 k revalidation function invocations/month
  • next/image active — ~300 k image optimisation requests/month
  • ~4 GB outbound egress/month
  • One staging environment
  • No video streaming (that's a separate Mux line item)

This is a typical content-marketing or e-commerce landing site for a funded startup or mid-size agency client. Not a hobby project, not a FAANG-scale app.

The pricing table

Provider Plan Base fee Image optimisation ISR / functions Egress Realistic monthly total
Vercel Pro $20/seat + $20 team $0 up to 5 k/mo then ~$0.005/img Included up to 1 M invocations Included up to 100 GB $55–$90 (add-ons stack fast)
Netlify Core (paid) $19/seat Not built-in — use Netlify Image CDN (beta) or external 125 k function invocations free, $25/M after 100 GB free, $0.55/GB after $45–$75
Railway Hobby → Pro $5 base + usage None native — you bring your own image CDN Billed as CPU/RAM per container $0.10/GB after 100 GB $30–$60
Render Starter web service $7–$25 fixed None native Background workers billed separately 100 GB free, $0.10/GB $25–$55
Fly.io Pay-as-you-go ~$5–10 for 2 shared CPUs None native Edge workers in preview $0.02/GB $20–$50
VPS (Hetzner/DO) 4 vCPU / 8 GB ~$24 fixed Self-managed (sharp + nginx cache) N/A — you own the Node process Cheap (~€1/TB on Hetzner) $25–$40 + your ops time

Vercel: the default, but the meter runs

Vercel is still the fastest path to production for a Next.js app. The Pro plan starts at $20/seat plus $20/team — so a two-person team is $60 before a single request. That's fine. The problem is what happens next.

Image optimisation is the most common surprise. The free tier gives you 5,000 source images per month, then ~$0.005 per optimised image. At 300 k transforms that's $1,500 — obviously you're caching aggressively, but uncached transforms during a traffic spike or after a cache purge add up quickly. Use minimumCacheTTL in next.config.ts and serve Sanity images via Sanity's own CDN with auto=format to avoid hitting Vercel's transform count unnecessarily.

ISR function invocations are included up to 1 M/month on Pro, which our reference site fits inside. Bandwidth (100 GB free) also covers 4 GB with massive headroom. The real cost pressure on Vercel is seats and any Edge Config or Analytics add-ons you bolt on later.

Netlify: competitive but image CDN is immature

Netlify's Core tier is $19/seat with 125 k function invocations free. For our reference site that's tight — 50 k revalidation calls from Sanity webhooks plus general API routes will push close to the limit some months, and the overage at $25/M invocation is steep. The saving grace: you can batch revalidation calls so one webhook triggers one function that revalidates many tags.

Netlify's native image CDN is still in beta as of mid-2026. For a production site I'd route images through Sanity's CDN with ?w=800&auto=format parameters and skip Netlify's image pipeline entirely. That removes one cost variable and one failure point.

Railway, Render, Fly: bring your own everything

These three are containerised hosts. You deploy a Dockerfile or a Node process — you don't get a managed Next.js runtime. That means:

  • No automatic ISR — you implement on-demand revalidation yourself via revalidatePath/revalidateTag in a route handler, which runs in your own container.
  • No built-in image optimisation — next/image still works, but every transform runs on your CPU. Add an nginx cache in front or route images to Sanity/Cloudinary.
  • Scaling is manual or requires autoscaling config.

The upside: predictable-ish billing. Render's $25/month Starter web service runs a persistent Node container — no cold starts, no per-invocation billing. Railway charges by CPU/RAM seconds which is harder to predict but typically stays under $40 for this traffic level if you size the instance correctly.

Fly.io is the most ops-heavy but cheapest at the bottom. Two shared CPUs + 512 MB RAM is $5–10/month and handles moderate Next.js traffic fine with proper caching headers. Egress is $0.02/GB — essentially free at 4 GB/month.

VPS: cheapest invoice, highest hidden cost

A Hetzner CX32 (4 vCPU, 8 GB RAM, €15/month) runs Next.js in standalone mode behind nginx with zero platform overhead. Add Cloudflare in front for CDN and DDoS protection and you're at roughly $20–25/month in hard costs.

The hidden cost is your time. You own TLS cert renewal, Node version upgrades, zero-downtime deploys (PM2 cluster mode or Docker rolling restarts), log management, and alerting. For a solo freelancer running their own site, fine. For a client engagement where your time is billable, that ops overhead is real money. Estimate 2–4 hours/month baseline.

Hidden costs that move every estimate

Image transforms are the single biggest surprise across all managed hosts. Sanity serves images via its own CDN at no extra charge — use that. Set quality: 80, define explicit sizes on every <Image /> and pin minimumCacheTTL to at least 86400 (24 hours) in your Next.js config.

ISR invocation count on Vercel/Netlify depends entirely on how aggressively your webhooks revalidate. A Sanity webhook that fires on every keystroke in draft mode will burn invocations fast. Add a debounce or filter to only revalidate on publish events.

Egress rarely bites on managed platforms (100 GB free tiers are generous), but on Fly.io and bare VPS egress pricing at scale is worth modelling before you commit.

Staging environments cost roughly the same as production on Vercel/Netlify (another seat or another site). On containerised hosts, staging is just another $5–10 service instance.

What I actually recommend

For a client site with a Sanity backend: start on Vercel Pro. The DX and zero-config ISR support is worth the premium until you're consistently over $200/month, at which point it's worth the migration effort to a containerised host. For internal tools or high-traffic apps where image transforms are low, Render or Railway hit a better cost-to-reliability ratio. A VPS is only the right answer if you have the ops discipline to maintain it — and most client projects don't.

Top comments (0)