TL;DR
Complete comparison of self-hosting Next.js versus deploying on Vercel, covering cost, feature parity, performance, and operational trade-offs.
Key facts
- Topology
- Next.js self-hosted vs Vercel
TL;DR
Vercel is the zero-config option that works brilliantly for small-to-medium projects. Self-hosting gives you full control over infrastructure, costs, and runtime behaviour — but you own the operations. The right choice depends on traffic volume, budget, and how much infrastructure control your team needs.
Cost comparison
At low traffic (under 100K page views/month), Vercel's free or Pro tier ($20/team/month) is hard to beat. You get automatic scaling, edge caching, and zero DevOps overhead.
At medium traffic (500K–2M views/month), Vercel costs escalate quickly. Bandwidth overages ($40/100 GB on Pro), serverless function invocations, and image optimization add up. A single $24/month Hetzner CAX21 (4 vCPU, 8 GB ARM) or a $48/month DigitalOcean Droplet handles the same traffic comfortably with nginx and PM2, at a fraction of the cost.
At high traffic (5M+ views/month), self-hosting is typically 5–10x cheaper. Vercel Enterprise pricing is negotiated but often runs to thousands per month. Two or three well-tuned EC2 instances behind an ALB cost a fraction of that and give you predictable, fixed billing.
Feature parity
| Feature | Vercel | Self-hosted |
|---|---|---|
| SSR / SSG / ISR | Fully managed | Fully supported with next start |
| Middleware | Edge runtime | Runs in Node.js (slightly different API surface) |
| Image optimization | Built-in CDN | Works, but uses server CPU/memory — consider an external CDN |
| Edge functions | Native | Not available — use serverless alternatives or middleware |
| Preview deployments | Automatic per branch | Requires custom CI/CD setup |
| Analytics | Built-in (paid) | Self-hosted alternatives (Plausible, PostHog) |
ISR works identically in self-hosted mode. The main gap is edge functions — if your architecture depends heavily on Vercel's edge runtime, self-hosting requires rearchitecting those pieces.
Performance differences
Vercel deploys to a global edge network with automatic CDN caching. Self-hosted performance depends on your infrastructure choices:
- Single server: Latency is determined by server location. Good for regional audiences
- Multi-region: Use a CDN (CloudFront, Cloudflare) in front of your origin for static assets and ISR pages
- Cold starts: Vercel serverless functions have cold start latency (100–500ms). Self-hosted PM2 processes are always warm — no cold starts
For SSR-heavy applications, a self-hosted server with PM2 cluster mode often delivers lower and more consistent latency than Vercel's serverless SSR.
When Vercel makes sense
- Small teams without dedicated DevOps
- Projects under 500K monthly page views
- Heavy reliance on edge functions and Vercel-specific features
- Rapid prototyping where deployment speed matters more than cost
When self-hosting wins
- Traffic above 1M monthly views where Vercel costs become significant
- Applications requiring custom nginx configuration, caching rules, or header manipulation
- Compliance requirements demanding data stays in specific regions or on specific infrastructure
- Teams that already manage Linux servers and want predictable, fixed infrastructure costs
Self-hosted production stack
The standard self-hosted Next.js stack:
# Build with standalone output
npm run build
# Run with PM2
pm2 start .next/standalone/server.js --name nextapp -i max
Add nginx in front for SSL, static asset caching, and connection buffering. This combination handles high traffic reliably with minimal resource usage.
Where Reflex helps
Reflex bridges the operational gap between Vercel and self-hosting. It provides the monitoring, deployment orchestration, and automated recovery that Vercel includes out of the box — but on your own infrastructure at your own cost. Zero-downtime deploys, health-gated rollouts, and automated incident response without vendor lock-in. See How it works.