Guide to Installing Node.js, Accessing the CLI, and Clearing Full Partitions in cPanel & WHM

This article explains how to install and uninstall Node.js on RHEL-based and Ubuntu servers, how to deploy Node.js applications, how to access the Linux command line through different operating systems and cPanel/WHM interfaces, and how to clear a full partition—especially when the /var directory fills up.

Node.js InstallationcPanel CLI AccessClear Full Partition

~3 min read • Updated Feb 18, 2026

1. Introduction to Node.js Installation


Node.js is an open-source server environment that runs JavaScript efficiently without blocking processes. It offers excellent resource management and is widely used for modern web applications.


Requirements


  • Root-level access to the server
  • A functioning package manager

2. Install Node.js on RHEL-Based Servers


You can install Node.js on supported RHEL-derived systems using one of the following methods:


Install via WHM


WHM » Home » Software » EasyApache 4 » Additional Packages

Install via Command Line


Available packages:


  • ea-nodejs16 (only option for CentOS 7)
  • ea-nodejs18
  • ea-nodejs20
  • ea-nodejs22

3. Install Node.js on Ubuntu Servers


curl -s https://deb.nodesource.com/setup_20.x | sudo bash
apt install nodejs
apt install ea-apache24-mod-passenger
ls -al /etc/cpanel/ea4/passenger*.system-default

4. Install a Node.js Application


cPanel users can deploy Node.js apps in two ways:


  • Clone an app via Git Version Control
  • Create a new application

For RHEL-based servers, read the How to Install a Node.js Application documentation. For Ubuntu, AlmaLinux 9+, or Rocky Linux 9, use the Passenger Applications documentation.


5. Uninstall Node.js


On RHEL-Based Servers


  • Uninstall via EasyApache 4
  • Or remove via package manager

On Ubuntu


apt-get purge --auto-remove nodejs

6. Troubleshooting Node.js


If you encounter issues, use:


  • Passenger Standalone Troubleshooting
  • Reverse Port Binding in Node.js

7. Included Applications


Node.js installation includes:


  • Node.js
  • NPM — Node package manager
  • NPX — Node process runner

Stored in:


/opt/cpanel/ea-nodejs16/bin/

8. Accessing the Command Line


cPanel & WHM uses Bash for the root user by default. Users can access the CLI through:


cPanel Terminal


cPanel » Home » Advanced » Terminal

WHM Terminal


WHM » Home » Advanced » Terminal

Operating System CLI Access


OSCLI ApplicationHow to Access
WindowsCommand PromptStart → Search → Command Prompt
macOSTerminalApplications → Utilities → Terminal
UbuntuTerminalCtrl + Alt + T

9. Connect to cPanel & WHM via SSH


ssh username@hostname

Example:


ssh [email protected]

After entering the password, you will see:


Last login: Fri Feb  6 12:52:33 2015 from 10.1.4.202
username@example [~]#

10. Limitations


If shell access is disabled, you may see:


Shell access is not enabled on your account!

Contact your hosting provider to enable SSH.


11. Clearing a Full Partition


The /var directory often fills up first due to system logs.


Step 1 — Check Disk Usage


du -sh

Example output:


563M ./cpanel
2.8G .

Step 2 — Identify Large Files


du -h *

Step 3 — Save Recent Entries


tail -5000 filename > filename.new
mv filename.new filename
sync

Step 4 — Delete Files


cat /dev/null > filename

Step 5 — Restart the Service


Follow the How to Restart Services documentation.


Conclusion


This guide provides everything you need to install and manage Node.js, access the CLI, and clear full partitions in cPanel & WHM environments. Mastering these tasks ensures smoother server performance and easier troubleshooting.


Written & researched by Dr. Shahin Siami