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:

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

Build OpenSSL before building Qt License Service:

  1. Make sure Perl and NASM are available in your PATH.
  2. Fetch the sources from the OpenSSL website.
    • Extract the sources to C:\openssl\.
  3. 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
  4. Build OpenSSL:
    • In the developer command prompt, run:
      nmake

Install using Qt Online Installer

First, download Qt Online Installer from your Qt Account.

  1. Open Qt Online Installer.
  2. Select Custom Installation.
  3. In Select Components > License Management Tools > Qt License Service, select the correct Qt License Service version.

    Qt License Service in Qt Online Installer.

  4. 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.

  1. Open Qt Maintenance Tool.
  2. Select Add or remove components.
  3. In License Management Tools > Qt License Service, select the correct Qt License Service version.
  4. 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:

  1. Set the OPENSSL_ROOT_DIR variable to point to the OpenSSL installation:
    export OPENSSL_ROOT_DIR=</path/to/your/openssl/installation>
  2. Make sure you are in the project root folder and run the build script:
    ./build_unix.sh
  1. Set the OPENSSL_ROOT_DIR variable to point to the OpenSSL installation:
    export OPENSSL_ROOT_DIR=</path/to/your/openssl/installation>
  2. Make sure you are in the project root folder and run the build script:
    ./build_unix.sh
  1. Set the OPENSSL_ROOT_DIR variable to point to the OpenSSL installation:
    set OPENSSL_ROOT_DIR=C:\openssl\
  2. 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:

  1. 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.
  2. Set the value of ca_bundle_path to the absolute path to CA bundle file or auto 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.
  3. 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.
  4. 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:

  1. 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.
  2. Set the value of ca_bundle_path to the absolute path to CA bundle file or auto 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.
  3. 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.
  4. 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:

  1. 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.
  2. 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.
  3. 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:

  1. Go to the <project root>/deploy directory:
    cd <project root>/deploy
  2. Copy the files:
    mkdir $HOME/qtlicd
    cp *.* $HOME/qtlicd/
  1. Go to the <project root>/deploy directory:
    cd <project root>/deploy
  2. Copy the files:
    mkdir $HOME/qtlicd
    cp *.* $HOME/qtlicd/
  1. Go to the <project root>\deploy directory:
    cd <project root>\deploy
  2. 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 modeDescription
An on-demand serviceLaunched automatically when a license reservation is required. Default operation mode.
A system serviceRunning always on the background as a system service and available for all users on the computer. Requires admin privileges.
A user-space processThe 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 messageSolution
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:

  1. Copy the qtlicd executable to a preferred destination folder (<user>):
    cd deploy
    mkdir /home/<user>/qtlicd
    cp qtlicd mocwrapper licheck qtlicensetool /home/<user>/qtlicd/
  2. 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
  3. Register the qtlicd executable for on-demand start. Optionally, add <optional argument> to specify the source (for example admin or john):
    cd /home/<user>/qtlicd/
    ./qtlicd --register <optional argument>
  4. Verify that the registration succeeded:
    cat /home/<user>/.local/share/Qt/qtlicd/installations.ini
  1. Copy the qtlicd executable to a preferred destination folder (<user>):
    cd deploy
    mkdir /home/<user>/qtlicd
    cp qtlicd mocwrapper licheck qtlicensetool /home/<user>/qtlicd/
  2. 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
  3. Register the qtlicd executable for on-demand start. Optionally, add <optional argument> to specify the source (for example admin or john):
    cd /home/<user>/qtlicd/
    ./qtlicd --register <optional argument>
  4. Verify that the registration succeeded:
    cat $HOME/Library/Application Support/Qt/qtlicd/installations.ini
  1. 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\
  2. Register the qtlicd.exe executable for on-demand start. Optionally, add <optional argument> to specify the source (for example admin or john):
    cd C:\"Program Files"\qtlicd
    qtlicd.exe --register <optional argument>
  3. 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.