Running Node.js or Python Applications
Deploy Node.js or Python apps on your hosting account.
cPanel — Node.js
- Go to Setup Node.js App in cPanel
- Click Create Application
- Select Node.js version
- Set the application root (e.g.,
myapp) - Set the application URL
- Set the startup file (e.g.,
app.js) - Click Create
Installing Dependencies
After creating the app:
- Click Run NPM Install in the cPanel interface
- Or via SSH: enter the virtual environment and run
npm install
cPanel — Python
- Go to Setup Python App in cPanel
- Click Create Application
- Select Python version
- Set the application root and startup file
- Click Create
Installing Packages
- Use the Add Package button in the cPanel interface
- Or via SSH: activate the virtual environment and run
pip install -r requirements.txt
Environment Variables
Set environment variables in the cPanel app configuration. Common ones:
NODE_ENV=productionPORT=3000DATABASE_URL=...
Troubleshooting
- App not starting: Check startup file path and logs
- Module not found: Run npm install or pip install
- Port conflict: Use the port assigned by cPanel, not a hardcoded one
- Static files not loading: Configure Apache to proxy correctly