This guide walks you through installing DirectAdmin, a popular web hosting control panel, on a fresh VPS (Virtual Private Server). By the end, you’ll have a fully functional control panel to manage websites, email, and databases. Before starting, ensure your VPS runs a supported operating system (e.g., AlmaLinux 8/9, Rocky Linux 8/9, Ubuntu 20.04/22.04/24.04) and that you have root access via SSH.
What You’ll Need
- A VPS with a clean installation of a supported OS (no other control panel or web server pre-installed).
- Root SSH access to the server.
- A valid DirectAdmin license (purchase from DirectAdmin or an authorized provider).
- A fully-qualified hostname (e.g., server.yourdomain.com) with DNS A record pointing to your server’s IP.
- Static IP address (most VPS providers assign one by default).
Step-by-Step
- Connect to your VPS via SSH. Use a terminal (Linux/macOS) or PuTTY (Windows) to log in as root:
ssh root@your_server_ip. If you use a key, specify it with-i. - Update the system. Run
apt update && apt upgrade -y(Ubuntu/Debian) ordnf update -y(AlmaLinux/Rocky). Reboot if the kernel was updated. - Set the hostname. Set a fully-qualified hostname (e.g.,
hostnamectl set-hostname server.yourdomain.com). Ensure it resolves to your server’s IP:ping server.yourdomain.comshould return that IP. - Disable SELinux (if enabled). On AlmaLinux/Rocky, check with
getenforce. If it returnsEnforcing, edit/etc/selinux/configand setSELINUX=disabled, then reboot. - Download the DirectAdmin installer. Run:
wget https://download.directadmin.com/setup.sh(or usecurl -O). - Run the installer. Execute
bash setup.sh. The script will prompt for your license key (or ask if you have one). If you have a license, enter it; otherwise, you can install a trial (if available) or skip for now. - Choose installation options. The script will ask about custom builds, PHP versions, etc. For a standard install, accept the defaults by pressing Enter.
- Wait for the installation to complete. This can take 10–30 minutes depending on your server’s resources and internet speed. The script will install Apache, MySQL/MariaDB, PHP, Exim, Dovecot, and other components.
- Note the admin credentials. At the end, the installer displays the admin username (usually
admin) and a temporary password. Save these securely. - Access DirectAdmin. Open your browser and go to
https://your_server_ip:2222. Accept the self-signed SSL certificate warning (you can install a valid SSL later). Log in with the admin credentials. - Change the admin password. After first login, go to Admin Level → Admin Settings → Change Password to set a strong password.
- Configure basic settings. Set your nameservers (e.g., ns1.yourdomain.com, ns2.yourdomain.com) if you plan to host domains with DNS. Go to Admin Level → DNS Management to add them.
- Install a valid SSL certificate. DirectAdmin supports Let’s Encrypt. Go to Admin Level → SSL Certificates and follow the prompts to generate a free certificate for the hostname.
Common Mistakes
- Installing on an unsupported OS or one with existing web server packages. This causes conflicts. Always start with a clean OS.
- Using a hostname that doesn’t resolve. DirectAdmin requires a valid hostname. If it doesn’t resolve, the installer may fail or services may misbehave.
- Ignoring SELinux. On RHEL-based systems, leaving SELinux enforcing can break DirectAdmin’s services. Disable it before installation.
- Not updating the system first. Outdated packages can cause installation errors.
- Skipping the license key entry. If you don’t have a license, you can install a trial, but the panel will be limited until you add a key.
Tips
- Use a VPS with at least 2GB RAM. DirectAdmin runs multiple services; more RAM ensures smoother performance.
- Take a snapshot before installing. Most VPS providers allow snapshots. If something goes wrong, you can revert quickly.
- Keep your system updated. After installation, enable automatic updates for security patches.
- Use a strong admin password and enable two-factor authentication (2FA). DirectAdmin supports 2FA via the admin settings.
- Configure a firewall. Enable CSF (ConfigServer Security & Firewall) or use your VPS’s firewall to restrict access to port 2222.
Troubleshooting
- Installer fails with “Cannot find a valid hostname.� Ensure your hostname is set correctly and resolves to the server’s IP. Check
cat /etc/hostnameandhostname -f. Update DNS if necessary. - Port 2222 is not accessible. Check your firewall:
firewall-cmd --list-all(RHEL) orufw status(Ubuntu). Open port 2222:firewall-cmd --permanent --add-port=2222/tcp && firewall-cmd --reloadorufw allow 2222/tcp. - Installation stops at “Downloading packages.� This is often a network issue. Check internet connectivity:
ping google.com. If DNS fails, addnameserver 8.8.8.8to/etc/resolv.conftemporarily. - Services like Apache or MySQL fail to start. Check logs in
/var/log/directadmin/and/var/log/httpd/. Common causes: port conflicts (e.g., another web server running) or insufficient memory. Free up ports or increase RAM. - Cannot log in to DirectAdmin. Reset the admin password from SSH:
/usr/local/directadmin/directadmin set admin_password your_new_passwordthensystemctl restart directadmin. - SSL certificate errors. If you can’t generate Let’s Encrypt, ensure port 80 is open and your domain resolves to the server. You can also install a self-signed cert temporarily.
Frequently Asked Questions
Does DirectAdmin work on any VPS?
DirectAdmin supports most VPS providers as long as the OS is one of the supported distributions and you have root access. It requires a static IP and a valid hostname.
Can I install DirectAdmin on a VPS with an existing website?
It’s not recommended. DirectAdmin is designed for a clean server. Running it alongside another web server can cause port conflicts and configuration issues.
How long does the installation take?
Typically 10–30 minutes, depending on your server’s specs and internet speed. The script downloads and compiles packages, so slower VPSes take longer.
Do I need a license to try DirectAdmin?
You can install a trial license that lasts 30 days. After that, you must purchase a license to continue using the panel.
Can I install DirectAdmin on Ubuntu?
Yes, DirectAdmin supports Ubuntu 20.04, 22.04, and 24.04. The installer will detect the OS and install the appropriate packages.
How do I update DirectAdmin later?
DirectAdmin updates itself automatically, but you can manually check for updates in Admin Level → System Updates. You can also run cd /usr/local/directadmin && ./directadmin update from SSH.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- OnePlus Watch 2 Teased? What We Know
- Vagrant vs Docker: Which Should You Use for Development?
- iQOO Neo 10 vs Neo 10R: Which Phone Should You Choose?
- Embedded OS: What They Do & When You Need One
- Best Sony E-Mount Lenses: Format & Subject Guide
- Samsung Galaxy Note Discontinued? Status Explained