# License handling

## Overview

To run a session against a ThinLinc cluster, the master server must be equipped with license files. The license files specify the number of concurrent users the cluster is allowed to run.

If no license files are installed on the cluster, a maximum of three concurrent users are allowed.

Each cluster can have one or several license files. Each file contains licenses for a specific number of concurrent users. When the master service (`vsmserver.service`) starts up, it reads all license files and creates a sum of the number of concurrent users allowed based on the licenses from all files.

Licenses are backwards compatible, meaning a license issued for a newer version of ThinLinc is valid for that version and all older versions of the software. Conversely, licenses are not forwards compatible: a license issued for an older version of ThinLinc cannot be used with newer versions of the software.

Version compatibility applies to the x (major) and y (minor) parts of ThinLinc x.y.z versioning. The z (patch) number is exempt: any license valid for a given x.y version will work across all patch (z) releases.

License files have one soft and one hard limit. When the soft limit is reached, new sessions can still be started, but a license violation will be logged and sent to the administrator (see Log files and e-mail messages). If however the hard limit has been reached, new sessions cannot be started. The purpose of this system is to allow growing organizations some time to adapt the number of licenses to a growing number of concurrent sessions, avoiding loss of production.

## License counting

One license is required for each pair of (username, client hardware). This means that if a user runs several sessions from the same client, only one license is used. If the same user runs multiple concurrent sessions from different client hardware, multiple licenses are required by the user.

## Location and format of license files

License files are delivered either in the form of text files (filename extension `.license`) or ZIP files (filename extension `.zip`). Transfer each file to your ThinLinc master server and place it in `/opt/thinlinc/etc/licenses`. Make sure that the transfer of the files uses binary mode, or the license file might not be verifiable. We recommend transferring via SCP or SFTP.

After adding new license files, either restart the master service by running /bin/systemctl restart vsmserver or wait until the master service automatically reads in the new licenses, something that happens once every 12 hours.

Note

In a high availability setup (see High availability) with multiple master nodes, license files should be copied to `/opt/thinlinc/etc/licenses` on both nodes.

## Log files and e-mail messages

ThinLinc logs user license violations to the file `/var/log/thinlinc-user-licenses`. Other license-related messages are logged to `/var/log/vsmserver.log`.

If license violations occur, ThinLinc sends email to the person defined as system administrator in the parameter `/vsmserver/admin_email` in `vsmserver.hconf`. E-mail messages warning about license violations are sent every 12 hours if any license violations have occurred.

## Checking the number of valid licenses

You can use the command tlctl license to verify the number of valid user licenses. There is also a graph available in the administrative interface. See the Status module for more information.