Preface:
To use cPanel, you must first create a cPanel account within the WHM (WebHost Manager) panel. However, accessing WHM requires the system’s root account. Since Ubuntu disables the root account by default, you need to log in to the server using the default administrator account first, and then follow the steps below to enable the root account.
1. Enabling the root user on Ubuntu 22.04
Run the following commands over SSH (logged in as your sudo user):
# 1. Set a password for the root account
sudo passwd root
# 2. Enable root login in SSH configuration
sudo nano /etc/ssh/sshd_configInside the file, find and edit these lines (or add them if missing):
PermitRootLogin yes
PasswordAuthentication yesThen restart the SSH service:
sudo systemctl restart sshNow you can log in as root using the password you set:
ssh root@your-server-ipOnce logged in, you can access WHM via:
https://your-server-ip:2087using:
Username: root
Password: <the same root password>2. Accessing WHM and cPanel after installation
| Panel | Default HTTPS Port | Example URL |
|---|---|---|
| WHM (WebHost Manager) | 2087 |
https://your-server-ip:2087 |
| cPanel (End-User Panel) | 2083 |
https://your-server-ip:2083 |
⚠️ You must log in to WHM first, since no cPanel accounts exist yet.
3. Initial WHM setup wizard steps
When you log in for the first time, WHM will guide you through these steps:
- Accept license agreement
- Add contact email (for alerts)
- Set a hostname (e.g.,
server1.yourdomain.com) - Configure the main shared IP
- Choose a DNS nameserver type (BIND recommended)
- Save settings
4. Create your first cPanel account
Inside WHM:
Account Functions → Create a New AccountYou’ll need:
- Domain name
- Username
- Password
- Contact email
Once created, log in to the cPanel user interface at:
https://yourdomain.com:20835. Activate your cPanel license
If you installed cPanel manually, it starts in Trial Mode (valid 15 days).
To activate your license:
Log in to WHM
Go to License Verification page, or run:
/usr/local/cpanel/cpkeycltThe system will fetch and activate the valid license.
6. Advanced Resources
For more information, please refer to the official cPanel website.
