{"id":2115,"date":"2021-05-22T22:39:19","date_gmt":"2021-05-22T22:39:19","guid":{"rendered":"https:\/\/dft.wiki\/?p=2115"},"modified":"2026-06-08T22:47:33","modified_gmt":"2026-06-09T02:47:33","slug":"installing-latest-cpanel-whm-on-centos-8","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=2115","title":{"rendered":"Installing cPanel + WHM on Ubuntu"},"content":{"rendered":"<p>The only drawback of <strong>cPanel<\/strong> is that it&#8217;s neither open-source nor free. The same is true for <strong>Plesk<\/strong>. However, both are widely used.<\/p>\n<p>If you&#8217;re looking for a powerful solution to manage your web server or resell web hosting services, check out <strong>CloudPanel CE<\/strong> [<a href=\"https:\/\/github.com\/cloudpanel-io\/cloudpanel-ce\">Link<\/a>] to see if it meets your requirements.<\/p>\n<p>Back to cPanel: this tutorial covers installing cPanel and configuring essential server settings. It does not cover how to use cPanel itself.<\/p>\n<p>Originally designed for CentOS, cPanel later provided an upgrade path to AlmaLinux for existing installations. It now supports Ubuntu 22.04 LTS.<\/p>\n<hr \/>\n<p><strong>SYSTEM REQUIREMENTS<\/strong><\/p>\n<p>Deploy a fresh default installation of Ubuntu 22.04 LTS (do <strong>not<\/strong> enable AppArmor). Then switch to <strong>root<\/strong>.<\/p>\n<pre>sudo su -<\/pre>\n<p>UFW (firewall) must be disabled.<\/p>\n<pre>iptables-save &gt; ~\/firewall.rules\r\nsystemctl stop ufw.service\r\nsystemctl disable ufw.service<\/pre>\n<p>Set an FQDN as the hostname.<\/p>\n<pre>hostnamectl set-hostname <span style=\"color: #ff0000;\"><strong>cpanelserver.mydomain.com<\/strong><\/span><\/pre>\n<p>Add <strong>&#8220;<span style=\"color: #ff0000;\">cpanelserver.mydomain.com<\/span>&#8220;<\/strong> and <strong>&#8220;<span style=\"color: #ff0000;\">cpanelserver<\/span>&#8220;<\/strong> to <strong>\/etc\/hosts<\/strong>. Example with a placeholder public IP:<\/p>\n<pre>127.0.0.1 localhost <strong><span style=\"color: #ff0000;\">cpanelserver<\/span><\/strong>\r\n200.200.200.200 <strong><span style=\"color: #ff0000;\">cpanelserver.mydomain.com<\/span><\/strong><\/pre>\n<p>Upgrade all system packages to the latest versions.<\/p>\n<pre>apt update &amp;&amp; apt upgrade -y<\/pre>\n<hr \/>\n<p><strong>FULL CPANEL INSTALLATION<\/strong><\/p>\n<p>Download and run the installation script.<\/p>\n<pre>cd \/home &amp;&amp; curl -o latest -L https:\/\/securedownloads.cpanel.net\/latest &amp;&amp; sh latest<\/pre>\n<p>That&#8217;s it!<\/p>\n<p>Open your browser and go to the following address, then log in with your <strong>root<\/strong> credentials.<\/p>\n<pre>https:\/\/<span style=\"color: #ff0000;\"><strong>1.2.3.4<\/strong><\/span>:2087<\/pre>\n<p>Log in with the system <strong>root<\/strong> account and its password to complete the installation.<\/p>\n<p>Alternatively, a URL will be generated at the end of the installation. Use that instead and create an administrator account (other than root).<\/p>\n<hr \/>\n<p><strong>INSTALLING CPANEL DNS ONLY AND WP SQUARED<\/strong><\/p>\n<p>The &#8220;DNS Only&#8221; license is a free, limited-feature cPanel &amp; WHM server type.<\/p>\n<pre>cd \/home &amp;&amp; curl -o latest -L https:\/\/securedownloads.cpanel.net\/latest-dnsonly &amp;&amp; sh latest<\/pre>\n<p>After installation, create a DNS cluster to sync configuration from the Master to the DNS Only Slave.<\/p>\n<p>WP Squared is a build tailored specifically for WordPress.<\/p>\n<pre>cd \/home &amp;&amp; curl -o latest -L https:\/\/securedownloads.cpanel.net\/latest-wp2 &amp;&amp; sh latest<\/pre>\n<hr \/>\n<p><strong>CLUSTERING AND DNS CLUSTERING<\/strong><\/p>\n<p>ON THE <span style=\"color: #ff0000;\"><strong>SLAVE<\/strong><\/span><\/p>\n<p><strong>Manage API Tokens<\/strong> &gt; <strong>Generate Token<\/strong>.<\/p>\n<p>Select: <strong>Everything<\/strong><\/p>\n<p>ON THE <span style=\"color: #ff0000;\"><strong>MASTER<\/strong><\/span><\/p>\n<p><strong>Configuration Cluster<\/strong> &gt; <strong>Create<\/strong>. Enter the <strong>IP of the Slave<\/strong> and the generated token.<\/p>\n<p><strong>DNS Cluster<\/strong> &gt; <strong>Enable DNS Clustering<\/strong>.<\/p>\n<p><strong>Manage API Tokens<\/strong> &gt; <strong>Generate Token<\/strong>.<\/p>\n<p>Select: <strong>Everything<\/strong><\/p>\n<p>ON THE <span style=\"color: #ff0000;\"><strong>SLAVE<\/strong><\/span><\/p>\n<p><strong>Configuration Cluster<\/strong> &gt; <strong>Create<\/strong>. Enter the <strong>IP of the Master<\/strong> and the generated token.<\/p>\n<p><strong>DNS Cluster<\/strong> &gt; <strong>Enable DNS Clustering<\/strong>.<\/p>\n<p>ON THE <span style=\"color: #ff0000;\"><strong>MASTER<\/strong><\/span><\/p>\n<p><strong>Manage API Tokens<\/strong> &gt; <strong>Generate Token<\/strong>.<\/p>\n<p>Select: <strong>Everything<\/strong><\/p>\n<p>ON THE <span style=\"color: #ff0000;\"><strong>SLAVE<\/strong><\/span><\/p>\n<p><strong>DNS Cluster<\/strong> &gt; <strong>Add a new server to the cluster<\/strong> &gt; <strong>Configure<\/strong>. Enter the <strong>IP of the Master<\/strong> and the generated token.<\/p>\n<p><strong>Manage API Tokens<\/strong> &gt; <strong>Generate Token<\/strong>.<\/p>\n<p>Select: <strong>Everything<\/strong><\/p>\n<p>ON THE <span style=\"color: #ff0000;\"><strong>MASTER<\/strong><\/span><\/p>\n<p><strong>DNS Cluster<\/strong> &gt; <strong>Add a new server to the cluster<\/strong> &gt; <strong>Configure<\/strong>. Enter the <strong>IP of the Slave<\/strong> and the generated token.<\/p>\n<hr \/>\n<p><strong>BONUS<\/strong><\/p>\n<p>I strongly recommend trying <strong>CloudPanel<\/strong> for its lightweight design and simplicity. Performance is significantly better than cPanel and Plesk, at no cost.<\/p>\n<pre>sudo apt update &amp;&amp; sudo apt -y upgrade &amp;&amp; sudo apt -y install curl wget\r\ncurl -sS https:\/\/installer.cloudpanel.io\/ce\/v2\/install.sh -o install.sh; \\\r\necho \"a3ba69a8102345127b4ae0e28cfe89daca675cbc63cd39225133cdd2fa02ad36 install.sh\" | \\\r\nsha256sum -c &amp;&amp; sudo bash install.sh<\/pre>\n<p>Navigate to: <strong>https:\/\/200.200.200.200:8443<\/strong> (use your actual public or private IP).<\/p>\n<p>Some CLI commands are available for automation or password recovery [<a href=\"https:\/\/www.cloudpanel.io\/docs\/v2\/cloudpanel-cli\/root-user-commands\/\">Link<\/a>].<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The only drawback of cPanel is that it&#8217;s neither open-source nor free. The same is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7],"tags":[],"class_list":["post-2115","post","type-post","status-publish","format-standard","hentry","category-linux","category-web"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/2115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2115"}],"version-history":[{"count":13,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/2115\/revisions"}],"predecessor-version":[{"id":5731,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/2115\/revisions\/5731"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}