To install Node.js and npm (Node Package Manager) in cPanel, follow the steps below:
Step 1: Log in to cPanel

- Open your web browser and go to your cPanel login URL.
- Enter your username and password to log in.
Step 2: Access the Terminal (SSH)

- In your cPanel, scroll down to the “Advanced” section and click on “Terminal”.
- If you don’t see the Terminal option, make sure that SSH access is enabled for your cPanel account. If not, contact your hosting provider to enable it.
Step 3: Manual Installation via Terminal

- Go to your project directory

2. Install Node Version Manager (nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
- Load nvm
source ~/.bashrc
- Install Node.js
nvm install node # For latest version
# OR
nvm install --lts # For LTS version
- Verify Installation
node -v
npm -v
- Make Node.js Available System-Wide (if needed)
Create symlinks in your ~/bin directory:
mkdir ~/bin
ln -s "$(which node)" ~/bin/node
ln -s "$(which npm)" ~/bin/npm
That’s it! You’ve successfully installed Node.js and npm on your cPanel hosting account.