Install Qt License Server
The default backend is Cloud Qt License Server hosted by Qt which means that you don't have to do any configuring or maintaining for the server. However, you can also host Qt License Server yourself either as On-Prem Qt License Server or as Offline Qt License Server. For more information, see Overview.
On-Prem Qt License Server is available in version 3.3.0 or later. In older versions, only Offline Qt License Server is available.
Before you install Qt License Server, see Prerequisites.
The following illustration describes the workflow of setting up an On-Prem Qt License Server or Offline Qt License Server.
The workflow of installing and setting up an On-Prem Qt License Server or Offline Qt License Server.
To set up On-Prem Qt License Server or Offline Qt License Server:
- As the server administrator:
- Get Qt Online Installer from Qt Customer Portal.
- Install the Qt License Server on-premises package on the server host machine.
- Configure Qt License Server according to the needs of your organization.
- Start the server.
- As the end user:
- Get Qt Online Installer from Qt Customer Portal.
- Install Qt Tools on your workstation. Qt License Service is automatically installed but if you need a manual Qt License Service installation, see Install Qt License Service manually.
- Set the server address of On-Prem Qt License Server or Offline Qt License Server for Qt License Service.
Using Qt Online Installer
First, download Qt Online Installer from your Qt Account.
To install Qt License Server with Qt Online Installer:
- Open Qt Online Installer and log in to your Qt Account.
- Select Custom Installation.
- In Customize > License Management Tools > Qt License Server (on-prem), select the correct 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.
To install Qt License Server with Qt Maintenance Tool:
- Open Qt Maintenance Tool and log in to your Qt Account.
- Select Add or remove components.
- In Customize > License Management Tools > Qt License Server (on-prem), select the correct Qt License Server version and the operating system of the host computer.
- Select Next and follow the instructions of the installer.
Package contents
The Qt License Server package is installed in the following folder:
<QtSDK>/LicenseManagementTools/QtLicenseServer/<version>/QtLicenseServer/<platform>
<QtSDK>\LicenseManagementTools\QtLicenseServer\<version>\QtLicenseServer\<platform>
The 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 |
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) |
Configuration
To configure Qt License Server:
- If needed, copy the Qt License Server package to a folder where you want to run it.
Important: Place all the files in the same folder.
- Set the operation mode:
- For On-Prem Qt License Server:
Environment="QLS_OPERATION_MODE=online"
Note: On-Prem Qt License Server downloads the licenses from Qt cloud automatically.
- For Offline Qt License Server:
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.
Important: This configuration determines the type of your Qt License Server. For more information, see Overview.
- For On-Prem Qt License Server:
- 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"
Important: For more information about SSL certificates, see SSL certificates.
For more information, see Qt License Server configuration.
Note: If you do not change the environment variables, Qt License Server uses the default configuration.
- Manage access control lists as described in Manage access control lists.
- If needed, copy the Qt License Server package to a folder where you want to run it.
Important: Place all the files in the same folder.
- Set the operation mode:
- For On-Prem Qt License Server:
<env name="QLS_OPERATION_MODE" value="online" />
Note: On-Prem Qt License Server downloads the licenses from Qt cloud automatically.
- For Offline Qt License Server:
<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.
Important: This configuration determines the type of your Qt License Server. For more information, see Overview.
- For On-Prem Qt License Server:
- 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" />
Important: For more information about SSL certificates, see SSL certificates.
For more information, see Qt License Server configuration.
Note: If you do not change the environment variables, Qt License Server uses the default configuration.
- Manage access control lists as described in Manage access control lists.
Run
To install Qt License Server as a system service (systemd):
- Ensure you are in the package root directory.
- Install Qt License Server and set it up as a
systemd
service using the installation script file:sudo ./installer.sh
- Check the status of Qt License Server:
systemctl status qt-license-server.service
- Check the environment variables of Qt License Server:
systemctl show qt-license-server.service -p Environment
By default, Qt License Server runs as a service in the background. To check the status:
systemctl is-active qt-license-server.service
- Ensure you are in the package root directory.
- Install Qt License Server using the provided service wrapper application:
qt-service.exe install
- Start Qt License Server:
qt-service.exe start
- Check the status of the Qt License Server:
qt-service.exe status
By default, Qt License Server runs as a service in the background. Find and control the service in the Windows Services application interface.
Important: Ensure that you have the appropriate permissions. If execution or file rights are insufficient, normal operations might fail. Check also the permissions for the folder where you installed Qt License Server.
Once the Qt License Server is running in the background, the Qt License Server database is initialized and stored in the same directory as the executable file.
Important: Once Qt License Server is running, configure the server address for clients.
Read logs
Once Qt License Server is installed and running, it collects logs you can use to investigate possible errors. The location of the Qt License Server logs depends on your operating system.
For Qt License Server installed as a system service, the logs are collected by the systemd journal.
To view the full log, run:
journalctl -u qt-license-server.service
For example, to check only the last 100 lines, run:
journalctl -u qt-license-server.service -n 100
Note: If Qt License Server is not installed as a system service, the logs are located in <\QLSRV executable root folder>/logs
.
By default, the logs are located in <\QLSRV executable root folder>\logs
.
For more information, see Check the logs.
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 On-Prem Qt License Server
Note: Offline Qt License Server reads all the licenses from entitlement.json
and the following steps are not available.
When using On-Prem Qt License Server, 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 IDs 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>
Important: Registered licenses are locked on this On-Prem Qt License Server instance. Other Qt License Server instances can't use these licenses simultaneously.
When the licenses are registered, the On-Prem Qt License Server instance syncs licenses from Qt cloud regularly.
Automatic registrations after restart
If the host computer or the On-Prem Qt License Server instance is restarted for any reason, the previously used licenses are automatically re-registered 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.