Servers powered by cPanel and WHM are very easy to maintain and many webmasters and bloggers are already familiar with this software as this is widely used by hosting services around the world, either for simple shared hosting plans to dedicated servers. Furthermore, the servers powered by cPanel/WHM are very popular in Managed Hosting Services and most of the managed services out there are limited to features only available in WHM. Yes, interestingly there are some managed services that won’t manage your service as they promise, only tweak the settings available WHM and other server configuration is considered “Best Effort”, but we will cover this in a different article.
So, if you are interested to setup your sites in a Digital Ocean server and use cPanel and WHM for managing your sites, this will allow you to tweak your settings from the WHM interface and provide your sub-accounts with a nice cPanel panel interface.
On the other side, Digital Ocean is a good alternative to Linode or even Amazon EC2, ideal for those who are looking for a reliable server with a simple dashboard. You can setup your server in minutes but by default the servers don’t support cPanel. Here we will see how to install cPanel/WHM on a Digital Ocean server in minutes.
Install Cpanel and WHM on DigitalOcean
The basic process will take a few minutes to complete. However, if you want to customize the server with advanced features, WHM plugins and more, then more time will be required.
First, create a Droplet on Digital Ocean. Go to your Digital Ocean dashboard and click New Droplet button.
Select CentOS in the Image Option (version 6.9 x65) as CentOS is one of the requirements by cPanel/WHM.
Now, choose the size of your Droplet. You can choose any size but cPanel has some special requirements to comply. For instance, you must have at least 1GB RAM and 20GB of available disk.
Then, select block storage, the server location and other options available in these pages.
You will need to add a primary domain name in the Droplet name. This is also a requirement by cPanel, as it requires you to have a valid Fully Qualified Domain Name (FCQDN). It must contain two dots and the hostname and domain name extension. For instance, you can chose host.hostingpilot.com (of course, replace hostingpilot by your own domain name).
Now, finalize the Droplet creation and wait a few seconds. Then, verify that you received the email with the confirmation and Droplet details.
Installing Cpanel/WHM
Now that you have received the details, log in to your server using SSH (you can use your favorite tool here, Putty for Windows or just the Terminal if you are on Mac). In our case, we use Terminal as I am using a Macbook.
The first time you log in to your server you will need to change your account password.
Now, you will need some dependencies are installed, for instance Perl is a requirement. In CentOS it can be installed with a few commands. Run sudo yum install perl and then press enter.
In order to run cPanel/WHM on your server, please run the following commands:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
Verify the license:
/usr/local/cpanel/cpkeyclt
It could take a few hours to download and complete the installation.
Accessing WHM
By default, WHM is using port 2087, so you will need to open the browser and enter: https://host.<domainname>.com:2087
You can also use the server’s IP address instead of the domain name.
In case your browser shows any SSL SSL certificate error, please bypass these errors by clicking the Advanced option in your browser.
To login the first time, you will need to use the root login as username and your root password.
FAQ and troubleshooting
Make sure you installed CentOS 6×64. If you installed Ubuntu then cPanel/WHM won’t work.