Skip to main content

Environment configuration

View Markdown

This page lists every environment variable that configures a Temporal Client, along with its TOML configuration key, the equivalent Temporal CLI flag, and which clients read it. The Temporal CLI is a Temporal Client, so its variables are included here.

For how to use these variables and configuration files together, refer to Environment configuration.

Environment variables always take precedence over values in a TOML configuration file. An explicitly passed CLI flag takes precedence over the matching environment variable.

The Supported by column records which clients read a variable. Where a client reads a variable but applies it with caveats, the description says so.

Client settings

VariableTOML keyCLI flagSupported byDescription
TEMPORAL_CONFIG_FILENA--config-fileAllPath to the TOML configuration file. Defaults to temporal.toml in a platform-specific directory.
TEMPORAL_PROFILENA--profileAllName of the configuration profile to load. Defaults to default.
TEMPORAL_ADDRESSprofile.<name>.address--addressAllHost and port of the Temporal Frontend Service, such as localhost:7233.
TEMPORAL_NAMESPACEprofile.<name>.namespace--namespaceAllTemporal Namespace to connect to.
TEMPORAL_API_KEYprofile.<name>.api_key--api-keyAllAPI key for authentication. When set, TLS is enabled by default.
TEMPORAL_TLSprofile.<name>.tls.disabled--tlsAllSet to true to enable TLS, false to disable it. The TOML key is inverted: disabled = true turns TLS off.
TEMPORAL_TLS_CLIENT_CERT_PATHprofile.<name>.tls.client_cert_path--tls-cert-pathAllFilesystem path to the client's public TLS certificate. Cannot be combined with TEMPORAL_TLS_CLIENT_CERT_DATA.
TEMPORAL_TLS_CLIENT_CERT_DATAprofile.<name>.tls.client_cert_data--tls-cert-dataAllRaw PEM data for the client's public TLS certificate. Cannot be combined with TEMPORAL_TLS_CLIENT_CERT_PATH.
TEMPORAL_TLS_CLIENT_KEY_PATHprofile.<name>.tls.client_key_path--tls-key-pathAllFilesystem path to the client's private TLS key. Cannot be combined with TEMPORAL_TLS_CLIENT_KEY_DATA.
TEMPORAL_TLS_CLIENT_KEY_DATAprofile.<name>.tls.client_key_data--tls-key-dataAllRaw PEM data for the client's private TLS key. Cannot be combined with TEMPORAL_TLS_CLIENT_KEY_PATH.
TEMPORAL_TLS_SERVER_CA_CERT_PATHprofile.<name>.tls.server_ca_cert_path--tls-ca-pathAllFilesystem path to the Certificate Authority certificate used to verify the server. Cannot be combined with TEMPORAL_TLS_SERVER_CA_CERT_DATA.
TEMPORAL_TLS_SERVER_CA_CERT_DATAprofile.<name>.tls.server_ca_cert_data--tls-ca-dataAllRaw PEM data for the Certificate Authority certificate used to verify the server. Cannot be combined with TEMPORAL_TLS_SERVER_CA_CERT_PATH.
TEMPORAL_TLS_SERVER_NAMEprofile.<name>.tls.server_name--tls-server-nameAllOverrides the server name used for Server Name Indication (SNI) in the TLS handshake.
TEMPORAL_TLS_DISABLE_HOST_VERIFICATIONprofile.<name>.tls.disable_host_verification--tls-disable-host-verificationAllDisables server hostname verification. Use with caution. Not every SDK applies this setting.
TEMPORAL_GRPC_META_*profile.<name>.grpc_meta--grpc-metaAllSets gRPC headers. The part after _META_ becomes the header key, so TEMPORAL_GRPC_META_SOME_KEY sets some-key.
TEMPORAL_CODEC_ENDPOINTprofile.<name>.codec.endpoint--codec-endpointAll except JavaEndpoint for a remote Codec Server. SDKs that support this setting do not apply it by default. Intended mostly for CLI use.
TEMPORAL_CODEC_AUTHprofile.<name>.codec.auth--codec-authAll except JavaAuthorization header value for the remote Codec Server.
TEMPORAL_CLIENT_AUTHORITYprofile.<name>.authorityNAGoOverrides the :authority gRPC header. Currently a Go SDK extension with no equivalent in other clients.

Temporal CLI settings

The Temporal CLI reads the variables below in addition to the client settings above. No other client reads them.

temporal env preset variables

The CLI supports a second configuration mechanism alongside TOML configuration files. temporal env stores named key-value presets in temporal.yaml, and the variables below select which preset the CLI reads. No SDK reads them.

Both mechanisms work. The temporal config command that manages TOML configuration files is currently experimental, while temporal env is not.

VariableTOML keyCLI flagSupported byDescription
TEMPORAL_ENVNA--envTemporal CLIName of the active temporal env preset. Defaults to default.
TEMPORAL_ENV_FILENA--env-fileTemporal CLIPath to the preset file. Defaults to temporal.yaml in the CLI configuration directory.

Legacy TLS variables

The CLI reads an older set of TLS variable names for compatibility. When any of them is set, it overrides the corresponding value from the configuration file and from the preferred variable. These names have no CLI flag of their own, and no SDK reads them.

VariableTOML keyCLI flagSupported byDescription
TEMPORAL_TLS_CERTNANATemporal CLISuperseded by TEMPORAL_TLS_CLIENT_CERT_PATH.
TEMPORAL_TLS_CERT_DATANANATemporal CLISuperseded by TEMPORAL_TLS_CLIENT_CERT_DATA.
TEMPORAL_TLS_KEYNANATemporal CLISuperseded by TEMPORAL_TLS_CLIENT_KEY_PATH.
TEMPORAL_TLS_KEY_DATANANATemporal CLISuperseded by TEMPORAL_TLS_CLIENT_KEY_DATA.
TEMPORAL_TLS_CANANATemporal CLISuperseded by TEMPORAL_TLS_SERVER_CA_CERT_PATH.
TEMPORAL_TLS_CA_DATANANATemporal CLISuperseded by TEMPORAL_TLS_SERVER_CA_CERT_DATA.