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

Related Articles

How to Restore Your cPanel Account: A Complete Guide for New System Administrators

This guide explains how new system administrators can restore a cPanel account using WHM, transfer accounts and configurations between servers, and enable diagnostic logging for transfer and restore operations. It covers essential concepts such as WHM vs. cPanel, root access, backup handling, SFTP uploads, transfer methods, and advanced debugging tools.

Continue

آموزش کامل انتقال تمام اکانت‌های cPanel از یک سرور به سرور دیگر

این مقاله نحوه انتقال همه اکانت‌های cPanel، تنظیمات سرویس‌ها، گواهی‌های SSL و IP اصلی سرور را از یک سرور قدیمی (Source) به یک سرور جدید (Target) توضیح می‌دهد. شامل نصب سرور جدید، انتقال تنظیمات، انتقال اکانت‌ها، تغییر IP، تنظیم DNS و نصب مجدد SSL است.

Continue

How to Migrate a WordPress® Installation to a cPanel & WHM Server

This guide explains how to migrate a WordPress installation from a macOS-hosted environment to a cPanel & WHM server. It covers exporting the database, uploading WordPress files, creating and importing a MySQL database, updating URLs, configuring wp-config.php, fixing broken links, and finalizing the migration.

Continue

How to Manually Transfer an Account Between Servers in cPanel & WHM

This article explains how to manually transfer a cPanel account between servers when the account is too large for WHM’s automated transfer tools. It covers creating temporary directories, compressing public_html and log files, securely transferring data with SCP, and restoring the files on the destination server.

Continue

How to Manually Migrate Horde Calendars and Contacts to Roundcube in cPanel & WHM

This article explains how to manually migrate Horde calendars and contacts to Roundcube in cPanel & WHM version 108 through 118. It covers exporting Horde data, placing it in the correct directories, and importing it into Roundcube using built‑in plugins or manual import tools.

Continue

How to Manually Migrate Accounts to cPanel & WHM from Unsupported Control Panels

This article explains how experienced system administrators can manually migrate accounts from unsupported third‑party control panels to cPanel & WHM. It covers pre‑migration steps, installation requirements, file and directory transfers, database restoration, SSL migration, and post‑migration tasks.

Continue