Skip to content

Configuration optionsđź”—

The server can be configured in two ways, using command line options when starting the server or by providing a configuration file.
Unless a configuration file is provided by a command line option, the server will check for a configuration file next to the server executable. When the server was installed via the Software Manager, the installation will contain a default configuration file config.yaml that should be adapted before starting the server.

Command line optionsđź”—

All serve commands share the -c command to specify a path to a License Server configuration file. The available options can also be queried by providing the -h command line option.

Configuration filesđź”—

The primary setup of the License Server is managed through a configuration file. Configuration files can be provided in YAML or JSON format.

For details on available configuration options, see the example configuration file.

Example configuration file
config.yaml
##############################################
## MVTec License Server configuration file. ##
##############################################

## serve ##
#
# Configuration of the server interfaces
serve:
  ## licenses ##
  #
  # Controls the server part handling license requests from HALCON
  licenses:
    ## host ##
    #
    # The interface to listen on for incoming requests
    #
    # Example values:
    #   localhost -> server only accessible from the same machine
    #   0.0.0.0   -> server accessible on all network interfaces of the machine
    host: 0.0.0.0

    ## port ##
    #
    # The port to listen on for incoming requests
    #
    # Default value: 22022
    port: 22022

    ## ip_whitelist ##
    #
    # A list of CIDR ranges, hostnames or IPs that are allowed to request licenses.
    # If the list is empty, requests from any IP are allowed.
    #
    # Default value: empty list -- allow all IPs
    # Example values:
    #  - <any hostname resolvable during server startup>
    #  - 192.168.0.1
    #  - 192.168.0.0/16
    #
    # ip_whitelist:
    #   - 127.0.0.1/32

    ## tls ##
    #
    # Controls the TLS settings. As a fallback, the server will generate a self-signed certificate
    # if no valid certificate is provided.
    tls:
      ## certificate ##
      #
      # Public certificate (must be PEM encoded)
      certificate:
        ## path ##
        path: /path/to/cert.pem

      ## key ##
      #
      # Private key (must be PEM encoded)
      key:
        path: /path/to/key.pem

  ## admin ##
  #
  # Controls the server part exposing server metrics
  admin:
    ## host ##
    #
    # The interface to listen on for incoming requests
    #
    # Example values:
    #   localhost -> server only accessible from the same machine
    #   0.0.0.0   -> server accessible on all network interfaces of the machine
    host: localhost

    ## port ##
    #
    # The port to listen on for incoming requests
    #
    # Default value: 22023
    port: 22023

    ## ip_whitelist ##
    #
    # A list of CIDR ranges, hostnames or IPs that are allowed to request licenses.
    # If the list is empty, requests from any IP are allowed.
    #
    # Default value: empty list -- allow all IPs
    # Example values:
    #  - <any hostname resolvable during server startup>
    #  - 192.168.0.1
    #  - 192.168.0.0/16
    #
    # ip_whitelist:
    #   - 127.0.0.1/32

    ## tls ##
    #
    # Controls the TLS settings. As a fallback, the server will generate a self-signed certificate
    # if no valid certificate is provided.
    tls:
      ## certificate ##
      #
      # Public certificate (must be PEM encoded)
      certificate:
        ## path ##
        path: /path/to/cert.pem

      ## key ##
      #
      # Private key (must be PEM encoded)
      key:
        path: /path/to/key.pem

## sessions
#
# Configuration of session properties
sessions:
  ## max_duration ##
  #
  # The maximum duration in seconds, that a session has time to revalidate itself.
  # After this duration the session is expired automatically.
  #
  # Default value: 240s
  # Min value:      10s
  # Max value:     600s
  max_duration: 240s

## licenses
#
# Configuration of license file related options
licenses:
  ## search_paths ##
  #
  # A list of directories where the server should search for licenses to serve.
  # Relative paths are evaluated relative to the current working directory of
  # where the server executable was started.
  #
  # Default value: "."
  search_paths:
    - .
    - ./license
    - ./licenses

## log
#
# Configuration of the servers logging functionality
log:
  ## level ##
  #
  # Log level
  #
  # Default value: info
  #
  # Values:
  # - panic
  # - fatal
  # - error
  # - warn
  # - info
  # - debug
  # - trace
  level: info

  ## format ##
  #
  # Log format
  #
  # Default value: text
  #
  # Values:
  # - text (human readable)
  # - json (logstash compatible)
  format: text

  ## target ##
  #
  # Log target can either be STDOUT or a full file path where logs should be written.
  # If a file path is given, log rotation will be enabled.
  # The directory of a provided file path must already exist.
  #
  # Default value: STDOUT
  target: STDOUT

  ## max_size ##
  #
  # The maximum size (in megabytes) a log file can reach before it is rotated.
  # If set to 0, rotation is based solely on the rotation interval.
  # If both this and rotation_interval are 0 or unset, the log file will not be rotated.
  # Only applicable when using a file target.
  #
  # Default value: 100
  max_size: 100

  ## rotation_interval ##
  #
  # How often log files are rotated, specified as a duration string with a time unit:
  # "h" for hours, "m" for minutes, or "s" for seconds (e.g., "24h" for daily rotation, "168h" for weekly).
  # If unset, rotation is based on file size only.
  # Only applicable when using a file target.
  #
  # Default value: ""
  rotation_interval: ""

## metrics
#
# Configuration of the prometheus metrics exported by the admin endpoint
metrics:
  ## session_duration_buckets
  #
  # Configures the buckets of the session duration histogram and must be a list of values.
  # The format should be 'As' for A seconds, Bm for B minutes, Ch for C hours. Integers without
  # a time unit are treated as nanoseconds.
  session_duration_buckets: [1m, 10m, 30m, 1h, 2h, 6h, 12h, 24h]
  ## session_client_remote_address
  #
  # The session_client_remote_address is a configuration flag that determines whether IP addresses of clients
  # requesting licenses are included in session metrics. By default, this flag is set to false.
  #
  # Warning: If this flag is set to true, it could significantly increase metric size, since Prometheus creates
  # a new metric for each unique IP address. This could become excessive if a large number of clients,
  # each from different IP addresses, connect frequently.
  # Please consider this potential impact on your network traffic and local storage of prometheus data
  # before enabling this flag.
  session_client_remote_address: false

CodeMeter configurationđź”—

Using HTTP for the CodeMeter cloud backendđź”—

In some IT setups, the SSL certificates are modified by a firewall (when using a “TLS/SSL termination proxy” or “SSL offloading”). In such cases, CodeMeter is not able to connect to the cloud backend via HTTPS, and you need to configure CodeMeter Runtime to use a HTTP connection instead. This can be done by adding the following line to CodeMeter’s server.ini:

UseWibuCloudWithHttp=1

For more information, see the CodeMeter documentation.

Proxy configurationđź”—

Access to the internet is required for License Server Cloud-Ready to http(s)://wibu.cloud and eu.wibu.cloud.

If you need to route this connection via a proxy, you can modify the local CodeMeter configuration. To set up your proxy, open http://localhost:22352/configuration/proxy.html.