
DirectAdmin still gets overlooked next to cPanel and Plesk. That's a shame. It's lighter on resources and cheaper to license per account. If you're running a small reseller operation or a handful of client sites on a modest VPS, that difference matters.
This DirectAdmin setup tutorial walks through a full install on a fresh Ubuntu or AlmaLinux VPS. It covers the configuration steps people usually skip, plus the hardening you need before putting real clients on it.
We'll cover licensing, the install script, DNS and mail configuration, user account creation, and a checklist for locking things down. By the end you'll have a working panel ready for production traffic — not just a demo install you're afraid to touch.
What DirectAdmin Is Good For (and Where It Isn't)
DirectAdmin uses roughly 30-40% less RAM than cPanel on the same workload, based on typical benchmarks from hosts running both side by side. Licensing is simpler too. A single license covers unlimited accounts on one server, which matters if you're building a reseller business.
Where it falls short: the plugin ecosystem is smaller, and enterprise buyers sometimes expect cPanel by name. If you're selling to non-technical clients who've only heard of cPanel, that can be a sales friction point.
For internal hosting, agency use, or budget-conscious resellers, DirectAdmin is a solid pick. If you're weighing control panels more broadly, our cPanel hardening tutorial covers the equivalent lockdown steps on that platform.
Before You Install: Server and Licensing Requirements
DirectAdmin officially supports Ubuntu 22.04/24.04, AlmaLinux 9/10, RHEL 9, and CentOS Stream 9. The minimum is 1 CPU core and 1GB RAM for a bare install. Budget 2GB+ if you're hosting WordPress sites with any real traffic.
- A fresh OS install with no other control panel or web server previously configured
- Root SSH access
- A registered domain pointed at your server's IP (for the hostname)
- A DirectAdmin license key from your account at directadmin.com, or a trial license for testing
- At least 20GB free disk space for the panel plus your hosted sites
Spin up a fresh VPS specifically for this. Don't install DirectAdmin on a box already running Apache or another panel. A HostMyCode VPS with a clean OS image is the right starting point. It gives you full root access to run the installer without restrictions.
Step 1: Set the Hostname and Update the System
SSH into your server as root and set a fully qualified hostname first. DirectAdmin's installer checks this early. Getting it wrong means editing config files by hand later.
hostnamectl set-hostname server1.yourdomain.com
apt update && apt full-upgrade -y # Ubuntu/Debian
dnf update -y # AlmaLinux/RHEL
Reboot after the upgrade so the kernel and any systemd changes take effect cleanly:
reboot
Step 2: Run the DirectAdmin Installer
DirectAdmin ships a single bash installer that handles the download, dependency checks, and initial configuration. Grab your license key ID and setup.txt details from the DirectAdmin client area before you start. The script will ask for them.
cd /root
wget -O setup.sh https://download.directadmin.com/setup.sh
chmod 755 setup.sh
./setup.sh
The installer prompts for your license ID, hostname confirmation, and whether to install Apache or Nginx as the web server. DirectAdmin supports Nginx as a reverse proxy in front of Apache. That's worth choosing if you care about static file performance. It also asks whether to install a mail server. Say yes unless you're routing mail elsewhere.
Install takes 20-40 minutes depending on your VPS's CPU allocation. Don't interrupt it, even if it looks stalled during the PHP compilation stage.
Step 3: First Login and Admin Account Setup
Once the install finishes, the script prints your admin username and a randomly generated password. Log in immediately and change it.
https://your-server-ip:2222
From the admin dashboard, go to Admin Settings > Admin Level > Change Password and set something strong — 16+ characters, no dictionary words. Then check System Info & Files to confirm the version is current. DirectAdmin auto-updates by default, but it's worth verifying on day one.
Enable two-factor authentication next, under Your Account > Two Factor Authentication. It's the single most effective step against credential-stuffing attacks on control panel logins.
Step 4: Configure DNS and Nameservers
DirectAdmin runs its own DNS server (usually BIND or PowerDNS, depending on your install choice) that generates zone files automatically for each domain you add. Set your nameserver hostnames properly before adding client domains.
Go to Admin Settings > Nameserver and confirm entries like ns1.yourdomain.com and ns2.yourdomain.com resolve to your server's IPs. You'll need to register these as glue records with your domain registrar, or through your domain and DNS management dashboard. That way the nameservers themselves are resolvable before clients delegate domains to them.
Once you're hosting more than a handful of paying clients, add a secondary DNS server for redundancy. Our BIND9 DNS slave setup guide covers configuring a secondary nameserver on a separate VPS.
Step 5: Create a Reseller or User Package and Test Account
Packages in DirectAdmin define resource limits — disk quota, bandwidth, number of domains, email accounts, and databases. Go to Reseller/Admin Level > Manage User Packages and create one before adding real users.
Package name: starter-shared
Disk Quota: 5000 MB
Bandwidth: 50000 MB
Domains: 1
Subdomains: 10
Email Accounts: 25
Databases: 5
SSL: Free (Let's Encrypt)
Create one test user against this package and walk through the full flow: add a domain, create an email account, upload a test file via SFTP, and issue an SSL cert. This confirms DNS, mail, and the web server are all wired correctly before you onboard anyone real.
This step mirrors the account-package planning covered in our WHM account package setup tutorial. The same oversell-avoidance logic applies whether you're on cPanel or DirectAdmin.
Step 6: Configure Free SSL and Force HTTPS
DirectAdmin includes built-in Let's Encrypt support through the SSL Certificates section of each user account. Enable it globally under Admin Settings > Directadmin.conf by setting:
letsencrypt=1
force_hostname_ssl=1
Restart DirectAdmin's service after editing the conf file directly:
systemctl restart directadmin
Users can then request certificates themselves from their control panel. If you hit renewal errors or DCV failures later, the troubleshooting steps in our Let's Encrypt setup guide apply almost identically, since DirectAdmin uses the same ACME protocol under the hood.
Step 7: Harden the Panel Before Going Live
Default installs are functional but not locked down enough for production. Run through this checklist before onboarding your first paying client:
- Move the panel port off 2222 only if you have a specific reason — obscurity alone isn't security, but it does cut down noise in your logs
- Restrict panel access with a firewall rule allowing only your admin IPs, then open it more broadly once you trust the setup
- Enable Brute Force Monitor under Admin Settings — DirectAdmin has this built in and it bans IPs after repeated failed logins
- Disable unused services: if you're not using FTP, disable pure-ftpd; if clients don't need shell access, keep it off by default
- Set up UFW or iptables rules to only expose the ports you actually need: 80, 443, 2222, 21 (if FTP is on), and mail ports
- Configure automatic OS security updates through unattended-upgrades (Ubuntu) or dnf-automatic (AlmaLinux)
For a full walkthrough of firewall rules and SSH hardening that applies regardless of which control panel you run, see our server hardening tutorial. It covers SSH key setup, UFW rule ordering, and log auditing in more depth than fits here.
Step 8: Set Up Backups Before You Add Real Clients
DirectAdmin includes a built-in backup/restore system under Admin Level > Backup/Transfer. Configure it to run nightly and push copies off the server, not just to local disk.
# Example cron for admin backup, run as root
0 3 * * * /usr/local/directadmin/dataskq d &
DirectAdmin's built-in scheduler (dataskq) handles most of this automatically once you enable scheduled backups in the panel UI. You still need an offsite destination, though. S3-compatible storage, a remote FTP target, or another VPS entirely all work. Don't rely on a single copy sitting on the same disk as the live data.
For a more resilient, versioned backup approach layered on top of DirectAdmin's native tool, our VPS backup strategy tutorial covers the 3-2-1 approach with Restic, which works well as a secondary layer.
Running DirectAdmin well starts with the right VPS underneath it — enough RAM headroom for mail and MySQL, and NVMe storage so backups and restores don't crawl. HostMyCode's VPS hosting gives you full root access for a clean DirectAdmin install, and if you'd rather not manage patching and hardening yourself, our managed VPS hosting handles that layer for you.
Frequently Asked Questions
Does DirectAdmin support Nginx instead of Apache?
Yes. The installer lets you choose Nginx as a standalone web server or as a reverse proxy in front of Apache. The proxy mode is more common since it keeps Apache's .htaccess compatibility while gaining Nginx's static file speed.
How much does a DirectAdmin license cost compared to cPanel?
DirectAdmin licensing is typically priced lower than cPanel/WHM, especially at higher account counts. It doesn't scale license cost per-account as aggressively as cPanel has in recent years. Check current pricing directly with DirectAdmin, since license tiers get updated periodically.
Can I migrate cPanel accounts into DirectAdmin?
Yes, but not automatically. You'll typically need to export each account's files, databases, and email separately, then recreate the account structure in DirectAdmin. Our hosting migration checklist covers the general workflow, though cross-panel migrations need extra manual steps for account recreation.
Is DirectAdmin good for WordPress hosting specifically?
Yes, especially combined with LiteSpeed or the Nginx reverse-proxy option, since both cut PHP execution overhead compared to plain Apache. Pair it with a caching plugin and you get performance close to a managed WordPress stack at a fraction of the resource footprint.
What happens if I run out of the trial license period?
The panel locks admin functions until a valid license is applied, but existing sites keep serving traffic since Apache/Nginx and mail services aren't tied to the license daemon. Renew or purchase before the trial expires to avoid admin-side disruption.