cocolicserver -- license server (deprecated)

Note: cocolicserver is no longer part of standard Coco installations. Since Coco 7.4.0, separate cocolicserver packages are available; they are only needed for older Coco versions to acquire license from the Qt License Server.

cocolicserver can be used to serve Coco licenses from a central computer. Clients can connect to the server, and cocolicserver ensures that no more than the available number of licenses are used concurrently.

In Coco versions 7.4.0 and later, Coco programs use the Qt License Server, and cocolicserver is no longer needed. It is only required when a legacy system with an older Coco version needs the new licenses. In this case, cocolicserver can serve as a proxy between the legacy system and the Qt License Service.

Running cocolicserver as a QLS proxy

Using cocolicserver as a QLS proxy for a legacy version of Coco involves two machines:

  • A system running an older version of Coco where coverage is measured: the client machine
  • A system running cocolicserver: the license machine

If you already have a setup where Coco runs on the client machine and cocolicserver runs on the license machine, you need to replace the old license server with this package.

Note: For more precise information in the Qt License Server about users consuming licenses, run a separate instance of cocolicserver for each machine that uses Coco, or run an instance in the client machine itself.

The cocolicserver package

The cocolicserver package is a separate package containing a special version of cocolicserver and the Qt License Service. Download it from your Qt Account Download area: https://account.qt.io/s/downloads.

The package names are:

  • Microsoft® Windows: cocolicserver_<x.y.z>_Windows_x86.zip or cocolicserver_<x.y.z>_Windows_x64.zip
  • Linux™: cocolicserver_<x.y.z>_<platform>.tar.gz
  • macOS: cocolicserver_x.y.z_<platform>.pkg

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

Setting up cocolicserver

After unpacking the package, set up the License Server and start cocolicserver.

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

Running cocolicserver

To start cocolicserver on the license machine:

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

    Port 49344 is the default port used by Coco. If your setup uses a different port number, modify the command accordingly.

  3. Perform a test run on the client machine. Ensure 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 are issues, check the cocolicserver log file and the qtlicd output for troubleshooting. The latter is located in license-service/logs/qtlicd_log.txt.

Syntax

cocolicserver <options>

Options

  • -q | --qls-proxy-port=<number> Get licenses from the Qt License Server and serve them to Coco applications from port <number>.

    The license server acts as a proxy for the Qt License Server.

  • -l <path> | --logfile=<path> Write log messages to the file at the absolute <path>. The file name may contain the following escape sequences:
    • %Y: Current year, in four digits
    • %M: Current month number, in two digits
    • %D: Current day, in two digits
    • %h: Current hour, in two digits
    • %m: Current minute, in two digits
    • %s: Current second, in two digits

    New log files are opened according to the values of the escape sequences. For example, if <path> is cocoserver_%Y_%M_%D.log, a new log file is created each day with names like cocoserver_2016_01_01.log, cocoserver_2016_01_02.log, etc.

  • -s | --server-identifier Print the identifier of the machine on which cocolicserver should run. Send this identifier to Qt to obtain a license file.
  • -c <path> | --config=<path> Absolute path to the configuration file (provided by Qt).

    This option sets the server to legacy mode.

  • @ <path> Read command line options from the file at <path> and insert them at the position of this option. The option file is a text file with one option per line. Leading and trailing blanks and empty lines are ignored.

The following options are available only on Linux™ and macOS:

  • --syslog Write log messages to the UNIX® system logging service.
  • --daemon Launch cocolicserver as a daemon background process.

The following options are available only on Microsoft® Windows:

  • --service-install Install cocolicserver as a Windows service that starts automatically at boot time.

    This option requires administrator privileges. Run it as follows:

    C:\somedir cocolicserver --service-install <options>

    The service is installed and starts automatically. It runs as if called directly: cocolicserver <options>. The visible name of the service is \COCO License Server.

    If the server is already installed as a service, the <options> are updated. The new options take effect only after restarting the service.

  • --service-uninstall Uninstall the cocolicserver Windows service. This option requires administrator privileges.

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.