How to Install DirectAdmin
To install DirectAdmin, start with a clean AlmaLinux, Rocky, Debian or Ubuntu server with 4 GB RAM, 4 GB swap and a static IPv4. Set a resolving FQDN hostname, then as root run the official setup.sh with your licence key. Log in at port 2222 using the credentials the installer prints.
For server admins and resellers setting up DirectAdmin on a fresh VPS, from requirements and licence to first login, firewall ports and fixes.
knowledge
- Read time
- 5 min
- Sections
- 8
- Updated
- 14 Nov 2026
- Written by
- WebJi® team
Last editorial update: 14 November 2026. Prices follow the dated sources on this page; checkout confirms current charges.
What does installing DirectAdmin actually do?
DirectAdmin's installer turns a clean Linux server into a complete hosting stack: it installs the panel plus the web server, PHP, MariaDB/MySQL, Exim mail, Dovecot, DNS and FTP, then hands you an admin login on port 2222. It is a commercial panel, so a valid licence is needed before the script will finish.
Because it builds everything itself, DirectAdmin must go on a fresh operating system. Its documentation warns against installing on a live server or one that already has another control panel, because it does not convert existing data. Plan the install for a new VPS, then migrate sites in afterwards.
DirectAdmin system requirements
DirectAdmin requires root access, a clean 64-bit install of a supported Linux distribution, at least 4 GB of RAM plus at least 4 GB of swap, one static IPv4 address and a filesystem with quota support.
| Requirement | Minimum | Practical note |
|---|---|---|
| Operating system | RHEL or a derivative (AlmaLinux, Rocky Linux, CentOS Stream), Debian or Ubuntu | Use a currently supported LTS release; check DirectAdmin's OS end-of-life table |
| Architecture | amd64 (x86-64) or arm64 | 32-bit systems are not supported |
| Memory | 4 GB RAM and at least 4 GB swap | More for busy mail, ClamAV or many PHP versions |
| Disk | 2 GB free after the OS, excluding site data | Size the disk for websites, mail and local backups |
| IP address | 1 static IPv4 | Two IPs if you want to run your own ns1/ns2 nameservers |
| Access | Root shell, working SSH, quota-capable filesystem | sudo from a normal user is not enough |
Most budget VPS images ship with little or no swap, so add it before installing. Choosing between DirectAdmin and other panels is covered in cPanel vs DirectAdmin.
Preparing the server: hostname, updates and swap
Set a fully qualified hostname that resolves to the server's IP, update the OS, and create swap so the server meets the 4 GB requirement. A hostname such as server.example.in needs an A record pointing at the server before you start.
# as root
hostnamectl set-hostname server.example.in
hostname -f
# update (Debian/Ubuntu)
apt update && apt -y upgrade
# update (AlmaLinux/Rocky)
dnf -y update
# 4 GB swap file
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile && swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstab
free -h
Run the install inside tmux or screen, so a dropped SSH connection does not kill the installer halfway through building services.
Running the DirectAdmin installer
Log in as root and run the official setup script with your licence key; the command-line installer then builds the stack with default options. Confirm first in the DirectAdmin client area that the licence shows as Active and Verified.
# command-line install with your licence key
sh <(curl -fsSL https://download.directadmin.com/setup.sh) 'YOUR_LICENSE_KEY'
# or the web-based installer: run without a key and open the URL it prints
sh <(curl -fsSL https://download.directadmin.com/setup.sh)
DirectAdmin's own documentation shows these commands run from a bash root shell; running them with sudo from a normal user does not work, so switch with sudo -s first. The web-based variant prints a one-time URL on port 35222 where you paste the licence key and choose options in the browser; allow that port temporarily if a firewall is already active. Options such as the web server or PHP versions can be preset with environment variables, listed on DirectAdmin's predefined installation options page.
Logging in to DirectAdmin for the first time
When the installer finishes it prints the admin username, password and a direct login link; the panel itself is at http://SERVER-IP:2222. The same credentials are saved in /usr/local/directadmin/conf/setup.txt.
- Open the login link, sign in as
adminand change the password at once. - Set the admin email so licence, backup and security notices reach you.
- Issue a Let's Encrypt certificate for the server hostname, so the panel opens over HTTPS without a warning.
- If this server will host DNS, create ns1 and ns2 and register them as glue records at the registrar; creating private nameservers walks through it.
- Delete or secure
setup.txtonce you have stored the password safely.
Firewall ports a DirectAdmin server needs
Open 2222 for the panel, 80 and 443 for websites, 22 for SSH and the mail ports, in both the VPS provider's firewall and the server's own firewall.
| Port | Service | Note |
|---|---|---|
| 2222 | DirectAdmin panel | Limit to your office IPs where possible |
| 80, 443 | Websites and Let's Encrypt validation | Must be open for certificates to issue |
| 22 | SSH | Prefer key-only login |
| 25, 465, 587 | SMTP relay and submission | Some providers block outbound 25 until asked |
| 110, 143, 993, 995 | POP3 and IMAP | Use the TLS ports in mail clients |
| 53 (TCP and UDP) | DNS | Only if the server runs its own nameservers |
| 21 + passive range | FTP | Optional; SFTP over 22 is safer |
For brute-force protection, CSF firewall integrates with DirectAdmin, and Fail2ban is an alternative on Ubuntu.
When the DirectAdmin install goes wrong
Most failed installs trace back to four causes: an unverified or wrong-IP licence, a hostname that does not resolve, a server that was not clean, or not enough memory.
- Licence rejected: the key must be active and tied to this server's IP; update the IP in the DirectAdmin client area, then restart with
systemctl restart directadmin. - Builds killed mid-way: memory ran out; confirm 4 GB RAM and 4 GB swap with
free -h, then rerun. - Port 80 already in use: another web server came with the image; reinstall the OS cleanly rather than removing packages by hand.
- Panel unreachable on 2222: the provider's firewall or security group is blocking it.
- Service status:
systemctl status directadminshould show active (running); the installer log is printed to the terminal.
After DirectAdmin is installed
Create a reseller or user package, add your first domain and test a website, mailbox and backup before moving real sites across. The DirectAdmin beginner guide covers domains, email and files, installing WordPress on DirectAdmin covers the most common site, and restoring a DirectAdmin backup shows the recovery path.
DirectAdmin runs on any WebJi® VPS built from a clean supported image; VPS plans are quoted in INR before payment with 18% GST added. If you would rather not manage a licence and server at all, reseller hosting from ₹4,000 a year gives you client accounts without root administration.
Frequently asked questions
Can I install DirectAdmin on a 2 GB VPS?
Not within DirectAdmin's stated requirements, which call for at least 4 GB of RAM and 4 GB of swap. Below that, compiling services and running mail scanning can fail or swap heavily. Choose a 4 GB plan or larger for a server you intend to put clients on.
Can I install DirectAdmin on a server that already runs cPanel or websites?
No. DirectAdmin's documentation advises against installing on a live server or one with another panel, because it does not convert existing data. Build a new server, install DirectAdmin, then migrate accounts across with its import tools.
Where do I find the DirectAdmin admin password after installation?
The installer prints it at the end, and it is stored in /usr/local/directadmin/conf/setup.txt. Change it after the first login, then remove or protect that file so the original password is not left on disk.
Does DirectAdmin work on ARM servers?
Yes. DirectAdmin supports 64-bit ARM (arm64) as well as amd64, so it can run on ARM-based cloud instances. Check that any third-party plugins you rely on also have ARM builds before choosing that platform.
Checked 14 November 2026 against the DirectAdmin installation and system requirements documentation · Reviewed by the WebJi® team, Jaipur.
Ready to get started with WebJi®?
Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.