How to Install CPanel & WHM on Ubuntu?




How to Install CPanel & WHM on Ubuntu?

Hello Friends,

In this tutorial we will go over the demonstration of how to install cpanel & whm on Ubuntu. This tutorial will give you a simple example of installing cpanel on Ubuntu. I would like to show you install free cpanel on Ubuntu. you will learn the installation of cpanel on your linux system.

Before we install cPanel and WHM, it's important to understand that they come with their own set of features. In a brief overview, let's explore what these features are. Come, let's get acquainted with the features of cPanel and WHM:

Step 1: Switch Root User

First of all, open the terminal and execute the following command on the terminal to switch the root user in the linux ubuntu system:

sudo -i

And also execute the following command on the terminal to disable the firewall, while installing cpanel & whm on the linux ubuntu system:

iptables-save > ~/firewall.rules

systemctl stop firewalld.service

systemctl disable firewalld.service

Step 2: Update Linux Ubuntu System Packages

Now, execute the following command on the terminal to update the system's existing packages:

sudo apt update

sudo apt upgrade

Step 3: Set Hostname

cPanel needs FQDN- Fully qualified domain name for proper installation. So, make sure we have set the hostname to the domain name that we are planning to use with it.

For example, we are using, edit the file for change or add new hostname.

So, execute the following command on the terminal to edit the file, which name is hostname:

nano /etc/hostname

When the hostname file is open, delete the old hostname and set the new hostname.

Then save and close file.

Now, change or add a new ip address with hostname, so execute the following command on the terminal to do it:

nano /etc/hosts

Add a line with something like the below but change the IP address with the server’s address and also the domain name: yourserver

For example: demo

Save and close the file.

Step 4: Install Cpanel/WHM

Once Hostname and IP setup is completed, then execute the following command on the terminal to install cpanel and whm on linux ubuntu:

cd /home && curl -o latest -L && sh latest

Wait a few minutes while CPanel and WHM installation is finished

Step 5: Access WHM/CPanel Web interface

Now, we need to complete the installation wizard from its web-based interface and we can access WHM with the following URL:


Step 6: Login As root user in WHM

Now whm has been opened on our browser. So we can log in to it with the root user’s username and password.

Use the following steps to configure whm in linux ubuntu:

  • Now a screen will open on the browser. In which we have to log in with the root user.
  • Then End User License Agreement and accept the terms have to be accepted.
  • To setup the Server Contact Email Address and Server Contact SMS Address.
  • Also, we can change or modify the Hostname section, enter a valid FQDN hostname and Resolver entries for server
  • Now select Main Network/Ethernet Device and IP available on that device will be considered as the main IP address of server
  • To set servers' static IP address.
  • To set FTP configuration for server
  • To enable quotas and click on “Finish setup wizard”
  • I hope it can help you...