{"id":1133,"date":"2026-09-02T23:19:40","date_gmt":"2026-09-02T17:49:40","guid":{"rendered":"https:\/\/cpanelfree.com\/blog\/?p=1133"},"modified":"2026-09-03T12:34:51","modified_gmt":"2026-09-03T07:04:51","slug":"how-to-install-directadmin-linux-server","status":"publish","type":"post","link":"https:\/\/cpanelfree.com\/blog\/how-to-install-directadmin-linux-server\/","title":{"rendered":"How to Install DirectAdmin on Linux Server: Complete Guide (2026)"},"content":{"rendered":"<div style=\"background-color: #f0f7ff;border-left: 4px solid #0066cc;padding: 16px 20px;margin-bottom: 25px;border-radius: 6px\">\n<p style=\"margin: 0 0 8px 0;font-weight: bold;color: #004499;font-size: 1.1em\">\u26a1 Quick Installation Summary (TL;DR)<\/p>\n<ul style=\"margin: 0;padding-left: 20px;color: #333\">\n<li><strong>Goal:<\/strong> Install and secure DirectAdmin web hosting control panel on a fresh Linux server.<\/li>\n<li><strong>Supported OS:<\/strong> AlmaLinux 8\/9, Rocky Linux 8\/9, Ubuntu 22.04\/24.04 LTS, Debian 11\/12.<\/li>\n<li><strong>Time Required:<\/strong> ~15 to 20 minutes.<\/li>\n<li><strong>Primary Command:<\/strong> <code>bash &lt;(curl -fsSL https:\/\/download.directadmin.com\/setup.sh) 'YOUR_LICENSE_KEY'<\/code><\/li>\n<li><strong>Access URL:<\/strong> <code>https:\/\/your-server-ip:2222<\/code><\/li>\n<\/ul>\n<\/div>\n<p><strong>DirectAdmin<\/strong> is one of the most reliable, lightweight, and high-performance commercial web hosting control panels available for Linux. Renowned for its low memory footprint, multi-tier account hierarchy (Admin, Reseller, User), and flexible <strong>CustomBuild 2.0<\/strong> engine, DirectAdmin is a leading alternative to cPanel for web hosts, agencies, and VPS administrators in 2026.<\/p>\n<p>In this step-by-step guide, you will learn how to prepare your Linux server (AlmaLinux, Rocky Linux, or Ubuntu), run the automated DirectAdmin installer, configure essential firewall ports, and secure your panel with a free Let&#8217;s Encrypt SSL certificate.<\/p>\n<hr style=\"margin: 30px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Direct Answer: How Do You Install DirectAdmin on Linux?<\/h2>\n<p><strong>Direct Answer:<\/strong> To install DirectAdmin on Linux, provision a clean server running AlmaLinux 9 or Ubuntu 24.04 LTS, update packages, set a valid FQDN hostname (e.g., <code>server.yourdomain.com<\/code>), and execute the official automated installer: <code>bash &lt;(curl -fsSL https:\/\/download.directadmin.com\/setup.sh) 'YOUR_LICENSE_KEY'<\/code>. Once completed, access your dashboard at <code>https:\/\/your-server-ip:2222<\/code>.<\/p>\n<hr style=\"margin: 30px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<div style=\"background-color: #f8fafc;border-left: 4px solid #0284c7;padding: 12px 16px;margin: 18px 0;border-radius: 4px\">\n    \ud83d\udcd6 <strong>Related Reading:<\/strong> Compare DirectAdmin with free open-source control panels in our guide to the <a href=\"https:\/\/cpanelfree.com\/blog\/best-free-cpanel-alternatives-2026\/\" style=\"color: #0284c7;font-weight: bold;text-decoration: underline\">Top 7 Best Free cPanel Alternatives in 2026<\/a>.\n<\/div>\n<h2>System Requirements &amp; Prerequisites<\/h2>\n<div style=\"background-color: #f8fafc;border: 1px solid #e2e8f0;padding: 18px 22px;margin-bottom: 25px;border-radius: 6px\">\n<h3 style=\"margin-top: 0;color: #1e293b;font-size: 1.15em\">\ud83d\udccb Server Prerequisites Checklist<\/h3>\n<ul style=\"margin-bottom: 0;padding-left: 20px;color: #334155;line-height: 1.7\">\n<li><strong>Operating System:<\/strong> Clean, freshly installed <strong>AlmaLinux 8\/9<\/strong>, <strong>Rocky Linux 8\/9<\/strong>, <strong>Ubuntu 22.04\/24.04 LTS<\/strong>, or <strong>Debian 11\/12<\/strong> (64-bit).<\/li>\n<li><strong>RAM:<\/strong> 1 GB minimum (2 GB to 4 GB+ recommended for production with MySQL, SpamAssassin, and ClamAV).<\/li>\n<li><strong>Swap Space:<\/strong> At least 2 GB swap memory configured.<\/li>\n<li><strong>Disk Space:<\/strong> 20 GB SSD \/ NVMe minimum.<\/li>\n<li><strong>DirectAdmin License:<\/strong> A valid license key (or active 60-day trial from DirectAdmin).<\/li>\n<li><strong>Static IPv4 Address:<\/strong> DirectAdmin requires a dedicated public IP address.<\/li>\n<li><strong>Fully Qualified Domain Name (FQDN):<\/strong> Set as your server hostname with a valid DNS A record (e.g., <code>server.yourdomain.com<\/code>).<\/li>\n<\/ul>\n<\/div>\n<div style=\"background-color: #fff9e6;border-left: 4px solid #ffaa00;padding: 12px 18px;margin: 20px 0;border-radius: 4px\">\n    <strong>\u26a0\ufe0f Critical Rule:<\/strong> DirectAdmin must be deployed on a <strong>clean minimal Linux OS<\/strong>. Do not pre-install Apache, Nginx, PHP, or MariaDB manually\u2014DirectAdmin&#8217;s CustomBuild system will compile and manage these services automatically.\n<\/div>\n<hr style=\"margin: 30px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Step 1: Update Your Linux Server<\/h2>\n<p>Connect to your server via SSH as the <code>root<\/code> user and ensure all core packages and repositories are up to date.<\/p>\n<p><strong>For AlmaLinux \/ Rocky Linux \/ RHEL:<\/strong><\/p>\n<pre style=\"background-color: #1e293b;color: #f8fafc;padding: 14px 18px;border-radius: 6px\"><code>dnf clean all &amp;&amp; dnf update -y\ndnf install -y wget curl tar bzip2 perl<\/code><\/pre>\n<p><strong>For Ubuntu \/ Debian:<\/strong><\/p>\n<pre style=\"background-color: #1e293b;color: #f8fafc;padding: 14px 18px;border-radius: 6px\"><code>apt update &amp;&amp; apt upgrade -y\napt install -y wget curl tar bzip2 perl<\/code><\/pre>\n<hr style=\"margin: 30px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Step 2: Set a Fully Qualified Domain Name (FQDN) Hostname<\/h2>\n<p>DirectAdmin requires a valid FQDN hostname that does not match any domain you plan to host as a website.<\/p>\n<p>1. Set your server hostname (replace with your actual domain):<\/p>\n<pre style=\"background-color: #1e293b;color: #f8fafc;padding: 14px 18px;border-radius: 6px\"><code>hostnamectl set-hostname server.yourdomain.com<\/code><\/pre>\n<p>2. Verify the hostname resolution:<\/p>\n<pre style=\"background-color: #1e293b;color: #f8fafc;padding: 14px 18px;border-radius: 6px\"><code>hostname -f<\/code><\/pre>\n<hr style=\"margin: 30px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Step 3: Open Required Firewall Ports<\/h2>\n<p>DirectAdmin operates on port <strong>2222<\/strong> by default. If your cloud VPS provider uses external firewall security groups (AWS, Google Cloud, DigitalOcean, Hetzner, Vultr) or local firewalls (Firewalld \/ UFW), ensure the following inbound ports are permitted:<\/p>\n<table style=\"width: 100%;border-collapse: collapse;margin-top: 15px;margin-bottom: 25px;text-align: left\">\n<thead>\n<tr style=\"background-color: #f1f5f9;border-bottom: 2px solid #cbd5e1\">\n<th style=\"padding: 10px;border: 1px solid #cbd5e1\">Port Number<\/th>\n<th style=\"padding: 10px;border: 1px solid #cbd5e1\">Protocol<\/th>\n<th style=\"padding: 10px;border: 1px solid #cbd5e1\">Service Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\"><strong>2222<\/strong><\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">TCP<\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">DirectAdmin Control Panel Web Interface<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\"><strong>80 &amp; 443<\/strong><\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">TCP<\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">HTTP &amp; HTTPS Web Traffic<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\"><strong>21 &amp; 35000-35999<\/strong><\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">TCP<\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">FTP Control &amp; Passive Data Range<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\"><strong>25, 587, 465, 110, 995, 143, 993<\/strong><\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">TCP<\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">Mail Services (SMTP, SMTPS, POP3, IMAP SSL)<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\"><strong>53<\/strong><\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">TCP \/ UDP<\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">BIND DNS Server<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr style=\"margin: 30px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Step 4: Execute the Official DirectAdmin Installation Script<\/h2>\n<p>DirectAdmin provides an automated setup script that installs all core components, configures database services, and builds the initial web server stack.<\/p>\n<p>Execute the installer as the <code>root<\/code> user (replace <code>YOUR_LICENSE_KEY<\/code> with your DirectAdmin key):<\/p>\n<pre style=\"background-color: #1e293b;color: #f8fafc;padding: 14px 18px;border-radius: 6px\"><code>bash &lt;(curl -fsSL https:\/\/download.directadmin.com\/setup.sh || wget -O - https:\/\/download.directadmin.com\/setup.sh) 'YOUR_LICENSE_KEY'<\/code><\/pre>\n<div style=\"background-color: #eff6ff;border-left: 4px solid #3b82f6;padding: 12px 18px;margin: 15px 0;border-radius: 4px\">\n    <strong>\ud83d\udca1 Pro Tip (Auto-Install Mode):<\/strong> If you want the installer to run completely unattended with default recommended packages, prefix the command with <code>auto<\/code>:<\/p>\n<p><code>bash &lt;(curl -fsSL https:\/\/download.directadmin.com\/setup.sh) auto<\/code>\n<\/div>\n<p>The automated compilation process will configure MariaDB, PHP-FPM, Apache\/Nginx, and Exim. This takes approximately <strong>10 to 20 minutes<\/strong>.<\/p>\n<div style=\"background-color: #f0fdf4;border-left: 4px solid #16a34a;padding: 14px 18px;margin: 20px 0;border-radius: 4px\">\n    <strong>\ud83c\udf89 Setup Complete!<\/strong> When finished, the terminal output will print your direct login URL, administrative username (<code>admin<\/code>), and a secure randomly generated password.\n<\/div>\n<hr style=\"margin: 30px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Step 5: Access DirectAdmin Dashboard on Port 2222<\/h2>\n<p>Open your web browser and navigate to your server IP address on port 2222:<\/p>\n<pre style=\"background-color: #1e293b;color: #f8fafc;padding: 14px 18px;border-radius: 6px\"><code>https:\/\/your-server-ip:2222<\/code><\/pre>\n<p>Log in using:<\/p>\n<ul>\n<li><strong>Username:<\/strong> <code>admin<\/code><\/li>\n<li><strong>Password:<\/strong> The password displayed in your terminal (also backed up in <code>\/usr\/local\/directadmin\/conf\/setup.txt<\/code>).<\/li>\n<\/ul>\n<hr style=\"margin: 30px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Step 6: Configure Free Let&#8217;s Encrypt SSL for Server Hostname<\/h2>\n<p>To encrypt panel access and secure email services, issue a trusted Let&#8217;s Encrypt SSL certificate for your hostname:<\/p>\n<pre style=\"background-color: #1e293b;color: #f8fafc;padding: 14px 18px;border-radius: 6px\"><code>\/usr\/local\/directadmin\/scripts\/letsencrypt.sh request Ranjan-RDP 4096<\/code><\/pre>\n<p>Enable automatic SSL redirects for DirectAdmin in its configuration:<\/p>\n<pre style=\"background-color: #1e293b;color: #f8fafc;padding: 14px 18px;border-radius: 6px\"><code>\/usr\/local\/directadmin\/directadmin set ssl_redirect 1\nservice directadmin restart<\/code><\/pre>\n<p>You can now log in securely via <code>https:\/\/server.yourdomain.com:2222<\/code> with a green padlock.<\/p>\n<hr style=\"margin: 30px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Step 7: Customize Web Server &amp; PHP with CustomBuild 2.0<\/h2>\n<p>DirectAdmin includes <strong>CustomBuild 2.0<\/strong>, allowing you to easily switch between web server stacks (Apache, Nginx reverse proxy, OpenLiteSpeed) and manage multiple PHP versions.<\/p>\n<p>To access CustomBuild from SSH:<\/p>\n<pre style=\"background-color: #1e293b;color: #f8fafc;padding: 14px 18px;border-radius: 6px\"><code>cd \/usr\/local\/directadmin\/custombuild\n.\/build update\n.\/build set webserver nginx_apache\n.\/build set php1_release 8.3\n.\/build set php2_release 8.2\n.\/build php\n.\/build rewrite_confs<\/code><\/pre>\n<hr style=\"margin: 30px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Troubleshooting Common DirectAdmin Issues<\/h2>\n<h3>1. Port 2222 Blocked \/ Cannot Reach Panel<\/h3>\n<p>If you cannot connect to the dashboard, ensure Firewalld (AlmaLinux\/Rocky) or UFW (Ubuntu) allows port 2222:<\/p>\n<p><strong>For AlmaLinux:<\/strong><\/p>\n<pre style=\"background-color: #1e293b;color: #f8fafc;padding: 14px 18px;border-radius: 6px\"><code>firewall-cmd --permanent --zone=public --add-port=2222\/tcp\nfirewall-cmd --reload<\/code><\/pre>\n<p><strong>For Ubuntu:<\/strong><\/p>\n<pre style=\"background-color: #1e293b;color: #f8fafc;padding: 14px 18px;border-radius: 6px\"><code>sudo ufw allow 2222\/tcp &amp;&amp; sudo ufw reload<\/code><\/pre>\n<h3>2. Recovering or Changing Admin Password<\/h3>\n<p>If you forget your admin password, reset it instantly from the command line:<\/p>\n<pre style=\"background-color: #1e293b;color: #f8fafc;padding: 14px 18px;border-radius: 6px\"><code>passwd admin<\/code><\/pre>\n<hr style=\"margin: 35px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Frequently Asked Questions (FAQ)<\/h2>\n<div style=\"margin-bottom: 16px;border: 1px solid #e2e8f0;border-radius: 8px;padding: 18px 20px;background-color: #fafbfc\">\n<h3 style=\"margin: 0 0 10px 0;font-size: 1.1em;color: #1e293b\">\u2753 Does DirectAdmin offer a free trial?<\/h3>\n<p style=\"margin: 0;color: #475569;line-height: 1.6\">Yes. DirectAdmin provides a full-featured 60-day free trial for new server installations directly through directadmin.com.<\/p>\n<\/div>\n<div style=\"margin-bottom: 16px;border: 1px solid #e2e8f0;border-radius: 8px;padding: 18px 20px;background-color: #fafbfc\">\n<h3 style=\"margin: 0 0 10px 0;font-size: 1.1em;color: #1e293b\">\u2753 Which Linux distribution is best for DirectAdmin?<\/h3>\n<p style=\"margin: 0;color: #475569;line-height: 1.6\">AlmaLinux 9 and Rocky Linux 9 are the industry-standard enterprise choices for DirectAdmin, though Ubuntu 22.04 and 24.04 LTS are fully supported and widely used.<\/p>\n<\/div>\n<div style=\"margin-bottom: 25px;border: 1px solid #e2e8f0;border-radius: 8px;padding: 18px 20px;background-color: #fafbfc\">\n<h3 style=\"margin: 0 0 10px 0;font-size: 1.1em;color: #1e293b\">\u2753 Can I migrate accounts directly from cPanel to DirectAdmin?<\/h3>\n<p style=\"margin: 0;color: #475569;line-height: 1.6\">Yes. DirectAdmin includes a native cPanel-to-DirectAdmin migration utility that can restore full cPanel backup archives (including databases, mailboxes, and cron jobs) with a single command.<\/p>\n<\/div>\n<div style=\"background-color: #f8fafc;border: 1px solid #e2e8f0;border-left: 4px solid #0ea5e9;padding: 20px;border-radius: 8px;margin: 30px 0\">\n<h3 style=\"margin-top: 0;color: #0f172a;font-size: 18px;display: flex;align-items: center\">\n        <span style=\"margin-right: 8px\">\ud83d\udd17<\/span> Recommended Related Technical Guides:<br \/>\n    <\/h3>\n<ul style=\"margin: 10px 0 0 0;padding-left: 20px;line-height: 1.8\">\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/best-free-cpanel-alternatives-2026\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">Top 7 Best Free cPanel Alternatives<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/cyberpanel-vs-cpanel-comparison-2026\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">CyberPanel vs cPanel In-Depth Comparison<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-install-cyberpanel-ubuntu-24-04-lts\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">How to Install CyberPanel on Ubuntu 24.04<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/best-free-web-hosting-2026\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">Top 10 Best Free Web Hosting Services<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/#plans\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">Explore $0 Free cPanel Web Hosting Plans<\/a><\/li>\n<\/ul>\n<\/div>\n<div style=\"background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);color: #ffffff;padding: 26px 22px;border-radius: 8px;margin-top: 30px\">\n<h3 style=\"color: #ffffff;margin-top: 0;font-size: 1.25em\">\ud83c\udfaf Conclusion &amp; Next Steps<\/h3>\n<p style=\"color: #cbd5e1;line-height: 1.7;margin-bottom: 0\">DirectAdmin is a formidable, cost-effective alternative to cPanel that gives server administrators total control, high speed, and low RAM utilization. With automated Let&#8217;s Encrypt integration, CustomBuild modularity, and strong security, it remains a premier choice for hosting websites on Linux in 2026.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Step-by-step guide to installing DirectAdmin on AlmaLinux 9, Rocky Linux &amp; Ubuntu 24.04. Includes server requirements, CustomBuild setup, SSL &amp; port 2222 configuration.<\/p>\n","protected":false},"author":1,"featured_media":1132,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51,1],"tags":[57,59,56,54,58,50,49],"class_list":["post-1133","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-web-hosting-news","tag-almalinux","tag-control-panels","tag-directadmin","tag-linux-tutorials","tag-ubuntu","tag-vps","tag-web-hosting"],"_links":{"self":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/comments?post=1133"}],"version-history":[{"count":2,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1133\/revisions"}],"predecessor-version":[{"id":1597,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1133\/revisions\/1597"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media\/1132"}],"wp:attachment":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media?parent=1133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/categories?post=1133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/tags?post=1133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}