cldeploy script, run sh cldeploy -k YOUR_KEY (or -i for an IP-based licence) and reboot into the CloudLinux kernel. Removing CloudLinux is harder. The safest way back is a fresh AlmaLinux server with cPanel and a move of the accounts with the WHM Transfer Tool. Check CloudLinux’s current documentation or support before you try an in-place uninstall.What CloudLinux adds to cPanel
CloudLinux OS is a version of Enterprise Linux built for shared and reseller hosting. On a cPanel server it adds:
- LVE limits: CPU, memory, I/O and process limits for each account, so one busy site cannot slow the whole server.
- CageFS: each user sees only their own files and a limited view of the system.
- PHP Selector: users choose their own PHP version and extensions.
- CloudLinux Manager in WHM to set limits and see which accounts use the most resources.
It is most useful on servers that host many separate accounts. A server that runs only your own sites may not need it.
Before you install
- ✓ A server running a release that CloudLinux can convert, such as AlmaLinux or Rocky Linux 8 or 9, with cPanel installed.
- ✓ A CloudLinux licence: an activation key, or an IP-based licence bought for the server’s IP address.
- ✓ A full backup or snapshot of the server. The conversion replaces the kernel and many system packages.
- ✓ Console access (VNC or KVM) in case the server does not come back after the reboot.
- ✓ A maintenance window. Sites go down during the reboot.
Step 1: update and back up
dnf update -y
# Back up every cPanel account to /home (needs enough free space)
for u in $(ls /var/cpanel/users); do /scripts/pkgacct "$u"; done
Copy the backups off the server as well. See our cPanel backup and restore guide.
Step 2: run the conversion
cd /root
wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
# With an activation key
sh cldeploy -k YOUR_ACTIVATION_KEY
# Or, with an IP-based licence
sh cldeploy -i
Run it inside screen, so a dropped SSH connection does not stop it. The script replaces the system packages and installs the CloudLinux kernel. It can take a while.
Step 3: reboot and check
reboot
# After logging back in
cat /etc/redhat-release # should name CloudLinux
uname -r # should show a kernel with "lve" or "el" and CloudLinux in the name
cagefsctl --cagefs-status # CageFS status
In WHM, open CloudLinux Manager to check the default limits.
Step 4: set up limits, CageFS and PHP Selector
- In CloudLinux Manager, set default limits for each hosting package. Start generous, then lower them as you learn how accounts behave.
- Turn on CageFS for all users, then add exceptions only where needed.
- Configure PHP Selector: choose the default version and the extensions users may enable.
- Watch the usage reports for a few days and adjust the limits.
See our guide to PHP Selector on CloudLinux.
Removing CloudLinux
Removing CloudLinux is not as simple as installing it. The kernel, the system packages and cPanel’s integration all change. CloudLinux has documented an uninstall option in cldeploy, but the steps and support depend on the CloudLinux version. You have two options:
Option A: move to a fresh server (recommended)
- Set up a new server with AlmaLinux and cPanel. See our cPanel install guide.
- Use WHM > Transfers > Transfer Tool to copy all accounts from the CloudLinux server.
- Test the sites, change DNS, and keep the old server until everything has run cleanly for a few days.
- Cancel the CloudLinux licence once the old server is shut down.
This avoids leftover packages and gives you a clean system.
Option B: uninstall in place
Only try this with a full backup or snapshot, console access, and CloudLinux’s current uninstall instructions for your version. Before you start, turn off CageFS and remove PHP Selector settings that sites rely on. If anything goes wrong, restore the snapshot. When in doubt, ask CloudLinux support or our team first.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| cldeploy says the licence is invalid | Wrong key, or the IP licence is for another address | Check the key or move the licence to the server’s main IP. |
| The old kernel boots after the reboot | The boot entry did not change | Check the default kernel with grubby --default-kernel and set the CloudLinux kernel. |
| Sites show errors after enabling CageFS | An application needs a file outside the cage | Check the CageFS documentation and add the path, or exclude the user while you investigate. |
| Accounts hit their limits all the time | Limits are too low for the sites | Raise the package limits, or move busy sites to a larger plan. |
Need help with this?
Want CloudLinux installed and tuned for you? Our server management team can convert your server and set the limits.
Frequently asked questions
Can I install CloudLinux on an existing cPanel server?
Yes. cldeploy converts a supported AlmaLinux or Rocky Linux server with cPanel in place. Take a full backup first.
Do I need to reboot after installing CloudLinux?
Yes. The server must boot into the CloudLinux kernel for LVE limits to work.
Can I remove CloudLinux later?
Yes, but the safest way is moving the accounts to a fresh AlmaLinux server. Check CloudLinux’s current instructions before an in-place uninstall.
Do I need CloudLinux for a server with only my own sites?
Usually not. It is most useful when many separate accounts share one server.
Can I add CloudLinux to an UnderHost Cloud VPS?
Yes. CloudLinux is available as a paid option on our Cloud VPS plans. See the Cloud VPS page for the current price and systems.
Related guides
- How to Optimize PHP Performance in cPanel with MultiPHP Manager & CloudLinux PHP Selector
- Optimizing PHP Performance in CloudLinux with PHP Selector: A Developer’s Guide
- Optimizing PHP Performance in CloudLinux with PHP Selector
- How to Install GMP on a cPanel Server (EasyApache 4)
- Updated Guide: How to Install MongoDB on a cPanel Server
