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 DA 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 c | grep update_channel
update_channel=alpha
1
2

And changed with:

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

Automated update

There are few ways of doing automated DirectAdmin updates which are disabled by default.

  • CustomBuild can be set to cron auto update the services, and if you also use da_autoupdate=yes, CB will do it for you. However, automated CB updates aren't always recommended.

  • A simple cronjob that runs this command is likely safer, if you only want DA to be auto-updated:

echo "action=update&value=program" >> /usr/local/directadmin/data/task.queue
1

Each night that the update is rejected, you'll get a note in your /var/log/directadmin/system.log.

Note: Pre-release and regular updates do not issue full config rewrites. If you need a template change, you must issue a full rewrite to get it:

/usr/local/directadmin/custombuild/build rewrite_confs
1

Manual update

Manual update can be triggered by a helper script getDA.sh. Script usage is straightforward:

$ /usr/local/directadmin/scripts/getDA.sh
Usage:
    /usr/local/directadmin/scripts/getDA.sh alpha
    /usr/local/directadmin/scripts/getDA.sh beta
    /usr/local/directadmin/scripts/getDA.sh current
    /usr/local/directadmin/scripts/getDA.sh stable
    /usr/local/directadmin/scripts/getDA.sh [commit-hash]
1
2
3
4
5
6
7

For example to manually update DA to latest release in the current update channel use:

/usr/local/directadmin/scripts/getDA.sh current
1

Please note that this is a manual update process, it will not start following new upate channel after update. An update from the dashboard will switch back to the latest release from the configured update channel.

How to check latest available DirectAdmin version

In an attempt to be more efficient at allowing all DA 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: 11/10/2021, 12:12:11 PM