How to Install DirectAdmin on Linux Server: Complete Guide (2026)

⚡ Quick Installation Blueprint (2026)

  • 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

🎯 Difficulty: Intermediate
⚡ Est. Execution: 10–15 Mins
⏱️ Verified 2026 Edition

🛡️ Linux Architect Verified

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.


⚡ Executive Summary & Key Takeaways

Verified Guide
  • Core Architecture: Production setup of Install DirectAdmin on Linux Server: Complete Guide (2026) engineered for maximum throughput and minimal memory footprint.
  • Deployment Speed: Fast-track setup under 5–10 minutes with isolated daemon processes and secure system permissions.
  • Security Hardening: Configured with dedicated system users, UFW network rules, and automated SSL/TLS termination.
  • Cost & Sovereignty: 100% open-source self-hosting on Linux VPS, eliminating expensive recurring SaaS subscriptions.

🎯 Difficulty: Intermediate
⚡ Est. Execution: 10–15 Mins
⏱️ 7 min read (1,395 words)

🔄 Verified September 2026 Edition

🐧 Target Environment: Ubuntu 24.04 / 22.04 LTS • Debian 12 • AlmaLinux 9
🛡️ Reviewed by: Senior Linux Systems Architect

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.


📖 Related Reading: Compare DirectAdmin with free open-source control panels in our guide to the Top 7 Best Free cPanel Alternatives in 2026.

System Requirements & Prerequisites


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'

The automated compilation process will configure MariaDB, PHP-FPM, Apache/Nginx, and Exim. This takes approximately 10 to 20 minutes.


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)

🚀 Production Cloud Infrastructure

Deploy on High-Performance Cloud VPS with MeraHost

Need dedicated vCPU, root SSH access, pure NVMe SSD speeds, and 99.95% uptime SLA for your production stack? Launch with MeraHost — guaranteed price lock with zero renewal hikes.

Leave a Comment