Skip to content

Help Centre › Websites, files and databases

How do I set up a Node.js app in cPanel?

In cPanel, open Setup Node.js App under Software, click Create Application, choose the Node.js version, folder, web address and startup file, then upload your code and click Run NPM Install. Node.js is included on every Tremhost web hosting plan.

  1. Log in to cPanel and, under Software, click Setup Node.js App.
  2. Click Create Application and fill in the form (see the table below).
  3. Click Create. cPanel makes the application folder and starts a small placeholder app.
  4. Upload your code into the application folder with File Manager or FTP. Include package.json, but not the node_modules folder.
  5. Back in Setup Node.js App, click the pencil icon next to your app, then Run NPM Install. This installs your packages from package.json.
  6. Click Restart and open the application URL to check it works.
FieldWhat to enter
Node.js versionThe version your app was built and tested on
Application modeProduction for a live site
Application rootA folder for the code, such as nodeapp. Keep it outside public_html so nobody can download your source files
Application URLThe domain or subdomain, and a path if the app should live at yourdomain.com/app
Application startup fileThe file that starts your app, such as app.js or server.js
Environment variablesSettings and secrets such as API keys, instead of writing them into the code

Two things that trip people up

  • The port. The web server passes visitors to your app, so don’t hard-code a port. Use app.listen(process.env.PORT || 3000), or the equivalent for your framework.
  • Changes don’t show. The app keeps running the old code until you click Restart. Restart after every upload.

Tip: Always run the app through Setup Node.js App, never by starting node yourself from a terminal. A process you start by hand stops when the session ends.

Each web hosting account has its own CPU and memory limits, which suits websites, APIs and bots with modest traffic. For background workers, Docker or heavy real-time traffic, a KVM VPS gives you a whole server, from $15 a month.

Still stuck? Open a support ticket with the application URL and what you see, or message us on WhatsApp.

Updated 6 November 2026. Something here out of date? Tell us.

Ask us on WhatsApp