Why cPanel on a VPS
- Easy account management. Manage many hosting accounts from one place.
- More productivity. Common server tasks have buttons.
- Better security. cPanel brings firewall, scanning and update tools.
- Scale. You can change resources as your sites grow.
- Speed. It has caching and tuning tools.
Requirements
Software
- A supported operating system. cPanel supports AlmaLinux, Rocky Linux, CloudLinux and Ubuntu (for current releases). Older guides mention CentOS, which has reached its end of life.
- A fresh server with no other control panel, web server or database installed.
- A valid cPanel license. You buy it from cPanel or a partner.
Hardware
- At least 2 GB of RAM (cPanel recommends 2 GB or more; very small servers will struggle).
- At least 20 GB of disk space (more is better).
- A network connection and a static IP address.
Steps
- Install a supported operating system on the VPS and update it.
sudo dnf update -y
- Set a fully qualified host name, such as
server.example.com:
sudo hostnamectl set-hostname server.example.com
The name must resolve to the IP address of the server.
- Install cPanel. Run the following as root. It downloads and starts the official installer:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
The installation takes 30 to 60 minutes. Do not close the session. Use screen or tmux so it keeps running if SSH drops.
- Open WHM. When it finishes, go to
https://your_server_ip:2087in a browser. Log in asroot. - Run the setup wizard. Accept the license terms, enter your email address, set the host name and the nameservers, and choose the settings you want.
- Create accounts. In WHM, use Create a New Account to add a domain, user and package.
- Set up email. Each account owner can create mailboxes under Email Accounts in cPanel.
- Install more software. cPanel includes tools such as Softaculous (extra license) and WordPress Toolkit to install apps.
Troubleshooting
- The installer says another service exists. The server must be clean. Reinstall the operating system.
- The host name is not valid. Use a name with at least two dots, for example
server.example.com, not justserver. - The license fails. Check that the license is for the IP address of this server.
- Ports are blocked. Open ports 2082, 2083, 2086, 2087, 80, 443, 25 and 53 in your firewall.
Quick recap
- Use a fresh, supported OS and a valid license.
- Set a proper host name, then run the cPanel installer.
- Finish the setup in WHM on port 2087.