- In cPanel, open Setup Node.js App in the Software section.
- Click Create Application.
- Choose the Node.js version (a current LTS version is recommended).
- Set Application mode to Production.
- Enter the Application root, the folder holding your app (for example
myapp), kept outside public_html. - Choose the Application URL, the domain or path the app runs on.
- Enter the Application startup file, for example
app.js. - Click Create.
Install dependencies
Upload your app files and package.json to the application root, then click Run NPM Install. Alternatively, copy the command shown at the top of the page to enter the app's environment over SSH and run npm there.
Restarting
Click Restart after changing code. Your app must listen on the port provided by the environment (process.env.PORT), not a fixed port.
Node.js apps on shared hosting are subject to the account's resource limits; very busy or long-running apps may need a VPS.