How to Install CloudLinux on cPanel, DirectAdmin and Plesk

Install CloudLinux
Rate this post

Key points

  • CloudLinux isolates each hosting account with LVE limits on CPU, memory and I/O, so one busy or hacked site cannot take down the whole server.
  • Order matters: OS first, then the control panel, then the conversion with cldeploy.
  • Use cldeploy -k KEY for a key license or cldeploy -i for an IP license, then reboot.
  • After the reboot, uname -r must contain lve. Then enable CageFS and set the PHP Selector.

On a shared hosting server, the classic failure is one account eating all the CPU or memory, and every other site slowing to a crawl. CloudLinux fixes that by putting each account in its own lightweight container with fixed limits, and adds CageFS so accounts cannot browse each other’s files. To install CloudLinux on an existing server you convert it in place, and that is mostly automatic. This guide walks through it for cPanel, DirectAdmin and Plesk.

Before you start

  • A supported OS: AlmaLinux 8 or 9, Rocky Linux, or CentOS 7. CentOS 8 and CentOS Stream cannot be converted.
  • The control panel already installed and working. CloudLinux recommends this order.
  • A license: an activation key, or an IP-based license for the server’s main IP. Licenses bought through some control panel stores are IP-based and have no key.
  • A full backup or snapshot. The conversion swaps the kernel and many system packages.
  • Console access from your provider’s panel, in case the server does not come back after the reboot.

On a KVM VPS this works the same as on a dedicated server, because the VPS runs its own kernel.

Step 1: Update the system

dnf -y update
reboot

Start the conversion from a fully updated system with the latest kernel running.

Step 2: Download cldeploy

cd /root
dnf -y install wget
wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy

Step 3: Run the conversion

# Key-based license
bash cldeploy -k YOUR_ACTIVATION_KEY

# IP-based license
sh cldeploy -i

The edition is detected from the license. The script replaces the repositories, installs the CloudLinux kernel and the LVE tools, and detects the control panel. Expect it to take 10–30 minutes. Do not interrupt it.

Step 4: Reboot and verify

reboot
# after the server is back:
uname -r

The kernel name must contain lve, for example …el9h.lve…. If it does not, the server booted the old kernel; check the boot menu or the default kernel with grubby --default-kernel.

Step 5: Panel-specific steps

cPanel / WHM

  • Open WHM → Plugins → CloudLinux Manager. Set default LVE limits (CPU, physical memory, I/O, entry processes) for your packages.
  • Enable CageFS for all users from the same screen, or later per account.
  • Under the PHP Selector, choose which alt-php versions customers may pick, and set a sensible default.
  • EasyApache 4 keeps working as before; rebuild only if CloudLinux Manager asks for it.

DirectAdmin

  • cldeploy runs DirectAdmin’s CustomBuild for you during the conversion.
  • Log in as admin and open the CloudLinux Manager plugin to set limits, CageFS and the PHP Selector.
  • To offer several PHP versions through the selector, install the alt-php packages:
    dnf groupinstall -y alt-php

Plesk

  • Plesk is supported. During conversion, cldeploy replaces Plesk’s own FastCGI module package with the CloudLinux one; this is expected.
  • Manage limits, CageFS and the PHP Selector from the CloudLinux extension in Plesk.
  • Converting back from CloudLinux (“step-down”) is not supported on Plesk, so keep that backup.

Step 6: Turn on CageFS

If CageFS is not installed yet, add it and build its template:

dnf -y install cagefs
cagefsctl --init
cagefsctl --enable-all

Each account now sees only its own home directory and a safe set of system files. After installing new system software that users need (for example a new command-line tool), refresh the template with cagefsctl --force-update.

Common problems

ProblemWhat to check
License error during cldeployThe key is typed correctly, or the IP license matches the server’s main public IP.
No lve in uname -rDefault kernel in GRUB; on some VPS platforms the provider must allow custom kernels.
Sites show 508 errorsThe account hit its entry-process or memory limit. Raise the LVE limits for that package.
A user’s cron job cannot find a programThe program is not in CageFS. Add it and run cagefsctl --force-update.

What next

CloudLinux limits damage between accounts; it does not stop malware from getting in. Pair it with Imunify360 and set up off-server backups with JetBackup. If you would rather not run your own hosting server, our Linux hosting with cPanel already runs on CloudLinux; for your own setup, see our KVM VPS plans.

Frequently asked questions

Should I install the control panel or CloudLinux first?

Install the operating system, then the control panel, then convert to CloudLinux with cldeploy. The script detects cPanel, DirectAdmin and Plesk and adjusts the setup for each.

Which operating systems can be converted to CloudLinux?

AlmaLinux 8 and 9 and Rocky Linux are the usual starting points; CentOS 7 is also supported. CentOS 8 and CentOS Stream cannot be converted.

What is the cldeploy command for an IP-based license?

Download the script with wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy and run sh cldeploy -i. For a key-based license, run bash cldeploy -k YOUR_ACTIVATION_KEY.

How do I know the conversion worked?

After the reboot, run uname -r. The kernel name must contain 'lve'. If it does not, the server did not boot into the CloudLinux kernel.

What is CageFS?

CageFS is a CloudLinux feature that gives every hosting account its own virtual file system, so one user cannot see other users' files or most system files. It is installed with yum install cagefs and initialised with cagefsctl --init.

Related articles