Deploying HQ
This page describes the install of the Lenses HQ via an archive on Linux.
To install the HQ from the archive you must:
Extract the archive
Configure the HQ
Start the HQ
Extracting the archive
Installation link
Link to archives can be found here: https://archive.lenses.io/lenses/6.0/hq/ (versioned builds live under the hq/ sub-directory).
Extract the archive using the following command. It unpacks into a lenses-hq/ directory:
tar -xzf lenses-hq-linux-amd64-latest.tar.gzInside the extracted archive, you will find the lenses-hq binary (plus config.yaml.sample, VERSION, licenses):
lenses-hq
├── lenses-hq # the binary
├── config.yaml.sample
└── VERSIONConfiguring the HQ
In order to properly configure HQ, one core components is necessary as prerequirement:
Configure Authentication
To set up authentication, there are multiple methods available.
You can choose between:
password-based authentication, which requires users to provide a username and password;
and SAML/SSO (Single Sign-On) authentication, which allows users to authenticate through an external identity provider for a seamless and secure login experience.
Both password based and SAML / SSO authentication methods can be used alongside each other.
First to cover is users property.
Users Property: The users property is defined as an array, where each entry includes a username and a password. The passwords are hashed using bcrypt for security purposes, ensuring that they are stored securely.
Second to cover will be administrators. It serves as definition of user emails which will have highest level of permissions upon authentication to HQ.
Full auth configuration spec can be found here.
Configure HTTP endpoint
Another part which has to be set in order to successfully run HQ is the http definition. As previously mentioned, this parameter defines everything around HTTP endpoint of the HQ itself and how users will interact with.
Definition of HTTP object is as follows:
secureSessionCookies. With TLS enabled, keep the default (session cookies are flagged Secure). If you access HQ over plain HTTP (for example a remote IP during evaluation), a browser will not send a Secure cookie back, so login appears to loop (repeated 401 on /api/v1/users/me). Set secureSessionCookies: false for HTTP access, or serve HQ behind TLS.
Configure Agent endpoint
After correctly configuring authentication strategy and connection endpoint , agent handling is the last most important box to tick.
The Agent's object is defined as follows:
More about setting up TLS can be read here.
Configure database
Prerequisite:
Running Postgres instance;
Created database for HQ;
Username (and password) which has access to created database;
In order to successfully run HQ, storage within config.yaml has to be defined first.
Definition of storage object is as follows:
Full database configuration spec can be found here.
Final Configuration File
If you have meticulously followed all the outlined steps, your config.yaml file should mirror the example provided below, fully configured and ready for deployment. This ensures your system is set up correctly with all necessary settings for authentication, database connection, and other configurations optimally defined.
Starting the HQ
Start Lenses by running:
or pass the location of the config file:
If you do not pass the location of the config file, the HQ will look for it inside the current (runtime) directory. If it does not exist, it will try its installation directory.
Once HQ starts, it will be listening on the https://localhost:8080
To stop HQ, press CTRL+C.
SystemD example
If your server uses systemd as a Service Manager, then manage HQ (start upon system boot, stop, restart). Below is a simple unit file that starts HQ automatically on system boot.
The config file (which contains the database password and license) must be readable by the systemd User=. If it is owned by root with mode 0640, HQ fails at startup with Fatal: load config from file: ... permission denied. chown it to the service user.
What's next?
After the successful configuration and installation of HQ, the next steps would be:
Last updated
Was this helpful?

