Skip to main content
Our cPanel hosting supports Node.js applications through the Setup Node.js App feature (CloudLinux Node.js Selector), letting you run Express, Next.js, and other Node.js applications alongside your PHP sites.

Creating a Node.js application

  1. Log in to cPanel.
  2. In the Software section, click Setup Node.js App.
image
  1. Click Create Application and complete the form:
    • Node.js version: pick the version your app requires.
    • Application mode: Development or Production.
    • Application root: the folder containing your app (e.g. nodeapp), relative to your home directory.
    • Application URL: the domain or subdomain/path where the app is served.
    • Application startup file: your entry point (e.g. app.js or server.js).
  2. Click Create.
cPanel configures the environment and routes web traffic on your chosen URL to the application via Phusion Passenger.

A minimal example app

Create app.js in your application root:
Passenger sets the port — always listen on process.env.PORT rather than a hard-coded port.

Installing dependencies

After uploading your package.json:
  • On the app’s row in Setup Node.js App, click Run NPM Install, or
  • Connect via SSH, enter the app’s virtual environment (the command is shown at the top of the app’s edit page — it looks like source /home/user/nodevenv/nodeapp/18/bin/activate), and run npm install.

Managing the application

From Setup Node.js App you can:
  • Restart the app after deploying new code
  • Stop/Start the app
  • Set environment variables (e.g. NODE_ENV, API keys)
  • Change the Node.js version

Troubleshooting

  • Check the stderr.log in the application root for startup errors.
  • “503” or Passenger error pages usually mean the app crashed on boot — the log tells you why.
  • After any code change, click Restart.
For larger applications with heavy build steps or persistent processes beyond web requests, consider whether a plan with dedicated resources fits better — we’re happy to advise.