Websites & apps

What is Node.js? A plain-English guide for website owners

Learn what Node.js is, how it differs from PHP hosting, what npm does and which hosting plan you need to run Node.js apps such as Next.js or Express.

BeginnercPanel hosting and Linux VPS3 min read

Node.js is a runtime that lets JavaScript run on a server instead of only in a web browser. It powers APIs, chat apps, dashboards and frameworks such as Next.js, Nuxt and Express. This guide explains what Node.js is, how it is different from classic PHP hosting and how to pick the right place to run it.

Before you start

You do not need any programming experience to follow this guide. If you already have a Node.js project and want to put it online, jump to the links in Next steps.

What Node.js actually is

Node.js takes Google's V8 JavaScript engine (the same engine inside Chrome) and adds the things a server needs: reading files, opening network ports, talking to databases and running background work. You start a Node.js app with a command such as node server.js, and it keeps running, listening on a port for requests.

  • Event-driven: one Node.js process handles many connections at once by not waiting on slow tasks such as database queries.
  • Long-running: unlike PHP, which starts fresh for every request, a Node.js app stays in memory between requests.
  • JavaScript everywhere: the same language works in the browser and on the server.

What npm is

npm (Node Package Manager) is installed with Node.js. It downloads the libraries your project depends on, listed in package.json, into the node_modules folder. The most common commands are:

npm install
npm run build
npm start

npm install fetches dependencies, npm run build runs the build script (for example compiling a Next.js site) and npm start starts the app.

How Node.js hosting differs from PHP hosting

TopicPHP (WordPress etc.)Node.js
How it runsThe web server runs PHP per requestYour app runs as its own process on a port
Upload and goYes, copy files and it worksNeeds npm install, sometimes a build, then a start command
Public accessDirectly through Apache/LiteSpeedThrough a reverse proxy or Passenger
RestartsNot neededNeeded after code changes

Where you can run Node.js

cPanel hosting

MdmHost cPanel hosting runs on CloudLinux, which includes the Setup Node.js App tool. It picks a Node.js version, installs your dependencies and connects the app to your domain through Phusion Passenger, so you do not manage ports or proxies yourself. It suits small and medium apps, APIs and Next.js sites. See Set up a Node.js app in cPanel.

Linux VPS

A VPS gives you root access. You install Node.js yourself, keep the app running with a process manager such as PM2 and put Nginx, Apache or LiteSpeed in front of it. Choose a VPS for WebSockets-heavy apps, background workers or apps that need more memory.

Static export

Some frameworks, including Next.js, can export plain HTML, CSS and JavaScript. That output needs no Node.js at all on the server and runs on any hosting plan.

Tip: Not sure which you need? If your app only renders pages and does not need a server at runtime, a static export is the cheapest and fastest option.

Node.js versions

Node.js releases a new major version every six months. Even-numbered versions (such as 20, 22 and 24) become LTS (long-term support) releases and are the ones to use in production. Check the engines field in your package.json to see which version your project expects.

Next steps

Looking for a home for your app? Compare our web hosting plans.

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.