Install Qt License Service manually
By default, Qt License Service is automatically installed as an on-demand service when you install a Qt or Quality Assurance product with Qt Online Installer.
However, install Qt License Service manually if you:
- Use Qt products or versions that are not supported. For more information, see Supported Qt and QA products.
- Need a different launching method for Qt License Service. For more information, see Operating modes.
Note: After the Qt License Service installation is ready, set up mocwrapper.
Prerequisites
Make sure the following tools are installed:
- CMake
- build-essential
- libuuid
To install them, run the following command:
sudo apt install cmake build-essential uuid-dev
- CMake
- Perl
- Netwide Assembler (NASM)
- OpenSSL (latest 3.x version, static build)
- Microsoft Windows SDK
- MSVC
Build OpenSSL before building Qt License Service:
- Make sure Perl and NASM are available in your PATH.
- Fetch the sources from the OpenSSL website.
- Extract the sources to
C:\openssl\
.
- Extract the sources to
- Configure the sources for a static build:
- Open the developer command prompt for the MSVC version you are using.
- Change directory to the extracted sources:
cd C:\openssl\
- Run the configure script:
perl Configure no-shared no-pinshared
- Build OpenSSL:
- In the developer command prompt, run:
nmake
- In the developer command prompt, run:
Install 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 Service, select the correct Qt License Service version.
- Select Next and follow the instructions of the installer.
Install 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 Service.
- Open Qt Maintenance Tool.
- Select Add or remove components.
- In License Management Tools > Qt License Service, select the correct Qt License Service version.
- Select Next and follow the instructions of the installer to complete the installation.
Build Qt License Service from sources
To build Qt License Service from sources:
- Set the
OPENSSL_ROOT_DIR
variable to point to the OpenSSL installation:export OPENSSL_ROOT_DIR=</path/to/your/openssl/installation>
- Make sure you are in the project root folder and run the build script:
./build_unix.sh
- Set the
OPENSSL_ROOT_DIR
variable to point to the OpenSSL installation:export OPENSSL_ROOT_DIR=</path/to/your/openssl/installation>
- Make sure you are in the project root folder and run the build script:
./build_unix.sh
- Set the
OPENSSL_ROOT_DIR
variable to point to the OpenSSL installation:set OPENSSL_ROOT_DIR=C:\openssl\
- Make sure you are in the project root folder and start the build script:
build_windows.bat
If the default CMake generator does not match the desired Visual Studio version, add the Visual Studio version as a parameter to the build script:
build_windows.bat "Visual Studio 17 2022"
Configure the server address
In Qt License Service version 3.4 or later, to set the server address, run:
<Qt SDK>/Tools/LicenseService/qtlicensetool --set-server-address <URL>
<Qt SDK>/Tools/LicenseService/qtlicensetool --set-server-address <URL>
<Qt SDK>\Tools\LicenseService\qtlicensetool.exe --set-server-address <URL>
To ensure the server address is correctly set, run:
<Qt SDK>/Tools/LicenseService/qtlicensetool --get-server-address
<Qt SDK>/Tools/LicenseService/qtlicensetool --get-server-address
<Qt SDK>\Tools\LicenseService\qtlicensetool.exe --get-server-address
With older Qt License Service versions, configure the server address in the configuration file:
Edit the qtlicd.ini
file in the $HOME/.local/share/Qt/qtlicd/
directory:
- Set the value of
server_addr
to the address and port of Qt License Server. The default is the cloud instance hosted by Qt. If you're using an on-premises Qt License Server, set the address accordingly. - Set the value of
ca_bundle_path
to the absolute path to CA bundle file orauto
for automatic detection. Automatic detection tries to first find a CA bundle file from predefined search paths, and if that fails,/etc/ssl/certs
will be used as a fallback for looking for an individual certificate file to verify the peer with. - Set the value of
tcp_listening_port
to the correct port if the default value is not suitable when using the on-premises Qt License Server. - Set the value of
request_timeout
to adjust the timeout for network requests in seconds. Set to 0 to never time out.
Edit the qtlicd.ini
file in the $HOME/Library/Application Support/Qt/qtlicd/
directory:
- Set the value of
server_addr
to the address and port of Qt License Server. The default is the cloud instance hosted by Qt. If you're using an on-premises Qt License Server, set the address accordingly. - Set the value of
ca_bundle_path
to the absolute path to CA bundle file orauto
for automatic detection. Automatic detection tries to first find a CA bundle file from predefined search paths, and if that fails,/etc/ssl/certs
will be used as a fallback for looking for an individual certificate file to verify the peer with. - Set the value of
tcp_listening_port
to the correct port if the default value is not suitable when using the on-premises Qt License Server. - Set the value of
request_timeout
to adjust the timeout for network requests in seconds. Set to 0 to never time out.
Edit the qtlicd.ini
file in the C:\Users\<user>\AppData\Roaming\Qt\qtlicd\
directory:
- Set the value of
server_addr
to the address and port of Qt License Server. The default is the cloud instance hosted by Qt. If you're using an on-premises Qt License Server, set the address accordingly. - Set the value of
tcp_listening_port
to the correct port if the default value is not suitable when using the on-premises Qt License Server. - Set the value of
request_timeout
to adjust the timeout for network requests in seconds. Set to 0 to never time out.
Note: If you build Qt License Service from sources, the qtlicd.ini
file is in the deploy
directory created during the build process.
If you build Qt License Service from sources, copy the Qt License Service files to the destination path after configuring the server address:
- Go to the
<project root>/deploy
directory:cd <project root>/deploy
- Copy the files:
mkdir $HOME/qtlicd
cp *.* $HOME/qtlicd/
- Go to the
<project root>/deploy
directory:cd <project root>/deploy
- Copy the files:
mkdir $HOME/qtlicd
cp *.* $HOME/qtlicd/
- Go to the
<project root>\deploy
directory:cd <project root>\deploy
- Copy the files:
mkdir C:\"Program Files"\qtlicd
copy *.* C:\"Program Files"\qtlicd\
Operating modes
Qt License Service can operate in the following modes:
Operating mode | Description |
---|---|
An on-demand service | Launched automatically when a license reservation is required. Default operation mode. |
A system service | Running always on the background as a system service and available for all users on the computer. Requires admin privileges. |
A user-space process | The user is responsible for starting and shutting down the service. Mainly for testing purposes. |
Note: When you start the Qt License Service executable (qtlicd(.exe)), it reads settings from the installation folder.
Install as a system service
To run Qt License Service as a system service:
Run the installation script as root and start the service:
$ sudo ./installer.sh
Qt License Service starts automatically after reboot.
Run the installation script as root and start the service:
$ sudo ./installer.sh
Qt License Service starts automatically after reboot.
Run the installation script as an administrator:
C:\"Program Files"\qtlicd\qtlicd --install
Possible error messages:
Error message | Solution |
---|---|
OpenSCManager failed (5) | You're not an administrator. Re-open the command prompt as administrator. |
CreateService failed (1073) | Qt License Service is already installed or running. If you want to reinstall Qt License Service, stop and delete the old installation first. |
CreateService failed (1072) | Qt License Service is deleted but still running. Stop it from Windows Services. |
Install as an on-demand service
To run Qt License Service as an on-demand service:
- Copy the qtlicd executable to a preferred destination folder (<user>):
cd deploy mkdir /home/<user>/qtlicd cp qtlicd mocwrapper licheck qtlicensetool /home/<user>/qtlicd/
- Copy the Qt License Service configuration file qtlicd.ini in place for on-demand launch:
mkdir -p /home/<user>/.local/share/Qt/qtlicd cp qtlicd.ini /home/<user>/.local/share/Qt/qtlicd
- Register the qtlicd executable for on-demand start. Optionally, add
<optional argument>
to specify the source (for exampleadmin
orjohn
):cd /home/<user>/qtlicd/ ./qtlicd --register <optional argument>
- Verify that the registration succeeded:
cat /home/<user>/.local/share/Qt/qtlicd/installations.ini
- Copy the qtlicd executable to a preferred destination folder (<user>):
cd deploy mkdir /home/<user>/qtlicd cp qtlicd mocwrapper licheck qtlicensetool /home/<user>/qtlicd/
- Copy the Qt License Service configuration file qtlicd.ini in place for on-demand launch:
mkdir -p $HOME/Library/Application Support/Qt/qtlicd cp qtlicd.ini $HOME/Library/Application Support/Qt/qtlicd
- Register the qtlicd executable for on-demand start. Optionally, add
<optional argument>
to specify the source (for exampleadmin
orjohn
):cd /home/<user>/qtlicd/ ./qtlicd --register <optional argument>
- Verify that the registration succeeded:
cat $HOME/Library/Application Support/Qt/qtlicd/installations.ini
- Copy the Qt License Service configuration file (qtlicd.ini) in place for on-demand start:
mkdir C:\Users\<user>\AppData\Roaming\Qt\qtlicd copy qtlicd.ini C:\Users\<user>\AppData\Roaming\Qt\qtlicd\
- Register the qtlicd.exe executable for on-demand start. Optionally, add
<optional argument>
to specify the source (for exampleadmin
orjohn
):cd C:\"Program Files"\qtlicd qtlicd.exe --register <optional argument>
- Verify that the registration succeeded:
type C:\Users\<user>\AppData\Roaming\Qt\qtlicd\installations.ini
Install as a user-space process
To run Qt License Service as a user-space process, make sure Qt License Service is not running. Then, from the command line, go to the directory where Qt License Service is installed, and enter:
./qtlicd --mode cli
./qtlicd --mode cli
qtlicd.exe --mode cli
Stop Qt License Service like any other app with Ctrl+C.
Note: This is recommended only for testing purposes or if it is not possible to install Qt License Service as a system service.
© 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.