StarDomain

Installing DirectAdmin on VPS

Installing DirectAdmin on VPS

DirectAdmin is a lightweight, fast, and reliable hosting control panel. It is an excellent alternative to cPanel, offering lower resource usage while providing all essential hosting management features. This guide covers the complete installation process.

Prerequisites

System Requirements

  • Operating System: AlmaLinux 8/9, Rocky Linux 8/9, CloudLinux 8/9, Debian 11/12, or Ubuntu 22.04/24.04
  • RAM: Minimum 1 GB (2 GB+ recommended)
  • Disk Space: Minimum 10 GB free (20 GB+ recommended)
  • Architecture: 64-bit (x86_64)
  • Network: Static IP address
  • Hostname: Valid FQDN (e.g., server.yourdomain.com)

Pre-Installation Checklist

  1. Fresh OS installation — no existing control panels or web servers
  2. Root access via SSH
  3. DirectAdmin license — purchase from {{COMPANY_NAME}} or DirectAdmin directly
  4. License ID and Client ID — needed during installation

Tip: DirectAdmin uses significantly less memory than cPanel, making it ideal for VPS servers with 2-4 GB RAM.

Installation Steps

Step 1: Connect to Your VPS

ssh root@your-server-ip

Step 2: Update the System

yum update -y    # AlmaLinux/Rocky
apt update && apt upgrade -y    # Debian/Ubuntu

Step 3: Set the Hostname

hostnamectl set-hostname server.yourdomain.com

Step 4: Download and Run the Installer

bash <(curl -Ss https://www.directadmin.com/setup.sh)

The installer will prompt you for:

  1. Your Client ID and License ID
  2. Your server's hostname
  3. Your server's primary IP address
  4. The network interface (usually eth0 or ens3)

Alternatively, use the auto mode:

bash <(curl -Ss https://www.directadmin.com/setup.sh) auto

Auto mode detects your settings and uses default options. Installation typically takes 10-20 minutes.

Step 5: Note Your Admin Credentials

After installation completes, the installer displays:

  • Admin URL (https://your-server-ip:2222)
  • Admin username (usually admin)
  • Admin password (auto-generated)

Save these credentials securely. You can also find them in /usr/local/directadmin/scripts/setup.txt.

Post-Installation Setup

1. Access DirectAdmin

Open your browser and navigate to:

https://your-server-ip:2222

Log in with the admin credentials from the installation output.

2. Essential Configuration

  1. Change the admin password: Admin Settings > Change Password
  2. Configure nameservers: Server Manager > DNS Administration
  3. Set up packages: Account Manager > Manage User Packages — create hosting packages with defined limits
  4. Configure PHP: Custom Build > PHP Settings — install and configure PHP versions
  5. Set up backups: Admin Settings > Backup/Transfer — configure scheduled backups
  6. Install SSL: Navigate to SSL Certificates to install Let's Encrypt for the hostname

3. License Activation

DirectAdmin licenses are tied to your server IP. Verify your license status:

/usr/local/directadmin/directadmin l

If moving to a new IP, update your license at the DirectAdmin client portal.

CustomBuild 2.0

DirectAdmin uses CustomBuild to manage web server software:

cd /usr/local/directadmin/custombuild
./build update
./build php          # Build/rebuild PHP
./build rewrite_confs  # Regenerate configurations

Common CustomBuild tasks:

  • Switch web server: ./build set webserver nginx or apache or openlitespeed
  • Add PHP version: ./build set php2_release 8.2 then ./build php n
  • Enable PHP-FPM: ./build set php1_mode php-fpm

Troubleshooting

Cannot Access DirectAdmin on Port 2222

  • Check firewall rules: iptables -L -n | grep 2222
  • Verify DirectAdmin is running: systemctl status directadmin
  • Restart if needed: systemctl restart directadmin

License Errors

  • Verify your IP matches the licensed IP
  • Run /usr/local/directadmin/directadmin l to check license status
  • Contact your license provider for IP changes

Installation Fails

  • Review the install log: /var/log/directadmin-install.log
  • Ensure all prerequisites are met (clean OS, correct version)
  • Verify network connectivity to DirectAdmin's servers

Need help with DirectAdmin installation or configuration? Contact our support team at {{SUPPORT_EMAIL}} or open a ticket at {{SUPPORT_URL}}.