← Back to Blog

How to Install cPanel on a VPS or Dedicated Server (2026 Guide)

How to Install cPanel on a VPS or Dedicated Server

cPanel/WHM is the most widely used hosting control panel in the world, and installing it on a fresh VPS or dedicated server is, in principle, a single command. In practice, most failed installs come down to one of a handful of preventable mistakes — a hostname that doesn't resolve, not enough RAM, or a server that isn't actually "fresh." This guide walks through the full process, the requirements that actually matter, and what tends to go wrong.

What You Need Before You Start

  • A clean, supported OS. AlmaLinux 8 or 9, or CloudLinux, with no other web server, database, or control panel already installed. cPanel's installer assumes it owns the box.
  • At least 2 GB of RAM (cPanel's published minimum), though 4 GB or more is realistic if you intend to run WordPress or other CMS sites on it with any real traffic.
  • 20 GB+ of free disk space for the OS, cPanel itself, and the dozens of services it installs (Apache or LiteSpeed, MySQL/MariaDB, PHP, Exim, and more).
  • Root SSH access to the server.
  • A fully qualified hostname (FQDN) that resolves to the server's IP — something like server1.yourdomain.com, not just yourdomain.com.
  • A valid cPanel license. A free trial license is issued automatically the first time you install on a new IP, but production use requires a paid license.

Step 1: Set Your Hostname

Before running the installer, set the server's hostname to your FQDN and confirm it resolves in DNS:

hostnamectl set-hostname server1.yourdomain.com

This single step causes more failed installs than anything else. If the hostname isn't a real FQDN, or the A record doesn't point back at the server, the installer — and later, AutoSSL and mail delivery — will misbehave.

Step 2: Update the OS

Make sure the base system is current before installing anything on top of it:

dnf update -y

Reboot if the kernel was updated, then confirm you're on a genuinely untouched install — no Apache, Nginx, or MySQL already configured by a provider's default image.

Step 3: Run the cPanel Installer

From the home directory as root:

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

This downloads and runs cPanel's official installer script, which pulls down and compiles the full stack — web server, mail server, database server, PHP, and WHM/cPanel itself.

Step 4: Wait

The install isn't instant. Depending on the server's specs and network speed, expect anywhere from 45 minutes to 2+ hours. The installer logs to /var/log/cpanel-install.log if you want to watch progress or diagnose a stall.

Step 5: Run the Initial WHM Setup Wizard

Once the install finishes, log in to WHM at https://server1.yourdomain.com:2087 and complete the first-run wizard: confirm your license, set your nameservers, configure the server's main IP, and set a secure root password if you haven't already. This is also where you'll choose between Apache and LiteSpeed if a LiteSpeed license is involved.

Common Install Problems

  • Hostname mismatch. The single most common cause of install or licensing failures — see Step 1.
  • Not enough RAM. Installs on 1 GB servers frequently hang or crash partway through compilation.
  • A "fresh" server that isn't. Pre-installed Apache, Nginx, or MySQL from a provider's default image will conflict with cPanel's own services.
  • Firewall blocking outbound traffic. The installer needs outbound access to cPanel's license and update servers; an overly aggressive default firewall can silently block it.
  • License not yet provisioned. New IPs sometimes take a few minutes to register with cPanel's licensing system — if WHM reports an invalid license immediately after install, wait and retry before troubleshooting further.

After Install: What's Still On You

A finished install is the easy part. Everything after it is the real work: configuring a firewall like CSF, setting up AutoSSL, hardening PHP and Exim against abuse, configuring offsite backups, applying cPanel and OS security patches as they're released, monitoring disk and CPU, and responding when something breaks at 2 AM. None of that is optional if the server is going to host anything that matters.

Is Doing This Yourself Worth It?

If you enjoy server administration, or you're treating this as a learning exercise, installing cPanel yourself is a reasonable weekend project. If you're trying to get a client's website or a business application live, the calculation looks different. The hours spent on the install, the ongoing patching, and the eventual incident when something fails all have a real cost — and most of it is invisible until it isn't.

This is exactly the gap Entexion's managed hosting plans close: a properly configured stack from day one, with security patching, monitoring, and backups handled for you — no manual installer, no 2 AM pages. And if you've already got cPanel running on a VPS somewhere and just want a competent team watching it, our Care & Maintenance plans work alongside your existing setup to handle exactly the ongoing work described above.

Either way, you don't have to be the one running dnf update at midnight.