Config Reference

LexFloatServer reads its settings from config.yml: the server and network, access to the local dashboard and API, the products it serves, and logging. This page describes every setting, in the order it appears in the file.

Settings marked with * are required. Every other setting has a default value.

Server

server:
port: 8090
...
SettingDescription
port*Port the server listens on, for example 8090.
enableIpv6Listens on IPv4 and IPv6 when true. Default: false (IPv4 only).
allowedClockOffsetAllowed difference, in seconds, between the server clock and a client's clock. Default: 60. Minimum: 60.
blockedIpsIP addresses the server blocks. Requests from these addresses are rejected.
cryptlexHostHost of the Cryptlex API, for Cryptlex On-Premise only. Leave it empty to use the Cryptlex servers.

Network

proxy:
trustedProxies: []
ssl:
enabled: false
...
SettingDescription
proxy.trustedProxiesIP addresses of the proxies that forward client requests to LexFloatServer. When set, the server accepts requests only through these proxies and reads the client's IP address from the X-Forwarded-For header. Leave empty if clients connect directly.
ssl.enabledServes every request over HTTPS instead of HTTP when true. Default: false. See Enabling HTTPS.
ssl.certificateFilePathCertificate file (PEM) for the server, for example a self-signed certificate. Required when ssl.enabled is true.
ssl.certificateKeyFilePathPrivate key file (PEM) of that certificate. Required when ssl.enabled is true.

Authentication

auth:
apiKey: a-long-random-string
admins:
- username: admin
password: choose-a-strong-password
SettingDescription
apiKeyKey that scripts and tools send in the X-API-Key header to authenticate with the API endpoints, including activation and deactivation.
adminsUsers who can log in to the local dashboard. Each user has a username, and either a password or a passwordHash. A logged-in user also gets an access token for the API endpoints. Required to use the local dashboard.
admins[].passwordHashHex-encoded SHA-256 hash of the password. Use it instead of password to keep the plain password out of the file.

Product settings

Each entry under products is one product the server serves.

products:
- productFilePath: ./products/ProductA.dat
displayName: Product A
licenseKey: AAAAAA-AAAAAA-AAAAAA-AAAAAA-AAAAAA
leaseDuration: 300
enabled: true
SettingDescription
productFilePath*Path to the product's Product.dat file. Download it from the actions menu on the Products page in the admin portal.
displayNameName shown in the local dashboard. Up to 256 characters, and different from every other product's name (case is ignored). If it is empty, too long, or already used, the server uses a generated name, product-<hash>, where <hash> is the first 12 characters of the SHA-256 hash of the product ID.
licenseKeyThe product's on-premise-floating license key. Used when you activate with lexfloatserver -a.
enabledTurns the product on or off. With true, the server serves the product. With false, the product stays configured in the file but the server does not serve it, for example when one of several products should be paused for a while. Default: true.
leaseDurationHow long a lease of this product lasts, in seconds, before the client must renew it. Default: the value in productDefaults.
maxOfflineLeaseDurationThe longest time, in seconds, that a client can borrow a seat of this product off the network. Default: the value in productDefaults.
allowedOfflineFloatingClientsHow many seats of this product can be borrowed off the network at the same time. Default: the value in productDefaults.

The product list follows these rules:

  • At least one product must be listed.
  • If a product is listed twice, the server uses the first enabled entry and ignores the other.
  • If a product file is missing or cannot be read, that product is skipped and the others still start. The log says why.

Product defaults

productDefaults sets the lease duration and the offline borrowing limits once for all products. A product uses these values unless its entry under products sets its own.

productDefaults:
leaseDuration: 60
maxOfflineLeaseDuration: 30
allowedOfflineFloatingClients: 0
SettingDescription
leaseDurationHow long a lease lasts, in seconds, before the client must renew it. Default: 60. Minimum: 30.
maxOfflineLeaseDurationThe longest time, in seconds, that a client can borrow a seat off the network. Default: 30. Minimum: 30.
allowedOfflineFloatingClientsHow many seats can be borrowed off the network at the same time. Default: 0 (no borrowing). -1 means all seats.

Which value a product uses

A product uses its own value if its entry sets one. Otherwise it uses the value from productDefaults.

productDefaults:
allowedOfflineFloatingClients: 5

products:
- productFilePath: ./products/ProductA.dat # no value set: allows 5
enabled: true
- productFilePath: ./products/ProductB.dat
allowedOfflineFloatingClients: 0 # own value: no borrowing
enabled: true

The license can also limit these values:

  • If the license in Cryptlex has a lease duration, LexFloatServer uses it and ignores leaseDuration in config.yml. The leaseDuration setting applies only when the license's lease duration is 0.
  • allowedOfflineFloatingClients can never be more than the number of seats on the license.

Local dashboard customization

You can show your own name, logo, colors, and favicon on the local dashboard.

dashboard:
customizations:
appName: Licensing Server
logoFilePath: ./customization/logo.svg
faviconFilePath: ./customization/favicon.ico
hue: 210
SettingDescription
appNameName shown in the local dashboard header, on the login page, and in the browser tab. Up to 64 characters. Default: Licensing Server.
logoFilePathLogo shown in the local dashboard. PNG or SVG, up to 2 MB. It is shown in both light and dark themes, so a transparent background works best.
faviconFilePathBrowser tab icon. PNG or ICO, up to 512 KB.
hueAccent color of the local dashboard, as a hue from 0 to 360 (for example 210 is blue and 140 is green).

If a value is invalid, for example a file is too large, the server logs an error and uses the default for that setting. The server still starts.

Logging

logging:
logLevel: 1
...
SettingDescription
logLevel0 Debug, 1 Information, 2 Warning, 3 Error. Default: 1.
console.enabledWrites logs to the terminal. Default: true.
console.noColorTurns off colors in terminal output. Default: false.
file.enabledWrites logs to files. Default: true.
file.directoryFolder for log files. Default: ./logs.
file.maxSizeMaximum size of each log file, in MB. Default: 1.
file.maxBackupsNumber of old log files to keep. Default: 10.

Server messages go to float_server.log. Each product also has its own file, float_server_<product-id-hash>.log, where <product-id-hash> is a short hash of the product ID, the same one used in the default display name product-<product-id-hash>.

Relative paths

SettingA relative path starts from
productFilePath, logoFilePath, faviconFilePath, SSL filesThe folder of the LexFloatServer executable
logging.file.directoryThe folder of config.yml
-p on the command lineThe current folder

Errors in the config file

The server checks the file when it starts:

  • Unknown setting, for example a typo: the server does not start. The error names the setting.
  • Value out of range, for example leaseDuration: 10: the server uses the nearest allowed value and logs a warning.
  • Invalid display name or customization value: the server uses the default and logs an error.
Installing LexFloatServerAPI Endpoints
Last updated: