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 installation workflow.

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:

Using Qt Online Installer

First, download Qt Online Installer from your Qt Account.

To install Qt License Server with Qt Online Installer:

  1. Open Qt Online Installer and log in to your Qt Account.
  2. Select Custom Installation.
  3. 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.

    Qt License Server in Qt Online Installer.

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

  1. Open Qt Maintenance Tool and log in to your Qt Account.
  2. Select Add or remove components.
  3. 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.
  4. 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.

FileDescription
qt-license-serverQt License Server executable file
qt-license-server.serviceConfiguration file
installer.shInstallation script file
uninstaller.shUninstallation script file
FileDescription
qt-license-server.exeQt License Server executable file
qt-service.xmlConfiguration file
qt-service.exeQt License Server wrapper, (WinSW version 2.12.0 x64)

Configuration

To configure Qt License Server:

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

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

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

  4. Manage access control lists as described in Manage access control lists.
  1. 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.

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

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

  4. Manage access control lists as described in Manage access control lists.

Run

To install Qt License Server as a system service (systemd):

  1. Ensure you are in the package root directory.
  2. Install Qt License Server and set it up as a systemd service using the installation script file:
    sudo ./installer.sh
  3. Check the status of Qt License Server:
    systemctl status qt-license-server.service
  4. 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
  1. Ensure you are in the package root directory.
  2. Install Qt License Server using the provided service wrapper application:
    qt-service.exe install
  3. Start Qt License Server:
    qt-service.exe start
  4. 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.