Home » Hosting Panel » DirectAdmin » Install DirectAdmin On Linux

Install DirectAdmin On Linux

Tutorial Overview

  1. Confirm DirectAdmin system requirements.
  2. Remove conflicting software
  3. Add required supporting software and service
  4. Configure self-signed SSL support

DirectAdmin Overview

DirectAdmin is a popular web hosting control panel used by many VPS owners to simplify the administration of web server, FTP, email, etc. It is supported on many operating systems, including the following:

DirectAdmin System Requirements

The following are DirectAdmins current system requirements, although we suggest you check there website page for the latest information at http://www.directadmin.com/install.html. You should ensure that your VPS has at least the following resources:

  • 500Mhz CPU
  • 1GB RAM
  • 2GB disk storage
  • 2 x public IPv4 addresses (for DNS), 1 x IPv4 can be used if using external DNS
  • FQDN for VPS (e.g. server1.example.com)

Preparing The VPS

DirectAdmin installs many applications from its own sources and therefore you must ensure that any conflicting installation of the software are removed prior to bringing the installation. You must remove the following software:

  • Apache, or any other web server (i.e. Nginx, Lighttpd, etc.)
  • PHP
  • MySQL
  • FTP server (ProFTPd, Pure-FTP, etc.)
  • Email server (Exim, Postfix, Sendmail, etc.)

In order to compile the various applications that DirectAdmin uses, you will need to ensure that the following is installed on the VPS:

  • gcc
  • g++
  • DNS server

As mentioned above, a DNS server is required on your VPS before starting the installation of DirectAdmin. We would suggest installing and configuring BIND9. Once that is done you can move on to the installation.

Installing DirectAdmin

Prior to starting the installation you should login to the DirectAdmin client area at their website and confirm your VPS IP address is licensed.

Next login to your VPS via SSH using your root credentials and get the DirectAdmin installation script by running the following:

cd /root
wget http://www.directadmin.com/setup.sh
chmod 755 setup.sh

You can now run the installation script as thus:


Once the script is running you will be prompted for your DirectAdmin client ID, license number and the hostname of the VPS.

As we are installing DirectAdmin on a VPS we must make some changes to the /usr/local/directadmin/conf/directadmin.conf file with regards our primary network device:

ethernet_dev=[DEVICE NAME]

Where [DEVICE NAME] is the name of your VPS primary network adapter. You can find your network adapter names by running the following command:

ipconfig -a

Some common device names are venet0:0 (OpenVZ, Virtuozzo, etc.), eth0:1, and eth0.

You can now access DirectAdmin via the following URL:

http://{VPS IP]:2222

However, please be aware that the above URL is not using HTTPS (SSL) encryption, so your login informaiton will be sent in clear text! To fix this, read on…

Configuring SSL Support

By default DirectAdmin does not support HTTPS (SSL) based connections ‘out of the box’, so some final configuration changes must be made in order to do so. Here, we’ll show you how to setup a ‘self-signed’ certificate to be used for DirectAdmin HTTPS login. Run the following from your VPS SSH command line:

/usr/bin/openssl req -x509 -newkey rsa:2048 -keyout /usr/local/directadmin/conf/cakey.pem -out /usr/local/directadmin/conf/cacert.pem -days 9000 -nodes
chown diradmin:diradmin /usr/local/directadmin/conf/cakey.pem
chmod 400 /usr/local/directadmin/conf/cakey.pem

Now we need to enable SSL within the DirectAdmin configuration:

vi /usr/local/directadmin/conf/directadmin.conf

Find the SSL=0 setting and change it to the following:


Now we need to restart DirectAdmin in order for the changes to take effect:

service directadmin restart

You can now securely login to your DirectAdmin VPS installation at the following URL:

https://{VPS IP]:2222

We’re finished! DirectAdmin is now up and running on your VPS. Did you have any issues or just want to brag? Yes… then please do so below:)