How to Use Node.js in cPanel
Posted about 2 months ago 4.1kSetup Node.js Application
Available on most hosts: Run Node.js apps alongside PHP.
Create Application
cPanel → Software → Setup Node.js App → Create Application → Select version.
Upload Code
Use File Manager or Git → Place in application root.
Start Application
Set startup file (usually app.js or server.js) → Run npm install → Start.
Environment Variables
Add Environment Variables
In app settings → Add keys like PORT, DATABASE_URL.
Common Configuration Table
| Setting | Typical Value |
|---|---|
| Node Version | 18.x or 20.x |
| Startup File | server.js |
| Application URL | yourdomain.com/app |
| Passenger Mode | Production |