Updating DirectAdmin Manually


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » TroubleShooting
Top Level » DirectAdmin

Updating DirectAdmin ManuallyLast Modified: Mar 9, 2021, 2:47 pm
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://update.directadmin.com/cgi-bin/daupdate?redirect=ok&uid=123&lid=1234'
tar xvzf update.tar.gz
./directadmin p
cd scripts
./update.sh
service directadmin restart

Where 123 and 1234 are your Client ID and License ID, respectively.  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 errrors extracting the update.tar.gz file, then run:

head -n 1 update.tar.gz

to search for an error.  If there is an readble error inside the file, then you'll need to contact sales@directadmin.com to get your license activated or updated.

Using the above redirect=ok 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.

os_override

When using './setup.sh auto' for the install, DirectAdmin will create /root/.os_override to sort out which OS you're running, and set it in that file.  The above /cgi-bin/daupdate call will have the &os= appended, based on what it finds.
As of 1.60.2, future DA updates done by our binaries will make the same &os= request, as long as the /root/.os_override is still there, even if the directadmin.conf does not have the os_override set.
Effect: This means, that if you installed DirectAdmin with 'setup.sh auto', where the installer gets you the correct binaries, if your license OS set in our database does not match the installed version, when using a manual wget call, as above, without any 'os' set in the GET line, it will rely on the os set in the license in our database.  This may differ from the /root/.os_override and/or directadmin.conf:os_override value, possibly causing the wrong binaries to be downloaded.  We are considering updating the /cgi-bin/daupdate call to simply push the os change in our our DB anytime the &os= request is included in the request.  If you would like this to happen, please let us know :)



If you'd like automated DA updates, there a few ways of going about it. (we don't trigger updates from our end to your server anymore)
- 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 isn'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

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 to 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


 
Related Helpfiles
I can't connect to DirectAdmin on port 2222
Installing a pre-release version of DirectAdmin
What IP does my system use for outbound connections?

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST