Node.js

Node.js hosting in India: from git push to live, with rollback

5 min read By Cloud Ninza

Push to main, watch it build, and if it breaks, the old version is back before anyone notices.

In short Node.js hosting in India should run your app as a managed process on the Node version you choose (18 to 26), build it with npm on deploy, keep secrets in environment variables, and deploy from Git with a health check and automatic rollback. Cloud Ninza Node.js plans start at ₹2,388 a year with all of this, free SSL, logs and a browser terminal.

How a Node.js app runs on managed hosting

Your app runs as its own process under your account, on the Node.js version you choose — 18, 20, 22, 24 or 26 — listening on the port in process.env.PORT. nginx and free SSL sit in front of it, the process restarts if it stops, and the whole account has a fixed memory ceiling from your plan.

The only code change most apps need is to listen on process.env.PORT and 127.0.0.1 rather than a hard-coded port.

Framework presets

App settings has presets for Express and other Node servers, Next.js, NestJS, Nuxt, SvelteKit and static builds. A preset fills in install (npm ci), build (for example next build) and start (for example next start on the platform's port). Change any of them; what runs is exactly what you save.

  • Express, Fastify, Koa
  • Next.js and Nuxt
  • NestJS
  • SvelteKit
  • Static builds (Vite, React, Vue)

Environment variables as key/value pairs

Database URLs, API keys and NEXT_PUBLIC_* settings go in environment variables, edited in the dashboard as keys and values: add a variable, edit one in place, remove one, or paste a whole .env file. Saving restarts the app so it reads the new values. PORT and HOST are set for you.

Git deployments with a health check

Connect GitHub, GitLab or Bitbucket and set the branch. Each push clones the commit into a fresh release, runs install and build, switches the app to the new release and checks that it answers. If the build fails or the app does not come up, the previous release stays live automatically. Earlier releases are kept, so you can make any of them live again.

The live log shows every stage as it runs, and you get an email when a deploy fails.

Databases and Atlas

Plans include MariaDB/MySQL or PostgreSQL. MongoDB Atlas and other external databases connect by connection string — add our server's IP to your Atlas network access list first, or the connection is refused.

Logs, terminal and SSH

stdout and stderr stream into Logs. The browser terminal and key-only SSH open a sandboxed shell with Node, npm and Git, scoped to your account. Touch tmp/restart.txt after a manual change and the app restarts.

When to move to a cloud server

Managed Node.js hosting suits APIs, Next.js sites, dashboards and bots. Move to a cloud server from ₹1,073 a month for always-on queue workers, heavy WebSocket traffic, Redis alongside the app, or more memory than the largest plan offers. Moving a project between blueprints — say from a PHP site to a Node.js app — is a dashboard action that keeps or downloads a backup of the old one.

Preparing a Node.js app

Most apps need only small changes. Listen on process.env.PORT and 127.0.0.1. Commit package-lock.json so installs are repeatable with npm ci. Put configuration in environment variables, not in committed files. Log to standard output. Handle SIGTERM so the app closes connections cleanly when a new release takes over.

For Next.js, set the build command to next build and the start command to next start on the platform's port; public environment variables that the browser needs must be present at build time, so add them before deploying.

Performance and memory

Node.js apps run within the plan's memory ceiling, so watch memory after deploys. A steady climb usually means an unbounded cache or listeners that are never removed. Keep heavy work — image processing, report generation — off the request path, or move it to a worker on a cloud server. Serve static assets with long cache headers, and put a CDN in front if many visitors are abroad.

If the app restarts unexpectedly, the reason is in Logs: an uncaught exception, a missing environment variable or an out-of-memory stop.

A first deployment, step by step

Create the Node.js app from Launch an app and pick the version. In App settings, choose the preset for your framework and add your environment variables as key/value rows. Under Git deployments, connect the repository and branch, copy the webhook URL into GitHub, GitLab or Bitbucket, and press Deploy. When the live log shows success, open the domain. Every push after that deploys the same way, with automatic rollback.

Troubleshooting common errors

A 502 from nginx means the app is not answering on its port — usually it listens on a fixed port or crashed at start; check Logs. "Cannot find module" means a dependency is in devDependencies but needed at runtime, or the build step did not run. "ECONNREFUSED" to a database means the connection string is wrong or, for Atlas, our IP is not on the network access list. Each of these is fixed in minutes once you read the log.

Databases for Node.js apps

Node.js apps can use MySQL or MariaDB and PostgreSQL created from the dashboard, or an external database such as MongoDB Atlas added by connection string. Keep the connection string in an environment variable and reuse a single connection pool across requests; opening a new connection per request is the most common cause of slow Node.js apps.

For Atlas, add our server's address to the cluster's network access list, and remember that a paused free cluster refuses connections until it is resumed.

Choosing a Node.js version

Several Node.js versions are installed side by side, and each app chooses its own. Use the current long-term support version for new projects, and pin the version in package.json's engines field so the team knows which one production runs. When you upgrade, change the version in App settings, deploy, and watch the logs; if something breaks, switch back and redeploy while you fix it.

APIs, WebSockets and background work

APIs built with Express, NestJS or Fastify run well on managed hosting. Light real-time features over WebSockets work too, through nginx. For heavy real-time traffic, long-running jobs or queues that must always be processing, use a cloud server for that part and keep the web app on hosting, so a busy background job never slows customers down.

Key takeaways

The short version, for anyone skimming:

  • Your app runs as a managed process on Node 18 to 26, listening on process.env.PORT.
  • Presets cover Express, Next.js, NestJS, Nuxt, SvelteKit and static builds.
  • Environment variables are key/value pairs in the dashboard; saving restarts the app.
  • Git deploys build each release, health-check it and roll back automatically.
  • Node.js plans start at ₹2,388 a year.
Host it with us

Node.js Hosting from ₹2,388/year

Run Express APIs and Next.js apps on the Node.js version you choose, with environment variables, logs and a set RAM allowance. Node.js 18, 20, 22, 24 or 26 · From 256 MB app RAM · Your code from Git or a ZIP.

Ready when you are

Hosting from ₹99 a month on servers in India

WordPress, PHP, Node.js, Python and Java plans with free SSL and your choice of version. Create your account, pick a plan and pay by UPI, card or netbanking; your hosting is created automatically and you get your login by email, usually within minutes.

Questions

Questions on this topic

Which Node.js versions are available?

Node.js 18, 20, 22, 24 and 26, changed from App settings.

Can I host a Next.js app?

Yes. The Next.js preset builds with next build and serves with next start on the platform's port.

Does my app need to listen on a specific port?

It must listen on process.env.PORT (and 127.0.0.1); the platform sets it.

Can I deploy from GitHub automatically?

Yes, with a webhook: each push builds, health-checks and rolls back automatically on failure.

How do I add environment variables?

In App settings, as key/value rows — add, edit, remove or paste a .env file.

Can I use MongoDB Atlas?

Yes. Allow our server's IP in your Atlas project's network access, then add the connection string.

Are WebSockets supported?

Yes, through the proxy; very heavy real-time traffic is better on a cloud server.

How do I see errors?

In Logs in the dashboard, which shows the app's output.

How much does Node.js hosting cost?

Node.js plans start at ₹2,388 a year before GST.

Can I switch my app from Python to Node.js?

Yes, by changing the project's blueprint in the dashboard; keep or download a backup first.