DirectAdmin is a web hosting control panel that supports various Linux distributions as well as FreeBSD.

Feature-wise, this product is slightly limited when compared to cPanel. Features that I found lacking includes:

  • No replacement for EasyApache
  • ACME/Let's Encrypt not enabled by default
  • Non-intuitive UI. The whole vue.js thing with their new theme is absolutely annoying to use.

However, this is a huge step up from InterWorx. There is no ridiculous encoded-PHP-scripts-as-system-scripts everywhere. It allows for custom apache/PHP setups with the CustomBuild system. While the new modern web interface is a little non-intuitive, it's still functional.

Installation[edit]

On a clean install of CentOS 7, install the required dependencies listed at https://help.directadmin.com/item.php?id=354

# yum install wget gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl quota libaio \
libcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 cyrus-sasl-devel perl-ExtUtils-Embed \
autoconf automake libtool which patch mailx bzip2-devel lsof glibc-headers kernel-devel expat-devel \
psmisc net-tools systemd-devel libdb-devel perl-DBI perl-Perl4-CoreLibs perl-libwww-perl xfsprogs rsyslog logrotate crontabs file kernel-headers

Start the automatic installation with the auto parameter.

# wget https://www.directadmin.com/setup.sh
# sh setup.sh auto

Review /usr/local/directadmin/conf/directadmin.conf and ensure that the ethernet_dev value is correct.

Installation takes less than an hour. When completed, access DirectAdmin on port 2222. The Admin username/password are stored in the /usr/local/directadmin/scripts/setup.txt file.

Softaculous[edit]

Installation is super fast.

# wget -N http://files.softaculous.com/install.sh
# chmod 755 install.sh
# ./install.sh

See: https://www.softaculous.com/docs/admin/installing-softaculous-in-directadmin/

AWStats[edit]

To enable AWstats over webalizer.

## Download and enable awstats
cd /usr/local/directadmin/scripts
./awstats.sh

## Trigger a tally
# echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
# /usr/local/directadmin/dataskq d800 | tee /usr/local/directadmin/dataskq.out

## Verify that awstats=1 is set
/usr/local/directadmin/conf/directadmin.conf

cPanel Migration[edit]

Clone the git repository at https://github.com/danitfk/cPanel-to-DirectAdmin-Migration. Create a import and export directory. Edit the default.conf and ensure that your IP address, nameservers, Plan/Package, and other account attributes are set to your liking.

Backups can be created using the /scripts/pkgacct <username> script on the cPanel server. Copy cPanel backups to the import directory. Run the conversion script and move the resulting file to the admin's user_backups directory.

# perl da.cpanel.import.pl
## Answer that you acknowledge what the script does
## Then the conversion happens
~fin

# cp export/*gz /home/admin/user_backups/

To restore the converted backup file, navigate into the Reseller view and click "Manage User Backups". Restore the backup file.

CustomBuild[edit]

CustomBuild is DirectAdmin's way of managing the software running on the server. The primary configuration file is located at /usr/local/directadmin/custombuild/options.conf and can be edited either from the web interface or directly via SSH.

Backups[edit]

Backups are configured under 'Admin Backup/Transfer' on the admin panel. Backups can only be stored locally at /home/admin/admin_backups or via FTP.

Backup restores can be done by the user if they upload a backup to their ~/backups directory.

Forcing SSL on DirectAdmin[edit]

See: https://help.directadmin.com/item.php?id=629