Environment Variables

Last modified on February 10, 2023

The StrongDM command line recognizes environment variables to control and modify its functionality. This document details the available environment variables and their function.

NameFormatFunction
SDM_ADMIN_TOKEN<JWT_TOKEN>An admin token or service account token to use for sdm authentication. If set, this token is used by StrongDM and there is no need to log in via the CLI or desktop app.
SDM_EMAILSDM_EMAIL=email-address-value@example.comIf set, the specified email address is used automatically when using the sdm login command in the CLI.
SDM_HOME/path/to/homeThe location where sdm places its logs and keys. Defaults to ~/.sdm. Must be writable by the user running sdm.
SDM_VERBOSEtrue|falseIf set, log verbosity is set to high for troubleshooting purposes.

Variables for Gateways and Relays

The following variables are only for use with gateways and relays.

NameFormatFunction
SDM_DOCKERIZEDtrue
false
stderr
If true, logs go to STDOUT rather than sdm.log for Docker or Kubernetes deployments or for troubleshooting purposes; if stderr, logs go to STDERR
SDM_MAINTENANCE_WINDOW_STARTintegerIf set, schedules the hour of the day (0 to 23 UTC) when gateways and relays can terminate connections and restart (default: 7)
SDM_METRICS_LISTEN_ADDRESS:portIf set in the gateway or relay’s environment on port 9999, enables the gateway or relay to listen for metrics on the specified port
SDM_ORCHESTRATOR_PROBES:portIf set, enables the http://<GATEWAY OR RELAY IP>:port/liveness URL to check whether the gateway or relay is in good health
SDM_RELAY_LOG_ENCRYPTIONplaintext
pubkey:///pubkeyfullpath/file.pem
Overrides relay log encryption settings configured in the Admin UI
SDM_RELAY_LOG_FORMATcsv
json
Overrides relay log format settings configured in the Admin UI
SDM_RELAY_LOG_STORAGEstdout
file
none
tcp://host:port
socket:///fullpath/
syslog://host:port
Overrides relay log storage settings configured in the Admin UI
SDM_RELAY_TOKEN<JWT_TOKEN>A gateway or relay token to use when invoking the sdm binary; normally not needed as this is entered when installing the gateway or relay
Top