Environment Variables
Every environment variable read by the QueryPilot binaries, with precedence rules.
Overview
This page lists every environment variable read by the QueryPilot binaries: the Router (binary querypilot), Analytics (binary querypilot-analytics), and the standalone Accelerator (binary querypilot-accelerator).
For variables that mirror a CLI flag, precedence is:
CLI flag, then environment variable, then config file or built-in default.
The environment variable applies only when the corresponding flag is absent from the command line.
Router
QUERYPILOT_CONFIG
Path to the Router config file. Mirrors -c, --config. When unset, the Router reads querypilot.toml from the current directory. See Router configuration.
QUERYPILOT_LOG_LEVEL
Override the Router log level. Mirrors -l, --log-level and overrides logging.level from the config file. Unlike the config key, it accepts full tracing filter directives, so both debug and sqp_core=debug,info are valid.
QUERYPILOT_LOG_LEVEL=debug querypilotAnalytics
QUERYPILOT_ANALYTICS_CONFIG
Path to the Analytics config file. Mirrors -c, --config. When unset, the server reads querypilot-analytics.toml from the current directory. A missing file silently yields full defaults; see the warning in the Analytics configuration reference.
QUERYPILOT_ANALYTICS_BIND
Override the PostgreSQL wire-protocol bind address. Mirrors -b, --bind and overrides config server.bind.
QUERYPILOT_ANALYTICS_API_BIND
Override the HTTP API bind address. Mirrors --api-bind and overrides config server.api_bind.
QUERYPILOT_ANALYTICS_DATABASE
Override the DuckDB database path (:memory: is allowed). Mirrors -d, --database and overrides config duckdb.database_path.
QUERYPILOT_ANALYTICS_LOG_LEVEL
Override the Analytics log level. Mirrors -l, --log-level and overrides config logging.level. Accepts tracing filter directives:
QUERYPILOT_ANALYTICS_LOG_LEVEL="sqp_duckdb_core=debug,info" querypilot-analyticsQUERYPILOT_ANALYTICS_UNSAFE_BIND_ALL
Permit non-loopback values for server.bind and server.api_bind. Mirrors --unsafe-bind-all. When unset, non-loopback binds are refused at startup. This is a gate only; it does not change the bind values themselves. It also does not cover metrics.bind, which can bind non-loopback addresses without it. Container deployments must set this (containers bind 0.0.0.0) and secure the ports at the network layer instead; see Security.
Accelerator (standalone)
QUERYPILOT_ACCELERATOR_ALLOW_INSECURE_HTTP
When set to 1, waives the requirement that a non-loopback sqp_api_url use https plus an API token. Read by the standalone querypilot-accelerator binary only.
This variable exists for test and development fixtures only, so containerized end-to-end tests can reach the Router admin API over plain HTTP across a Docker network. Setting it in production sends the Accelerator's API token and cache-management traffic unencrypted to a non-loopback host. Use https and an API token instead.
All binaries
NO_COLOR
When set to any value, disables ANSI color in log output. Read by both querypilot and querypilot-analytics.
RUST_LOG is not read
Neither querypilot nor querypilot-analytics reads RUST_LOG. Both build their log filter exclusively from the configured level: the config file's logging.level, the --log-level flag, or the QUERYPILOT_LOG_LEVEL and QUERYPILOT_ANALYTICS_LOG_LEVEL variables above. Exporting RUST_LOG=debug has no effect.
The standalone querypilot-accelerator binary reads no logging environment variable at all; its verbosity is the log_verbosity key in its config file.
Values preset by the shipped containers
The Docker images and deployment manifests preset three of the variables above; see Deployment for the full container conventions.
| Variable | Value in shipped containers |
|---|---|
QUERYPILOT_CONFIG | /etc/sqp/querypilot.toml |
QUERYPILOT_ANALYTICS_CONFIG | /etc/sqp/querypilot-analytics.toml |
QUERYPILOT_ANALYTICS_UNSAFE_BIND_ALL | true |