What Is Node.js Hosting?

Category: Hosting Basics ยท Updated 2026-10-30

Node.js hosting is a hosting setup that keeps a Node.js application running as a continuous process, usually behind a reverse proxy such as Nginx, rather than executing a script fresh on every request the way PHP does. It needs SSH or similar access to install dependencies and manage the process, so it is typically offered on VPS, cloud or specialized platform plans rather than basic shared hosting.

How Node.js hosting differs from traditional web hosting

Classic shared hosting is built around a request-response model: the web server receives a request, hands it to an interpreter like PHP, gets a response, and the process ends. Node.js applications instead start once and keep running continuously in memory, listening on a port such as 3000, handling requests through an event loop until the server is stopped. This means Node.js hosting needs a way to keep that process alive, restart it if it crashes, and route public traffic to it, which basic shared hosting control panels are not built for.

What a Node.js hosting setup typically includes

ComponentRole
Node.js runtimeExecutes your JavaScript or TypeScript application code
Process manager (e.g. PM2, systemd)Keeps the app running, restarts it on crash, manages logs
Reverse proxy (Nginx or Apache)Faces the internet on ports 80/443, forwards requests to the Node process, handles HTTPS
Package manager (npm or yarn)Installs dependencies listed in package.json

Where Node.js applications run

  • VPS or cloud server: full control; you install Node, configure the process manager and reverse proxy yourself.
  • Platform-as-a-service: you push code and the platform handles builds, scaling and process management.
  • Serverless functions: short-lived Node functions triggered by requests, billed per execution rather than per running server.
  • cPanel "Node.js Selector": some shared hosts offer a limited Node.js app manager alongside regular PHP hosting.

Starting and keeping an app running

npm install
npm run build   # if the project needs a build step

# Keep the app alive with a process manager
pm2 start server.js --name my-app
pm2 save
pm2 startup

A reverse proxy then forwards public traffic to the internal port the app listens on, for example sending everything on port 443 to localhost:3000.

What to check before choosing a plan

  • Which Node.js versions are supported, and whether you can switch versions.
  • Whether SSH access is included to run npm install and manage the process.
  • How many concurrent apps or processes the plan allows.
  • Memory and CPU limits, since a Node process stays resident in RAM continuously.
  • Support for WebSockets if your app needs real-time connections.

Frequently asked questions

What is Node.js hosting?

It is hosting configured to keep a Node.js application running as a continuous process and route web traffic to it, typically through a reverse proxy, rather than executing a script fresh on each request.

Can I run Node.js on shared hosting?

Some shared hosts offer a Node.js app manager in cPanel for small apps, but most shared plans are built around PHP and do not support long-running processes well. A VPS or a Node-focused platform is the more common choice.

Do I need a VPS for Node.js?

Not strictly, but a VPS, cloud server or platform-as-a-service gives you the process control and SSH access that most real Node.js applications need. Basic shared hosting is often too limited.

What is PM2 used for?

PM2 is a process manager for Node.js that keeps an application running in the background, restarts it automatically if it crashes, and manages logs and multiple app instances on one server.

Why does my Node.js app need a reverse proxy?

A reverse proxy such as Nginx handles public ports 80 and 443, terminates HTTPS and forwards requests to the internal port your Node app listens on. Running Node directly as the public-facing server on those ports is possible but less common in production.

How is Node.js hosting different from PHP hosting?

PHP hosting runs a script once per request and then discards it, while Node.js hosting keeps one process alive continuously, handling many requests through its event loop. This makes Node.js hosting better suited to real-time features but requires process management that PHP hosting does not need.

Related topics