Query Engines
Environment variables

Environment variables

The Vizzly query engine can be configured by setting runtime environment variables. These will allow you to do things such as;

  • Change the log level to be more or less verbose.
  • Change the base path for all routes on the query engine.
  • Change where the Vizzly config is located on the docker image.

The variables


The default port the query engine runs on is port 8000. You can change this using the PORT environment variable.


This changes the base path of the Vizzly query engine. For example, you might have a routing layer that matches requests for /vizzly-query-engine/*, and forwards them to the query engine. In which case, you'd set this value to /vizzly-query-engine so the requests match the path matchers in the query engine.

If you need to support dynamic base paths, this is supported by using path matchers and indexes starting at 1. For example, a base path of;


will match requests sent to all of the following;


This environment variable is not required and defaults to ''.


Changes the path at which the config file resides inside the running container.

This environment variable is not required, and defaults to /etc/vizzly/vizzly.config.json.


Change the log level from the default warning level. Valid logging levels are "debug", "info", "warning" and "error".


Provide your Vizzly public key through an environment variable, rather than the publicKeyCertificates field of the Vizzly config.

The value should be formatted as a JSON array. For example, if you had the following public key;

-----END PUBLIC KEY-----

then it would be exported in this format as an environment variable.

export VIZZLY_PUBLIC_KEYS='["-----BEGIN PUBLIC KEY-----\r\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQJqQ1P+MyW4E/32pXvkxQiOVT0IW\r\n1CwdEzN2D5+KtIK1qyUpMFiH2oBc8BIo8w3AvID0cOrD5+KEKXSIbw9Nig==\r\n-----END PUBLIC KEY-----\r\n"]'

The Vizzly CLI command vizzly format-public-pem-for-env will convert your public PEM file into the format required for the VIZZLY_PUBLIC_KEYS environment variable.


Load secret environment variables from AWS Secrets Manager (opens in a new tab).

Provide the ID of the secret stored within the same region as the running Vizzly Query Engine, to load secret environment variables at runtime.

The secret should be in a JSON-formatted string, for example, a secret storing a postgres database password will be;


Be certain that the container has permission to fetch the secret from AWS Secrets Manager.