How to Install DirectAdmin on a Dedicated Server

How to Install DirectAdmin on a Dedicated Server
Eileen.B
15m
0 comments
Print
2025/08/28

Imagine you’ve just set up your brand-new dedicated server, powerful, secure, and ready to host websites, but then comes the big question: How do I manage everything without typing a bunch of confusing commands or setting up things the hard way? That’s where DirectAdmin comes in, DirectAdmin is a control panel that makes managing your server much easier, with it, you can handle websites, files, and more all from an easy-to-use interface, in this guide, we will show How to Install DirectAdmin on a Dedicated Server, it’s clear and begginer friendly and will help you get your server up and running in no time.

💡 Your Simple Road Map: We will start by making sure your server has the right operating system, partition structure, and hardware requirements. Then we will cover the necessary software, IP setup, and how to prepare for installation using predefined options, finally, you can run the installation script and successfully install DirectAdmin.    

How to Install DirectAdmin on a Dedicated Server

Why Pick DirectAdmin Instead of Other Panels?

When it comes to server control panels, cPanel and Plesk are the most popular, but DirectAdmin stands out because it’s lightweight and doesn’t use too many server resources, which means your websites can run faster since the panel itself doesn’t slow things down, it’s also cheaper compared to cPanel, which makes it a good option if you’re someone on a budget but still want a powerful tool.

Main Benefits of Using DirectAdmin on a Dedicated Server

Using DirectAdmin will save you from typing long and, importantly, complicated Linux commands; instead, you get a clean dashboard where you can do many things, such as creating emails and enabling SSL certificates, in Dedicated Server it is morer usefull because you are in a full control position, and you can do many things such as managing resources and hosting multiple websites, without even needing advanced Linux skills.

Prerequisites to Install DirectAdmin on a Dedicated Server

1- Operating System

Let’s identify the operating systems that are supported by DirectAdmin:

  • CloudLinux 7,8 (64-bit)
  • RHEL 7,8,9 (64-bit)
  • CentOS 7,8 (64-bit)
  • Rocky Linux 8,9 (64-bit)
  • AlmaLinux 8,9 (64-bit)
  • Debian 10, 11, 12 (64-bit, Arm64)
  • Ubuntu 18.04, 20.04, 22.04 (64-bit, Arm64)

2- Partition Scheme

It is better to use a simple partition structure:

                                 Partition
                                 Size
                                   /boot
                              500 MB
                                  swap
                          2 x RAM (16GB max)
                                / (root)
                            The rest of the drive

🔴 Note: You can adjust these sizes if needed, on Debian, MySQL databases are stored in the” /home/mysql/ ” directory, Also make sure to install basic development tools such as GCC, and G++.

3- Hardware

  • A processor with a minimum speed of 500 MHz is required to run DirectAdmin, although it might still work on slower systems.
  • At least 2 GB of RAM and 4 GB of swap memory are recommended.
  • A minimum of 2 GB of available disk space on the hard drive is required for Linux installation, not including the website data.

4- Software

  • SSH must be installed on the server.
  • During Red Hat installation, choose named (Name Daemon)
  • GCC and G++ to compile Apache and PHP
  • Support for quotas from the kernel and filesystem
  • Support for IPv6 from the kernel

5- IP Addresses

To control DNS, you need a minimum of two static IPv4 addresses on your server, Some registrars may require the use of an external DNS service depending on the IP address.

How to Install LAN (Internal IP)

It is possible to install DirectAdmin on an internal IP address. The steps for installing on a LAN are the same as for automatic installation, but ensure to select the Ethernet device that corresponds to the LAN IP (usually eth0, ens192, venet0, etc), When prompted, input the external license IP address.

How to Run the Installation with Predefined Options

If you need to install DA frequently, like many people, you may have a set of custom options that you want to use, and you may want to automate the process:

setup.sh

Export environment variables set to the desired values to customize the main options as shown below:

export php1_release=8.0

To customize PHP modules:

export php_imap=yes

Now run the following installation command:

./setup.sh LICENSE_KEY

You can use a predefined options.conf file to customize more options.

Note that due to the presence of /usr/local/directadmin/custombuild/options.conf or the /usr/local/directadmin/custombuild/php_extensions.conf files, the installation process uses the settings from predefined options.conf and/or php_extensions.conf files.

Now copy them from another server. You can also download from a URL, but you must remember to place the options.conf or php_extensions.conf files before installation:

mkdir -p /usr/local/directadmin/custombuild
wget -O /usr/local/directadmin/custombuild/options.conf "http://yourdomain.com/options.conf"
wget -O /usr/local/directadmin/custombuild/php_extensions.conf "http://yourdomain.com/php_extensions.conf"

Here is a sample call for the setup.sh script with environment variables:

cd /root/
wget -O setup.sh https://download.directadmin.com/setup.sh
chmod 755 setup.sh
DA_HOSTNAME={{hostname}} ./setup.sh LICENSE_KEY

Other usable environment variables:

DA_CHANNEL : Download channel: alpha, beta, current, stable
DA_COMMIT : Exact DA build to install, will use latest from update channel if empty 
DA_OS_SLUG : Build targeting specific platform: linux_amd64, debian10_amd64, rhel8_amd64, … 
DA_EMAIL : Default email address
DA_HOSTNAME : Hostname to use for installation
DA_NS1 : pre-defined ns1
DA_NS2 : pre-defined ns2

You need to set additional environment variables to a non-empty value to take effect (for example, DA_SKIP_CSF=true):

DA_SKIP_CSF : skip installation of CFS firewall 
DA_SKIP_MYSQL_INSTALL : skip installation of MySQL/MariaDB 
DA_SKIP_SECURE_PHP : skip disabling insecure PHP functions automatically 
DA_SKIP_CUSTOMBUILD : skip all the CustomBuild actions 
DA_INTERACTIVE_CUSTOMBUILD : run interactive CustomBuild installation if DA_SKIP_CUSTOMBUILD is unset" 
DA_FOREGROUND_CUSTOMBUILD : run CustomBuild installation in foreground DA_SKIP_CUSTOMBUILD is unset"

So, when CustomBuild runs by setup.sh, it will use the settings without any changes, The setup.sh correctly handles mysql_inst and mariadb/mysql versions variables and you can use it to compile the appropriate database service at install time.

Introducing Options for Script Installation Mode

Remember to set options in place before calling the setup.sh in command-line mode.

You can set the CustomBuild.conf and php_extensions.conf options in place with desired options before running setup.sh. This will do things like using the desired download server, using the desired PHP version/mode, web server type, etc. You need to place the files in the following locations before running setup.sh:

/usr/local/directadmin/custombuild/options.conf
/usr/local/directadmin/custombuild/php_extensions.conf

These files should define your preferred settings, and CustomBuild will use those settings instead of the default ones when it runs.

Export the following variables with your desired email and nameservers before running setup.sh to declare Custom Email and ns1/ns2:

export [email protected]
export DA_NS1=ns1.example.com
export DA_NS2=ns2.example.com

You can use the hostname of your choice by specifying it as follows:

export DA_HOSTNAME="server.yourdomain.com"

Export the following variable to skip MySQL installation:

export DA_SKIP_MYSQL_INSTALL=true

If you want to install the pre-release version of DirectAdmin when installing for the first time, use the flag ‘beta’ as shown below:

DA_CHANNEL=beta ./setup.sh LICENSE_KEY

Installing DirectAdmin on a Dedicated Server

First, sign in to your client account and click the “view” link next to your license. Check if the license is activated and verified. Then enter your license key and if you do not know your key enter auto.

Now login to your server as root and run the following command to run the installation script:

bash <(curl -fsSL https://download.directadmin.com/setup.sh) 'Provided license key should go here'

If you have a non-root shell, you should use the following command to get the root shell before executing the install command:

sudo -s

You can access the DirectAdmin control panel through the following URL:

http://server.ip.address:2222

Note: Use the admin username and password which is provided in the setup.sh output information.

That’s all about installing DirectAdmin on a Dedicated Server.

Installing DirectAdmin on a Dedicated Server

Real-World Example: DirectAdmin in Action

When I first started using a Dedicated Server, I was worried about controlling everything from the command line, for example, creating emails or even setting up SSL certificates felt really overwhelming for me, because it was a new experience, but after installing DirectAdmin, those tasks became so much easier for me, because from the moment of installation, I was able to add my domain easily, create a few email addresses and most importantly enabling SSH with just a few clicks.

Conclusion

Installing DirectAdmin on a dedicated server may look tricky at first, but if you follow the steps one by one , it’s actually quite simple, as long as your server has the right system setup and you prepare the basic requirements, the installation runs without any problem, The best part about DirectAdmin is that it saves you from typing lots of complicated commands, instead, you get a clean, easy-to-use panel where you can manage websites, emails, and databases in just a few clicks, which is a great news, Once installed, you can log in and start using it right away. If you want a safe and beginner-friendly way to control your server, DirectAdmin is a great choice

Share this Post
Frequently Asked Questions

You can purchase a license from the official DirectAdmin website.

Typically, 15 to 3 minuets, de[pending on your server.

Eileen.B

Leave a reply

Calculate the value of (1 + 7) :

Save my name and email in this browser for the next time.

Last Comments

Show More
Rating: 0/5