Node.js is a robust runtime environment for running server side JavaScript applications. On Cyberin shared hosting, deploying Node.js apps is simple thanks to our cPanel interface, though there are a few limitations and best practices to keep in mind.
This guide will walk you through:
Setting up Node.js apps using cPanel controls
Installing and managing npm packages
Switching Node.js versions (when available)
Troubleshooting common installation and runtime issues
Before you get started, make sure you have:
An active Cyberin shared hosting account with cPanel access
Your Node.js application files ready, or a plan to build one from scratch
Basic familiarity with web hosting and file management concepts
Note: Shared hosting environments don't provide root or SSH access for system wide installations. All Node.js and npm actions have to be done through cPanel or the terminal provided, if one is available.
Log in to cPanel.
Go to the Software section and click Node.js App.
Click Create Application.
Application Root: Choose or create a folder, such as mynodeapp.
Application URL: Select your domain or subdomain.
Application Startup File: Usually app.js or index.js.
Node.js Version: Pick the version you want from the dropdown, if more than one is available.
Click Create.
Your application environment will now be set up. The system creates a virtual environment for your app, separate from other system processes.
To use npm packages in your application:
In the Node.js App section, find your app and click Edit.
Use the Run NPM Install button. This will install all dependencies listed in your package.json.
If you need to add a new package:
Update your package.json via File Manager or the cPanel Terminal (if available), or
Use the application terminal in cPanel to run:
npm install package-name --saveClick Restart Application after adding or updating packages.
> Tip: Always ensure your package.json is in your app’s root directory.
Cyberin shared hosting typically lets you choose from several Node.js versions:
When you create or edit your application in the Node.js App section, simply pick your preferred version from the Node.js Version dropdown.
Keep in mind, changing the version will require you to restart your application.
Note: Installing custom Node.js versions isn't allowed on shared hosting. You can only use the versions provided in cPanel.
Create Application Root
In cPanel File Manager, navigate to your app root (e.g., mynodeapp).
Create index.js
const http = require('http');
const port = process.env.PORT || 3000;
http.createServer((req, res) => {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello, World!');
}).listen(port, () => {
console.log(`Server running at port ${port}`);
});Set Startup File: Point the cPanel Node.js app to index.js.
Start the App: Use cPanel controls to start/restart the application.
Test: Visit your application URL in a browser. You should see "Hello, World!"
Check the startup file: Make sure the filename matches what’s set in cPanel.
Missing dependencies: Use NPM Install button or review your package.json. Port errors: always use process.env.PORT for the port, don’t hard code it.
Syntax or typo mistakes: double check your package.json and code files. Unsupported packages: some native modules that need compilation may not work on shared hosting.
Unsupported features: if you’re seeing syntax or runtime errors, check that your selected Node.js version supports the features you’re using.
Use File Manager: upload and edit files through the cPanel File Manager to avoid permission problems. Max file size: use FTP for files larger than 250 MB.
Check logs: use the View Logs feature in the Node.js App section to find error messages.
Restart the app: changes to code or dependencies often require a restart.
If you’ve tried these steps and your app still isn’t working, please submit a support ticket with details and error messages.
Keep dependencies up to date using npm.
Don’t use root or global npm installs, always install packages in your app directory.
Restrict file permissions to improve security.
Back up your application before making major changes.
Monitor resource usage through cPanel so you don't exceed shared limits.