Self-hosting Next.js means running next start (or the standalone server.js) on a Node.js server you or your host controls, instead of deploying to Vercel's platform. The framework features are the same: App Router, Server Components, Server Actions, ISR, image optimisation and streaming all work on a plain Node.js server. What changes is the infrastructure around the framework, such as the global edge network, the shared caches between regions and the dashboard extras. This guide goes through what you keep, what you replace and when each choice makes sense.
What works the same when you self-host
Next.js is open source, and the Next.js self-hosting guide states that all features are supported when you deploy to a Node.js server. In practice that means:
| Feature | Self-hosted on Node.js |
|---|---|
| App Router and Pages Router | Yes |
| React Server Components and streaming | Yes |
| Server Actions | Yes |
| Route Handlers (API routes) | Yes |
| Proxy (previously middleware) | Yes |
| Static generation and ISR | Yes |
On-demand revalidation (revalidatePath, revalidateTag) |
Yes |
Image optimisation with next/image |
Yes, using sharp on your server |
next/font |
Yes (fonts are downloaded at build time) |
There is no "lite" version of Next.js for self-hosting. The same next build output runs in both places.
What Vercel adds on top
Vercel builds platform features around the framework. These are the ones you either replace, go without or do differently when self-hosting:
A global edge network
Vercel serves static assets and cached pages from many locations and can run functions in chosen regions. Self-hosted, your app runs where your server is. For an audience concentrated in South Africa, a Johannesburg server is already close to your users; for a global audience, you would add a CDN in front.
Shared, distributed caching
On Vercel, the ISR and data caches are managed for you across instances and regions. Self-hosted, the default cache lives on the server's disk and memory. With one instance, that just works. With several instances you configure a shared cache handler (for example, backed by Redis). Our guide to ISR and caching in self-hosted Next.js covers this.
Image optimisation infrastructure
On Vercel, optimised images are cached on their network and billed per use. Self-hosted, next/image resizes images on your server with sharp and caches them on disk. That costs CPU and memory on your plan instead, which matters on smaller servers. See Next.js image optimisation when you self-host.
Serverless scaling
Vercel runs your server code as functions that scale with traffic. A self-hosted Node.js server is a long-running process with a fixed amount of RAM and CPU. That has upsides: no cold starts, in-memory caches survive between requests, WebSockets and background work are straightforward. The downside is that you size the server for your peak, or add instances.
Platform extras
Vercel also offers things like preview comments, built-in analytics and speed insights, a web application firewall and skew protection between deploys. Some have self-hosted equivalents (preview deploys, analytics tools, a firewall at your CDN), and some you may not need.
What you take on when self-hosting
Self-hosting on a VPS means you are responsible for:
- installing and upgrading Node.js
- keeping the process running and restarting it on crashes
- a reverse proxy, HTTPS certificates and renewals
- OS security patches and a firewall
- builds and deploys from Git
- backups and restores
Managed app hosting sits in between: you still self-host Next.js in the framework sense (a normal Node.js server, no platform-specific APIs), but the host takes care of the server, process, SSL and Git deploys.
Cost and billing
Vercel's pricing combines a per-seat plan with usage-based charges, billed in US dollars; check their current pricing for your expected traffic. Self-hosted costs are usually flat: a monthly plan with fixed RAM, storage and traffic.
For South African teams, the practical differences are:
- Currency. A rand price does not move with the exchange rate.
- Predictability. A fixed monthly plan is easy to budget and to pass on to clients.
- VAT. A local provider issues a South African VAT invoice.
Neither model is always cheaper. Low-traffic hobby projects can fit free tiers; high-traffic apps with lots of dynamic rendering can be cheaper on fixed plans. Model your own numbers.
Things to adjust when you move off Vercel
If you are migrating an existing app:
- Remove Vercel-only packages you no longer use, such as platform-specific analytics or KV/Blob clients, or keep them if you still want those services.
- Environment variables. Copy them to your new host. Remember
NEXT_PUBLIC_variables are inlined at build time. - Cron jobs defined in
vercel.jsonneed to move to your host's scheduled tasks. - Edge runtime code. In Next.js 16,
proxy.tsruns on the Node.js runtime. Route handlers you markedexport const runtime = "edge"still work undernext start, but review whether you need them. - Image loaders. If you set a custom loader for Vercel, switch back to the default or point it at your own image CDN.
- Domains and DNS. Point your records at the new host and let it issue SSL.
When Vercel is still the right choice
Be honest about your situation. Vercel is a strong option when:
- your audience is spread across many continents and you want a global edge without setting it up
- traffic is extremely spiky and you want serverless scaling
- your team relies on Vercel-specific workflow features
- paying in dollars and usage-based billing are not a concern
Self-hosting (or managed Node.js hosting) is usually the better fit when your users are mainly in one country, you want fixed rand pricing, your app benefits from a long-running process, or you want your data in South Africa.
Frequently asked questions
Does Next.js work fully without Vercel?
Yes. Every Next.js feature is supported on a Node.js server. What you lose are Vercel's platform services, such as its edge network and managed distributed caches, which you can replace or may not need.
Is self-hosted Next.js slower than Vercel?
Not inherently. For users near your server, a self-hosted app can respond quickly because requests travel a short distance. For a global audience you would add a CDN to match an edge network.
Do Server Actions work when self-hosting?
Yes. They run on your Node.js server. If you run several instances, set the same NEXT_SERVER_ACTIONS_ENCRYPTION_KEY on all of them so actions work across instances.
Can I use middleware when self-hosting?
Yes. Next.js 16 renamed middleware to proxy (proxy.ts), and it runs on your Node.js server with full access to Node.js APIs.
Want to self-host Next.js without managing servers? NewHost Next.js hosting deploys from Git to South African servers, and our pricing page lists every plan in rand.