Updating your DirectAdmin License manually

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

Top Level » TroubleShooting
Top Level » DirectAdmin » Licenses

Updating your DirectAdmin License manuallyLast Modified: Jul 13, 2020, 7:39 pm
If you need to update your DirectAdmin license manually, you can do so by typing:

/usr/local/directadmin/scripts/getLicense.sh auto
service directadmin restart

Alternatively, if you need to specify the UID/LID values, you can manually enter your information, then run the following commands:
Client ID (uid):  
License ID (lid):
IP address:      

cd /usr/local/directadmin/scripts
./getLicense.sh 123 1234
service directadmin restart

Where 123 and 1234 are your Client ID and License ID, respectively. If there are errrors extracting the update.tar.gz file, then run:
head -n 1 /usr/local/directadmin/conf/license.key

to search for an error. If there is an readable error inside the file, double check the IP you are using matches the IP in the license on our system.  Also check that it's active in our clients section.  Failing that, you'll need to contact sales@directadmin.com to get your license activated or updated.

If you have multiple IPs on your device and wget is binding to the incorrect one, you can specify the IP to bind to by adding it as the last argument:

cd /usr/local/directadmin/scripts
./getLicense.sh 123 1234
service directadmin restart

If you're not able to connect to port 443 on directadmin.com (https), or are not getting any results (no returned data), it may be a block somewhere on 443.
For that case, you can try using port 80 to get the license.  To do this, type:

echo 1 > /root/.insecure_download

and the scripts will automatically download over port 80, without encryption.

If you get errors during the restart, eg:

Stopping DirectAdmin: [ FAILED ]
Starting DirectAdmin: [ OK ]

your PID file may be out of sync. In the case, restart directadmin forcefully:

killall -9 directadmin
/etc/init.d/directadmin start

Retry the restart command, to ensure that both the "Stopping" and "Starting" sections are "[ OK ]".

If you cannot connect to port 2222 at all, see this guide:

July 16, 2013: New license relay server

If you cannot connect to www.directadmin.com via any means, a new script has been added to let you get the license via a license relay server.
More info and fallback automation will come in time, but for now, manually running this from your server will work:

cd /usr/local/directadmin/conf
cp -f license.key license.key.old
wget -O license.key --no-check-certificate 'https://license.directadmin.com/licenseupdate.php?uid=123&lid=1234'
chown diradmin:diradmin license.key
chmod 600 license.key

You must connect from your server using the correct IP address.  Use the --bind-address= option if needed, to force the correct IP.

related error messages

*** An error has occurred while trying to update the license file ***

Related Helpfiles
error with wget: use `--no-check-certificate` for licenses/updates
The task.queue is not being processed
How to compile wget for your system
I need to automate the updating of my license file in ssh
What IP does my system use for outbound connections?
Testing why the automated license update isn't working
My old server does not support new SSL Protocols, but I need to update my license

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