The Application Manager in cPanel allows users to deploy Phusion Passenger applications, including NodeJS apps. To install a cPanel-provided version of NodeJS on your system, you'll need to install the supporting packages. This article provides the steps to install those packages.
Please note that CloudLinux allows users to use multiple versions of NodeJS through "NodeJS Selector," so CloudLinux users may wish to install the CloudLinux-provided version of NodeJS instead.
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Use yum/dnf/apt, as appropriate, to install the needed packages.
Please note that in the following commands, "$nodeversion" must be replaced with the desired NodeJS version (i.e., ea-nodejs16, ea-nodejs18, or ea-nodejs20).
- CentOS 7
yum install ea-apache24-mod_env ea-apache24-mod-passenger ea-nodejs16
- AlmaLinux 8/9 and Rocky Linux 8/9
dnf install ea-apache24-mod_env ea-ruby27-mod_passenger $nodeversion
apt install ea-apache24-mod-env ea-apache24-mod-passenger $nodeversion
- CentOS 7
- Verify that NodeJS has been installed correctly.
/opt/cpanel/$nodeversion/bin/node -vPlease note that "$nodeversion" must be replaced with the installed NodeJS version (i.e., ea-nodejs16, ea-nodejs18, or ea-nodejs20).