To install cPanel/WHM on a DigitalOcean droplet running a supported Linux distribution (usually CentOS, AlmaLinux, or Rocky Linux), follow these steps. Keep in mind that cPanel is a paid product, and you’ll need a valid license.
Step-by-Step Installation:
- Log in to your DigitalOcean Droplet: Use SSH to access your droplet.
bash
ssh root@your_droplet_ip
- Update your system: Ensure your system is up to date before installation.
bash
yum update -y
- Set the hostname: Set a valid hostname for your server. Replace
yourdomain.comwith your actual domain.bashhostnamectl set-hostname server.yourdomain.com
- Disable Network Manager (Optional for CentOS 7 or earlier): cPanel requires
NetworkManagerto be disabled on CentOS systems.bashsystemctl stop NetworkManager
systemctl disable NetworkManager
- Install Perl: cPanel requires Perl to be installed on the server.
bash
yum install perl -y
- Download and install cPanel: Download and run the cPanel installer script.
bash
cd /home
curl -o latest -L https://securedownloads.cpanel.net/latest
sh latest
- Wait for the installation to complete: The installation process can take 30-60 minutes depending on the server. The script will handle the installation of all necessary components.
- Access cPanel/WHM: Once installed, you can access WHM (the admin side of cPanel) through your browser. Use the following URL:
arduino
https://your_droplet_ip:2087
Log in with the
rootuser and your root password.
Post-Installation:
- After logging into WHM for the first time, you’ll go through the initial setup wizard.
- You’ll also need to purchase a cPanel license if you don’t already have one.
Note:
Make sure your droplet meets the minimum requirements for cPanel, and ensure ports 2083, 2087, and 2086 are open in your firewall for cPanel/WHM access.
