Get started

Node.js hosting in India: from code to live

The set-up that most production Node.js apps use on a VPS, in the order you build it.

Node.js apps need a server where you control the process, the version and the ports. A VPS gives you that. This is the set-up most teams use, from a blank server to a live app.

What a VPS gives a Node.js app

  • Root access, so you install the Node version you need, with the tools you like.
  • Open ports and background processes, which most shared hosting blocks.
  • Resources reserved for you, so a busy minute on another customer's site does not slow your API.
  • Prices in rupees. Plans start at ₹899 a month with UPI and card payments.

Pick a size

A small API, a bot or a side project fits the smallest plan (1 vCPU, 1 GB RAM, 50 GB NVMe SSD). A busy API, a Next.js site with server rendering or an app with its database on the same machine needs more memory; 2 vCPUs, 4 GB RAM, 80 GB NVMe SSD at ₹1,499 a month is a common next step. Measure memory use with real traffic and move up when it stays high.

The set-up, step by step

  1. First login and a normal user. Log in as root once, create a normal user, and turn on SSH keys. See the knowledge base for the commands.
  2. Install Node.js with the version your app targets, from the official repository or a version manager.
  3. Put your code on the server with Git, build it, and set its environment variables in a file that only your user can read.
  4. Run it under a process manager. PM2 or a systemd service restarts the app after a crash or a reboot.
  5. Add Nginx in front. It terminates HTTPS, serves static files and passes the rest to your app on a local port. One server can host several apps this way.
  6. Get a certificate from Let's Encrypt and renew it automatically.
  7. Turn on the firewall. Allow SSH, HTTP and HTTPS; keep your app and database ports closed to the internet.

Keep it healthy

  • Log to files or to a service, and rotate the logs so the disk does not fill.
  • Set a memory limit on the process manager so a leak restarts the app instead of freezing the server.
  • Back up your database and uploads to a place off the server, and test a restore.
  • Update the operating system and your dependencies on a schedule, and read the change notes before big upgrades.

Next step

See the Cloud VPS plans, or ask us if you want help choosing. Heavy databases or constant high load may be better on a dedicated server.

FAQ

Node.js Hosting in India: your questions answered

Why use a VPS for Node.js and not shared hosting?

A Node.js app is a long-running process that listens on a port. Most shared hosting does not let you run your own processes, install your own Node version or open ports. On a VPS you have root access and control all of it.

Which VPS size do I need for a Node.js app?

A small API or bot usually runs on the smallest plan (1 vCPU, 1 GB RAM, 50 GB NVMe SSD). A busy API, a Next.js app with server rendering or a database on the same machine needs more memory, so look at 2 vCPUs, 4 GB RAM, 80 GB NVMe SSD. Check memory use under real traffic before you decide.

How do I keep my app running after I close the terminal?

Run it under a process manager such as PM2, or as a systemd service. Both restart the app if it crashes and start it again after a reboot.

Do I need Nginx in front of Node.js?

It is the usual set-up. Nginx handles HTTPS and static files and passes other requests to your app on a local port. It also lets you run several apps on one server, each on its own domain.

Can I run a database on the same VPS?

Yes for small and medium projects. Give the database enough memory, keep regular backups, and move it to its own server when the app grows.

Where are the servers?

Our servers run from India-first locations, including Kolkata, which keeps the delay low for users in India.

Get a VPS running today

Cloud VPS plans start at ₹899 a month, billed in rupees, with full root access.