How to host a Next.js app in India
Decide first whether your app needs a server. A Next.js app with output: "export" is static and can be hosted from ₹199 a month. An app with server rendering, API routes, server actions or authentication needs a Node.js server and usually a database. On Nexovia you push either kind or upload a zip; the platform detects which it is, builds it, checks it and runs it in India with HTTPS on your domain.
1. Check which kind of Next.js app you have
- Static export:
next.confighasoutput: "export"and the build writes anout/folder. No server code runs after the build. - Server app: you use API routes, route handlers, server actions, middleware or sign-in such as NextAuth. These need
next starton a Node.js server.
2. Keep secrets out of the code
Anything that starts with NEXT_PUBLIC_ is sent to the browser. Never put database passwords or API keys there. On Nexovia, database URLs and keys are kept in a vault and given to the app as environment variables when it starts.
3. Add a database if you need one
Most server apps use PostgreSQL through Prisma or Drizzle. Request a managed database for the app; the connection string arrives as DATABASE_URL. If you use Prisma, keep your migrations in the repository so they run on every release.
4. Deploy
- Push the repository to your Nexovia project, or upload the project as a zip.
- The platform detects Next.js, installs dependencies from your lockfile and builds it on a separate build server.
- Zecurix Guard checks the source and the built browser files for leaked keys; vulnerable packages with a critical fix stop the release.
- The new version starts beside the current one and must pass its health check before traffic moves.
5. Point your domain
Add your domain in the console and create the record it shows. The certificate is issued automatically. If the domain still points somewhere else, the DNS checker tells you which record to change and where.
Common problems
| Symptom | Cause and fix |
|---|---|
| Build fails on an old Next.js version | Upgrade to a supported release; old versions carry critical vulnerabilities that stop the release |
| Sign-in redirects to localhost | Set NEXTAUTH_URL or your auth library's base URL to your real domain |
| Images or fonts missing after export | Use relative paths or the basePath setting; check the out/ folder locally |
| Unknown pages show the home page | Add an app/not-found page so the export writes a real 404 page |
Questions
Can I host a server-rendered Next.js app in India?
Yes. Nexovia runs server-rendered Next.js with next start on servers in India, with a managed PostgreSQL database and your secrets kept in a vault.
How much does Next.js hosting cost in India?
On Nexovia, a static export starts at ₹199 a month and a server app with a database at ₹499 a month, plus GST.
Do I need Docker to host Next.js?
No. The platform builds Next.js without a Dockerfile. If you have your own Dockerfile, it is used instead.