โก Quick Installation Summary (TL;DR)
- Goal: Install and secure DirectAdmin web hosting control panel on a fresh Linux server.
- Supported OS: AlmaLinux 8/9, Rocky Linux 8/9, Ubuntu 22.04/24.04 LTS, Debian 11/12.
- Time Required: ~15 to 20 minutes.
- Primary Command:
bash <(curl -fsSL https://download.directadmin.com/setup.sh) 'YOUR_LICENSE_KEY' - Access URL:
https://your-server-ip:2222
DirectAdmin 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 CustomBuild 2.0 engine, DirectAdmin is a leading alternative to cPanel for web hosts, agencies, and VPS administrators in 2026.
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’s Encrypt SSL certificate.
Direct Answer: How Do You Install DirectAdmin on Linux?
Direct Answer: 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., server.yourdomain.com), and execute the official automated installer: bash <(curl -fsSL https://download.directadmin.com/setup.sh) 'YOUR_LICENSE_KEY'. Once completed, access your dashboard at https://your-server-ip:2222.
System Requirements & Prerequisites
๐ Server Prerequisites Checklist
- Operating System: Clean, freshly installed AlmaLinux 8/9, Rocky Linux 8/9, Ubuntu 22.04/24.04 LTS, or Debian 11/12 (64-bit).
- RAM: 1 GB minimum (2 GB to 4 GB+ recommended for production with MySQL, SpamAssassin, and ClamAV).
- Swap Space: At least 2 GB swap memory configured.
- Disk Space: 20 GB SSD / NVMe minimum.
- DirectAdmin License: A valid license key (or active 60-day trial from DirectAdmin).
- Static IPv4 Address: DirectAdmin requires a dedicated public IP address.
- Fully Qualified Domain Name (FQDN): Set as your server hostname with a valid DNS A record (e.g.,
server.yourdomain.com).
Step 1: Update Your Linux Server
Connect to your server via SSH as the root user and ensure all core packages and repositories are up to date.
For AlmaLinux / Rocky Linux / RHEL:
dnf clean all && dnf update -y
dnf install -y wget curl tar bzip2 perl
For Ubuntu / Debian:
apt update && apt upgrade -y
apt install -y wget curl tar bzip2 perl
Step 2: Set a Fully Qualified Domain Name (FQDN) Hostname
DirectAdmin requires a valid FQDN hostname that does not match any domain you plan to host as a website.
1. Set your server hostname (replace with your actual domain):
hostnamectl set-hostname server.yourdomain.com
2. Verify the hostname resolution:
hostname -f
Step 3: Open Required Firewall Ports
DirectAdmin operates on port 2222 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:
| Port Number | Protocol | Service Description |
|---|---|---|
| 2222 | TCP | DirectAdmin Control Panel Web Interface |
| 80 & 443 | TCP | HTTP & HTTPS Web Traffic |
| 21 & 35000-35999 | TCP | FTP Control & Passive Data Range |
| 25, 587, 465, 110, 995, 143, 993 | TCP | Mail Services (SMTP, SMTPS, POP3, IMAP SSL) |
| 53 | TCP / UDP | BIND DNS Server |
Step 4: Execute the Official DirectAdmin Installation Script
DirectAdmin provides an automated setup script that installs all core components, configures database services, and builds the initial web server stack.
Execute the installer as the root user (replace YOUR_LICENSE_KEY with your DirectAdmin key):
bash <(curl -fsSL https://download.directadmin.com/setup.sh || wget -O - https://download.directadmin.com/setup.sh) 'YOUR_LICENSE_KEY'
auto:
bash <(curl -fsSL https://download.directadmin.com/setup.sh) auto
The automated compilation process will configure MariaDB, PHP-FPM, Apache/Nginx, and Exim. This takes approximately 10 to 20 minutes.
admin), and a secure randomly generated password.
Step 5: Access DirectAdmin Dashboard on Port 2222
Open your web browser and navigate to your server IP address on port 2222:
https://your-server-ip:2222
Log in using:
- Username:
admin - Password: The password displayed in your terminal (also backed up in
/usr/local/directadmin/conf/setup.txt).
Step 6: Configure Free Let’s Encrypt SSL for Server Hostname
To encrypt panel access and secure email services, issue a trusted Let’s Encrypt SSL certificate for your hostname:
/usr/local/directadmin/scripts/letsencrypt.sh request Ranjan-RDP 4096
Enable automatic SSL redirects for DirectAdmin in its configuration:
/usr/local/directadmin/directadmin set ssl_redirect 1
service directadmin restart
You can now log in securely via https://server.yourdomain.com:2222 with a green padlock.
Step 7: Customize Web Server & PHP with CustomBuild 2.0
DirectAdmin includes CustomBuild 2.0, allowing you to easily switch between web server stacks (Apache, Nginx reverse proxy, OpenLiteSpeed) and manage multiple PHP versions.
To access CustomBuild from SSH:
cd /usr/local/directadmin/custombuild
./build update
./build set webserver nginx_apache
./build set php1_release 8.3
./build set php2_release 8.2
./build php
./build rewrite_confs
Troubleshooting Common DirectAdmin Issues
1. Port 2222 Blocked / Cannot Reach Panel
If you cannot connect to the dashboard, ensure Firewalld (AlmaLinux/Rocky) or UFW (Ubuntu) allows port 2222:
For AlmaLinux:
firewall-cmd --permanent --zone=public --add-port=2222/tcp
firewall-cmd --reload
For Ubuntu:
sudo ufw allow 2222/tcp && sudo ufw reload
2. Recovering or Changing Admin Password
If you forget your admin password, reset it instantly from the command line:
passwd admin
Frequently Asked Questions (FAQ)
โ Does DirectAdmin offer a free trial?
Yes. DirectAdmin provides a full-featured 60-day free trial for new server installations directly through directadmin.com.
โ Which Linux distribution is best for DirectAdmin?
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.
โ Can I migrate accounts directly from cPanel to DirectAdmin?
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.
๐ Recommended Related Technical Guides:
๐ฏ Conclusion & Next Steps
DirectAdmin is a formidable, cost-effective alternative to cPanel that gives server administrators total control, high speed, and low RAM utilization. With automated Let’s Encrypt integration, CustomBuild modularity, and strong security, it remains a premier choice for hosting websites on Linux in 2026.

