License Templates
A license template acts as a blueprint for the licenses you create for your customers. Before you start creating licenses, you need to create a license template that contains the default values for the license fields.
While creating a license from any license template, you can override all the properties of the license template. The license template provides you with default values for all the properties of a license, so you don't have to provide them every time you create a new license.
Creating a license template
Go to the License Templates page in the admin portal and click Create. A license template form with the following fields opens:
Name
The name of the license template.
Type
There are three types of licenses:
- Node-locked: The default type, which locks the license to the machine.
- Hosted floating: Used for creating a hosted floating license.
- On-premise floating: Used for creating an on-premise floating license.
Subscription Interval
To define a recurring subscription, use the subscriptionInterval property to specify the interval and the subscriptionStartTrigger to determine when that duration begins. To learn more, refer to Subscription Licensing.
Lease Duration
This option is valid for hosted-floating and on-premise-floating license types only. It sets the duration for which your app can lease the floating license from the license server.
Leasing strategy
This option is valid for hosted-floating and on-premise-floating license types only. It allows for the following strategies:
- Per-Machine: Each machine will only consume a single floating license/activation, irrespective of the number of instances (processes) of your app being run on the machine.
- Per-Instance: Each instance (process) of your app will consume a separate floating license/activation, irrespective of whether the instances are running on the same machine or different machines.
Allowed floating clients
This option is valid for the on-premise floating license type only. It sets the maximum number of concurrent clients that can lease the floating license from the LexFloatServer.
Allowed activations
Allowed number of activations (seats) for the license. What an activation represents depends on the license type:
- Node-locked: the number of devices the license can be activated on. For example, if you allow 10 activations, the license can be used on 10 different machines at the same time.
- Hosted floating: the number of activations (seats) that can be leased concurrently from the Cryptlex server.
- On-premise floating: the number of LexFloatServer instances that the license allows.
Allowed deactivations
Allowed number of deactivations for the license. This setting is ignored for hosted-floating licenses.
Server sync interval
Whenever the application starts (and IsLicenseGenuine() is called the first time), the server sync occurs immediately in a separate thread. This setting determines the interval for further server syncs until the application is closed or license is deactivated.
Server sync grace period
The duration for which the server sync failure due to a network error is acceptable.
Allowed clock offset
The allowed difference between the network time and the system time. This can be used to allow license activations on machines where system clocks run behind the network time.
Fingerprint matching strategy
LexActivator generates a structured fingerprint of the machine which allows for multiple fingerprint matching strategies. It allows for the following strategies:
- Exact: This strategy requires an exact match of all the hardware components used to generate the fingerprint. If there is a minor change in the hardware, the fingerprint will not be accepted, and the machine will be treated as a different machine.
- Fuzzy: This strategy uses fuzzy matching by comparing different hardware fingerprints and if the comparison score is greater than a minimum threshold value, the machine is accepted. This is the recommended strategy.
- Loose: This strategy is similar to fuzzy but with a much lower threshold value.
Required metadata keys
List of required metadata keys that a license using the license template must have.
Required meter attributes
List of required meter attributes which a license using the license template must have.
Expiring soon event offset
The number of seconds to wait before the license expiration date to trigger the license.expiring-soon webhook event.
Key pattern
Regex for the license key format. The default regex is ^([A-F0-9]{6}-){5}[A-F0-9]{6}$, which generates license keys in the format XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX.
You can also set a custom key when creating a license via the Web API by passing the key field, for example NODE-LOCKED-XXXXXX-..., HOSTED-FLOATING-XXXXXX-..., or NODE-LOCKED-OFFLINE-XXXXXX-..., so your app can infer the license type from the key before activation.
Allowed countries
List of the allowed countries. The country name is resolved using the IP address. If none of the countries is selected, then all the countries are allowed.
Disallowed countries
List of the disallowed countries. The country name is resolved using the IP address. If none of the countries is selected, this setting is ignored. If a country is set in both Allowed and Disallowed, Disallowed is given preference.
Allowed IP range
IP address range in CIDR notation, for example 196.210.135.105/24. If no range is specified, then all the IP addresses are allowed.
Allowed IP addresses
List of the allowed IP addresses. If none of the IP addresses is included, then all the IP addresses are allowed.
Disallowed IP addresses
List of the disallowed IP addresses. If none of the IP addresses is included, this setting is ignored.
Allow VM Activations
Whether to allow an activation inside a virtual machine. Cloned virtual machines may report the same fingerprint.
Allow Container Activations
Whether to allow an activation inside a container. This must never be set to true for an on-premise floating license.
Crypto binding
When the cryptoBindingEnabled property is set to true, activations are bound cryptographically instead of relying on the device fingerprint. This makes it a reliable way to license apps running inside containers or virtual machines, provided the app has an active internet connection. Crypto binding is supported on Windows and Linux. To learn more, refer to Containers and Virtual Machines.
Allow Client Lease Duration
Whether to allow the client app to set the lease duration for the hosted floating license activation.
User locked
Prevents multiple users on the same OS from sharing the same activation. If enabled, each user consumes a license activation from the allowed number of activations for the license.
Disable geolocation
If you don't want to store the IP address and location of the license activation, set this property to true.