Get 50% Discount Offer 26 Days

Recommended Services
Supported Scripts
WordPress
Hubspot
Joomla
Drupal
Wix
Shopify
Magento
Typeo3
How to Install CloudLinux on cPanel VPS

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.

1. What is CloudLinux?

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.

Key Features of CloudLinux:

  • Resource Isolation: Each user is contained in their LVE, preventing “noisy neighbors.”
  • Increased Security: Tools like CageFS and KernelCare add extra layers of protection.
  • Improved Stability: Stops resource spikes from crashing the server.
  • PHP and Python Selector: Users can choose their preferred PHP/Python versions.
  • Optimized Performance: Maximizes efficiency for shared hosting environments.

2. Why Use CloudLinux on cPanel VPS?

Combining CloudLinux with cPanel/WHM offers the ultimate hosting experience. Here’s why:

  • Control Resource Allocation: Prevents a single cPanel account from overloading the server.
  • Increased User Experience: Each account operates independently, minimizing performance drops.
  • Simplified Management: CloudLinux integrates seamlessly with cPanel/WHM through tools like LVE Manager.
  • Robust Security: CageFS isolates users, while KernelCare ensures kernel-level protection without downtime.

3. System Requirements

Before starting the installation, make sure of the following:

  • Supported Operating Systems:
    • CentOS 7 or 8
    • AlmaLinux 8 or later
    • RHEL 7 or 8
    • Ubuntu/Debian (experimental)
  • cPanel/WHM installed and licensed.
  • Root Access to the VPS.
  • A CloudLinux License Key, which you can purchase from the CloudLinux website.

4. Preparing for CloudLinux Installation

Backing Up Your Server

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.

Checking Your OS and cPanel Version

Run the following commands to verify compatibility:

Check your operating system:

cat /etc/redhat-release
Using the cat /etc/redhat-release command to check the OS version
  1. Check your cPanel version:
cat /usr/local/cpanel/version
Identifying the version of cPanel installed on the server

5. How to Install CloudLinux

Installing CloudLinux on CentOS, AlmaLinux, or RHEL

Step 1: Download the CloudLinux Deployment Script

Download the installer script using wget:

wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy

Downloading CloudLinux installer script

Step 2: Run the Installation Script

Execute the script with your CloudLinux license key:

Running the CloudLinux installation script
sh cldeploy -k YOUR_LICENSE_KEY

Replace YOUR_LICENSE_KEY with your CloudLinux license key.

Executing the CloudLinux installation script with the license key

Step 3: Reboot the Server

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

reboot

Rebooting the server to activate the CloudLinux kernel after installation

Step 4: Verify the Installation

After rebooting, confirm the OS version:

cat /etc/redhat-release
Confirming successful CloudLinux installation by checking the OS version

The output should reflect CloudLinux.

Switching CentOS to 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

Downloading the CloudLinux installer script using wget
bash cldeploy -k YOUR_LICENSE_KEY
Executing the CloudLinux installation script with the license key
  1. Reboot the server:
reboot

Rebooting the server to activate the CloudLinux kernel
  1. Verify the switch:
cat /etc/redhat-release
Confirming successful CloudLinux installation by checking the OS version

Installing CloudLinux on Ubuntu/Debian (Experimental)

CloudLinux has experimental support for Debian-based systems. Use these steps carefully:

Step 1: Update System Packages

Update and upgrade all packages:

apt update && apt upgrade -y

Step 2: Download and Run Deployment Script

Download the deployment script:

wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy

Using the wget command to download the CloudLinux installer script from the official repository

Run the installer with your license key:

bash cldeploy -k YOUR_LICENSE_KEY
Running the CloudLinux installer script to complete the installation process

Step 3: Reboot and Verify

Reboot your server:

reboot

Restarting the server to complete the CloudLinux installation proces

Confirm that CloudLinux is active:

cat /etc/os-release

6. Post-Installation Setup

Verifying Installation

Check the OS version:

cat /etc/redhat-release
  1. Confirm the kernel:
uname -r
Confirming successful CloudLinux installation by checking the kernel version
  1. The output should display a CloudLinux kernel version.
  2. Log in to WHM and confirm that LVE Manager appears under the Plugins section.

Configuring Key Features

CageFS (Filesystem Virtualization)

Install CageFS:

yum install cagefs -y
  1. Enable CageFS for all users:
cagefsctl --enable all
  1. Verify CageFS status:
cagefsctl --status

LVE Manager (Resource Management)

Confirming CageFS installation and status in WHM

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

  • CPU
  • RAM
  • Entry Processes
  • Disk I/O

Install LVE Manager:

yum install lvemanager -y
Installing LVE Manager to configure user resource limits
  1. Access LVE Manager in WHM to configure limits for individual users.

PHP Selector

PHP Selector allows users to select their desired PHP version.

Install alternative PHP versions:

yum groupinstall alt-php
Installing additional PHP versions for website compatibility and flexibility

7. Advanced Features of CloudLinux

MySQL Governor

Manages and optimizes MySQL resource usage.

Install MySQL Governor:

yum install governor-mysql -y
Installing MySQL Governor to optimize MySQL resource usage
  1. Enable MySQL Governor:
/usr/share/lve/dbgovernor/mysqlgovernor.py --install

Enabling MySQL Governor to optimize MySQL resource usage

8. Troubleshooting Installation Issues

Issue: Deployment Script Fails to Download

Install wget and try again:

yum install wget -y

Installing wget to download the deployment script

Issue: Invalid License Key

Make sure the key is correct and active. If issues persist, contact CloudLinux Support.

Conclusion

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.

About the writer

Vinayak Baranwal Article Author

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

Leave a Reply

Your email address will not be published. Required fields are marked *

Lifetime Solutions:

VPS SSD

Lifetime Hosting

Lifetime Dedicated Servers