Updating DirectAdmin

Update channels

DirectAdmin update channels are software release streams allowing DirectAdmin users to select how often they want to receive software updates.

There four update channels:

  • current - default update channel used by new DirectAdmin installations.
  • stable - update channel that delays all the releases compared to current update channel, some minor versions are skipped entirely.
  • beta - update channel also known as pre-releases or release candidates (RC). This channel receives same updates as current channel but a bit earlier.
  • alpha - bleeding edge code usually contains not yet finished features, this update channels can receive bug-fixes almost immediately after they are pushed.

Update channel that is being followed are stored in the main directadmin.conf file with key update_channel. It can be checked with:

$ /usr/local/directadmin/directadmin config | grep update_channel
update_channel=alpha
1
2

And changed with:

/usr/local/directadmin/directadmin set update_channel current
1

Automated updates

DirectAdmin has a built in auto-update functionality. It automatically detects if a new DirectAdmin release is available and installs the update. Updates are gradually rolled-out to avoid all the systems upgrading at the same time.

This feature is controlled by the autoupdate configuration value in main DirectAdmin config file.

To turn it ON use command:

/usr/local/directadmin/directadmin config-set autoupdate 1
1

Manual update using GUI

Update can be triggered from the GUI in the Licensing / Updates section. If a new DirectAdmin version is available you will see an Update Directadmin button available.

Repos View

Manual update using CLI

Manual update can be triggered by a CLI command da update. When executed without any parameters this command will update DirectAdmin to the latest available version of selected update channel.

It is also possible to update to a specific DA build or latest build from other relese channels (without changing configuration).

Usage examples:

da update               # Update to the latest version from configured update channel
da update alpha         # Update to the latest verdion in alpha channel
da update current       # Update to the latest verdion in current channel
da update 00112233...ff # Update to a particular DA build
1
2
3
4

Manual update using CLI commands

If da update command is not available (it is not present in old DirectAdmin installations) or you want full control of update procedure DirectAdmin can be upgraded completely manually.

Execute the following commands as root user:

CHANNEL=current                                                                                             # can be one of: alpha, beta, current, stable
OS_SLUG=linux_amd64                                                                                         # can be: linux_amd64, rhel8_amd64, rhel7_amd64, debian10_amd64, ...
COMMIT=$(dig +short -t txt "$CHANNEL-version.directadmin.com" | sed 's|.*commit=\([0-9a-f]*\).*|\1|')       # can be commit hash literal value if you want specific build to be installed
FILE="directadmin_${COMMIT}_${OS_SLUG}.tar.gz"                                                              # creates download package name from the variables above

curl --location --progress-bar --connect-timeout 10 "https://download.directadmin.com/${FILE}" --output "/root/${FILE}"   # downloads given directadmin build into /root dir
tar xzf "/root/${FILE}" -C /usr/local/directadmin                                                                         # extracts downloaded package to /usr/local/directadmin
/usr/local/directadmin/directadmin permissions || true                                                                    # runs post-upgrade permission fix step
/usr/local/directadmin/scripts/update.sh                                                                                  # runs other post upgrade fixes
service directadmin restart							                                          # restarts directadmin
1
2
3
4
5
6
7
8
9
10

Note: Please do not use this script for updating DirectAdmin on EOL distros. This script will install latest release without checking EOL status which most likely be non-functional on EOL systems.

How to check latest available DirectAdmin version

In an attempt to be more efficient at allowing all DirectAdmin boxes to know which version is the most recent, we've added a new TXT records for each update channel:

  • alpha-version.directadmin.com
  • beta-version.directadmin.com
  • current-version.directadmin.com
  • stable-version.directadmin.com

Example of checking current versions using dig tool:

$ dig +short -t txt alpha-version.directadmin.com beta-version.directadmin.com current-version.directadmin.com stable-version.directadmin.com
"v=1.63.2&commit=00112233445566778899aabbccddeeff00000000"
"v=1.63.1&commit=aa112233445566778899aabbccddeeff00000000"
"v=1.63.1&commit=aa112233445566778899aabbccddeeff00000000"
"v=1.63.0&commit=ff112233445566778899aabbccddeeff00000000"
1
2
3
4
5

Extracting just the version string:

$ dig +short -t txt current-version.directadmin.com | sed 's|.*v=\([0-9.]*\).*|\1|'
1.63.1
1
2
Last Updated: 7/7/2022, 11:52:06 AM