Running Node.js on SillyHost
SillyHost supports Node.js applications on Business and VPS hosting plans. You can run Express, Next.js, Nuxt.js, and other Node.js frameworks alongside your traditional PHP websites.
Setting Up via cPanel
- Log into cPanel and find the Setup Node.js App tool under the Software section
- Click Create Application
- Configure the following settings:
- Node.js version – Select your preferred version (we recommend the latest LTS release)
- Application mode – Choose
Productionfor live sites orDevelopmentfor testing - Application root – The directory containing your Node.js project (e.g.,
/home/username/myapp) - Application URL – The domain or subdomain your app should respond on
- Application startup file – Usually
app.js,server.js, orindex.js
- Click Create to save the application
Installing Dependencies
After creating the application, you need to install your npm packages:
- In the Node.js app manager, click the Run NPM Install button, or
- Connect via SSH, navigate to your application root, and run:
npm install
Environment Variables
You can set environment variables directly in the cPanel Node.js interface. Click Add Variable and enter the key-value pairs your application needs, such as database connection strings or API keys. These are equivalent to entries in a .env file.
Restarting Your Application
After making changes to your code, you need to restart the application. In the cPanel Node.js manager, click the Restart button. If you are connected via SSH, you can also use: touch tmp/restart.txt
Viewing Logs
Application logs can be found in the stderr.log file within your application root directory. Use SSH to tail the log in real time: tail -f ~/myapp/stderr.log
Important Notes
- Node.js apps on shared hosting use Phusion Passenger, not a standalone process
- WebSocket support may be limited on shared hosting — consider a VPS for WebSocket-heavy applications
- Ensure your app listens on the port provided by the
PORTenvironment variable