How to Run a Node.js App on cPanel Hosting Without a VPS

Many projects now include a Node.js piece: an API, a WhatsApp bot or a small dashboard. The good news is you can run these apps on the same cPanel hosting, without buying a dedicated server.
Before you start
- Make your app read its port from the
PORTenvironment variable instead of a fixed number. - Prepare a
package.jsonwith your dependencies. - Know your entry file, such as
app.jsorserver.js.
Steps
- Upload the app to a folder outside
public_htmlusing File Manager or Git. - In cPanel, open the Node.js app tool (Setup Node.js App).
- Create an application: pick the Node version, app folder, domain or URL and entry file.
- Run the package install to execute
npm install. - Add environment variables, such as API keys, on the same screen rather than in code.
- Start the app and open the URL to confirm.
Let the assistant help
In the Meridian interface you can ask the AI assistant "why isn't my app starting?" or "where is the error log?" and it points you to the right place.
When do you need a VPS?
- The app needs high, guaranteed resources around the clock.
- You need custom system software or Docker.
- You expect many concurrent users or heavy WebSocket traffic.
In those cases a VPS fits better. For light and medium apps, cPanel hosting is enough and costs less.


