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
...| Setting | Description |
|---|---|
port* | Port the server listens on, for example 8090. |
enableIpv6 | Listens on IPv4 and IPv6 when true. Default: false (IPv4 only). |
allowedClockOffset | Allowed difference, in seconds, between the server clock and a client's clock. Default: 60. Minimum: 60. |
blockedIps | IP addresses the server blocks. Requests from these addresses are rejected. |
cryptlexHost | Host of the Cryptlex API, for Cryptlex On-Premise only. Leave it empty to use the Cryptlex servers. |
Network
proxy:
trustedProxies: []
ssl:
enabled: false
...| Setting | Description |
|---|---|
proxy.trustedProxies | IP 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.enabled | Serves every request over HTTPS instead of HTTP when true. Default: false. See Enabling HTTPS. |
ssl.certificateFilePath | Certificate file (PEM) for the server, for example a self-signed certificate. Required when ssl.enabled is true. |
ssl.certificateKeyFilePath | Private 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| Setting | Description |
|---|---|
apiKey | Key that scripts and tools send in the X-API-Key header to authenticate with the API endpoints, including activation and deactivation. |
admins | Users 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[].passwordHash | Hex-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| Setting | Description |
|---|---|
productFilePath* | Path to the product's Product.dat file. Download it from the actions menu on the Products page in the admin portal. |
displayName | Name 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. |
licenseKey | The product's on-premise-floating license key. Used when you activate with lexfloatserver -a. |
enabled | Turns 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. |
leaseDuration | How long a lease of this product lasts, in seconds, before the client must renew it. Default: the value in productDefaults. |
maxOfflineLeaseDuration | The longest time, in seconds, that a client can borrow a seat of this product off the network. Default: the value in productDefaults. |
allowedOfflineFloatingClients | How 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| Setting | Description |
|---|---|
leaseDuration | How long a lease lasts, in seconds, before the client must renew it. Default: 60. Minimum: 30. |
maxOfflineLeaseDuration | The longest time, in seconds, that a client can borrow a seat off the network. Default: 30. Minimum: 30. |
allowedOfflineFloatingClients | How 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: trueThe license can also limit these values:
- If the license in Cryptlex has a lease duration, LexFloatServer uses it and ignores
leaseDurationinconfig.yml. TheleaseDurationsetting applies only when the license's lease duration is0. allowedOfflineFloatingClientscan 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| Setting | Description |
|---|---|
appName | Name shown in the local dashboard header, on the login page, and in the browser tab. Up to 64 characters. Default: Licensing Server. |
logoFilePath | Logo 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. |
faviconFilePath | Browser tab icon. PNG or ICO, up to 512 KB. |
hue | Accent 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
...| Setting | Description |
|---|---|
logLevel | 0 Debug, 1 Information, 2 Warning, 3 Error. Default: 1. |
console.enabled | Writes logs to the terminal. Default: true. |
console.noColor | Turns off colors in terminal output. Default: false. |
file.enabled | Writes logs to files. Default: true. |
file.directory | Folder for log files. Default: ./logs. |
file.maxSize | Maximum size of each log file, in MB. Default: 1. |
file.maxBackups | Number 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
| Setting | A relative path starts from |
|---|---|
productFilePath, logoFilePath, faviconFilePath, SSL files | The folder of the LexFloatServer executable |
logging.file.directory | The folder of config.yml |
-p on the command line | The 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.