New Customers: 50% OFF Your First Month on All VPS Servers & Web Hosting Plans!

How to install cPanel?

A complete guide to installing cPanel and WHM on a fresh Linux server. Learn the essential pre-installation steps, how to run the official installer, and how to configure WHM for your first account.

HostworldWeb hosting & cPanel 3 min read Updated 23 Sep 2026

Install cPanel on a fresh, supported AlmaLinux 8, 9 or 10 server, or Ubuntu 24.04 LTS, then run this as root to download and start the installer: cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest. When it finishes, go to https://your-server-ip:2087 to access WHM and complete setup.

Before you start

  • Use a freshly installed, supported OS with no other control panel or preinstalled services. Do not use Rocky Linux. Do not install “over” anything else.
  • Have a static public IPv4 and a unique, resolvable FQDN hostname that is not a domain you plan to host.
  • Root SSH access to the server, and the ability to rebuild the OS in Virtualizor from your Hostworld client area if you need to roll back. A rebuild erases everything on the server, so take your backups off the server first.

Step 1: Prepare the server

Get these right before you run the installer. Skipping them causes most failures.

  • Set a proper hostname: a unique, resolvable FQDN under 60 characters. Do not reuse a customer domain you plan to host. Installation can fail if the hostname is invalid.
  • Networking: ensure a static public IPv4. IPv6-only is not supported. If you are behind NAT, configure 1:1 NAT and NAT loopback.
  • Security frameworks: on AlmaLinux, disable SELinux. On Ubuntu, AppArmor is supported and does not need to be disabled.
  • NetworkManager: AlmaLinux 8 installs may disable NetworkManager. On AlmaLinux 9, do not disable NetworkManager.
  • Firewall: ensure outbound HTTPS to cPanel endpoints during install and updates, for example securedownloads.cpanel.net:443. If in doubt, disable the OS firewall for the installation, then re-enable and configure it after.
  • Images: use a clean upstream image or template. Pre-built cloud images can cause issues.

Step 2: Run the official installer

This downloads the current cPanel & WHM installer to /home and executes it. Run as root:

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

Optional: customise the install. For example, if your server IP has an active CloudLinux licence and you want to remain on AlmaLinux, add --skip-cloudlinux. You can also skip extras like WP Toolkit or ImunifyAV:

sh latest --skip-cloudlinux --skip-wptoolkit --skip-imunifyav

Watch /var/log/cpanel-install.log to verify progress and completion.

Step 3: Finish in WHM

Open WHM over HTTPS on port 2087 and complete the initial configuration, then create your first cPanel account:

https://your-server-ip:2087

cPanel offers a free 15-day trial licence. Check cPanel's own documentation on signing up for a trial licence for the current sign-up process and what the trial email contains.

Step 4: Undo or roll back

There is no cPanel uninstaller. To remove it, you must reinstall the OS. In Hostworld, use Virtualizor from your client area to rebuild the VPS with a fresh supported OS, then restore from your backups. Reinstalling the OS will erase all data on the server.

If it does not work

  • Installer fails or complains about the hostname: set a unique, resolvable FQDN, then start again on a clean OS. Do not proceed with a partial install. Check /var/log/cpanel-install.log for the exact error.
  • Unsupported or deprecated OS: new installs on Rocky Linux and Ubuntu 22.04 are blocked. Rebuild the server with AlmaLinux 8, 9 or 10, or Ubuntu 24.04 LTS, then run the installer again. Remember that the rebuild wipes the server.
  • Network or licensing errors: ensure the server has a static public IPv4, not DHCP or IPv6-only. If behind NAT, configure 1:1 NAT and loopback. Allow outbound HTTPS to cPanel endpoints such as securedownloads.cpanel.net:443 through your firewall.
  • No network after changing NetworkManager on AlmaLinux 9: reconnect via the Virtualizor VNC console, revert the change, and follow the AlmaLinux 9 note above.

If you are stuck, open a support ticket and tell us the VPS name, OS version, and the last 50 lines of /var/log/cpanel-install.log.

What next

For context on OS choices, networking and migrations around cPanel servers, see our VPS guides. If you need a new server to reinstall or migrate to, see our UK VPS range, which runs in a UK data centre in London. This support article focuses on the install path; the guide explores alternatives and when to pick each.

Common questions

What operating systems support cPanel installation?

cPanel installs on AlmaLinux 8, 9 or 10, and Ubuntu 24.04 LTS. Rocky Linux and older Ubuntu versions are not supported for new installs.

What should I prepare before installing cPanel?

Set a unique, resolvable FQDN hostname, ensure a static public IPv4 address, disable SELinux on AlmaLinux, and allow outbound HTTPS to cPanel endpoints through your firewall.

How do I access WHM after installation?

Open https://your-server-ip:2087 in your browser and complete the initial configuration. You can activate a free 15-day trial licence during first login.

Can I uninstall cPanel after installing it?

No. To remove cPanel, you must rebuild the entire operating system. Use Virtualizor to reinstall the OS from a clean image.

What should I do if the installer fails?

Check /var/log/cpanel-install.log for the exact error. Most failures are caused by an invalid hostname or unsupported OS. Start again on a clean, supported operating system.

Was this article helpful?