cPanel & WHM is the most widely used commercial web hosting control panel. WHM (WebHost Manager) is the server-level admin interface where you create hosting accounts; cPanel is what each client logs into to manage their own websites, email, databases and files. Installing it on a VPS turns the server into a small hosting platform for your clients.
Before you start
Requirements
- A fresh server — install cPanel on a clean OS, not over an existing setup.
- Supported OS — AlmaLinux, Rocky Linux, CloudLinux, or a supported Ubuntu LTS release. Check cPanel’s current system requirements for the exact versions supported by the cPanel version you’ll install.
- Resources — at least 2 GB RAM (4 GB or more recommended for hosting several clients with email and spam filtering), 40 GB+ disk.
- A license — cPanel is licensed per server, with pricing tiers by number of accounts. A 15-day trial license is issued automatically for new IPs in many cases.
Hostname and DNS
The server needs a fully qualified hostname that isn’t one of the domains you’ll host:
hostnamectl set-hostname server1.example.com
Create an A record for server1.example.com pointing to the server IP. Decide whether DNS for client domains will be served by cPanel’s nameservers (ns1/ns2.example.com with glue records) or an external DNS service.
Email: check your provider’s mail policy
Hosting clients usually means hosting their email. Outbound mail requires open SMTP ports and rDNS (PTR) matching your hostname. On VPS.DO, mail ports and rDNS are available on USA VPS plans only; Hong Kong and Japan plans block mail ports. Our Zero Spam Policy applies — make sure clients understand it. See also Email VPS.
1. Install cPanel & WHM
Log in as root on the fresh server:
cd /home
curl -o latest -L https://securedownloads.cpanel.net/latest
sh latest
Installation takes roughly 30–90 minutes. Run it inside screen or tmux so a dropped SSH session doesn’t interrupt it:
apt install -y screen || dnf install -y screen
screen -S cpanel
When it finishes, the installer prints a URL to WHM.
2. Initial WHM setup
Open https://YOUR_SERVER_IP:2087 and log in as root. The setup wizard asks for:
- Agreement to the license
- Contact email for server notifications
- Nameservers (or skip if using external DNS)
- Basic networking confirmation
Afterwards, review:
- Server Configuration → Basic WebHost Manager Setup — contact details, default nameservers.
- Security Center — enable cPHulk brute-force protection and two-factor authentication for root.
- SSL/TLS → Manage AutoSSL — enable AutoSSL so every hosted domain gets a free certificate automatically.
- Software → MultiPHP Manager — set the default PHP version and enable PHP-FPM.
3. Firewall
cPanel uses several ports. If you use a firewall, allow:
| Port | Use |
|---|---|
| 2083 / 2087 | cPanel / WHM (HTTPS) |
| 2096 | Webmail (HTTPS) |
| 80, 443 | Websites |
| 21 (and passive range) | FTP, if offered |
| 25, 465, 587, 110, 995, 143, 993 | |
| 53 | DNS, if the server is a nameserver |
| 22 | SSH (restrict to your IP) |
Many administrators use the CSF/ConfigServer-compatible firewall or a maintained fork with a cPanel UI plugin.
4. Create packages and accounts
- Packages → Add a Package — define disk quota, bandwidth, number of domains, email accounts, databases.
- Account Functions → Create a New Account — enter the client’s domain, username, password and package.
The client logs in at https://their-domain.com/cpanel or https://server1.example.com:2083.
For resellers, WHM can create reseller accounts that manage their own clients.
5. Backups
Enable Backup → Backup Configuration in WHM: daily/weekly account backups, with an additional destination off the server (SFTP, S3-compatible storage). See backing up a VPS to cloud storage.
6. Keep it secure
- Updates: cPanel updates itself nightly by default — leave it on.
- Root login via SSH keys only; restrict SSH by IP.
- Monitor mail queues for compromised accounts sending spam.
- Use ModSecurity with OWASP rules (available in WHM).
Alternatives to cPanel
If license cost is a concern, free panels such as HestiaCP, CyberPanel or aaPanel cover many of the same features. For your own sites rather than clients’, a panel may not be needed at all — see hosting multiple websites on one VPS.
Sizing
For a small hosting business with up to a few dozen accounts, start with 4 vCPU, 8 GB RAM and enough SSD for client data and local backups. Our USA VPS plans include rDNS and open mail ports for exactly this kind of setup.