To install DirectAdmin on AlmaLinux, use a clean AlmaLinux server with at least 4 GB of RAM and 4 GB of swap. Log in as root and run the setup script with your license key:
sh <(curl -fsSL https://download.directadmin.com/setup.sh) 'YOUR_LICENSE_KEY'
When it finishes, the script prints the admin username, password and a login link. Your panel is at http://YOUR_SERVER_IP:2222.
Requirements
| Item | Requirement |
|---|---|
| Operating system | Clean 64-bit AlmaLinux. Nothing else installed: no Apache, PHP, MySQL, FTP or mail server, and no other control panel |
| RAM | 4 GB minimum |
| Swap | 4 GB minimum |
| Disk | At least 2 GB free after the OS install, plus space for your sites |
| Network | At least one static IPv4 address |
| Access | Root over SSH |
| License | An active, verified DirectAdmin license key |
These are DirectAdmin’s own requirements. A VPS with 4 GB RAM is the practical minimum. Choose the location nearest to the people who will use your sites.
Step 1: Connect and update
Log in over SSH as root; if you need help, see How to Connect to Your Linux VPS with SSH. Then update and reboot:
dnf -y update
reboot
The installer must run in a real root shell. If you logged in as a normal user, switch with sudo -s first. Prefixing the command with sudo does not work.
Step 2: Add swap if the server has none
Check memory and swap:
free -h
If the Swap line shows 0B, create a 4 GB swap file:
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstab
Run free -h again; the Swap total should now read 4.0Gi.
Step 3: Set a hostname
Use a subdomain that won’t host a website, such as server.example.com:
hostnamectl set-hostname server.example.com
In your domain’s DNS, create an A record for server pointing to the server IP. DirectAdmin uses the hostname for its own SSL certificate and for mail.
Step 4: Run the installer inside tmux
The install compiles and configures web, database, mail and FTP services, so it takes a while. Run it inside tmux so a dropped SSH connection doesn’t stop it:
dnf -y install tmux
tmux new -s da
sh <(curl -fsSL https://download.directadmin.com/setup.sh) 'YOUR_LICENSE_KEY'
Paste your own key between the quotes. If you get disconnected, log in again and run tmux attach -t da.
If you prefer to choose the options in a browser, run the script without a key. It prints a temporary link, and you finish the setup on that page:
sh <(curl -fsSL https://download.directadmin.com/setup.sh)
Step 5: First login
At the end, the installer shows the admin username, its password and a direct login URL. The same details are saved on the server:
cat /usr/local/directadmin/conf/setup.txt
Open http://203.0.113.10:2222, replacing the IP with your own, and log in as admin. After the hostname certificate is issued you can use https:// on the same port.
Important: outgoing port 25
Outgoing connections on port 25 are closed on AVASERVER servers, as stated in our terms. The mail server that DirectAdmin installs can receive mail, but it can’t deliver directly to other servers on port 25. Send outgoing mail through an external SMTP relay on port 587 or 465. Set it up as a smarthost in the Exim configuration, as described in DirectAdmin’s documentation.
After the installation
- Change the admin password in Admin › Account › Password. The original one is stored in
setup.txt. - Create a reseller or user package, then your first user account.
- If you no longer need the setup file, remove it:
rm /usr/local/directadmin/conf/setup.txt. - Keep the root password safe and separate. See How to Change the Root Password on a Linux VPS.
Fix common installation problems
“License is not valid” or the installer refuses the key. Check in your DirectAdmin account that the license is Active and Verified, and that it is bound to this server’s IP.
The install stops because of missing memory. Add the swap file from Step 2 and run the installer again.
Port 2222 does not open in the browser. Check that the service runs with systemctl status directadmin. Also make sure no firewall blocks TCP 2222.
If you need help with the server itself, such as network, IP or reinstalling AlmaLinux, open a ticket from our contact page with your server IP.
Frequently asked questions
Which port does DirectAdmin use?
Port 2222, for example http://203.0.113.10:2222. The temporary web installer uses a different port, shown in the link it prints.
Where do I find the admin password after the install?
In /usr/local/directadmin/conf/setup.txt, together with the admin username.
Can I install DirectAdmin on a server that already runs websites?
No. DirectAdmin requires a clean operating system without web, database or mail services, and without any other control panel.
Do I need a license before installing?
Yes. The command-line install needs an active, verified license key.
