Configuring and Starting LexFloatServer

Configuring LexFloatServer

LexFloatServer reads all its settings from config.yml, included with every LexFloatServer release. This page covers the settings you need to get started. For all settings, see the Config Reference.

By default, LexFloatServer looks for config.yml in the same folder as the executable. If the file is in another folder, pass its path with the -c option.

The file is read when the server starts, so restart LexFloatServer after you change it.

What goes in the config file

The file has two kinds of settings:

  • Server-wide settings apply to the whole server, such as the port, network, and logging.
  • Product settings list the products the server serves, with the settings for each product, such as its product file and license key.
configVersion: 2

server:
port: 8090
...

...

products:
- productFilePath: ./products/ProductA.dat
displayName: Product A
licenseKey: AAAAAA-AAAAAA-AAAAAA-AAAAAA-AAAAAA
enabled: true

Settings marked with * are required.

SettingWhat to put there
server.port*Port that your app and the local dashboard connect to, for example 8090.
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 for this product in the local dashboard.
licenseKeyThe license key of the product's on-premise-floating license.
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. Set it back to true and restart LexFloatServer to serve it again. Default: true.

Adding more products

Add one entry under products for each product:

products:
- productFilePath: ./products/ProductA.dat
displayName: Product A
licenseKey: AAAAAA-AAAAAA-AAAAAA-AAAAAA-AAAAAA
enabled: true

- productFilePath: ./products/ProductB.dat
displayName: Product B
licenseKey: BBBBBB-BBBBBB-BBBBBB-BBBBBB-BBBBBB
enabled: true

To give one product its own lease duration or offline borrowing limits, see Product settings.

Enabling HTTPS

With ssl.enabled set to true, LexFloatServer serves every request over HTTPS instead of HTTP, on the same port. Plain HTTP requests are rejected. LexFloatClient traffic is encrypted even without HTTPS. HTTPS adds encryption for the API endpoints and the local dashboard, which send the API key, access tokens, and login passwords.

To enable HTTPS:

  1. Create a certificate for the server. Your customer can use a self-signed certificate. For example, with OpenSSL:

    openssl req -x509 -newkey rsa:2048 -nodes -days 365 \
    -keyout server-key.pem -out server-cert.pem \
    -subj "/CN=myfloatingserver" \
    -addext "subjectAltName=DNS:myfloatingserver,IP:10.0.4.10"

    Replace myfloatingserver and 10.0.4.10 with the host name and IP address that clients use to reach the server.

  2. Set the SSL settings in config.yml:

    ssl:
    enabled: true
    certificateFilePath: ./server-cert.pem
    certificateKeyFilePath: ./server-key.pem
  3. Restart LexFloatServer.

  4. Use https:// URLs. In your app, pass an https:// URL to LexFloatClient, for example SetHostUrl("https://myfloatingserver:8090"). Scripts and the local dashboard also use https://.

If the certificate or key file is missing or invalid, LexFloatServer does not start and logs an SSL certificate error.

Starting LexFloatServer in the terminal

LexFloatServer can run in two ways:

  • In a terminal (command prompt). It stops when you close the terminal.
  • As a system service, for normal use. It starts with the machine and runs in the background. See Installing LexFloatServer.

To start it in a terminal, pass the -s option:

lexfloatserver -s

The log shows each product as it loads. A product that is not activated yet is reported, but the server still starts, so you can activate the product next.

Command-line options

lexfloatserver <command> [options]

Pass one command each time you run the program.

CommandDescription
-s, --startStart the server in the terminal.
-a, --activateActivate product licenses.
-d, --deactivateDeactivate product licenses.
-g, --generate-offline-requestCreate an offline activation request file.
--statusShow the license status of each product.
-i, --installInstall the server as a system service.
-u, --uninstallUninstall the system service.
-h, --helpShow every command and option.
-v, --versionShow the version.

A command applies to every enabled product in config.yml. To run it for some products only, pass -p once for each product file.

Run lexfloatserver --help for the full list of options.

Examples

# Check every product
lexfloatserver --status

# Activate every enabled product with the license key in its config entry
lexfloatserver -a

# Activate one product with a license key passed on the command line
lexfloatserver -a -p ./products/ProductA.dat -l LICENSE_KEY

# Start only two products
lexfloatserver -s -p ./products/ProductA.dat -p ./products/ProductB.dat

# Install a system service that runs only Product A
lexfloatserver -i -p ./products/ProductA.dat --service-name myfloatingserver
OverviewActivating LexFloatServer
Last updated: