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:
- Copy the Qt License Server package to the folder where you want to run it. Place all the files in the same folder.
- 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.
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" />- 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:
- Obtain the SSL certificate from a trusted public Certificate Authority.
- Enable SSL on Qt License Server:
Open the
qt-license-server.servicefile and enable the following attribute:Environment="QLS_ENABLE_SSL=yes"Open the
qt-service.xmlfile and enable the following attribute:<env name="QLS_ENABLE_SSL" value="yes" /> - Place the following files in the root folder of Qt License Server:
cert.pemkey.pem
- 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):
- Ensure you are in the package root directory.
- Install Qt License Server and set it up as a
systemdservice using the installation script file:sudo ./installer.sh - Check the status of Qt License Server:
systemctl status qt-license-server.service - 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- Ensure you are in the package root directory.
- Install Qt License Server using the provided service wrapper application:
qt-service.exe install - Start Qt License Server:
qt-service.exe start - 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.serviceFor example, to check only the last 100 lines, run:
journalctl -u qt-license-server.service -n 100Note: 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.serviceAfter 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 startEnable 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 type | Description |
|---|---|
| Expiring licenses | Notifies about licenses that are about to expire in 1, 5, or 10 days. |
| Lost connection to the Qt cloud | Notifies 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:
- Enable the email notifications:
Environment="QLS_EVENTS_EMAIL_NOTIFICATION=yes" - Set up the SMTP environment variables based on your SMTP server configuration.
In the qt-service.xml file:
- Enable the email notifications:
<env name="QLS_EVENTS_EMAIL_NOTIFICATION" value="yes" /> - Set up the SMTP environment variables based on your SMTP server configuration.
| Environment variable | Description |
|---|---|
QLS_SMTP_HOST | The SMTP server address. Required. |
QLS_SMTP_PORT | The SMTP server port. Required. |
QLS_SMTP_ACCOUNT_USERNAME | The SMTP server administrator account username or email. Required. |
QLS_SMTP_ACCOUNT_PASSWORD | The SMTP server password. Optional. |
QLS_SMTP_ACCOUNT_NAME | The administrator account display name. Required. |
QLS_SMTP_RECIPIENTS | A 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:
- Register licenses
- Manage ACLs
- Install client-side tools on client machines, configure the server address, and test the connection
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.