Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

HQ

This page describes how to configure HQ with its config.yaml file.

HQ reads its configuration from a single YAML file, config.yaml. On Linux, pass the file's path when you start HQ, for example lenses-hq config.yaml. The Docker and Helm installations provide the file for you; see Installation.

For every setting, its default and whether it is required, see the Configuration Reference.

License and EULA

Every configuration starts with the license. HQ does not start without a license key, or unless you accept the Lenses EULA:

license:
  key: license_key_...
  acceptEULA: true

Example configuration

Only license and database are required; every other setting has a default. In practice you also need a way to log in, so this example adds an administrator with a password:

config.yaml
license:
  key: license_key_...
  acceptEULA: true

database:
  host: postgres:5432
  database: hq
  username: hq
  password: $(HQ_DB_PASSWORD)    # Read from an environment variable.

auth:
  administrators:
    - admin                      # Full access for this user.
  users:
    - username: admin
      # bcrypt hash of "correcthorsebatterystaple". Use your own.
      password: $2a$10$F66cb6ZhnJjGCZuxlvKP1e84eytTpT1MDJcpBblHaZgsqp1/Aa0LG

http:
  address: :8080                 # UI and API. Default :8082.
  secureSessionCookies: false    # Needed while HQ is served over plain HTTP.

agents:
  address: :10000                # Where Agents connect. Default :10000.

With this file, the UI and API listen on port 8080, Agents connect on port 10000, and Prometheus metrics are served on port 9090.

To create a password hash, see Admin account. To log in with your identity provider instead, see SSO & SAML. Before you expose HQ, enable TLS and set secureSessionCookies back to true.

Read values from environment variables

HQ replaces $(NAME) anywhere in config.yaml with the value of the environment variable NAME before it reads the file. Use this to keep secrets, such as passwords and private keys, out of the file:

  • Values that span several lines, such as PEM certificates, work when the placeholder is the whole value, as above.

  • If the variable is not set, HQ leaves the text as it is and uses $(NAME) literally, for example as the password. Make sure every variable you reference is set.

Check a configuration file

Test a configuration file without starting HQ:

test-config checks that every required setting is present and that each value has the right type and format. A file that passes can still fail at startup, for example if two servers are set to the same address.

Last updated

Was this helpful?