On this page

Configure On-Prem Qt License Server

After you install the Qt License Server package, configure the instance and start it as a system service.

Configure the server

To configure On-Prem 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 enabling HTTPS, see Set up 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 to online:

    Environment="QLS_OPERATION_MODE=online"
    <env name="QLS_OPERATION_MODE" value="online" />
  4. Manage access control lists as described in Manage ACLs.

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

Set up SSL certificates

To enable a secure connection (HTTPS) between the end-user machines that are running Qt License Service and Qt License Server, obtain an SSL certificate from a trusted public Certificate Authority.

To set up SSL:

  1. Obtain the SSL certificate from a trusted public Certificate Authority.
  2. Enable SSL on Qt License Server:

    Open the qt-license-server.service file and enable the following attribute:

    Environment="QLS_ENABLE_SSL=yes"

    Open the qt-service.xml file and enable the following attribute:

    <env name="QLS_ENABLE_SSL" value="yes" />
  3. Place the following files in the root folder of Qt License Server:
    • cert.pem
    • key.pem
  4. Restart Qt License Server.

Note: In localhost testing environments, you can set QLS_ENABLE_SSL to no. In production, a certificate from a Certificate Authority is required on the computer hosting Qt License Server.

Start the server

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

Enable email notifications

Use a Simple Mail Transfer Protocol (SMTP) server with your On-Prem Qt License Server to send email notifications to given email recipients about expiring licenses and connection issues.

The following notification types are supported.

Notification typeDescription
Expiring licensesNotifies about licenses that are about to expire in 1, 5, or 10 days.
Lost connection to the Qt cloudNotifies about On-Prem Qt License Server losing connection to the Qt cloud. Sends an email every day until the connection is re-established. If the connection to the Qt cloud can't be established for 7 days, the On-Prem Qt License Server instance stops serving license reservations to client applications. An email notification is sent that the server is not operational anymore until the connection is established again.

First, set up an internal SMTP server and allow connections from your On-Prem Qt License Server.

Then, to enable the email notifications:

In the qt-license-server.service file:

  1. Enable the email notifications:
    Environment="QLS_EVENTS_EMAIL_NOTIFICATION=yes"
  2. Set up the SMTP environment variables based on your SMTP server configuration.

In the qt-service.xml file:

  1. Enable the email notifications:
    <env name="QLS_EVENTS_EMAIL_NOTIFICATION" value="yes" />
  2. Set up the SMTP environment variables based on your SMTP server configuration.
Environment variableDescription
QLS_SMTP_HOSTThe SMTP server address. Required.
QLS_SMTP_PORTThe SMTP server port. Required.
QLS_SMTP_ACCOUNT_USERNAMEThe SMTP server administrator account username or email. Required.
QLS_SMTP_ACCOUNT_PASSWORDThe SMTP server password. Optional.
QLS_SMTP_ACCOUNT_NAMEThe administrator account display name. Required.
QLS_SMTP_RECIPIENTSA comma-separated list of email addresses to receive the notifications. For example: user1@example.com,user2@example.com. Required.

If you don't provide the password, you can enable the connection while the server is running:

./qt-license-server enable-email-notification --url <URL of the running instance> --password <SMTP server password>
.\qt-license-server.exe enable-email-notification --url <URL of the running instance> --password <SMTP server password>

After you change the configuration file, restart Qt License Server as described in Reconfigure.

Next steps

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

See also Qt License Server configuration and 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.