Node.js™ is an open-source server environment that runs JavaScript. It does not use threads and does not block processes. Because of this, it provides efficient resource management.
For more information about Node.js, visit the Node.js website.
Requirements
Before you can install Node.js, your system must meet the following requirements:
You must possess root-level access to the server.
Your server’s package manager must function properly. For more information about package managers, read our Package Manager Basics documentation.
Install Node.js
Installing Node.js on servers running RHEL-derived operating systems
In the interface, install the Node.js package in the Additional Packages section of WHM’s EasyApache 4 interface (WHM » Home » Software » EasyApache 4).
On the command line, use your package manager to install one of the following packages:
ea-nodejs16
Note:If your system runs CentOS 7, you can only install the ea-nodejs16 package.
ea-nodejs18
ea-nodejs20
ea-nodejs22
Installing Node.js on servers running Ubuntu
To install Node.js on Ubuntu® operating systems run the following commands, where 20.x represents the Node.js version that you want to install:
For information on how to do this for a server that runs Ubuntu, AlmaLinux OS 9, or Rocky Linux™ 9, read our Using Passenger Applications documentation.
You can uninstall Node.js from a server running an RHEL-derived operating system with one of the following methods:
In the interface, uninstall the Node.js package in the Additional Packages section of WHM’s EasyApache 4 interface (WHM » Home » Software » EasyApache 4).
On the command line, use your package manager to uninstall your NodeJS package.
To uninstall Node.js from an Ubuntu server, run the following command:
If you experience issues with the port on which your Node.js applications listens, use Phusion Passenger’s™Reverse port binding in Node.js documentation to troubleshoot the issue.
Included applications
When you install Node.js, the package includes the following applications: