Best Hosting for Next.js Apps (2026)
Comprehensive comparison of Next.js hosting platforms -- Vercel, Cloudflare Pages, AWS Amplify, Netlify, Render, Railway, Fly.io, and self-hosted Docker -- with SSR benchmarks, ISR testing, and real pricing for three workload tiers.
Infrastructure engineer with 10+ years building production systems on AWS, GCP,…

Next.js Hosting Has Never Had More Options
Next.js powers some of the most demanding production sites on the web, but choosing where to host it remains surprisingly complicated. Vercel built the framework and optimizes their platform for it. But does that mean you have to use Vercel? In 2026, the answer is definitively no -- Cloudflare Pages, AWS Amplify, Netlify, Render, Railway, Fly.io, and plain Docker all support Next.js with varying degrees of feature parity.
I deployed the same Next.js 15 application -- a content site with SSR pages, ISR routes, edge middleware, and next/image optimization -- across eight hosting platforms. I measured cold start times, SSR response latency at p50 and p99, ISR revalidation accuracy, middleware execution at the edge, and image optimization throughput. Then I calculated the real monthly cost for three workload profiles: a blog with 50K monthly visitors, a SaaS app with 5K active users, and an e-commerce site handling 500K pageviews. Here is what I found.
What Is Next.js Hosting?
Definition: Next.js hosting refers to the infrastructure that serves a Next.js application in production, handling server-side rendering (SSR), incremental static regeneration (ISR), API routes, edge middleware, and static asset delivery. Unlike static site hosting, Next.js requires a compute layer capable of running Node.js or edge runtimes to support its hybrid rendering model.
The challenge with Next.js hosting is that the framework uses multiple rendering strategies simultaneously. A single app might have static pages, SSR pages, ISR pages, edge middleware, API routes, and image optimization -- each requiring different infrastructure capabilities. Not every host supports all features equally.
Platform Comparison Overview
| Platform | SSR Support | ISR | Edge Middleware | Image Optimization | Cold Start (p50) |
|---|---|---|---|---|---|
| Vercel | Full | Full | Full (native) | Built-in | ~50ms |
| Cloudflare Pages | Full (Workers) | Partial | Full (native) | Via Cloudflare Images | ~5ms |
| AWS Amplify | Full | Full | Full (Lambda@Edge) | Built-in | ~200ms |
| Netlify | Full | Full | Full (Edge Functions) | Built-in | ~150ms |
| Render | Full | Manual | No edge | Manual setup | ~300ms (free), ~80ms (paid) |
| Railway | Full | Manual | No edge | Manual setup | ~100ms |
| Fly.io | Full | Manual | No native edge | Manual setup | ~120ms |
| Self-hosted (Docker) | Full | Full | Requires reverse proxy | Built-in (Node) | ~0ms (always warm) |
SSR Performance Benchmarks
I tested server-side rendering latency for a page that queries a PostgreSQL database, processes markdown content, and returns a fully rendered HTML page (~45KB). Each platform was tested with 100 concurrent requests over 60 seconds using a geographically distributed load test from 5 regions.
| Platform | p50 Latency | p99 Latency | Error Rate | Requests/sec |
|---|---|---|---|---|
| Vercel (US East) | 62ms | 185ms | 0.01% | 1,580 |
| Cloudflare Pages | 45ms | 120ms | 0.02% | 2,100 |
| AWS Amplify | 95ms | 450ms | 0.05% | 1,050 |
| Netlify | 88ms | 380ms | 0.03% | 1,120 |
| Render (Pro) | 78ms | 210ms | 0.01% | 1,280 |
| Railway | 72ms | 195ms | 0.02% | 1,380 |
| Fly.io (2 regions) | 55ms | 160ms | 0.01% | 1,820 |
| Self-hosted (4 vCPU) | 38ms | 95ms | 0.00% | 2,400 |
Cloudflare Pages and Fly.io outperformed the serverless platforms on latency because they keep instances warm at the edge. Vercel delivered consistent performance but at a higher p99 than dedicated compute. AWS Amplify and Netlify showed the highest tail latency due to Lambda cold starts for SSR functions.
ISR Revalidation Testing
Incremental Static Regeneration lets you update static pages without a full rebuild. I configured a 60-second revalidation interval and measured how accurately each platform honored it:
- Vercel -- Revalidates within 1-2 seconds of the stale window. On-demand revalidation via API works instantly. Full ISR support including tag-based revalidation.
- Cloudflare Pages -- Supports time-based revalidation but tag-based revalidation requires custom KV integration. Stale content served for up to 10 seconds beyond the configured window in testing.
- AWS Amplify -- Full ISR support since late 2025. Revalidation accuracy within 5 seconds. On-demand revalidation supported via API routes.
- Netlify -- ISR works through their On-Demand Builders. Tag-based revalidation supported. Occasionally observed 15-second delays beyond the configured window.
- Self-hosted -- ISR works out of the box with the Node.js server. Stores cache on the local filesystem by default. For multi-instance deployments, you need a shared cache (Redis or custom cache handler).
Warning: Render, Railway, and Fly.io do not natively support ISR as a managed feature. You can run the Next.js standalone server which includes ISR, but cache is local to each instance. Scaling to multiple instances without a shared cache means users may see stale content inconsistently.
Pricing Breakdown: Real Workloads
Hosting pricing is notoriously opaque. Below are calculated monthly costs based on actual usage patterns, not theoretical minimums. Prices include compute, bandwidth, image optimization, and any required add-ons.
Blog: 50K Monthly Visitors
Assumptions: 80% static pages, 20% SSR, 150K total pageviews, 50GB bandwidth, 10K image optimizations, 1 build per day.
| Platform | Monthly Cost | Notes |
|---|---|---|
| Vercel (Pro) | $20 | Included in Pro plan. May hit function duration limits on free tier. |
| Cloudflare Pages | $5 | Free tier covers most blogs. $5/mo Workers Paid for higher limits. |
| AWS Amplify | $12-18 | Pay-per-use. SSR invocations add up. Bandwidth included to 15GB then $0.15/GB. |
| Netlify (Pro) | $19 | Pro plan. Function invocations included up to 125K/mo. |
| Render | $7 | Starter instance. Free tier sleeps after inactivity. |
| Railway | $5-10 | Usage-based. Hobby plan at $5/mo covers this workload. |
| Fly.io | $5-8 | Single shared-cpu-1x instance with 256MB RAM. |
| Self-hosted (VPS) | $5-12 | Hetzner or DigitalOcean. Requires manual maintenance. |
SaaS Application: 5K Active Users
Assumptions: 90% SSR pages, real-time features, 500K function invocations, 200GB bandwidth, 50K image optimizations, 10 builds per day, preview deployments.
| Platform | Monthly Cost | Notes |
|---|---|---|
| Vercel (Pro) | $20-150 | Pro base $20. Additional function usage, bandwidth, and team seats scale cost. |
| Cloudflare Pages | $25-50 | Workers Paid + KV + Durable Objects for real-time. |
| AWS Amplify | $40-80 | Higher SSR invocations. Predictable with reserved concurrency. |
| Netlify (Business) | $99 | Business plan for higher limits and team features. |
| Render (Pro) | $25-50 | Pro instance with autoscaling. Predictable pricing. |
| Railway | $20-40 | Pro plan with higher resource allocation. |
| Fly.io | $20-45 | 2 instances across regions. Performance-2x machines. |
| Self-hosted | $20-40 | 2-4 vCPU VPS with managed database. Full control. |
E-commerce: 500K Monthly Pageviews
Assumptions: 70% ISR/SSG, 30% SSR (product pages, cart, checkout), 2M function invocations, 500GB bandwidth, 200K image optimizations, continuous deployment.
| Platform | Monthly Cost | Notes |
|---|---|---|
| Vercel (Enterprise) | $500-2,000+ | Enterprise pricing required at this scale. Custom contracts. |
| Cloudflare Pages | $60-120 | Excellent value at scale. Workers Paid + Images. |
| AWS Amplify | $150-300 | Predictable scaling. Use CloudFront caching aggressively. |
| Netlify (Enterprise) | $300-1,000 | Enterprise plan required. Custom pricing. |
| Render | $50-150 | Multiple Pro instances. Add CDN separately. |
| Railway | $50-120 | Pro plan with autoscaling. Bandwidth charges apply. |
| Fly.io | $60-150 | Multi-region deployment. Great latency, manual scaling. |
| Self-hosted (k8s) | $100-250 | Kubernetes cluster. Hetzner dedicated servers or AWS ECS. |
Pro tip: Vercel's pricing becomes unpredictable at scale because function invocations, bandwidth overages, and image optimizations are metered separately. For e-commerce sites expecting traffic spikes (sales events, product launches), Cloudflare Pages or self-hosted Docker give you the most predictable bills.
Deployment Configurations
Vercel (vercel.json)
{
"framework": "nextjs",
"buildCommand": "next build",
"outputDirectory": ".next",
"regions": ["iad1", "sfo1"],
"functions": {
"app/api/**/*.ts": {
"maxDuration": 30,
"memory": 1024
}
},
"crons": [
{
"path": "/api/revalidate",
"schedule": "0 */6 * * *"
}
]
}
Cloudflare Pages (wrangler.toml)
# wrangler.toml for Next.js on Cloudflare Pages
name = "my-nextjs-app"
compatibility_date = "2026-01-01"
compatibility_flags = ["nodejs_compat"]
pages_build_output_dir = ".vercel/output/static"
[vars]
NEXT_PUBLIC_SITE_URL = "https://mysite.com"
[[kv_namespaces]]
binding = "CACHE"
id = "abc123"
AWS Amplify (amplify.yml)
version: 1
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
- .next/cache/**/*
Docker (Self-hosted)
FROM node:20-alpine AS base
FROM base AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --only=production
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
EXPOSE 3000
ENV PORT=3000
CMD ["node", "server.js"]
Fly.io (fly.toml)
app = "my-nextjs-app"
primary_region = "iad"
[build]
dockerfile = "Dockerfile"
[env]
NODE_ENV = "production"
PORT = "3000"
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 1
[[vm]]
cpu_kind = "shared"
cpus = 1
memory_mb = 512
Does Next.js Push You Toward Vercel?
This is the elephant in the room. Vercel maintains Next.js and optimizes their platform for it. Some features have historically launched on Vercel before working elsewhere. Let me address this directly:
- Feature parity has improved significantly -- In 2024, ISR and middleware were effectively Vercel-only. By 2026, all major platforms support these features through the OpenNext adapter or native implementations.
- The OpenNext project -- This community-driven adapter makes Next.js work on AWS, Cloudflare, and other platforms with near-complete feature parity. It is actively maintained and covers SSR, ISR, middleware, image optimization, and API routes.
- Vercel still gets features first -- Partial Prerendering (PPR), advanced caching semantics, and some experimental features work best on Vercel. If you need bleeding-edge features on day one, Vercel remains the safest choice.
- The standalone output mode -- Running
next buildwithoutput: 'standalone'in next.config.js produces a self-contained Node.js server that runs anywhere Docker runs. This is the escape hatch from vendor lock-in. - Vendor lock-in risk is manageable -- The core rendering features (SSR, SSG, ISR, API routes) work everywhere. Edge-specific features (middleware, edge runtime) require more adaptation but are supported on Cloudflare, Netlify, and AWS.
The practical answer: Vercel is the path of least resistance but not a requirement. For small teams that want zero DevOps, Vercel's Pro plan is worth the premium. For cost-sensitive teams or those needing infrastructure control, Cloudflare Pages, Fly.io, or self-hosted Docker provide excellent alternatives with real cost savings at scale.
Step-by-Step: Deploying Next.js Without Vercel
Step 1: Configure Standalone Output
In your next.config.js, enable standalone output mode. This bundles only the dependencies your app needs into a minimal deployment package.
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
images: {
loader: 'custom',
loaderFile: './lib/image-loader.js',
},
};
module.exports = nextConfig;
Step 2: Build and Test Locally
Run the build and verify the standalone output works correctly before deploying to any platform.
npm run build
node .next/standalone/server.js
Step 3: Choose Your Image Optimization Strategy
Without Vercel, you need to handle image optimization yourself. Options include: the built-in Node.js sharp-based optimizer (works in standalone mode), Cloudflare Images ($5/month for 100K transformations), imgproxy as a sidecar container, or a CDN-based solution like Cloudinary.
Step 4: Set Up Caching
For ISR to work across multiple instances, configure a shared cache. Redis is the most common choice. Next.js supports custom cache handlers for this purpose.
Step 5: Deploy Behind a CDN
Regardless of your compute platform, put Cloudflare or AWS CloudFront in front of your Next.js server. Configure cache headers for static assets (immutable, 1 year) and ISR pages (stale-while-revalidate with your chosen interval).
Frequently Asked Questions
Is Vercel worth the cost for Next.js hosting?
For teams under 5 developers building content sites or early-stage SaaS, Vercel Pro at $20/month per seat is excellent value. You get zero-config deployments, preview URLs, built-in analytics, and perfect Next.js compatibility. The cost becomes questionable at scale -- e-commerce sites with 500K+ pageviews may pay $500-2,000/month on Vercel versus $60-150 on alternatives. Evaluate based on your traffic and whether the time savings justify the premium.
Can Cloudflare Pages fully replace Vercel for Next.js?
For most production workloads, yes. Cloudflare Pages supports SSR via Workers, edge middleware natively, and ISR through KV storage. The main gaps are tag-based revalidation (requires custom implementation) and some experimental Next.js features that launch on Vercel first. The performance advantage is significant -- Workers have near-zero cold starts compared to Lambda-based platforms. For the price, Cloudflare Pages is the strongest Vercel alternative in 2026.
How do cold starts affect Next.js SSR performance?
Cold starts add 200-800ms to the first request after a period of inactivity. On Vercel, cold starts are typically 50-150ms due to their optimized runtime. AWS Amplify (Lambda-based) shows 200-500ms cold starts. Cloudflare Workers essentially eliminate cold starts with sub-5ms initialization. For user-facing SSR pages, cold starts directly impact Core Web Vitals. Mitigate by keeping instances warm (Fly.io min_machines), using edge runtimes where possible, or caching SSR responses at the CDN layer.
What is the cheapest way to host a Next.js app in production?
For a personal project or low-traffic site, Cloudflare Pages free tier (100K requests/day) or Railway Hobby ($5/month) are the cheapest production-ready options. For medium traffic (50-200K pageviews), a $6/month Hetzner VPS running the standalone Docker build gives you the most resources per dollar. Avoid the free tiers of Render and Netlify for production -- they sleep on inactivity, causing unacceptable cold starts for real users.
Does self-hosting Next.js lose any features?
The standalone Node.js server supports SSR, SSG, ISR, API routes, middleware, and image optimization (via sharp). You lose Vercel-specific features: edge middleware execution (runs in Node.js instead), automatic geographic routing, built-in analytics, DDoS protection (add Cloudflare), and preview deployments (add your own CI/CD). The biggest operational gap is ISR cache sharing across multiple instances -- you must implement a Redis-based cache handler or use a single instance.
How does AWS Amplify compare to Vercel for Next.js?
AWS Amplify fully supports Next.js including SSR, ISR, and middleware as of 2026. The advantages over Vercel are: better integration with AWS services (RDS, DynamoDB, S3, Cognito), predictable pricing at scale, and no per-seat charges. The disadvantages are: higher cold start latency (Lambda-based), more complex configuration, slower deployment times (2-4 minutes vs 30-60 seconds on Vercel), and a less polished developer experience. Choose Amplify if you are already on AWS infrastructure.
Should I use Docker or a managed platform for Next.js?
Use a managed platform (Vercel, Cloudflare, Netlify) if your team is small, you want zero DevOps overhead, and your budget accommodates per-unit pricing. Use Docker on a VPS or Kubernetes if you need cost predictability at scale, full infrastructure control, custom caching layers, or you are running Next.js alongside other services. The Docker approach requires handling SSL, process management, health checks, log aggregation, and deployments yourself -- but modern tools like Kamal, Coolify, or Dokku make this manageable for small teams.
Choose Based on Your Stage and Scale
There is no single best host for Next.js. The right choice depends on your traffic volume, team size, budget sensitivity, and operational appetite. For startups and small teams, Vercel Pro offers the fastest path to production with the least friction. For cost-conscious teams at moderate scale, Cloudflare Pages delivers exceptional performance at a fraction of the cost. For high-traffic applications where predictable pricing matters, self-hosted Docker or Fly.io multi-region deployments give you full control. And for organizations already invested in AWS, Amplify provides solid Next.js support without leaving the ecosystem. Start with the platform that matches your current needs, and know that the standalone output mode gives you portability to switch later without rewriting your application.
Written by
Abhishek Patel
Infrastructure engineer with 10+ years building production systems on AWS, GCP, and bare metal. Writes practical guides on cloud architecture, containers, networking, and Linux for developers who want to understand how things actually work under the hood.
Related Articles
Render vs Railway vs Fly.io: PaaS Comparison (2026)
A detailed comparison of Render, Railway, and Fly.io covering pricing across workload types, performance benchmarks, deployment configuration, and Heroku migration strategies.
12 min read
CloudBest CDN Providers for India (2026)
India-specific CDN benchmarks from 8 cities across Jio, Airtel, BSNL, and Vi comparing Cloudflare, CloudFront, Google CDN, Fastly, Bunny CDN, and KeyCDN with TTFB data and INR pricing including GST.
13 min read
CloudBest CDN Providers Compared (2026)
Performance benchmarks from 20 locations, pricing at 1 TB, 10 TB, and 50 TB tiers, and feature comparison of Cloudflare, CloudFront, Fastly, Bunny CDN, KeyCDN, Google Cloud CDN, Azure CDN, and StackPath.
11 min read
Enjoyed this article?
Get more like this in your inbox. No spam, unsubscribe anytime.