TürkiyeVPS

What Is Node.js Hosting? Node.js Hosting vs VPS

Why won't a Node.js app run on classic PHP hosting? We explain what Node.js hosting offers, choosing a version, deploying with Git, RAM requirements and when it's time to move to a VPS.

7 min read

You've built an API with Express, a site with Next.js or a bot in Node.js, and you want to put it live. Upload the files to a classic PHP hosting plan and you'll find it doesn't run. That's because, unlike PHP sites, Node.js apps stay up as a continuously running process. In this post we explain what Node.js hosting is, how it differs from classic hosting, and when to choose Node.js hosting versus a VPS.

Quick summary: Node.js hosting is a hosting plan built to run Node.js applications: the Node.js version you need, SSH and Git access, free SSL and the infrastructure required to keep your app running all come ready to go. For a single app or API, Node.js hosting is the practical choice; if you'll run a database, Redis, Docker or multiple services, a VPS is more flexible.

Why won't a Node.js app run on classic hosting?

On classic shared hosting, the web server (Apache, Nginx or LiteSpeed) runs a PHP file each time a request comes in and returns the result; your code doesn't run between requests. With Node.js, your app is a program started with node app.js that binds to a port and listens continuously. That program needs to be:

  • restarted when it crashes,
  • started automatically when the server reboots,
  • reachable through a reverse proxy that forwards incoming requests to the app's port,
  • run with the correct Node.js version.

Classic hosting plans don't support these processes. We cover the general differences between hosting types in our What is web hosting? post.

What does Node.js hosting offer?

Look for the following in a good Node.js hosting plan:

  • Node.js version choice: It's important that your app runs on the version it was tested with. Prefer current LTS releases (for example 20, 22, 24); older projects may also need versions like 18.
  • SSH access: A terminal is essential for npm install, database migrations and checking logs. If you're new to SSH, start with our What is SSH? post.
  • Git deploys: Being able to update your code with git pull is far safer and faster than uploading files one by one.
  • Free SSL: Your domain should load over HTTPS.
  • Enough RAM: Node.js apps live in memory. A simple Express API runs on a few hundred MB; frameworks like Next.js can need 1-2 GB of RAM during the build.
  • Disk type: The node_modules folder is made up of thousands of small files; NVMe storage speeds up installs and startup.

Node.js hosting vs VPS

Node.js hosting VPS
Setup Environment comes ready You install Node.js, PM2, Nginx and SSL yourself
Management Less maintenance Full control, all maintenance is on you
Database, Redis, Docker Depends on the plan, limited Install whatever you want
Best for A single app, API or site Multiple services, custom configuration

Choose Node.js hosting: If you want to get an API, a Next.js or Nuxt site, or a small web app live quickly and don't want to deal with server administration.

Choose a VPS: If you'll run PostgreSQL, Redis, a queue worker or Docker containers alongside your app, or you need to install system packages or configure custom networking. We walk through keeping a Node.js app running nonstop on a VPS step by step in our running a Node.js app 24/7 with PM2 guide, and cover the domain and SSL side in our Nginx and Let's Encrypt SSL setup post.

Checklist before going live

  1. Specify the Node.js version with the engines field in package.json.
  2. Read the app's port from an environment variable such as process.env.PORT instead of hard-coding it.
  3. Put secret keys in a .env file rather than in your code, and don't commit .env to Git.
  4. In production, install only the packages you need with npm ci --omit=dev.
  5. For projects that need a build step, like Next.js, add npm run build to your deploy process.
  6. Send logs to a file or a process manager; know where to look when something goes wrong.

Deploying a Node.js app on a VPS step by step

This is the shortest path from a Git repository to a running app (on our Node.js VPS plans Node.js LTS, npm, PM2 and Git come preinstalled):

  1. Connect over SSH and fetch your code:
git clone https://github.com/user/app.git /opt/app
cd /opt/app
npm ci
  1. Put your settings in a .env file (port, database address, secret keys). If your project has a build step, run npm run build.
  2. Start the app with PM2 and save it for reboots:
PORT=3000 pm2 start npm --name app -- start
pm2 save
pm2 startup

Run the line that pm2 startup prints once; after that the app comes back on its own when the server restarts. 4. Connect your domain (ports 80/443 need an extra IPv4 address): on a Node.js VPS, tvps-nginx-proxy 3000 example.com installs Nginx and forwards port 80 to your app. For free SSL, run apt-get install -y certbot python3-certbot-nginx and then certbot --nginx -d example.com. 5. Updates and logs: ship a new version with git pull && npm ci && pm2 reload app without downtime, and follow errors with pm2 logs app.

Which is better for Telegram and Discord bots?

A bot isn't a website; instead of waiting for incoming requests, it connects out to Telegram or Discord servers itself. That's why even the cheapest VPS is usually enough for bots. For bots written in Python, see our running a Telegram bot 24/7 on a VPS guide; for Node.js bots, the PM2 guide applies in the same way.

A TürkiyeVPS VPS for your Node.js app

TürkiyeVPS offers Node.js VPS plans for Node.js: a VPS with root access that you reach over SSH, delivered with the current Node.js LTS, npm, PM2 and Git already installed; prices are the same as our regular VPS plans. You pull your app with Git and keep it running 24/7 with PM2; you can also install extra services such as a database, Redis or Docker on the same server. Budget plans run behind a shared IP and only your SSH port is open: that is enough for bots and background jobs, but to serve your site on your own domain over ports 80/443 you need an extra IPv4 address for $1.88 per month. With the extra IP you set up Nginx and a free Let's Encrypt SSL certificate and connect the app to your domain. For apps under constant load, see our VDS plans with dedicated CPU and guaranteed RAM. For PHP and WordPress sites, classic web hosting is a better fit. Payments are accepted in USDT (TRC20).

Frequently Asked Questions

What's the difference between Node.js hosting and regular hosting?

On regular (PHP) hosting, the web server runs a PHP file on each request. With Node.js hosting, your app is a continuously running process; the plan provides the right Node.js version, keeps the process up and forwards requests to the app's port.

How much RAM does a Node.js app need?

A simple Express API or bot runs on a few hundred MB. For frameworks like Next.js and Nuxt, and projects with a build step, 2 GB of RAM is a safer bet. If you have multiple apps or heavy traffic, consider 4 GB or more.

Can I host my Next.js site on Node.js hosting?

Yes. A Next.js app is built with npm run build and runs as a Node.js process with npm start. Because RAM usage spikes during the build, choose a plan with at least 2 GB of RAM.

Can I use MongoDB or PostgreSQL with Node.js hosting?

Your app can connect to an external database. If you want to install and manage the database yourself on the same server, a VPS with root access is a better fit.

Which is cheaper, Node.js hosting or a VPS?

The smallest VPS plans are usually cheaper, but you have to handle installing Node.js, a process manager, Nginx and SSL, plus updates, yourself. Node.js hosting cuts down that setup and maintenance work. Which one is more economical depends on your time and your app's needs.