How to Install & Configure DirectAdmin on an AlmaLinux / Ubuntu VPS (Step-by-Step 2026 Guide)

Quick Answer: The Fastest Way to Install DirectAdmin

To install DirectAdmin on a freshly provisioned AlmaLinux 9, Rocky Linux, or Ubuntu 24.04 LTS VPS, log in as root via SSH, install curl and tar, retrieve the automated setup script with curl -O https://www.directadmin.com/setup.sh, make it executable via chmod 755 setup.sh, and execute it using your license key: ./setup.sh auto. The automated installer compiles necessary dependencies, configures the CustomBuild engine, generates your default admin credentials, and provisions SSL certificates for port 2222 in under 15 minutes.

As cPanel licensing costs have surged over recent years, DirectAdmin has cemented its reputation as the premier lightweight, lightning-fast, and cost-effective web hosting control panel for enterprise Linux servers. Consuming as little as 250 MB of idle RAM—compared to 1.5 GB+ for legacy alternatives—DirectAdmin delivers incredible density, responsive page loads, and modular software compilation via its battle-tested CustomBuild 2.0 engine.

Whether you are setting up a private staging server or deploying a multi-tenant client hosting cluster, installing DirectAdmin on a clean Virtual Private Server (VPS) is straightforward. In this comprehensive 2026 guide, we walk you through server prerequisites, step-by-step automated installation on modern Enterprise Linux, essential CustomBuild performance tuning, CSF firewall hardening, and SSL provisioning.

DirectAdmin Hardware & Operating System Prerequisites

Before launching the installation script, verify that your VPS satisfies these baseline technical requirements:

Resource Component Minimum Baseline Recommended for Production
Operating System AlmaLinux 8/9, Rocky Linux 9, Ubuntu 22.04 LTS AlmaLinux 9 (64-bit) or Ubuntu 24.04 LTS
CPU Cores 1 vCPU (1.5 GHz+) 2 to 4 vCPUs (Dedicated KVM Threads)
System Memory (RAM) 1 GB RAM + 2 GB Swap file 4 GB to 8 GB ECC RAM
Disk Storage 20 GB SSD Storage 50 GB+ High-Speed Pure NVMe RAID-10
Networking 1 Static IPv4 Address 1 Static IPv4 + /64 IPv6 Block with FQDN Hostname

Step 1: VPS Pre-Flight Configuration & Hostname Setup

Begin by connecting to your clean VPS via SSH using root privileges. DirectAdmin requires a fully qualified domain name (FQDN) that resolves to your server’s public IP address (for example, server1.yourdomain.com). Avoid setting the hostname to a root domain.

# 1. Update OS package repositories
dnf update -y # On AlmaLinux / Rocky / RHEL
# or: apt update && apt upgrade -y (on Ubuntu/Debian)

# 2. Set permanent FQDN hostname
hostnamectl set-hostname server1.yourdomain.com

# 3. Install foundational build dependencies
dnf install -y tar gcc gcc-c++ make flex bison openssl-devel perl-CPAN perl-ExtUtils-MakeMaker perl-Data-Dumper curl wget

Step 2: Execute the Automated DirectAdmin Installer

DirectAdmin provides a universal installer script that automatically detects your Linux distribution, configures repository mirrors, compiles CustomBuild dependencies, and establishes internal database structures:

# Download the universal setup script
wget -O setup.sh https://www.directadmin.com/setup.sh
chmod 755 setup.sh

# Run the automated installer with your license key
./setup.sh auto

Note: If you have a specific license key or client ID, pass it as an argument: ./setup.sh 'YOUR_DA_KEY'. The installer will proceed through automated package compilation. On an NVMe-powered KVM VPS, this process completes in approximately 8 to 14 minutes.

Once installation finishes, your terminal will display your unique management URL and randomly generated admin credentials:

DirectAdmin is now installed.
To access your web control panel, open your browser to:
https://server1.yourdomain.com:2222 or https://YOUR_SERVER_IP:2222

The following credentials have been created:
Username: admin
Password: [Generated_Secure_Password]

Step 3: CustomBuild 2.0 Optimization (LiteSpeed & PHP 8.x)

The true power of DirectAdmin is CustomBuild (located at /usr/local/directadmin/custombuild/). It allows you to switch your entire web server stack—from traditional Apache to high-performance OpenLiteSpeed or LiteSpeed Enterprise—with a few terminal commands.

# Navigate to CustomBuild
cd /usr/local/directadmin/custombuild

# Switch web server from Apache to OpenLiteSpeed for turbo performance
./build set webserver openlitespeed
./build set php1_mode lsphp
./build set php1_release 8.3
./build set php2_mode lsphp
./build set php2_release 8.2

# Enable HTTP/3 (QUIC) and automated Let’s Encrypt SSL
./build set letsencrypt yes

# Compile the new web server stack
./build update
./build openlitespeed
./build php n
./build rewrite_confs

MeraHost VPS Automation

Deploy Pre-Configured DirectAdmin VPS in 60 Seconds

Skip manual compilation and licensing headaches. MeraHost KVM Cloud VPS instances come with 1-click DirectAdmin OS templates pre-tuned with LiteSpeed, pure NVMe RAID-10 storage, and automated daily backups.

Step 4: Hardening Security with CSF Firewall & Port 2222 SSL

Running a bare server exposed to the public internet requires immediate security hardening. Install ConfigServer Security & Firewall (CSF), which integrates seamlessly into the DirectAdmin dashboard:

# Install CSF and Login Failure Daemon (LFD)
cd /usr/local/directadmin/custombuild
./build update
./build csf

# Provision a valid Let’s Encrypt SSL certificate for DirectAdmin port 2222
/usr/local/directadmin/scripts/letsencrypt.sh request_single server1.yourdomain.com 4096

# Restart DirectAdmin to enforce secure HTTPS access
systemctl restart directadmin

With CSF active, your server automatically blocks brute-force SSH attacks, monitors port scans, and restricts unauthorized access while providing an intuitive GUI firewall management interface directly inside DirectAdmin.

Frequently Asked Questions

How much RAM does DirectAdmin use compared to cPanel?

DirectAdmin is written in C++ and has an ultra-compact memory footprint, consuming around 200 MB to 350 MB of idle RAM. In contrast, cPanel typically requires 1.2 GB to 2 GB of idle RAM just for background services. This makes DirectAdmin significantly faster on smaller VPS instances.

Can I migrate accounts from cPanel to DirectAdmin automatically?

Yes. DirectAdmin includes a built-in cPanel-to-DirectAdmin migration tool. You simply upload standard cPanel backup archives (backup-*.tar.gz) to the /home/admin/user_backups directory and restore them via the DirectAdmin interface with automatic translation of databases, mailboxes, and DNS records.

Can I change the default DirectAdmin port from 2222?

Yes. You can edit /usr/local/directadmin/conf/directadmin.conf and change the port=2222 parameter to a custom port number. Remember to allow the new port in your CSF firewall configuration before restarting the DirectAdmin service.

Does DirectAdmin support WordPress LiteSpeed Cache (LSCache)?

Yes, natively. By compiling OpenLiteSpeed or LiteSpeed Enterprise via CustomBuild, your DirectAdmin server supports full server-level LSCache integration, micro-caching, and HTTP/3 QUIC out of the box.

3.7/5 - (3 votes)
Enterprise Cloud Infrastructure

Ready for Blazing-Fast NVMe Cloud Hosting?

Tired of slow shared servers and unexpected renewal price hikes? Migrate to MeraHost with 100% free migration, pure Gen4 NVMe compute, 99.95% SLA uptime, and 24/7 human sysadmin support.

Pure Gen4 NVMe SSD LiteSpeed + LSCache 100% Free Migration 0% Renewal Hikes

Leave a Comment