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.
- How to install aapanel 6 on Fedora 34/35
- How to install and configure CyberPanel on CentOS 8
- How to install Ajenti 2 Control Panel on Debian 11
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
Prerequisites
- 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
ubuntu
Set a new hostname by editing the /etc/hostname
$ nano /etc/hostname
Remove Ubuntu and add the following
46.101.75.141 demo.nextgentips.com 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 https://securedownloads.cpanel.net/latest && sh latest
Sample output will look like this
output
[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): https://46-101-75-141.cprapid.com:2087/cpsess6486417479/login/?session=root%3aXiINeEcF3a4g_a_A%3acreate_user_session%2c1740a98f4b1988077787ce31bf2e7ac2
[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): https://46.101.75.141:2087
[2022-01-16 20:02:31 +0000] [51136] ( INFO):
[2022-01-16 20:02:31 +0000] [51136] ( INFO): Visit https://go.cpanel.net/whminit 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 http://support.cpanel.net or https://go.cpanel.net/allfaq 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://
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
$ https://46-101-75-141.cprapid.com:2087/cpsess6486417479/login/?session=root%3aXiINeEcF3a4g_a_A%3acreate_user_session%2c1740a98f4b1988077787ce31bf2e7ac2
When the above login URL expires you can generate a new one with this command
$ whmlogin
# WHM
http://:2087
In case you are not familiar with configuration head over to this configuration site
Conclusion
Congratulation, you have learned how to install Cpanel on Ubuntu 20.04. In case of anything consult the documentation.