# Manual update

You'll need your UID (Client ID) and LID (License ID) for the following commands. You can usually find these values in /usr/local/directadmin/scripts/setup.txt.

Enter your information here: Client ID (uid): License ID (lid):

If you need to update your copy of DirectAdmin manually, you can do so by running the following commands:

cd /usr/local/directadmin
wget --no-check-certificate -O update.tar.gz 'https://www.directadmin.com/cgi-bin/daupdate?redirect=ok&uid=1234&lid=567890'
tar xvzf update.tar.gz
./directadmin p
cd scripts
./update.sh
service directadmin restart
1
2
3
4
5
6
7

Note that if you are running FreeBSD, you might need to add a \ before the ? character in the wget line, and use /usr/local/etc/rc.d/directadmin restart.

If there are errors extracting the update.tar.gz file, then run: head -n 1 update.tar.gz to search for an error. If there is an readable error inside the file, then you'll need to contact sales@directadmin.com to get your license activated or updated.

Using the redirect=okopen in new window option in the download string will tell the daupdate that the downloader being used supports Location header redirects. The daupdate script will offload downloads when possible to other servers.

# 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:

cd /usr/local/directadmin/custombuild
./build rewrite_confs
1
2

# Installing pre-release version

The pre-release version of DirectAdmin is the latest version of the code which has not yet been put into production. It could also be referred to as the beta of the next version of DA, except that it's usually updated every few days with new changes, fixes, features, etc.

Before a new version of DirectAdmin is released, the pre-release binaries will be labeled the "Release Candidate" binaries (RC), and new features are no longer added, but fixes changes will be made as mass testing is done (by anyone who wishes) before they're deemed "stable" for production use.


To get the pre-release binaries, go to your Clients section:
https://www.directadmin.com/clientsopen in new window

Click the license for which you wish to install the binaries, and follow the pre-release links.

Note that you must have a valid/active license in order to see the links.

If you wish to downgrade back to the standard production binaries, use the manual daupdate guide to go back, but exclude channel=beta from the daupdate request.

Note, if you're downloading these binaries for a recent fix, ensure you check the date that they were compiled to ensure that the fix is in them. To do this, type:

cd /usr/local/directadmin
./directadmin o
1
2

and make sure that the compiled date is recent, relative to the fix. If the date is before the fix was implemented, then the fix is not likely in these binaries, in which case you can just request we update them by emailing us (please include your OS version).


If you don't have access to the clients area, and still need the pre-release binaries, you can simply add channel=beta to the daupdate script, to grab the pre-release binaries. You'll need your uid and lid, which can usually be found in the /usr/local/directadmin/scripts/setup.txt file:

Client ID (uid): License ID (lid):

cd /usr/local/directadmin
wget --no-check-certificate -O new.tar.gz 'https://www.directadmin.com/cgi-bin/daupdate?redirect=ok&uid=1234&lid=567890&channel=beta'
tar xvzf new.tar.gz
./directadmin p
scripts/update.sh
killall -9 directadmin
./directadmin d
1
2
3
4
5
6
7

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:

cd /usr/local/directadmin/custombuild
./build rewrite_confs
1
2

# How to revert from Pre-release back to the stable version

If you decide you need to revert back to the latest stable version of DirectAdmin after updating to Pre-Release version, simply remove the 'channel=beta' flag from the instructions to update manually located here.

# 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 record:

version.directadmin.com. 14400  IN      TXT     "v=1.54.1&f=1.541000"
1

where DA will try that first, before attempting to connect to /ver.php.

This will be far more efficient, since a lookup has to be done anyway to determine the A record for directadmin.com, before doing the high-overhead Apache connection to check it.

So we just skip that A lookup and instead do a TXT lookup on version.directadmin.com, giving the version an all-in-one clean hit. This has the added benefit of caching the values in your /etc/resolv.conf name-servers, so future hits won't even touch directadmin.com.

This can be checked manually as:

host -t TXT version.directadmin.com
1

Example output:

version.directadmin.com descriptive text "v=1.60.4&f=1.604000"
1

Note for systems where DA previously connected "bind" to a proper IP (say the lan_ip value wasn't set if you're on a LAN), it would previously show "unable to connect" for the version in Admin Level -> Licenses/Updates. With this change, unless there is a DNS value, you won't be able to use the "unable to connect" version to determine if your lan_ip is set up incorrectly or not.