License Key hashes: New method for installs/setup.sh and getLicense.sh

Do not double post, as said trial method works, after migration update your lifetime license with data from the new server
 
Yes. I know you ment that. :) But I rather call it a temp account.
Fake account is account with non existing mail address... to prevent confusion. ;)
 
I just wouldn't want to clutter up their system with temp accounts.
I don't know. It's a trial license for 60 days so I presume either the account will be removed after some time if no license is bought on that account, or it will keep existing and one can order a trial license later if needed again.

But I'm not sure if they get deleted or not. However this is how DA themselves said to do it with server transfers. Either this if it needs to be done fast, or either ask via the sales email address.
 
Ok, so we used to be able to install DirectAdmin on a template-host, which would then be cleared of all uniquely identifying stuff like license, IP addresses, mail-addresses, etc... This template-VM is then cloned to a new VM for a new customer, after which it needs to retrieve/install a dedicated license for that server.

This used to work with a '.skip_license' file in the root-dir, which, well, skipped the license installation and check. Afterwards, when the template is cloned to a new VM, we issue a script with "./getLicense.sh auto" to retrieve/install the final license which was prepared for that host/IP.

With this new licensing system, this no longer works, and we need to change the procedures for building the template-VM.

@DirectAdmin Sales: how do you propose we tackle this? We just need a dedicated license to install DA for the template host, which will then be cleared before the final VM's are cloned from this template with different IP address, hostname and License...

And to be clear, we would need to re-build the same template VM regularly, so once every few weeks or months, to bring it up to date, or change some installation defaults or components.

Another addition: The workflow for this template-to-customerserver would be something like this, license-wise:

  • Create new VM with known, fixed IP/hostname, etc...
  • Install DA (with or without license, but without errors)
  • clear license/IP/hostname
  • convert to VMWare template
  • clone to customer-server with different IP/hostname, etc..
  • request/install license

This template will be used to clone multiple customer-servers easily from Foreman/VMWare with cloud-init and other tools to quickly roll out many server without the need to install them all individually...so we need a way to be able to simply install DA without the current licensing hassle

With kind regards,

Hindrik Deelstra
Oxilion B.V.
 
Last edited:
@HindrikOxilion you can still skip the license. The only change would be using ./getLicense.sh key instead of ./getLicense.sh auto

This thread provides more information to datacenters, including the new licensing API calls. Most are skipping everything you described and opting for universal keys instead. Every customer (and template) has the same key so there is no longer the need to adjust licenses, or even deploy new licenses. ?
 
@DirectAdmin Sales Thanks for your response!

We did try with skipping the license, but that definitely does *not* work for the initial setup. The "setup.sh" script simply fails with exit-code 1, because DirectAdmin fails to start, throwing an error about a missing License, even when echoing "1" into ".skip_get_license", and using "setup.sh auto", which used to work before.

This is the output on the stderr when using the skip_license option:

"[setup.sh] Failed to start directadmin service, please make sure you have a valid license"

Then the installer quits, and reverts the installation.

So for now, we've chosen to dedicate 1 of our lifetime licenses to be used for the initial setup of DirectAdmin on our templates with a valid license. We simply clear the license.key file afterwards, and use the Licensing API to retrieve a valid license for a new cloned customer-server.

With kind regards,

Hindrik Deelstra
Oxilion B.V.
 
@HindrikOxilion That is correct -- the DA binary itself won't start up without a license so your solution sounds good. You don't need to sacrifice a license for it, though. Just add IP Restriction(s) to it and then it doesn't matter if everyone knows the key.
 
This server is running directadmin 1.63.4 on Centos 7.9.

I am having problems with servers running into 'license expired' issues, am I the only one having these kinds of issues?
In the past I could fix it, but not this time.

I have ran
./getLicense.sh licensekeyhere
And this command returned:
######################################################################## 100.0%
Success!!

I did then a restart of directadmin 'systemctl restart directadmin'
But the license is still expired.

I even tried to do this:
echo 'Provided license key should go here' > /usr/local/directadmin/conf/license.key
chmod 0600 /usr/local/directadmin/conf/license.key
systemctl restart directadmin

But directadmin just won't start then.

The old licensing system was much more stable,
since it changed I have had 4 occurrences with license issues.

What is the solution?

Is this log helpful?
Apr 24 05:49:32 web2 directadmin: 2022/04/24 05:49:32 info licence refreshed successfully
Apr 24 09:32:17 web2 directadmin: 2022/04/24 09:32:17 info licence refreshed successfully
Apr 24 13:47:11 web2 directadmin: 2022/04/24 13:47:11 info licence refreshed successfully
Apr 24 17:57:04 web2 directadmin: 2022/04/24 17:57:04 info licence refreshed successfully
Apr 24 22:09:45 web2 directadmin: 2022/04/24 22:09:45 info licence refreshed successfully
Apr 25 02:04:08 web2 directadmin: 2022/04/25 02:04:08 info licence refreshed successfully
Apr 25 05:51:43 web2 directadmin: 2022/04/25 05:51:43 info licence refreshed successfully
Apr 25 09:36:35 web2 directadmin: 2022/04/25 09:36:35 info licence refreshed successfully
Apr 25 11:09:52 web2 directadmin: 2022/04/25 11:09:52 http: TLS handshake error from 77.174.189.104:50849: EOF

Kr
Dries
 
I am regulary updating all servers and services via custombuild.

Somehow custombuild does not see there is a directadmin update.
Latest version of DirectAdmin: 0 build 0
Installed version of DirectAdmin: 0 build 0

This is the reason why there was running an old version. I will have to keep this in mind.

I had to update directadmin via an other way: ./getDA.sh current
After updating, the expired issue is fixed.

I don't want to let directadmin update automatically when it wants to, I am running updates via commandline like I am used to.
 
There was an issue with displaying the correct version when 1.63.6 was released;

#36

That "fix" probably broke this in older versions, like the one you were running: 1.63.4.
 
Hi @DirectAdmin Sales

I checked my IP was verified by this link https://license.directadmin.com/?

Because i miss the LID off this license so i have to use the following commands to install a fresh Directadmin

bash <(curl -LSs https://download.directadmin.com/setup.sh || curl -LSs https://download-alt.directadmin.com/setup.sh) 'auto'

Before everything is good but now i receive the notice "Unable to detect your license key, please re-run setup.sh with LK provided as the argument"

Please tell me What should i do?
 
Back
Top