Replies: 4 comments 2 replies
-
|
Hi, Next.js, from the very beginning has supported self-hosting. The good ol' It'll work just about the same. We call this baseline |
Beta Was this translation helpful? Give feedback.
-
|
Yes, you can absolutely self-host a Next.js app on any shared or VPS server without Vercel. Basic stepsnpm run build
npm run startOptimized self-hostingUse module.exports = {
output: 'standalone',
}Then run: node .next/standalone/server.jsYou can host this on any server running Node.js — a VPS, shared hosting with Node support, Railway, Render, etc. Official guide: https://nextjs.org/docs/app/guides/self-hosting |
Beta Was this translation helpful? Give feedback.
-
|
Yes, but it depends on what you mean by "shared hosting". If the shared hosting provider supports running a persistent Node.js process, then a Next.js app can be deployed without Vercel. In that case, you can build the app with: npm run build
npm run startor use the standalone output for a smaller deployment. However, many traditional shared hosting plans are designed only for PHP applications and do not allow you to run a Node.js server continuously. In those environments, a Next.js application may not work even though it works fine on a VPS. Before choosing a host, I would check:
If your hosting provider supports those requirements, then you can host a Next.js application independently of Vercel without any issues. |
Beta Was this translation helpful? Give feedback.
-
|
Yes — Next.js is completely independent of Vercel. Vercel maintains it, but it's open source and runs anywhere. You have two main self-hosting paths, and which one works on a "shared server" depends on whether that host lets you run a Node.js process. Option 1 — Node.js server (supports all Next.js features)If your host can run a long-running Node process, just build and start it: npm run build
npm run start # runs `next start`This supports everything: SSR, API routes, ISR, image optimization, middleware, etc. Works on any VPS or Node-capable host (DigitalOcean, AWS EC2, Hetzner, Railway, Render, a self-managed Linux box, etc.). For smaller/Docker deployments, set Option 2 — Static export (works on basic/cheap shared hosting)If you're on traditional shared hosting (cPanel, Apache/Nginx, PHP-style hosts) that only serves static files and can't run Node, use a static export: // next.config.js
const nextConfig = {
output: 'export',
}
module.exports = nextConfig
Quick decision guide
So the short answer: yes, you can host it anywhere — a basic shared server works with a static export, and any Node-capable server runs the full app. Hope this resolves it — if so, would you mind clicking "Mark as answer" so others searching for the same thing can find it quickly? Happy to clarify further. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Can We Install Nextjs App on shared server or any other server..
independant of Veceral
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions