1. Enable Node.js for Your Website
This guide explains how to enable Node.js for your website and how to install npm modules inside your isolated Node.js container using SSH.
- Log in to your hosting control panel.
- Go to Websites and select your domain.
- Open the Node.js App section.
- Click Create Node.js App.
- Configure:
- Port (autoβassigned or custom)
- Startup command (e.g.,
node app.js) - Node.js version (Stable recommended)
- Working directory (Home directory)
- Start mode (Automatic)
- Save your settings.
Your website now has its own isolated Node.js container. The log panel will show the startup process.
2. Access Your Node.js Container via SSH
To install npm modules, you must log in directly to your websiteβs container. This is done through the SSH settings shown in your control panel.
Open the SSH Access Panel
In your website dashboard, go to:
Websites β Advanced β SSH Key Manager / SSH Password Authentication
Option A: Log in using an SSH Key (recommended)
- Click Upload Public Key in the SSH Key Manager.
- Add your SSH public key.
- Use the SSH command shown in the panel to connect.
Option B: Log in using SSH Password Authentication
- Enable SSH password authentication.
- Copy the SSH login command shown in the panel.
- Use your SSH password to log in.
Once logged in, you are inside your websiteβs Node.js container.
3. Initialise Your Node Environment (REQUIRED BEFORE ANY NPM COMMANDS)
Before installing npm modules, you must initialise Node.js and NVM inside the container by running:
/usr/bin/install_nvm_and_node.sh
Then load NVM into your current shell session:
export NVM_DIR="$HOME/.nvm"
. "$NVM_DIR/nvm.sh"
4. Navigate to Your Application Directory
ls -la
You should see files such as:
- app.js
- package.json
- package-lock.json
- node_modules (if already installed)
- public_html
If your app is inside a subfolder:
cd foldername
5. Install npm Modules
All npm installations must be done inside your container after running the initialization script and loading NVM.
Install all dependencies from package.json:
npm install
Install a specific module:
npm install express
Install multiple modules:
npm install express axios dotenv
6. Restarting Your Node.js Application
You can restart your Node.js application directly via SSH using:
pkill -f "node.*src/server"
Or restart the entire container:
- Go to Websites β Node.js App.
- Click Delete App.
- Create the app again with the same settings.
This forces the container to rebuild and restart with your latest code and modules.
7. Common Issues & Fixes
Error: Cannot find module 'express'
Modules were not installed inside the container or Node was not initialised.
/usr/bin/install_nvm_and_node.sh
export NVM_DIR="$HOME/.nvm"
. "$NVM_DIR/nvm.sh"
npm install express
App not updating after changes
Restart using:
pkill -f "node.*src/server"
Or recreate the Node.js app in the control panel.