Skip to main content

Configuration reference

This page is auto-generated from the configuration schema.

Required top-level keys: credentials, secrets

Environment variables

Every configuration key can be set via an environment variable. Talos uses the TALOS_ prefix and converts dot-separated config paths to uppercase with underscores:

TALOS_<SECTION>_<KEY>

Replace dots (.) with underscores (_) and convert to uppercase. For example, serve.http.port becomes TALOS_SERVE_HTTP_PORT.

Array values

For array-typed config keys (like secrets.hmac.retired), use comma separation or indexed variables:

# Comma-separated
export TALOS_SECRETS_HMAC_RETIRED="old-secret-1,old-secret-2"

# Or indexed
export TALOS_SECRETS_HMAC_RETIRED_0="old-secret-1"
export TALOS_SECRETS_HMAC_RETIRED_1="old-secret-2"

Precedence

Configuration sources are applied in this order (highest priority first):

  1. Environment variables
  2. Configuration file (--config flag)
  3. Default values

Environment variables always override file-based configuration.

Required variables

At minimum, these must be set (via env var or config file):

VariableDescription
TALOS_SECRETS_DEFAULT_CURRENTDefault secret for HMAC operations (min 32 chars)
TALOS_CREDENTIALS_ISSUERToken issuer (iss claim) for derived tokens

cache Commercial

Cache configuration.

KeyTypeDefaultEnv VarDescription
cache.memory.max_sizeinteger104857600TALOS_CACHE_MEMORY_MAX_SIZEMaximum memory usage in bytes. (restart required, Commercial)
cache.memory.num_countersinteger10000TALOS_CACHE_MEMORY_NUM_COUNTERSNumber of counters for frequency estimation. (restart required, Commercial)
cache.redis.addrsstring[]["localhost:6379"]TALOS_CACHE_REDIS_ADDRSRedis server addresses (supports cluster/sentinel). (restart required, Commercial)
cache.redis.conn_max_idle_timestring5mTALOS_CACHE_REDIS_CONN_MAX_IDLE_TIMEMaximum duration a connection may be idle before being closed. (restart required, Commercial)
cache.redis.conn_max_lifetimestring30mTALOS_CACHE_REDIS_CONN_MAX_LIFETIMEMaximum duration a connection may be reused. (restart required, Commercial)
cache.redis.dbinteger0TALOS_CACHE_REDIS_DBRedis database number. (restart required, Commercial)
cache.redis.min_idle_connsinteger2TALOS_CACHE_REDIS_MIN_IDLE_CONNSMinimum number of idle connections kept open. (restart required, Commercial)
cache.redis.passwordstringTALOS_CACHE_REDIS_PASSWORDRedis password. (restart required, Commercial)
cache.redis.pool_sizeinteger100TALOS_CACHE_REDIS_POOL_SIZEConnection pool size (Commercial)
cache.redis.timeoutstring3sTALOS_CACHE_REDIS_TIMEOUTRedis operation timeout (duration string) (Commercial)
cache.redis.tls.enabledbooleanfalseTALOS_CACHE_REDIS_TLS_ENABLEDEnable TLS using the system certificate pool. (restart required, Commercial)
cache.ttlstring5mTALOS_CACHE_TTLDefault cache TTL (duration string). (Commercial)
cache.typememory, redis, noopnoopTALOS_CACHE_TYPECache implementation type. (restart required, Commercial)

credentials

Credential configuration for API keys and derived tokens (JWT, macaroon).

KeyTypeDefaultEnv VarDescription
credentials.api_keys.default_ttlstringTALOS_CREDENTIALS_API_KEYS_DEFAULT_TTLDefault API key TTL (duration string).
credentials.api_keys.max_ttlstring8760hTALOS_CREDENTIALS_API_KEYS_MAX_TTLMaximum age for API keys with timestamps.
credentials.api_keys.prefix.currentstringory_akTALOS_CREDENTIALS_API_KEYS_PREFIX_CURRENTCurrent prefix used for new API key generation.
credentials.api_keys.prefix.public_currentstringTALOS_CREDENTIALS_API_KEYS_PREFIX_PUBLIC_CURRENTCurrent prefix used for new PUBLIC API key generation.
credentials.api_keys.prefix.public_retiredstring[][]TALOS_CREDENTIALS_API_KEYS_PREFIX_PUBLIC_RETIREDRetired public prefixes accepted during verification for migration purposes.
credentials.api_keys.prefix.retiredstring[][]TALOS_CREDENTIALS_API_KEYS_PREFIX_RETIREDRetired prefixes accepted during verification for migration purposes.
credentials.clock_skewstring5mTALOS_CREDENTIALS_CLOCK_SKEWMaximum clock skew tolerance for timestamp and token validation.
credentials.derived_tokens.default_ttlstring1hTALOS_CREDENTIALS_DERIVED_TOKENS_DEFAULT_TTLDefault derived token TTL applied to both JWT and macaroon tokens when no explicit TTL is provided in the request (duration string)
credentials.derived_tokens.jwt.signing_key_idstringTALOS_CREDENTIALS_DERIVED_TOKENS_JWT_SIGNING_KEY_IDOptional JWK 'kid' hint used to select the active signing key.
credentials.derived_tokens.jwt.signing_keys.urlsstring[][]TALOS_CREDENTIALS_DERIVED_TOKENS_JWT_SIGNING_KEYS_URLSList of JWKS resources.
credentials.derived_tokens.macaroon.prefix.currentstringmcTALOS_CREDENTIALS_DERIVED_TOKENS_MACAROON_PREFIX_CURRENTCurrent prefix used for new macaroon token generation.
credentials.derived_tokens.macaroon.prefix.retiredstring[][]TALOS_CREDENTIALS_DERIVED_TOKENS_MACAROON_PREFIX_RETIREDRetired prefixes accepted during macaroon verification for rotation purposes.
credentials.issuerstringTALOS_CREDENTIALS_ISSUERToken issuer (iss claim) for derived tokens. (min 1 chars)
credentials.issuer_retiredstring[][]TALOS_CREDENTIALS_ISSUER_RETIREDRetired issuer URLs accepted during token verification.

db (restart required)

Database configuration.

KeyTypeDefaultEnv VarDescription
db.dsnstringTALOS_DB_DSNDatabase connection string with scheme and optional query parameters. (restart required, min 1 chars)

last_used (restart required)

Configuration for batched last_used_at timestamp updates.

KeyTypeDefaultEnv VarDescription
last_used.flush_intervalstring30sTALOS_LAST_USED_FLUSH_INTERVALMaximum time between batch flushes (Go duration string, e.g. (restart required)
last_used.flush_sizeinteger100TALOS_LAST_USED_FLUSH_SIZENumber of updates per shard that triggers a batch flush. (restart required)
last_used.num_workersinteger4TALOS_LAST_USED_NUM_WORKERSNumber of goroutines processing last-used batches. (restart required)
last_used.queue_sizeinteger10000TALOS_LAST_USED_QUEUE_SIZEBuffer size for the async last-used update queue. (restart required)

log (restart required)

Logging configuration.

KeyTypeDefaultEnv VarDescription
log.formatjson, textjsonTALOS_LOG_FORMATLog format. (restart required)
log.leveldebug, info, warn, errorinfoTALOS_LOG_LEVELLog level. (restart required)

multitenancy Commercial (restart required)

Multi-tenancy configuration.

KeyTypeDefaultEnv VarDescription
multitenancy.enabledbooleanfalseTALOS_MULTITENANCY_ENABLEDEnable multi-tenancy support. (restart required, Commercial)
multitenancy.networksobject[][]TALOS_MULTITENANCY_NETWORKSNetwork routing configuration. (restart required, Commercial)

rate_limit Commercial

Rate limit enforcement for API keys with a RateLimitPolicy.

KeyTypeDefaultEnv VarDescription
rate_limit.backendmemory, redismemoryTALOS_RATE_LIMIT_BACKENDCounter backend. (restart required, Commercial)
rate_limit.enabledbooleanfalseTALOS_RATE_LIMIT_ENABLEDEnable rate limit enforcement. (Commercial)

secrets

Centralized secrets management.

KeyTypeDefaultEnv VarDescription
secrets.default.currentstringTALOS_SECRETS_DEFAULT_CURRENTCurrent default secret for all components without specific overrides (min 32 chars)
secrets.default.retiredstring[][]TALOS_SECRETS_DEFAULT_RETIREDRetired default secrets that remain valid for verification during rotation
secrets.hmac.currentstringTALOS_SECRETS_HMAC_CURRENTCurrent HMAC secret for new key generation and checksum verification (min 32 chars)
secrets.hmac.retiredstring[][]TALOS_SECRETS_HMAC_RETIREDRetired HMAC secrets that remain valid for verification during rotation
secrets.pagination.currentstringTALOS_SECRETS_PAGINATION_CURRENTSecret used to sign and encrypt pagination tokens. (min 32 chars)
secrets.pagination.retiredstring[][]TALOS_SECRETS_PAGINATION_RETIREDList of retired pagination secrets that should remain valid for decoding legacy page tokens during secret rotation.

serve

Server configuration for HTTP and metrics endpoints.

KeyTypeDefaultEnv VarDescription
serve.http.client_ip_sourceCLIENT_IP_SOURCE_UNSPECIFIED, CLIENT_IP_SOURCE_REMOTE_ADDR, CLIENT_IP_SOURCE_CF_CONNECTING_IP, CLIENT_IP_SOURCE_X_FORWARDED_FOR, CLIENT_IP_SOURCE_X_REAL_IP, CLIENT_IP_SOURCE_TRUE_CLIENT_IPCLIENT_IP_SOURCE_UNSPECIFIEDTALOS_SERVE_HTTP_CLIENT_IP_SOURCEDetermines which HTTP header or connection property is used to resolve the client IP for IP restriction checks. Must match your infrastructure topology. Default (unspecified) uses the TCP remote address. Hot-reloadable: read dynamically per request.
serve.http.cors.allow_credentialsbooleanfalseTALOS_SERVE_HTTP_CORS_ALLOW_CREDENTIALSIndicates whether the request can include user credentials like cookies, HTTP authentication or client side SSL certificates.
serve.http.cors.allowed_headersstring[]["Authorization","Content-Type"]TALOS_SERVE_HTTP_CORS_ALLOWED_HEADERSA list of non simple headers the client is allowed to use with cross-domain requests. (min 1 chars)
serve.http.cors.allowed_methodsstring[]["GET","POST","PUT","PATCH","DELETE"]TALOS_SERVE_HTTP_CORS_ALLOWED_METHODSA list of methods the client is allowed to use with cross-domain requests.
serve.http.cors.allowed_originsstring[]["*"]TALOS_SERVE_HTTP_CORS_ALLOWED_ORIGINSA list of origins a cross-domain request can be executed from.
serve.http.cors.debugbooleanfalseTALOS_SERVE_HTTP_CORS_DEBUGSet to true to debug server side CORS issues.
serve.http.cors.enabledbooleanfalseTALOS_SERVE_HTTP_CORS_ENABLEDIf set to true, CORS will be enabled and preflight-requests (OPTION) will be answered.
serve.http.cors.exposed_headersstring[]["Content-Type"]TALOS_SERVE_HTTP_CORS_EXPOSED_HEADERSIndicates which headers are safe to expose to the API of a CORS API specification (min 1 chars)
serve.http.cors.max_agenumber0TALOS_SERVE_HTTP_CORS_MAX_AGEIndicates how long (in seconds) the results of a preflight request can be cached.
serve.http.hoststring0.0.0.0TALOS_SERVE_HTTP_HOSTThe host (interface) that the endpoint listens on. (restart required)
serve.http.portinteger4420TALOS_SERVE_HTTP_PORTThe port that the endpoint listens on. (restart required)
serve.http.request_log.exclude_health_endpointsbooleanfalseTALOS_SERVE_HTTP_REQUEST_LOG_EXCLUDE_HEALTH_ENDPOINTSExclude /health/alive and /health/ready endpoints from request logs
serve.http.trust_forwarded_hostbooleanfalseTALOS_SERVE_HTTP_TRUST_FORWARDED_HOSTTrust the X-Forwarded-Host header for tenant routing. (restart required)
serve.metrics.hoststring0.0.0.0TALOS_SERVE_METRICS_HOSTThe host (interface) that the metrics endpoint listens on. (restart required, Commercial)
serve.metrics.portinteger4422TALOS_SERVE_METRICS_PORTThe port that the metrics endpoint listens on. (restart required, Commercial)

tracing Commercial (restart required)

OpenTelemetry tracing configuration.

KeyTypeDefaultEnv VarDescription
tracing.enabledbooleanfalseTALOS_TRACING_ENABLEDEnable tracing. (restart required, Commercial)
tracing.endpointstringTALOS_TRACING_ENDPOINTTrace collector endpoint. (restart required, Commercial)
tracing.environmentstringdevelopmentTALOS_TRACING_ENVIRONMENTDeployment environment tag in trace attributes. (restart required, Commercial)
tracing.exporterotlpTALOS_TRACING_EXPORTERTrace exporter type. (restart required, Commercial)
tracing.sample_ratenumber0.001TALOS_TRACING_SAMPLE_RATESampling rate (0.0 to 1.0). (restart required, Commercial)
tracing.service_namestringtalosTALOS_TRACING_SERVICE_NAMEService name reported to OpenTelemetry. (restart required, Commercial)
tracing.service_versionstring0.0.0TALOS_TRACING_SERVICE_VERSIONService version reported to OpenTelemetry. (restart required, Commercial)