On this page

Install Qt License Server

The default back end 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 On-Prem Qt License Server or Offline Qt License Server:

  1. Copy the Qt License Server package to the folder where you want to run it. Place all the files in the same folder.
  2. In the configuration file (Linux: qt-license-server.service, Windows: qt-service.xml), change the environment variables of Qt License Server.

    Example:

    Environment="QLS_PORT=8080"
    Environment="QLS_ENABLE_SSL=yes"
    Environment="QLS_LOG_LEVEL=info"
    <env name="QLS_PORT" value="8080" />
    <env name="QLS_ENABLE_SSL" value="yes" />
    <env name="QLS_LOG_LEVEL" value="info" />

    For more information about SSL certificates, see SSL certificates.

  3. Warning: The following configuration determines the type of your Qt License Server. For more information, see Overview.

    In the same configuration file, set the operation mode:

    • For On-Prem Qt License Server:
      Environment="QLS_OPERATION_MODE=online"
      <env name="QLS_OPERATION_MODE" value="online" />
    • For Offline Qt License Server:
      Environment="QLS_OPERATION_MODE=offline"
      <env name="QLS_OPERATION_MODE" value="offline" />

      With Offline Qt License Server, you need a node-locked offline license file, entitlement.json.

      To obtain a node-locked offline license file, follow these steps.
      1. Ensure you have defined the port number of the running Offline Qt License Server instance in the configuration file (Linux: qt-license-server.service, Windows: qt-service.xml). For example:
        Environment="QLS_PORT=8080"
        <env name="QLS_PORT" value="8080" />

        Note: Provide the port number you plan to use in production.

      2. Generate the hardware fingerprint on the Offline Qt License Server host computer with qt-license-server:
        ./qt-license-server generate-server-fingerprint
        .\qt-license-server.exe generate-server-fingerprint

        Note: Run this command on the machine you intend to use in production.

      3. Send the generated hardware fingerprint and the HTTPS port number of the Offline Qt License Server instance to Qt Support for validation.
      4. Download the entitlement.json file from Qt Customer Portal once it's ready.
      5. Copy the entitlement.json file to the folder where Qt License Server runs. If you already have a license file in the folder, replace it with the new one.
      6. Restart Offline Qt License Server to apply the new license file:
        systemctl daemon-reload
        systemctl restart qt-license-server.service
        qt-service.exe stop
        qt-service.exe start
      7. Verify that the correct licenses are loaded by Offline Qt License Server:
        ./qt-license-server status --url <URL>
        .\qt-license-server.exe status --url <URL>

        In case the licenses are not imported correctly, check the logs. Contact Qt Support if needed.

      For more information about entitlement.json and node-locking, see Manage license node-locking and Compose entitlement.json from multiple licenses.

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

If you don't change the environment variables, Qt License Server uses the default configuration. For more configuration options, see Qt License Server configuration.

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

Next steps

After your Qt License Server instance is installed and running, see the following topics to set up and manage your Qt License Server instance:

See also Qt License Server command-line interface.

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