{"id":12807,"date":"2025-12-20T12:24:15","date_gmt":"2025-12-20T06:54:15","guid":{"rendered":"https:\/\/www.youstable.com\/blog\/?p=12807"},"modified":"2025-12-20T12:24:17","modified_gmt":"2025-12-20T06:54:17","slug":"how-to-configure-cpanel-on-linux","status":"publish","type":"post","link":"https:\/\/www.youstable.com\/blog\/how-to-configure-cpanel-on-linux","title":{"rendered":"How to Configure cPanel on Linux Server &#8211; (Step-by-Step Guide 2026)"},"content":{"rendered":"\n<p><strong>To configure cPanel on a Linux server in 2026<\/strong>, prepare a clean, supported OS (AlmaLinux, Rocky Linux, CloudLinux, or Ubuntu LTS), set a valid hostname and static IP, open cPanel\/WHM ports, run the cPanel installer via SSH, complete the WHM Initial Setup Wizard, then harden security, configure DNS, enable AutoSSL, and create hosting packages.<\/p>\n\n\n\n<p>In this step-by-step guide, you\u2019ll learn how to configure cPanel on a Linux server from scratch using best practices that align with modern hosting standards. We\u2019ll cover installation, WHM configuration, DNS and SSL, mail deliverability, security hardening, backups, and performance tuning\u2014so your cPanel\/WHM stack is production-ready and compliant with 2026 hosting requirements.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"what-youll-need-system-requirements-and-prerequisites\"><strong>What You\u2019ll Need (System Requirements &amp; Prerequisites)<\/strong><\/h2>\n\n\n\n<p>Make sure your environment meets cPanel\u2019s current requirements. As of 2026, focus on supported, actively maintained distributions and a clean server image.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"supported-operating-systems\"><strong>Supported Operating Systems<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>AlmaLinux 8\/9 (recommended for production)<\/li>\n\n\n\n<li>Rocky Linux 8\/9<\/li>\n\n\n\n<li>CloudLinux 8\/9 (for high-density, shared hosting)<\/li>\n\n\n\n<li>Ubuntu 22.04 LTS (check cPanel docs for latest supported Ubuntu LTS)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"minimum-hardware\"><strong>Minimum Hardware<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CPU: 2 vCPU+ (4 vCPU recommended)<\/li>\n\n\n\n<li>RAM: 2 GB minimum (4\u20138 GB recommended)<\/li>\n\n\n\n<li>Disk: 40 GB minimum (NVMe\/SSD preferred)<\/li>\n\n\n\n<li>Network: Static public IPv4; NAT is supported with proper configuration<\/li>\n<\/ul>\n\n\n\n<p>cPanel requires a valid license (trial or paid). Many providers, including YouStable, bundle cPanel licenses with VPS and Dedicated servers to simplify setup.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-1-prepare-the-server-clean-os-hostname-networking\"><strong>Step 1: Prepare the Server (Clean OS, Hostname, Networking)<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"a-update-the-os-and-install-essentials\"><strong>A. Update the OS and install essentials<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># AlmaLinux\/Rocky\/CloudLinux\nsudo dnf -y update\nsudo dnf -y install curl perl screen tar\n\n# Ubuntu\nsudo apt update &amp;&amp; sudo apt -y upgrade\nsudo apt -y install curl perl screen tar<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"b-set-a-fully-qualified-hostname-fqdn\"><strong>B. Set a fully qualified hostname (FQDN)<\/strong><\/h3>\n\n\n\n<p>Use a valid, resolvable FQDN like server.example.com (not example.com).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo hostnamectl set-hostname server.example.com\necho \"YOUR.SERVER.IP server.example.com server\" | sudo tee -a \/etc\/hosts<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"c-ensure-a-static-ip-and-working-dns-resolvers\"><strong>C. Ensure a static IP and working DNS resolvers<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Check IP\nip addr\n\n# Add resolvers if needed\necho -e \"nameserver 1.1.1.1\\nnameserver 8.8.8.8\" | sudo tee \/etc\/resolv.conf<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"d-disable-selinux-rhel-family-before-install\"><strong>D. Disable SELinux (RHEL-family) before install<\/strong><\/h3>\n\n\n\n<p>cPanel requires SELinux to be disabled during installation.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Temporarily\nsudo setenforce 0\n\n# Permanently (requires reboot)\nsudo sed -i 's\/^SELINUX=.*\/SELINUX=disabled\/' \/etc\/selinux\/config<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-2-open-cpanel-whm-ports-in-the-firewall\"><strong>Step 2: Open cPanel\/WHM Ports in the Firewall<\/strong><\/h2>\n\n\n\n<p>Open required ports so services function correctly. If you use a cloud firewall (AWS Security Groups, etc.), allow them there too.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>WHM\/cPanel: <\/strong>2087 (WHM SSL), 2083 (cPanel SSL)<\/li>\n\n\n\n<li>Web: 80, 443<\/li>\n\n\n\n<li><strong>FTP: <\/strong>21 and passive range (e.g., 30000\u201335000)<\/li>\n\n\n\n<li><strong>Mail: <\/strong>25, 465, 587 (SMTP), 110, 995 (POP3), 143, 993 (IMAP)<\/li>\n\n\n\n<li><strong>DNS: <\/strong>53 TCP\/UDP<\/li>\n\n\n\n<li><strong>SSH: <\/strong>22 (or your custom port)<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># firewalld example (RHEL-family)\nsudo firewall-cmd --permanent --add-service=http\nsudo firewall-cmd --permanent --add-service=https\nsudo firewall-cmd --permanent --add-port=2083\/tcp --add-port=2087\/tcp\nsudo firewall-cmd --permanent --add-port=21\/tcp\nsudo firewall-cmd --permanent --add-port=53\/tcp --add-port=53\/udp\nsudo firewall-cmd --permanent --add-port=25\/tcp --add-port=465\/tcp --add-port=587\/tcp\nsudo firewall-cmd --permanent --add-port=110\/tcp --add-port=995\/tcp\nsudo firewall-cmd --permanent --add-port=143\/tcp --add-port=993\/tcp\nsudo firewall-cmd --permanent --add-port=30000-35000\/tcp\nsudo firewall-cmd --reload<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-3-install-cpanel-unattended-via-cli\"><strong>Step 3: Install cPanel (Unattended via CLI)<\/strong><\/h2>\n\n\n\n<p>Run the official installer on a clean server (no existing control panel). Installation can take 20\u201360 minutes depending on resources.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/home\ncurl -o latest -L https:\/\/securedownloads.cpanel.net\/latest\nsudo sh latest<\/code><\/pre>\n\n\n\n<p>When the installer finishes, access WHM over HTTPS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;YOUR.SERVER.IP:2087\n# or\nhttps:\/\/server.example.com:2087<\/code><\/pre>\n\n\n\n<p>Login as the root user with the server\u2019s root password or SSH key.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-4-complete-the-whm-initial-setup-wizard\"><strong>Step 4: Complete the WHM Initial Setup Wizard<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"a-agree-to-terms-and-add-contact-info\"><strong>A. Agree to Terms &amp; Add Contact Info<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add a primary contact email for alerts (outages, quota, security)<\/li>\n\n\n\n<li>Optional SMS webhook or secondary email for redundancy<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"b-networking-hostname-resolvers-main-ip\"><strong>B. Networking: Hostname, Resolvers, Main IP<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify the FQDN hostname (server.example.com)<\/li>\n\n\n\n<li>Confirm resolvers (1.1.1.1, 8.8.8.8)<\/li>\n\n\n\n<li>Set the main shared IPv4 (and NAT settings if applicable)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"c-nameservers-and-dns-role\"><strong>C. Nameservers &amp; DNS Role<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Choose nameservers (ns1.example.com, ns2.example.com)<\/li>\n\n\n\n<li>Let WHM create the necessary A records<\/li>\n\n\n\n<li>Later, add glue records with your domain registrar<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"d-services-and-security-defaults\"><strong>D. Services &amp; Security Defaults<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enable DKIM and SPF by default for new accounts<\/li>\n\n\n\n<li>Enable quotas (requires reboot on some systems)<\/li>\n\n\n\n<li>Set AutoSSL provider (Let\u2019s Encrypt recommended)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-5-post-install-security-hardening\"><strong>Step 5: Post-Install Security Hardening<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"a-change-ssh-defaults-and-secure-root\"><strong>A. Change SSH defaults and secure root<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a new sudo user and disable root SSH password login<\/li>\n\n\n\n<li>Use SSH keys and optionally change SSH port<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Create a sudo user\nsudo useradd -m adminuser\nsudo passwd adminuser\nsudo usermod -aG wheel adminuser  # (RHEL)\n# or\nsudo usermod -aG sudo adminuser   # (Ubuntu)\n\n# Edit SSH config\nsudo sed -i 's\/^#\\?PermitRootLogin.*\/PermitRootLogin no\/' \/etc\/ssh\/sshd_config\nsudo sed -i 's\/^#\\?PasswordAuthentication.*\/PasswordAuthentication no\/' \/etc\/ssh\/sshd_config\nsudo systemctl restart sshd<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"b-enable-cphulk-and-configure-brute-force-protection\"><strong>B. Enable cPHulk and configure brute-force protection<\/strong><\/h3>\n\n\n\n<p>In WHM &gt; Security Center &gt; cPHulk Brute Force Protection, enable and tune thresholds. Whitelist your management IPs to prevent lockouts.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"c-consider-csf-lfd-firewall\"><strong>C. Consider CSF\/LFD firewall<\/strong><\/h3>\n\n\n\n<p>ConfigServer Security &amp; Firewall (CSF) is widely used with cPanel for granular firewall and login failure detection.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Example install (verify latest from vendor before running)\ncd \/usr\/local\/src\nsudo curl -O https:\/\/download.configserver.com\/csf.tgz\nsudo tar -xzf csf.tgz\ncd csf\nsudo sh install.sh\nsudo perl \/usr\/local\/csf\/bin\/csftest.pl<\/code><\/pre>\n\n\n\n<p>Switch CSF from TESTING to active in \/etc\/csf\/csf.conf and restart CSF\/LFD.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-6-configure-dns-and-nameservers-properly\"><strong>Step 6: Configure DNS and Nameservers Properly<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"a-register-glue-records-at-registrar\"><strong>A. Register Glue Records at Registrar<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create ns1.example.com and ns2.example.com pointing to your server IPs<\/li>\n\n\n\n<li>Update your domain to use these nameservers<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"b-choose-dns-mode\"><strong>B. Choose DNS mode<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Single-server DNS: Simple, fine for small setups<\/li>\n\n\n\n<li>Clustered DNS: Use multiple cPanel DNSOnly nodes for redundancy<\/li>\n\n\n\n<li>External DNS (Cloudflare\/Route 53): Offload DNS, often improves resilience<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-7-enable-ssl-and-autossl-lets-encrypt\"><strong>Step 7: Enable SSL &amp; AutoSSL (Let\u2019s Encrypt)<\/strong><\/h2>\n\n\n\n<p>Use WHM &gt; SSL\/TLS &gt; Manage AutoSSL, choose Let\u2019s Encrypt, and run AutoSSL for all users. This secures cPanel\/WHM, webmail, and hosted domains automatically.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-8-create-packages-accounts-and-feature-sets\"><strong>Step 8: Create Packages, Accounts, and Feature Sets<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"a-packages\"><strong>A. Packages<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Define disk, bandwidth, inode limits, and email\/database quotas<\/li>\n\n\n\n<li>Create separate packages for staging vs. production workloads<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"b-feature-manager\"><strong>B. Feature Manager<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enable only needed tools (Git Version Control, NodeJS, Ruby, etc.)<\/li>\n\n\n\n<li>Reduce attack surface by disabling unused features<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"c-account-creation\"><strong>C. Account Creation<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>WHM &gt; Create a New Account: add domain, user, package, and contact info<\/li>\n\n\n\n<li>Verify SPF, DKIM, and AutoSSL post-creation<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-9-mail-deliverability-spf-dkim-dmarc-rdns\"><strong>Step 9: Mail Deliverability (SPF, DKIM, DMARC, rDNS)<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>SPF\/DKIM: <\/strong>Enabled by default for new accounts; verify DNS propagation<\/li>\n\n\n\n<li><strong>DMARC: <\/strong>Add a policy record (monitoring p=none, then quarantine\/reject as you mature)<\/li>\n\n\n\n<li><strong>rDNS\/PTR: <\/strong>Set at your VPS\/dedicated provider for the server\u2019s main IP and hostname<\/li>\n\n\n\n<li><strong>SMTP ports: <\/strong>Ensure 25\/465\/587 open; some clouds block 25 (use an SMTP relay if required)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-10-backups-updates-and-monitoring\"><strong>Step 10: Backups, Updates, and Monitoring<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"a-backups-whm-backup-configuration\"><strong>A. Backups (WHM &gt; Backup Configuration)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enable compressed or incremental backups<\/li>\n\n\n\n<li>Set retention (e.g., daily 7, weekly 4, monthly 3)<\/li>\n\n\n\n<li>Remote targets: S3, SFTP, or object storage for off-site safety<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"b-updates\"><strong>B. Updates<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>WHM &gt; Update Preferences: choose RELEASE or STABLE tiers<\/li>\n\n\n\n<li>Enable automatic updates for cPanel and system packages<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"c-monitoring\"><strong>C. Monitoring<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Service Monitoring: WHM &gt; Service Manager for Exim, Dovecot, ClamAV, etc.<\/li>\n\n\n\n<li>Resource usage: WHM &gt; Process Manager and system tools (top, iotop, sar)<\/li>\n\n\n\n<li>External uptime &amp; SSL expiry checks (e.g., StatusCake, UptimeRobot)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"troubleshooting-common-issues-and-fixes\"><strong>Troubleshooting: Common Issues and Fixes<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>WHM not loading: <\/strong>Confirm 2087\/tcp open, check cloud firewall, verify SSL certificate<\/li>\n\n\n\n<li><strong>AutoSSL fails: <\/strong>Ensure DNS A records resolve to your server and port 80\/443 are open<\/li>\n\n\n\n<li><strong>Email to Gmail\/Outlook rejected: <\/strong>Fix rDNS, SPF, DKIM, add DMARC, warm up IP<\/li>\n\n\n\n<li><strong>Slow install: <\/strong>Increase RAM\/CPU, ensure fast mirrors, use SSD\/NVMe<\/li>\n\n\n\n<li><strong>Quota not working: <\/strong>Re-run quota setup in WHM and reboot<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"best-practices-for-performance-and-reliability\"><strong>Best Practices for Performance and Reliability<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use AlmaLinux\/Rocky on NVMe storage; assign 2\u20134 GB swap<\/li>\n\n\n\n<li>Separate storage for backups or push off-site to object storage<\/li>\n\n\n\n<li>Enable HTTP\/2 and Brotli at the <a href=\"https:\/\/www.youstable.com\/blog\/install-apache-web-server-in-linux\/\">web server<\/a> level; use PHP-FPM<\/li>\n\n\n\n<li>Regularly audit insecure PHP versions and enable CageFS\/CloudLinux if multi-tenant<\/li>\n\n\n\n<li>Adopt DNS clustering or external DNS to reduce single points of failure<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"diy-vs-managed-when-to-choose-a-managed-cpanel-server\"><strong>DIY vs. Managed: When to Choose a Managed cPanel Server<\/strong><\/h2>\n\n\n\n<p>If you\u2019re short on time or Linux administration expertise, a managed cPanel server saves hours on installation, hardening, updates, and backups. At YouStable, our <a href=\"https:\/\/www.youstable.com\/cpanel-vps\">cPanel VPS<\/a> and Dedicated solutions ship on supported Linux (AlmaLinux\/Rocky), include license options, proactive security (CSF\/cPHulk), off-site backups, and 24\u00d77 optimization assistance\u2014so you can focus on sites, not servers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"full-command-summary-quick-reference\"><strong>Full Command Summary (Quick Reference)<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># 1) Update &amp; essentials\ndnf -y update &amp;&amp; dnf -y install curl perl screen tar   # (RHEL-family)\n# or\napt update &amp;&amp; apt -y upgrade &amp;&amp; apt -y install curl perl screen tar  # (Ubuntu)\n\n# 2) Hostname &amp; hosts\nhostnamectl set-hostname server.example.com\necho \"YOUR.SERVER.IP server.example.com server\" &gt;&gt; \/etc\/hosts\n\n# 3) Disable SELinux (RHEL-family)\nsetenforce 0\nsed -i 's\/^SELINUX=.*\/SELINUX=disabled\/' \/etc\/selinux\/config\n\n# 4) Firewall (open essential ports)\nfirewall-cmd --permanent --add-service=http\nfirewall-cmd --permanent --add-service=https\nfirewall-cmd --permanent --add-port=2083\/tcp --add-port=2087\/tcp\nfirewall-cmd --permanent --add-port=21\/tcp\nfirewall-cmd --permanent --add-port=53\/tcp --add-port=53\/udp\nfirewall-cmd --permanent --add-port=25\/tcp --add-port=465\/tcp --add-port=587\/tcp\nfirewall-cmd --permanent --add-port=110\/tcp --add-port=995\/tcp\nfirewall-cmd --permanent --add-port=143\/tcp --add-port=993\/tcp\nfirewall-cmd --permanent --add-port=30000-35000\/tcp\nfirewall-cmd --reload\n\n# 5) Install cPanel\ncd \/home\ncurl -o latest -L https:\/\/securedownloads.cpanel.net\/latest\nsh latest\n\n# 6) Access WHM\n# https:\/\/server.example.com:2087 (login as root)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"faqs-how-to-configure-cpanel-on-linux-server\"><strong>FAQs: How to Configure cPanel on Linux Server<\/strong><\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1765609011374\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"which-linux-is-best-for-cpanel-in-2026\"><strong>Which Linux is best for cPanel in 2026?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>AlmaLinux 8\/9 and Rocky Linux 8\/9 are top choices for stability and long support windows. CloudLinux 8\/9 is ideal for shared hosting isolation. Ubuntu 22.04 LTS is supported by cPanel; verify the current LTS support in the official documentation.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765609029770\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"can-i-install-cpanel-on-an-existing-server-with-websites\"><strong>Can I install cPanel on an existing server with websites?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>cPanel must be installed on a clean OS with no other control panel. If you have existing sites, migrate them after installation using WHM\u2019s Transfer Tool or site-level backups.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765609038753\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"how-long-does-cpanel-installation-take\"><strong>How long does cPanel installation take?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Typically 20\u201360 minutes depending on CPU, RAM, disk, and network. Using NVMe storage and at least 4 vCPU\/8 GB RAM significantly speeds up the process.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765609043817\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"do-i-need-a-cpanel-license-for-configuration\"><strong>Do I need a cPanel license for configuration?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes. You can use a trial initially and add a paid license later, or purchase the license via your <a href=\"https:\/\/www.youstable.com\/blog\/best-vps-hosting-providers-in-india\/\">hosting provider<\/a>. Many YouStable plans include cPanel licensing to streamline setup.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765609055854\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"which-ports-must-be-open-for-cpanel-whm\"><strong>Which ports must be open for cPanel\/WHM?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>At minimum: 2087 (WHM SSL), 2083 (cPanel SSL), 80\/443 (web), 21 and passive range for FTP, 25\/465\/587\/110\/995\/143\/993 for mail, 53 TCP\/UDP for DNS, and SSH (22 or custom). Configure both the OS firewall and any cloud-level firewalls.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"final-thoughts\"><strong>Final Thoughts<\/strong><\/h2>\n\n\n\n<p>You\u2019ve <a href=\"https:\/\/www.youstable.com\/blog\/what-is-kubernetes-on-linux-server-step-by-step-learning-guide\/\">learned how to configure cPanel on a Linux server<\/a> end-to-end: preparing the OS, installing cPanel, finishing WHM\u2019s setup, hardening security, enabling DNS and AutoSSL, and optimizing deliverability, backups, and performance. Prefer a turnkey path? Choose a <a href=\"https:\/\/www.youstable.com\/blog\/benefits-of-fully-managed-dedicated-server\/\">managed cPanel VPS or Dedicated server from YouStable<\/a>, and we\u2019ll provision, secure, and maintain your stack for you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To configure cPanel on a Linux server in 2026, prepare a clean, supported OS (AlmaLinux, Rocky Linux, CloudLinux, or Ubuntu [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":15617,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"iawp_total_views":15,"footnotes":""},"categories":[350],"tags":[],"class_list":["post-12807","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledgebase"],"acf":[],"featured_image_src":"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Configure-cPanel-on-Linux-Server.jpg","author_info":{"display_name":"Prahlad Prajapati","author_link":"https:\/\/www.youstable.com\/blog\/author\/prahladblog"},"_links":{"self":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/12807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/comments?post=12807"}],"version-history":[{"count":7,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/12807\/revisions"}],"predecessor-version":[{"id":15618,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/12807\/revisions\/15618"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media\/15617"}],"wp:attachment":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media?parent=12807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/categories?post=12807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/tags?post=12807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}