This comprehensive guide covers everything you need to know about installing and configuring CloudLinux on cPanel VPS. Whether you’re working with CentOS, AlmaLinux, RHEL, or exploring experimental support for Ubuntu/Debian, this step-by-step guide provides all necessary commands, tips, and detailed explanations to confirm a smooth installation process.
CloudLinux is an OS designed to improve shared hosting environments. It isolates server users into Lightweight Virtual Environments (LVEs), ensuring stability and security by preventing any single user from consuming excessive resources.
Combining CloudLinux with cPanel/WHM offers the ultimate hosting experience. Here’s why:
Before starting the installation, make sure of the following:
Always back up your server before making significant changes. Use the cPanel backup script:
/usr/local/cpanel/scripts/cpbackup --force
Critical files can be backed up manually or through WHM’s backup interface.
Run the following commands to verify compatibility:
Check your operating system:
cat /etc/redhat-release

cat /usr/local/cpanel/version

Download the installer script using wget:
wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy

Execute the script with your CloudLinux license key:

sh cldeploy -k YOUR_LICENSE_KEY
Replace YOUR_LICENSE_KEY with your CloudLinux license key.

Once the installation completes, reboot your server to activate the CloudLinux kernel:
reboot

After rebooting, confirm the OS version:
cat /etc/redhat-release

The output should reflect CloudLinux.
For CentOS systems, follow these steps to switch to CloudLinux:
Download and execute the deployment script:
wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy

bash cldeploy -k YOUR_LICENSE_KEY

reboot

cat /etc/redhat-release

CloudLinux has experimental support for Debian-based systems. Use these steps carefully:
Update and upgrade all packages:
apt update && apt upgrade -y
Download the deployment script:
wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy

Run the installer with your license key:
bash cldeploy -k YOUR_LICENSE_KEY

Reboot your server:
reboot

Confirm that CloudLinux is active:
cat /etc/os-release
Check the OS version:
cat /etc/redhat-release
uname -r

Install CageFS:
yum install cagefs -y
cagefsctl --enable all
cagefsctl --status

LVE Manager is the core resource allocation tool in CloudLinux. It integrates directly into WHM, allowing you to set limits on:
Install LVE Manager:
yum install lvemanager -y

PHP Selector allows users to select their desired PHP version.
Install alternative PHP versions:
yum groupinstall alt-php

Manages and optimizes MySQL resource usage.
Install MySQL Governor:
yum install governor-mysql -y

/usr/share/lve/dbgovernor/mysqlgovernor.py --install

Install wget and try again:
yum install wget -y

Make sure the key is correct and active. If issues persist, contact CloudLinux Support.
Installing CloudLinux on your cPanel VPS increases performance, security, and stability, making it a must-have for shared hosting environments. This guide provides every command and detail you need to complete the process seamlessly. For additional resources, visit the CloudLinux documentation.

Vinayak Baranwal wrote this article. Use the provided link to connect with Vinayak on LinkedIn for more insightful content or collaboration opportunities.