Next.js Hosting Requirements
Next.js is a React framework that supports multiple rendering strategies — Static Site Generation (SSG), Server-Side Rendering (SSR), Incremental Static Regeneration (ISR), and Edge Functions. Your hosting choice determines which features work, how fast they perform, and how much they cost.
This guide is based on hands-on Next.js 15 deployments across 7 hosting providers, measuring SSR response times, ISR revalidation, build times, and edge function performance over 60 days.
What Next.js Needs from Hosting
- Node.js 18.17+ — Next.js 15 requires Node.js 18.17 minimum. Node.js 20 LTS is recommended for production stability and performance.
- SSR support — If your app uses Server Components, API routes, or dynamic rendering, your host must run a Node.js server process. Static-only exports can deploy to any CDN.
- Build environment —
next buildcompiles your application. Build times range from 30 seconds to 10+ minutes depending on page count. Your host needs sufficient memory (1GB+ for medium projects) during builds. - Edge Function support — Next.js Middleware and Edge API routes run at the CDN edge for sub-50ms responses globally. Only Vercel, Cloudflare, and Netlify fully support this.
- ISR support — Incremental Static Regeneration combines static performance with dynamic freshness. Requires a persistent file system or KV store for cached pages. Not all hosts support ISR correctly.
Static Export vs. Full Next.js
Next.js can export as fully static HTML with output: 'export' in next.config.js. Static exports work on any hosting — Netlify, Cloudflare Pages, GitHub Pages, or even shared hosting. You lose SSR, API routes, ISR, Middleware, and Image Optimization, but gain simplicity and the cheapest possible hosting. If your site is content-focused without dynamic server logic, static export is the pragmatic choice. For applications requiring authentication, real-time data, or API backends, you need full Next.js hosting with Node.js runtime.
The Vercel Lock-In Question
Vercel created Next.js and provides the best hosting experience for it — but some features (Edge Middleware, ISR, Image Optimization) work best or exclusively on Vercel. The community has raised valid concerns about vendor lock-in. In practice, self-hosting Next.js on DigitalOcean or Cloudways works well for SSR and SSG. ISR requires additional configuration (Redis or file-system caching), and Edge Functions need alternative implementations. If lock-in concerns you, design your app to be Vercel-portable from the start.
Top 7 Next.js Hosts
1. Vercel — Best Overall Next.js Hosting
Free tier / Pro $20/mo | Node.js 20 | Edge Network | Rating: 9.5/10
Vercel is built by the creators of Next.js and provides the definitive hosting experience. Every Next.js feature works perfectly — SSR, SSG, ISR, Middleware, Edge Functions, Image Optimization, and App Router. Git-push deployment takes 30-90 seconds for most projects. The global Edge Network delivers sub-50ms TTFB for static content and sub-200ms for SSR in most regions. Preview deployments for every pull request enable team collaboration workflows. The free tier (Hobby) supports personal projects with 100GB bandwidth, while Pro ($20/mo) adds team features, analytics, and higher limits.
Pros: Built for Next.js, every feature works, fastest deployment, Edge Functions, Image Optimization, preview deployments
Cons: Pro pricing scales with team size, bandwidth overages expensive ($40/100GB), vendor lock-in risk, Hobby limited to personal use
2. Cloudflare Pages — Best Free Next.js Hosting
Free tier (generous) | Workers Runtime | Rating: 8.5/10
Cloudflare Pages offers the most generous free tier for Next.js deployment — unlimited bandwidth, 500 builds/month, and deployment to 300+ edge locations. The @cloudflare/next-on-pages adapter runs Next.js on Cloudflare's Workers runtime. SSG works perfectly, and SSR runs on edge workers for global low-latency responses. The trade-off is compatibility — some Node.js APIs aren't available in the Workers runtime, and ISR requires Cloudflare KV configuration. For projects that fit within the Workers model, it's hard to beat free with unlimited bandwidth.
Pros: Unlimited free bandwidth, 300+ edge locations, fast builds, Cloudflare CDN integration, zero-cost hosting
Cons: Workers runtime limitations (some Node.js APIs unavailable), ISR requires KV setup, debugging edge functions is harder, limited Node.js compatibility
3. DigitalOcean App Platform — Best Self-Hosted Next.js
From $5/mo | Node.js 20 | Full SSR | Rating: 8.6/10
DigitalOcean's App Platform deploys Next.js from GitHub with automatic builds, managed SSL, and horizontal scaling. Unlike edge-based platforms, App Platform runs a full Node.js server — every Next.js feature works without compatibility workarounds. For teams avoiding Vercel lock-in, App Platform provides a clean deployment path with predictable pricing. A $12/mo Basic plan handles most Next.js applications. For higher control, deploy on a Droplet ($6/mo) with PM2 or Docker for complete server management.
Pros: Full Node.js compatibility, predictable pricing, auto-deploy from Git, managed SSL, horizontal scaling
Cons: No edge functions, slower cold starts than Vercel, no ISR without custom caching, single-region deployment
4. Cloudways — Best Managed VPS for Next.js
From $14/mo | Node.js 20 | SSH Access | Rating: 8.3/10
Cloudways supports Next.js as a custom Node.js application with full SSH access and PM2 process management. You get dedicated server resources (CPU, RAM), managed backups, SSL, and monitoring — infrastructure tasks handled for you while you retain application-level control. This approach works well for Next.js apps that need specific Node.js packages, custom server configurations, or backend services (databases, caches) on the same server. During testing, a $26/mo DigitalOcean server on Cloudways handled 400 SSR requests/second with consistent sub-300ms response times.
Pros: Dedicated resources, full SSH + PM2, managed infrastructure, Cloudflare CDN add-on, server-level control
Cons: $14/mo minimum, no edge functions, manual Next.js configuration, no built-in preview deployments, no ISR without Redis
5. Netlify — Best for Static Next.js
Free tier / Pro $19/mo | Edge Functions | Rating: 8.4/10
Netlify excels for Next.js projects using primarily SSG with selective SSR through their Next.js Runtime. The free tier includes 100GB bandwidth and 300 build minutes. Netlify's deploy previews, branch deploys, and form handling complement Next.js workflows well. Edge Functions support Middleware, and their Image CDN handles image optimization. However, full SSR performance lags behind Vercel, and ISR support requires their proprietary On-Demand Builders. For content-heavy sites using mostly static generation, Netlify is excellent.
Pros: Generous free tier, deploy previews, form handling, Edge Functions, Image CDN, excellent build logs
Cons: SSR slower than Vercel, ISR requires On-Demand Builders, build times can be long, bandwidth costs above free tier
6. Hostinger VPS — Best Budget Self-Hosted Next.js
From $5.49/mo | Node.js 20 | Full Root | Rating: 7.8/10
Hostinger's VPS provides the cheapest path to self-hosted Next.js with full server control. Install Node.js, PM2, Nginx (reverse proxy), and deploy your Next.js app with complete SSR support. The KVM 2 plan ($6.99/mo, 2 vCPU, 8GB RAM) handles demanding Next.js applications with room to spare. You manage everything — OS updates, Node.js versions, SSL certificates, and process management — but the cost savings versus managed platforms are significant for developers comfortable with Linux.
Pros: $5.49/mo full VPS, complete control, generous resources, global data centers, no bandwidth surprises
Cons: Fully unmanaged, no deployment automation, manual SSL setup, no edge functions, no preview deployments
7. Railway — Best Modern PaaS for Next.js
From $5/mo | Node.js 20 | Git Deploy | Rating: 8.2/10
Railway provides a clean deployment experience for Next.js with Git-push deploys, automatic builds, and environment variable management. It detects Next.js projects automatically, runs the build, and serves both SSR and SSG pages. Built-in PostgreSQL and Redis support enables full-stack Next.js applications with API routes. The developer experience rivals Vercel for simplicity while running on standard Node.js — no edge runtime compatibility concerns. Resource-based pricing is predictable for consistent workloads but can exceed Vercel Pro costs for high-traffic sites.
Pros: Auto-detect Next.js, Git-push deploy, built-in PostgreSQL + Redis, standard Node.js runtime, clean DX
Cons: No edge functions, resource-based pricing scales, no image optimization, smaller community than Vercel/Netlify
Next.js Hosting Comparison
| Host | Price | SSR | SSG | ISR | Edge Functions | Image Optimization | Best For |
|---|---|---|---|---|---|---|---|
| Vercel | Free/$20 | ✅ | ✅ | ✅ | ✅ | ✅ | Best Overall |
| Cloudflare Pages | Free | ✅ Workers | ✅ | ⚠️ KV | ✅ | ⚠️ | Free Hosting |
| DigitalOcean | $5/mo | ✅ | ✅ | ⚠️ Custom | ❌ | ❌ | Self-Hosted |
| Cloudways | $14/mo | ✅ | ✅ | ⚠️ Redis | ❌ | ❌ | Managed VPS |
| Netlify | Free/$19 | ✅ | ✅ | ⚠️ ODB | ✅ | ✅ | Static-First |
| Hostinger VPS | $5.49/mo | ✅ | ✅ | ⚠️ Custom | ❌ | ❌ | Budget VPS |
| Railway | $5/mo | ✅ | ✅ | ⚠️ Custom | ❌ | ❌ | Modern PaaS |
SSR vs. SSG vs. ISR Explained
Static Site Generation (SSG)
Pages are pre-rendered at build time into static HTML. Every visitor receives the same cached HTML file, delivering the fastest possible response times (sub-50ms from CDN edge). Use SSG for content that doesn't change between builds — blog posts, documentation, marketing pages. In Next.js 15 with App Router, pages are static by default unless they use dynamic functions (cookies, headers, searchParams). SSG works on every hosting platform in this guide.
Server-Side Rendering (SSR)
Pages are rendered on the server for each request, generating fresh HTML with current data. SSR is necessary for personalized content (user dashboards), real-time data (stock prices), and authenticated pages. Response times are slower than SSG (100-500ms depending on data fetching) because the server must execute React components and database queries per request. SSR requires a Node.js server process, which eliminates pure CDN/static hosting.
Incremental Static Regeneration (ISR)
ISR combines SSG performance with SSR freshness. Pages are statically generated at build time, then re-generated in the background after a configurable revalidation period. First visitors get cached static HTML (fast), and the regeneration happens transparently. Use revalidate: 60 in your page component to regenerate every 60 seconds. ISR is a Vercel-pioneered feature that works natively on Vercel but requires custom caching configuration on other platforms.
Edge Functions and Middleware
Next.js Middleware runs at the CDN edge before the request reaches your server. Use it for geolocation-based redirects, A/B testing, authentication checks, and bot detection — all with sub-10ms latency. Edge API Routes run serverless functions at edge locations for global low-latency API responses. Vercel, Cloudflare, and Netlify support Edge Functions. Self-hosted deployments (DigitalOcean, Cloudways) run Middleware on the Node.js server instead of at the edge.
Choosing the Right Rendering Strategy
- Marketing sites, blogs, docs → SSG (any host works)
- E-commerce product pages → ISR with 60-300s revalidation (Vercel ideal)
- User dashboards, real-time data → SSR (any host with Node.js)
- Authentication redirects, geo-targeting → Middleware (Vercel/Cloudflare for edge, any host for server-side)
Next.js Deployment Guide
Deploying to Vercel (Recommended)
- Connect repository — Link your GitHub, GitLab, or Bitbucket repository to Vercel
- Configure project — Vercel auto-detects Next.js, sets build command (
next build) and output directory - Set environment variables — Add
DATABASE_URL, API keys, and secrets through the Vercel dashboard - Deploy — Push to your main branch. Vercel builds, optimizes, and deploys to their global edge network in 30-90 seconds
- Preview deployments — Every pull request automatically gets a unique preview URL for testing and review
Self-Hosting on VPS (DigitalOcean/Hostinger)
- Install Node.js 20 LTS, PM2, and Nginx on Ubuntu 22.04
- Clone your repository:
git clone your-repo /var/www/myapp - Install dependencies:
npm ci - Build:
npm run build(ensure sufficient memory — setNODE_OPTIONS=--max-old-space-size=2048for large projects) - Start with PM2:
pm2 start npm --name 'nextjs' -- start - Configure Nginx as reverse proxy to port 3000 with SSL via Certbot
- Set up PM2 startup:
pm2 startup && pm2 savefor auto-restart on reboot
Docker Deployment
Next.js provides an official Docker example optimized for production:
- Multi-stage Dockerfile: install dependencies, build, then create a minimal production image
- The standalone output mode (
output: 'standalone'in next.config.js) creates a self-contained server without node_modules - Production image size drops from 1GB+ to ~100MB with standalone + multi-stage builds
- Deploy the Docker image to any container platform: DigitalOcean App Platform, Railway, Fly.io, or your own server
Static Export Deployment
For SSG-only Next.js sites, add output: 'export' to next.config.js. Run next build to generate static HTML in the out/ directory. Deploy this directory to any CDN or static host — Cloudflare Pages, Netlify, GitHub Pages, or even shared hosting. This is the simplest deployment path but sacrifices SSR, API routes, ISR, and Middleware.
FAQ
Frequently Asked Questions
Do I have to use Vercel to host Next.js?
No. Next.js is open-source and can be self-hosted on any platform that runs Node.js. SSR and SSG work on DigitalOcean, Cloudways, Railway, and VPS providers. However, some features — ISR, Edge Middleware, and Image Optimization — work best or most easily on Vercel. For static-only Next.js sites, any CDN or static host works perfectly.
Is Vercel free tier enough for production?
Vercel's Hobby (free) tier is limited to personal, non-commercial projects per their terms of service. It includes 100GB bandwidth, 100 deployments/day, and serverless function execution. For commercial projects, you need the Pro plan ($20/mo per team member). The free tier is excellent for portfolio sites, personal blogs, and side projects.
Can I host a Next.js app on shared hosting?
Only as a static export. If you use output: 'export' in next.config.js, Next.js generates static HTML files that can be uploaded to any shared hosting. However, you lose SSR, API routes, ISR, Middleware, and Image Optimization. For full Next.js features, you need a platform that runs Node.js — VPS, cloud hosting, or a PaaS like Vercel/Railway.
What is the cheapest way to host a full Next.js application?
Cloudflare Pages (free) supports SSR through Workers and offers unlimited bandwidth. Vercel's free Hobby tier works for personal projects. For commercial use, Railway ($5/mo) or DigitalOcean App Platform ($5/mo) provide affordable full-featured Next.js hosting. Self-hosting on a Hostinger VPS ($5.49/mo) is the cheapest option with full control.
How does Next.js ISR work on non-Vercel hosts?
ISR on Vercel works automatically with a persistent cache. On other platforms, you need to configure caching manually. DigitalOcean and Railway can use the file system cache (works on single servers). For multi-server deployments, configure Redis as an ISR cache. Cloudflare uses KV store, and Netlify uses On-Demand Builders. Each platform requires different configuration for ISR.
Should I use Next.js App Router or Pages Router for hosting?
App Router (recommended since Next.js 13.4) works on all hosts in this guide. Pages Router is stable and well-supported everywhere. App Router's Server Components can reduce client-side JavaScript but add server-side processing requirements. If your host has limited compute resources, Pages Router with SSG may perform better. Both routers deploy identically on Vercel, DigitalOcean, and other platforms.
The Bottom Line
Best Overall Next.js Host
Best Free Next.js Hosting
Best Self-Hosted Next.js
For Next.js hosting, Vercel (free/Pro $20/mo) provides the definitive experience with native support for every Next.js feature. Cloudflare Pages offers the best free tier with unlimited bandwidth and edge SSR. Teams avoiding Vercel lock-in should use DigitalOcean ($5/mo) for full Node.js compatibility with App Platform or Droplet deployment.
More guides: Best Django Hosting 2026 • Best Laravel Hosting 2026 • Best Static Site Hosting 2026