Install on-premises Qt License Server
The default backend is a cloud Qt License Server hosted by Qt which means that you don't have to do any configuring or maintaining for the server. However, Qt License Server is also available as an on-premises package which you can host on your host computer.
In Qt License Server version 3.3.0 or later, on-premises Qt License Server is available in online mode and offline mode. In older versions, only offline mode is available.
Install the Qt License Server on-premises package using Qt Online Installer. If you have Qt installed, install on-premises Qt License Server using Qt Maintenance Tool.
Note: If you have an on-premises Qt License Server, you have to configure the server address for Qt License Service.
Obtain SSL certificates
First, obtain CA certificates for the on-premises Qt License Server instance from an official Certificate Authority. For testing in a local environment, certificates are not necessary. For more information, see SSL certificates.
Warning: For production, we highly recommend that SSL certificates are used for HTTPS communication.
Using Qt Online Installer
First, download Qt Online Installer from your Qt Account.
- Open Qt Online Installer.
- Select Custom Installation.
- In Select Components > License Management Tools > Qt License Server (on-prem), select the correct on-premises Qt License Server version and the operating system of the host computer.
- Select Next and follow the instructions of the installer.
Using Qt Maintenance Tool
Qt Maintenance Tool is included in each Qt installation. If you already have Qt, use Qt Maintenance Tool to install Qt License Server.
- Open Qt Maintenance Tool.
- Select Add or remove components.
- In License Management Tools > Qt License Server (on-prem), select the correct on-premises Qt License Server version and the operating system of the host computer.
- Select Next and follow the instructions of the installer to complete the installation.
Package contents
The on-premises Qt License Server package is installed in the following folder:
<QtSDK root>/LicenseManagementTools/QtLicenseServer/<version>/QtLicenseServer/<platform>
<QtSDK root>\LicenseManagementTools\QtLicenseServer\<version>\QtLicenseServer\<platform>
The on-premises Qt License Server package contents depend on your operating system:
File | Description |
---|---|
qt-license-server | Qt License Server executable file |
qt-license-server.service | Configuration file |
installer.sh | Installation script file |
uninstaller.sh | Uninstallation script file |
key.pem | Private key file, used only if SSL is enabled (for testing purposes only, self-signed by Qt) |
cert.pem | Certificate file, used only if SSL is enabled (for testing purposes only, self-signed by Qt) |
File | Description |
---|---|
qt-license-server.exe | Qt License Server executable file |
qt-service.xml | Configuration file |
qt-service.exe | Qt License Server wrapper, (WinSW version 2.12.0 x64) |
key.pem | Private key file, used only if SSL is enabled (for testing purposes only, self-signed by Qt) |
cert.pem | Certificate file, used only if SSL is enabled (for testing purposes only, self-signed by Qt) |
Note: The entitlement.json file is not included in the Qt License Server package. Request this file from the license manager or download the file from Qt Customer Portal. For more information, see Compose entitlement.json from multiple licenses.
Configuration
To configure Qt License Server:
- If needed, copy the server package to a folder where you want to run the server.
Note: All the files need to be put into the same folder.
- Set the operation mode for Qt License Server.
- Operating in online mode:
Environment="QLS_OPERATION_MODE=online"
Note: In online mode, Qt License Server downloads the licenses from Qt Cloud automatically.
- Operating in offline mode:
Environment="QLS_OPERATION_MODE=offline"
Copy the entitlement.json file into the same folder.
Note: Get the offline license file (entitlement.json file) from Qt Customer Portal. For more information, see Compose entitlement.json from multiple licenses.
- Operating in online mode:
- In qt-license-server.service, change the environment variables of Qt License Server under
[Service]
.Example:
# Environmental variables Environment="QLS_PORT=8080" Environment="QLS_ENABLE_SSL=yes" Environment="QLS_LOG_LEVEL=info"
For information about the different configuration options, see Qt License Server configuration.
Note: If you do not change the environment variables, the server will use the default configuration.
- If needed, copy the server package to a folder where you want to run the server.
Note: All the files need to be put into the same folder.
- Set the operation mode for Qt License Server.
- Operating in online mode:
<env name="QLS_OPERATION_MODE" value="online" />
Note: In online mode, Qt License Server downloads the licenses from Qt Cloud automatically.
- Operating in offline mode:
<env name="QLS_OPERATION_MODE" value="offline" />
Copy the entitlement.json file into the same folder.
Note: Get the offline license file (entitlement.json file) from Qt Customer Portal. For more information, see Compose entitlement.json from multiple licenses.
- Operating in online mode:
- In qt-service.xml, change the environment variables of Qt License Server.
Example:
<env name="QLS_PORT" value="8080" /> <env name="QLS_ENABLE_SSL" value="yes" /> <env name="QLS_LOG_LEVEL" value="info" />
For information about the different configuration options, see Qt License Server configuration.
Note: If you do not change the environment variables, the server will use the default configuration.
Run
- Run the following commands in a terminal:
- Make sure you are in the package root directory.
- Change to root user and install the server and set up as a systemd service:
sudo su ./installer.sh
- Check the status of the license server:
systemctl status qt-license-server.service
- Check the environment variables of the license server:
systemctl show qt-license-server.service -p Environment
By default, Qt License Server will run as a service in the background. To check the status:
systemctl is-active qt-license-server.service
- Once the server is running in the background, the server database will be initialized and stored in the same directory as the executable file.
- Run the following commands in a terminal:
- Make sure you are in the package root directory.
- Install Qt License Server using the provided service wrapper application:
qt-service.exe install qt-service.exe start
- Check the status of the license server:
qt-service.exe status.
By default, Qt License Server will run as a service in the background. Find and control the service in the Windows Services application interface.
Note: Ensure that you have the appropriate permissions. If execution or file rights are insufficient, normal operations may fail.
- Once the server is running in the background, the server database will be initialized and stored in the same directory as the executable file.
Reconfigure
If you forgot to configure or need to update something, do the following:
You can find the configuration file in /etc/systemd/system/qt-license-server.service
.
After making the necessary changes, save the file and run the following commands:
systemctl daemon-reload systemctl restart qt-license-server.service
After making the necessary changes to the qt-service.xml file, save the file and run the following commands:
qt-service.exe stop qt-service.exe start
Register licenses for Online mode
Note: If you have configured the on-premises Qt License Server to operate in offline mode, all the licenses are read from the entitlement.json and the following steps are not available.
When you have the online on-premises Qt License Server installed, register the needed licenses.
To register all applicable licenses in the given Qt Account:
qt-license-server register --email <email> --password <pass> --url <instance URL>
qt-license-server.exe register --email <email> --password <pass> --url <instance URL>
Instead of using the –email and –password options, you can use environment variables:
QLS_QT_ACCOUNT_LOGIN_EMAIL
QLS_QT_ACCOUNT_LOGIN_PASSWORD
To register only specific licenses in the given Qt Account with a license ID:
qt-license-server register --email <email> --password <pass> --url <instance URL> --licenses 12345 98765
qt-license-server.exe register --email <email> --password <pass> --url <instance URL> --licenses 12345 98765
Note: If the license ID's are not valid, nothing is registered. If you run the command with previously registered licenses and an invalid ID, the command is rejected, and the previously registered licenses are kept.
To deregister all currently registered licenses:
qt-license-server deregister --email <email> --password <pass> --url <instance URL>
qt-license-server.exe deregister --email <email> --password <pass> --url <instance URL>
Note: Registered licenses are locked on this on-premises Qt License Server instance. These licenses can't be used simultaneously by other on-premises instances.
Once the licenses have been registered, the on-premises Qt License Server instance will sync licenses from Qt Cloud on regular basis.
Automatic registrations after restart
If the host computer or the on-premises Qt License Server instance is restarted for any reason, the previously used licenses are automatically reregistered by the instance.
See also Qt License Server command-line interface and Qt License Server configuration.
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.