The Qt License Service

Coco uses the Qt License Server system for license management. It consists of a License Server that holds the licenses and a License Service program that gets the licenses from the License Server.

The License Service resides on the same machine as the program that uses the licenses (known as the License Client), while the License Server is in general on a separate machine. The default License Server is the Qt License Server at https://qls.qt.io, but a customer can also set up a License Server on-premise.

The setup of the License Service depends on the Coco version and whether there is already a Qt system installed:

  • If there is already a Qt system with a commercial license installed at the machine on which Coco runs, then Coco will use the License Service of the Qt system.
  • A stand-alone Coco installation can use the License Service tools that are bundled with it.
  • Legacy systems (before Coco 7.4.0) cannot use the Qt License Service directly. For them, a separate cocolicserver package contains a special version of the cocolicserver program that translates Qt licenses to the old format.

Using an existing License Service

If there is already a License Service running, Coco will use it, as long as the License Sevice has a high enough version number.

When in doubt, do the following:

  1. Print out the version info:
    Qt/Tools/LicenseService/qtlicd(.exe) --version

    This should show at least version 3.5.0.

  2. If that's not the case, run the Qt Maintenance Tool, select Update components and follow the instructions.
  3. Repeat step 1 to check the version number.

Now the Coco programs should be able to find the existing License Service installation.

To verify that a Qt license could be acquired, run

cocolic --check

It should output your license data and not "License is invalid".

Using the bundled License Service

In Coco, the License service programs are in the subdirectory license-service of the Coco installation.

  • Under Linux, this directory is /opt/SquishCoco/license-service.
  • Under macOS, it is /Applications/SquishCoco/license-service.
  • Under Windows, it is %SQUISHCOCO%\license-service.

In the following section, this directory is abbreviated as license-service.

Setup of the License Service

We only describe here the simplest setup, the "on-demand" launch of the Qt License Service. For other kinds of setup see the license service documentation

  1. Use qtlicensetool to log in with Qt.

    Note: This step is necessary if you want to use the central Qt License Server. Skip this step if you will be using an on-premise Qt License Server.

    Run

    license-service/qtlicensetool(.exe) -l

    You are then prompted for your Qt account email address and its password.

    As of License Service 3.5.0, it is also possible to specify the account email and the password with the environment variables QT_ACCOUNT_LOGIN_EMAIL and QT_ACCOUNT_LOGIN_PASSWORD before running the command above. This is useful when qtlicensetool is run from a script without user interaction.

  2. Create the qtlicd configuration files.

    Run qtlicensetool in command line mode, with the command

    license-service/qtlicensetool(.exe) --reservations

    The program will print some error messages, which you can ignore.

    qtlicd then creates a configuration directory.

    • Under Linux, this directory is ~/.local/share/Qt/qtlicd.
    • Under macOS, it is $HOME/Library/Application Support/Qt/qtlicd.
    • Under Windows, it is C:\Users\<user>\AppData\Roaming\Qt\qtlicd.

    This directory contains a file qtlicd.ini and other files.

    Note: Alternatively, you may also manually create the above directories and copy the file license-service/qtlicd.ini into it.

  3. Customize the qtlicd.ini file, if necessary.

    If you use your own on-premise Qt License Server, run the following command:

    license-service/qtlicensetool(.exe) --set-server-address <license server URL>

    You will also need to accept Qt Terms and Conditions, with

    license-service/qtlicensetool(.exe) --accept-terms-and-conditions

    Alternatively, you may also manually edit the following entries in qtlicd.ini:

    • server_addr=<license server URL>
    • terms_and_conditions_accepted=true

    The other parameters in qtlicd.ini are described in the Qt License Service configuration documentation page but it is rarely necessary to modify them.

  4. Register qtlicd so that it is started automatically as on-demand service, with
    license-service/qtlicd(.exe) --register
  5. Run
    cocolic --check

    to verify that the license was acquired successfully.

Licenses for legacy systems

The use of cocolicserver with a legacy version of Coco involves two machines:

  • A system on which an older version of Coco runs and coverage is measured: The client machine, and
  • A system on which cocolicserver runs, the license machine.

Note: If you want to have more precise information on Qt License Server about the users consuming the license, a separate instance of cocolicserver should run for each machine that uses Coco.

We assume that you have already a setup in which Coco runs on the client machine and cocolicserver runs on the license machine. It is then necessary to replace the old license server with the cocolicserver binary in this package.

The cocolicserver package

There is a package with a Qt License Service and a special version of cocolicserver. The package has the name

  • Microsoft® Windows: The package is a file cocolicserver_<x.y.z>_Windows_x86.zip or cocolicserver_<x.y.z>_Windows_x64.zip.
  • Linux™: The package is a file cocolicserver_<x.y.z>_<platform>.tar.gz.
  • macOS: The installation package is a file of the form cocolicserver_x.y.z_<platform>.pkg.

It is an archive file than must be unpacked on the license machine; the result is a directory named cocolicserver_<x.y.z>_<platform>.

Setting up cocolicserver

After the package has been unpacked, the License Server must be set up and cocolicserver be started.

The License Sevice setup process is similar to that described in Setup of the License Service, except that the license-service directory is now cocolicserver_<x.y.z>_<platform>/license-service.

Running cocolicserver

To start cocolicserver on the license machine, you must then:

  1. Stop the old cocolicserver if it is still running.
  2. Run the new cocolicserver on the license machine The call typically has the form
    cocolicserver_<x.y.z>_<platform>/bin/cocolicserver(.exe) -q 49344 -l <log file>

    because 49344 is the default port number that is used by Coco. If your setup uses a different port number, change the call appropriately.

  3. Do a test run on the client machine Make sure that the Coco applications use the license server:
    cocolic(.exe) --license-server=<IP address of license machine>:49344

    Run a Coco program, for example coveragebrowser, on the client machine. It should start without problems. If there is a problem, the cocolicserver log file as well as the output of qtlicd may help to understand it. The latter is in the file license-service/qtlicd_log.txt.

Troubleshooting

If you encounter any issues, you may check the following documentation pages:

You may also send a support request via your Qt Account, together with the relevant log files.

Coco v7.5.0 ©2025 The Qt Company Ltd.
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.