How to install Cpanel and WHM on Ubuntu 20.04

In this tutorial, we are going to learn how to install Cpanel on Ubuntu 20.04. Also, I will show you the free alternatives to Cpanel. This will make a big impact while trying to choose which free web hosting to use without worrying about the licenses. Cpanel provides a way where you can send emails by providing email hosting services which makes it easy to communicate with your customers.

Cpanel is a web hosting control panel. It provides a GUI interface where administrators key in the information they want to configure, this simplifies the process of hosting a web site to the website end-user.

Cpanel free alternatives

We have a ton of free and open-source alternatives to Cpanel. This includes

  • CyberPanel free version
  • Ajenti
  • Zpanel
  • Virtualmin GPL version
  • Froxlor
  • ISPconfig
  • aapanel

We have other tones of services, so it’s up to you the user to choose which satisfies your needs.

Check out these articles to get to know more about the above few alternatives.

Uses of Cpanel

Cpanel allows you to do the following:

  • Publish new websites after you have registered your domain either with godaddy or namecheap, I prefer using namecheap because its easy to navigate
  • Helps you organize web files
  • You can cretate email accounts to use
  • You can manage domains
  • Check the status of your website
  • Run troubleshooting tasks within your website


  • Make sure you have Ubuntu 20.04 up and running
  • You have root access
  • You have a hostname with fully qualified registered domain name
  • Disable OS firewalls
  • Make sure SELinux is disable if you have installed
  • Make sure you have installedPerl

Install Cpanel on Ubuntu 20.04

1. Run system updates

It is always recommended to run system installation for freshly installed systems in order to make system repositories up to date.

$ sudo apt update
$ sudo apt upgrade -y

2. Install Screen for Ubuntu 20.04

It is recommended that you install the screen on your server and run the Cpanel installation script inside the screen. To install the screen run the following.

Check if the screen is installed first

$ screen --version
Screen version 4.08.00 (GNU) 05-Feb-20

If it’s not there, install the screen with the following command;

apt install screen

Another thing to note is to make sure you have a fully qualified hostname. So to check your hostname type hostname on the command line.

$ hostname 

Set a new hostname by editing the /etc/hostname

$ nano /etc/hostname

Remove Ubuntu and add the following server

Restart your server for the changes to take effect.

3. Installing cpanel on Ubuntu 20.04

To start installation run the screen command first.

$ screen

If by chance you don’t have the screen installed run the following to install it

$ apt install screen

Now to install Cpanel run the following command on your terminal

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

Sample output will look like this

[2022-01-16 20:02:30 +0000] [51136] ( INFO): Flushing the task queue
[2022-01-16 20:02:31 +0000] [51136] ( INFO): cPanel install finished in 14 minutes and 2 seconds!
[2022-01-16 20:02:31 +0000] [51136] ( INFO): Congratulations! Your installation of cPanel & WHM 11.100 is now complete. The next step is to configure your server. 
[2022-01-16 20:02:31 +0000] [51136] ( INFO): 
[2022-01-16 20:02:31 +0000] [51136] ( INFO): Before you configure your server, ensure that your firewall allows access on port 2087.
[2022-01-16 20:02:31 +0000] [51136] ( INFO): 
[2022-01-16 20:02:31 +0000] [51136] ( INFO): After ensuring that your firewall allows access on port 2087, you can configure your server.
[2022-01-16 20:02:31 +0000] [51136] ( INFO): 
[2022-01-16 20:02:31 +0000] [51136] ( INFO): 1. Open your preferred browser
[2022-01-16 20:02:31 +0000] [51136] ( INFO): 
[2022-01-16 20:02:31 +0000] [51136] ( INFO): 2. Navigate to the following url using the address bar and enter this one-time autologin url:
[2022-01-16 20:02:31 +0000] [51136] ( INFO): 
[2022-01-16 20:02:31 +0000] [51136] ( INFO):
[2022-01-16 20:02:31 +0000] [51136] ( INFO): 
[2022-01-16 20:02:31 +0000] [51136] ( INFO): After the login url expires you generate a new one using the 'whmlogin' command or manually login at:
[2022-01-16 20:02:31 +0000] [51136] ( INFO): 
[2022-01-16 20:02:31 +0000] [51136] ( INFO):
[2022-01-16 20:02:31 +0000] [51136] ( INFO): 
[2022-01-16 20:02:31 +0000] [51136] ( INFO): Visit for more information about first-time configuration of your server.
[2022-01-16 20:02:31 +0000] [51136] ( INFO): 
[2022-01-16 20:02:31 +0000] [51136] ( INFO): Visit or for additional support
[2022-01-16 20:02:31 +0000] [51136] ( INFO): 
[2022-01-16 20:02:31 +0000] [51136] ( INFO): Thank you for installing cPanel & WHM 11.100!

The installation will take time, so relax and wait for it to finish.

It will install many dependencies including MariaDB for database management.

Head over to your favorite browser and type https://<your_IP_address>:2087

Alternatively, you are given a one-time URL to login with, use root as username and password set. Note: make sure you set the password first to continue using Cpanel.

You will get a one-time URL like this


When the above login URL expires you can generate a new one with this command

$ whmlogin
Cpanel install login
Cpanel install login

In case you are not familiar with configuration head over to this configuration site


Congratulation, you have learned how to install Cpanel on Ubuntu 20.04. In case of anything consult the documentation.

About Kipkoech Sang

I am a technology enthusiast who loves to share gained knowledge through offering daily tips as a way of empowering others. I am fan of Linux and all other things open source.
View all posts by Kipkoech Sang →

Leave a Reply

Your email address will not be published.