Environment Variables
An environment variable is a named value the operating system hands to a program when it starts. Bridge uses them to receive settings without writing them into the config file, which matters most for secrets and for values that differ between deployments.
Every setting has a variable, named after its path
You do not need a list. The variable name is the setting’s position in the config file, upper-cased, with each level joined by an underscore and prefixed with BRIDGE_:
| Setting in the config file | Environment variable |
|---|---|
server.listen | BRIDGE_SERVER_LISTEN |
server.auth.britive.tenant | BRIDGE_SERVER_AUTH_BRITIVE_TENANT |
server.telemetry.disabled | BRIDGE_SERVER_TELEMETRY_DISABLED |
server.checkout_api_tokens.enabled | BRIDGE_SERVER_CHECKOUT_API_TOKENS_ENABLED |
server.checkout_api_tokens.max_token_days | BRIDGE_SERVER_CHECKOUT_API_TOKENS_MAX_TOKEN_DAYS |
ssh.native.host_key_path | BRIDGE_SSH_NATIVE_HOST_KEY_PATH |
redis.native.enabled | BRIDGE_REDIS_NATIVE_ENABLED |
vnc.native.enabled | BRIDGE_VNC_NATIVE_ENABLED |
vnc.browser.enabled | BRIDGE_VNC_BROWSER_ENABLED |
cluster.orchestrator.provisioner.k8s.namespace | BRIDGE_CLUSTER_ORCHESTRATOR_PROVISIONER_K8S_NAMESPACE |
Every setting documented in bridge.reference.yaml is reachable this way. The names come from Bridge’s own configuration structure rather than a maintained list, so a setting added in a later release is settable as soon as it exists.
Write values the way the config file writes them
| Type | Format | Example |
|---|---|---|
| Text | As-is | BRIDGE_SERVER_LOG_LEVEL=debug |
| Number | Digits | BRIDGE_SERVER_DATASTORE_PORT=5432 |
| Boolean | true or false | BRIDGE_SERVER_TLS_ENABLED=false |
| Duration | A number and a unit | BRIDGE_SSH_IDLE_TIMEOUT=30m |
| List | Comma-separated | BRIDGE_SERVER_AUTH_TYPES=britive,ldap |
Lists are comma-separated because an environment variable holds a single string. Spaces around a comma are ignored.
Listen addresses accept a bare port. BRIDGE_SSH_NATIVE_LISTEN=2222 binds every interface on port 2222, the same as writing listen: 2222 in the file. To bind one interface, give a host and a port: BRIDGE_SSH_NATIVE_LISTEN=127.0.0.1:2222.
An override completes the config file
Bridge reads the config file, applies environment variables over it, then validates the result once. A file that is missing a required value is completed by an override rather than rejected because of one.
An environment variable takes precedence over the same setting in the file. Nothing in the file overrides an environment variable.
A malformed value stops the process and names the variable. BRIDGE_SERVER_TLS_ENABLED=yes-please fails at startup and says which variable was wrong, rather than being ignored and leaving TLS in a state you did not choose.
Variables with no configuration setting
Bridge reads these from the environment only. The secrets are kept out of every config file deliberately. The identity values differ per process, so a file shared by several processes cannot carry them.
| Variable | Purpose |
|---|---|
BRIDGE_CONFIG | Path of the config file to read. The published image sets it per deployment model. |
BRIDGE_ENCRYPTION_KEY_B64 | The key that encrypts checkout credentials at rest. Required in every deployment. |
BRIDGE_ENCRYPTION_KEY_FILE | The same key, read from a file instead of the environment. |
BRIDGE_ENCRYPTION_ALLOW_GENERATED | Development only. Accepts a generated ephemeral key, which makes stored credentials unreadable after a restart. |
BRIDGE_CLUSTER_TOKEN | Shared cluster secret. It is not the credential for broker checkout or check-in requests in v3. |
BRIDGE_INSTANCE_ID | Identity of this process. |
BRIDGE_WORKER_ID | Identity of a session or proxy worker. The orchestrator sets it. |
BRIDGE_WORKER_ADDR | Address a worker advertises to the rest of the cluster. |
BRIDGE_CLUSTER_ADDR | Address a worker reaches the orchestrator on. |
BRIDGE_BROKER_API_URL | Checkout API used by broker scripts. Defaults to http://127.0.0.1:8081 for the colocated broker. External brokers use the Bridge HTTPS URL. |
BRIDGE_BROKER_API_TOKEN_FILE | Broker credential file. Defaults to /data/keys/bridge-broker-api.token for the colocated broker. External brokers use a protected file containing a checkout token created in the admin panel. |
BRIDGE_TLS_INSECURE | true skips certificate verification for broker API HTTPS requests. Default false. The default loopback API uses HTTP. |
BRIDGE_CA_CERT | Optional CA bundle for broker API HTTPS requests. Unset by default. |
BRIDGE_DEV_LDAP_ADMIN | Development only. A true value grants Bridge administrator privileges to the LDAP user named admin. Never set it outside a local test harness. |
BRITIVE_BROKER_AUTH_TOKEN | Broker-pool credential. Bridge also uses it for automatic license retrieval and explicitly enabled telemetry. |
BRITIVE_BROKER_TENANT_SUBDOMAIN | Tenant subdomain used by the broker and Bridge platform integrations. |
BRITIVE_BROKER_AUTO_UPDATE | true fetches the newest Britive Broker from download.britive.com when the container starts and runs it. If the repository is unreachable or the package does not verify, the broker bundled in the image runs instead. Default false. Needs HTTPS egress to download.britive.com from the orchestrator or single role. |
BRITIVE_BROKER_APK_SUITE | Package suite that update reads: stable (default) or next. |
In v3.0.1, the container entrypoint exports defaults for BRIDGE_BROKER_API_URL,
BRIDGE_BROKER_API_TOKEN_FILE, and BRIDGE_TLS_INSECURE to broker scripts.
It preserves nonempty overrides. Bridge creates the credential file at startup.
bsh reads that file. BSH_BRIDGE_BROKER_API_TOKEN can instead supply the token
or a secret-manager reference. See bsh’s
connection overrides.
Platform telemetry defaults to disabled in v3.0.1 and later. Set BRIDGE_SERVER_TELEMETRY_DISABLED=false only after your tenant supports telemetry ingestion, then restart the publisher. See Platform Telemetry.
BRIDGE_ENCRYPTION_KEY_B64 is required, and it must stay constant. It is a 32-byte key, base64-encoded. Bridge encrypts the credentials held for each checkout with it before writing them to the database, so database access alone does not reveal them. Changing the key makes existing encrypted data unreadable. See Operations for what rotating it involves.
Generate one with openssl rand -base64 32.
BRIDGE_NAMESPACE is not a configuration override. The orchestrator passes it through to the workers it creates. The Kubernetes namespace itself is cluster.orchestrator.provisioner.k8s.namespace.
Older variable names still work
Bridge recognised a small number of variables before names were derived from setting paths. Each one remains valid and sets exactly what it always did. Where both forms are set, a nonempty path-derived value wins.
| Older name | Setting | Path-derived name |
|---|---|---|
BRIDGE_ROLE | cluster.role | BRIDGE_CLUSTER_ROLE |
BRIDGE_DATASTORE_HOST | server.datastore.host | BRIDGE_SERVER_DATASTORE_HOST |
BRIDGE_DATASTORE_PORT | server.datastore.port | BRIDGE_SERVER_DATASTORE_PORT |
BRIDGE_DATASTORE_USER | server.datastore.user | BRIDGE_SERVER_DATASTORE_USER |
BRIDGE_DATASTORE_PASSWORD | server.datastore.password | BRIDGE_SERVER_DATASTORE_PASSWORD |
BRIDGE_DATASTORE_NAME | server.datastore.name | BRIDGE_SERVER_DATASTORE_NAME |
BRIDGE_DATASTORE_SSLMODE | server.datastore.sslmode | BRIDGE_SERVER_DATASTORE_SSLMODE |
BRIDGE_TLS_ENABLED | server.tls.enabled | BRIDGE_SERVER_TLS_ENABLED |
BRIDGE_HOST_KEY_SEED | ssh.native.host_key_seed | BRIDGE_SSH_NATIVE_HOST_KEY_SEED |
BRIDGE_LDAP_BIND_PASSWORD | server.auth.ldap.bind_password | BRIDGE_SERVER_AUTH_LDAP_BIND_PASSWORD |
BRIDGE_LICENSE | server.license.key | BRIDGE_SERVER_LICENSE_KEY |
BRIDGE_LICENSE_PATH | server.license.path | BRIDGE_SERVER_LICENSE_PATH |
BRITIVE_TENANT | server.auth.britive.tenant | BRIDGE_SERVER_AUTH_BRITIVE_TENANT |
BRITIVE_REDIRECT_URL | server.auth.britive.redirect_url | BRIDGE_SERVER_AUTH_BRITIVE_REDIRECT_URL |
Create API tokens in the admin panel
In v3.0.2 and later, Admin > API Tokens contains read-only service tokens for monitoring and checkout tokens for external brokers. Bridge stores token hashes in the datastore. Token values are not Bridge configuration settings.
See Metrics and service tokens or Connect an external broker. External broker support defaults to disabled. Its maximum token lifetime defaults to 90 days.