blog posts

How to install cPanel on Ubuntu 20.04

The role of cPanel in Linux server and website management is undeniable. Although there are many alternatives to this control panel, we can guess that none of them are as useful and popular as cPanel.

cPanel plays an important role in better management of websites and domains, its installation in Ubuntu 20.04 requires providing minimum network, hardware, etc. requirements. If all the requirements for this installation are available, its installation is done simply with a download command from the cPanel site script.

Before starting to use this control, you should familiarize yourself with the minimum requirements and steps to install cPanel in Ubuntu 20.04. No need to worry; in this article, we have covered everything you need to install cPanel control panel successfully. So let’s get started:

Important uses of cPanel

Of course, referring to the article “What is the cPanel control panel?” You can learn more fully and deeply about the applications and features of this control panel, but in summary, the most important applications can be mentioned as follows:

  • Publication of the website
  • Domain management
  • Organize web files
  • Create and manage email accounts
  • Setting up and controlling FTP accounts
  • Backup of website files
  • Checking the status of the website
  • Running troubleshooting tasks on the website
  • Database setup

Requirements for installing cPanel in Ubuntu 20.04

It is better not to get away from the main discussion and learn the installation process of this control panel as soon as possible. Before installing cPanel, we must first familiarize ourselves with the minimum requirements of this control panel so that we do not encounter any problems in the installation process. The requirements of this control panel for installation on the Ubuntu 20.04 server have been reviewed in several separate sections, which you can see below:

Network requirements

Your hostnames should:

  • Be registered and have all the necessary conditions.
  • Do not match any other domain.
  • It has a maximum length of 60 characters.
  • Connect to a valid IPv4 or IPv6 address.

Your server should:

Have a valid IP address.
Have a valid subnet address.
Have a default gateway IP address.

Ethernet device

Before installing cPanel, you must first configure your Ethernet device with a static IP address and valid host names. Your server detects and initializes the Ethernet device during installation.


The installer file opens the necessary ports during the installation process. It is better to disable OS firewalls before installing cPanel and configure a third-party firewall such as APF or CSF after cPanel installation.

To disable the firewall in Ubuntu 20.04, just run the following commands:

iptables-save > ~/firewall.rules

system stop ufw. service

systemctl disable use.service

Steps to install cpanel on Ubuntu 20.04

Step 1) Switch to root user.

sudo -i

Step 2) Update your system.

It is recommended to update your system before any installation process so that all packages are updated to their latest version and the system cache memory is restored.

sudo apt update

sudo apt upgrade

Step 3) If necessary, choose a valid and qualified hostname for your domain.

In order to install cPanel properly, you need a FQDN domain name, so make sure you have set valid hostnames for your desired domain.

– To check host names, enter the following command:


– To set the host names, edit the related file:

gedit /etc/hostname

Delete the old host names in this file and add the new name you want. After saving, close the tab.

– Open the /etc/hosts file:

gedit /etc/hosts

Insert a new line in the following format at the beginning of the page. yourhostname is the name you want to use for the host. (space the size of a tab) (space the size of a tab) yourhostname

for example: server1

– Reboot the server.


– You will notice the change of hostname with the following command:

hostname –fqdn

Step 4) Install Cpanel on Ubuntu 20.04 system.

It is recommended to install the Linux Screen tool before installing cPanel so that the created shell session remains active in the event of a network failure.

– If you have already installed this tool, check its version with the command:


– If you have not installed such a tool in your system, you will receive an error message, so install the screen tool with the following command:

apt install screen

Note 1: SELinux is not compatible with cPanel, so do not install this module to have a successful cPanel installation process.

Tip 2: In order to install cPanel through script properly, you must have installed Perl in your system before that.

apt -y install perl perl-base

– Now it’s time to install CPanel. Just run the following command as the root user:

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

Note 3: If your SSH remote access is interrupted for any reason, just continue the cPanel installation process from the script by entering the following command from the rest:


Installing cPanel takes some time, so wait until the installation of all required packages is complete.

How to access a cPanel user interface

To enter the cPanel user interface, you need to open your browser and enter your IP address (or domain) and port number 2083 in the address bar as shown below.


To log in to cPanel, in the username field, enter root and in the password field, enter the password of your Ubuntu 20.04 server.

Note 4: If you need to change the password, use the passwd command.

notice that:

You must also go through these steps to install C Pool on a virtual server with Ubuntu 20.04 operating system. Administrators who prefer to use a virtual server due to higher processing power and benefit from stronger hardware resources, need a control panel compatible with the server operating system to manage their websites, and cPanel is one of the best options for It is Linux.

Suppose you intend to buy a Linux virtual server to provide more power to your website or websites using the cPanel control panel. In that case, you can refer to the Ded9 company’s Linux virtual server purchase page and view our plans to find the best choice. Do it for the growth and development of your business.