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. Ory Talos converts dot-separated config paths to uppercase with underscores:

<SECTION>_<KEY>

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

Array values

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

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

# Or indexed
export SECRETS_HMAC_RETIRED_0="old-secret-1"
export 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
SECRETS_HMAC_CURRENTHMAC secret (also derives the pagination cursor key). Minimum 32 characters.
CREDENTIALS_ISSUERToken issuer (iss claim) for derived tokens.

cache Commercial

Cache configuration.

KeyTypeDefaultEnv VarDescription
cache.memory.max_sizeinteger104857600CACHE_MEMORY_MAX_SIZEMaximum memory usage in bytes. (restart required, Commercial)
cache.memory.num_countersinteger10000CACHE_MEMORY_NUM_COUNTERSNumber of counters for frequency estimation. (restart required, Commercial)
cache.redis.addrsstring[]["localhost:6379"]CACHE_REDIS_ADDRSRedis server addresses (supports cluster/sentinel). (restart required, Commercial)
cache.redis.conn_max_idle_timestring5mCACHE_REDIS_CONN_MAX_IDLE_TIMEMaximum duration a connection may be idle before being closed. (restart required, Commercial)
cache.redis.conn_max_lifetimestring30mCACHE_REDIS_CONN_MAX_LIFETIMEMaximum duration a connection may be reused. (restart required, Commercial)
cache.redis.dbinteger0CACHE_REDIS_DBRedis database number. (restart required, Commercial)
cache.redis.min_idle_connsinteger2CACHE_REDIS_MIN_IDLE_CONNSMinimum number of idle connections kept open. (restart required, Commercial)
cache.redis.passwordstringCACHE_REDIS_PASSWORDRedis password. (restart required, Commercial)
cache.redis.pool_sizeinteger100CACHE_REDIS_POOL_SIZEConnection pool size. (restart required, Commercial)
cache.redis.timeoutstring3sCACHE_REDIS_TIMEOUTRedis operation timeout (duration string). (restart required, Commercial)
cache.redis.tls.enabledbooleanfalseCACHE_REDIS_TLS_ENABLEDEnable TLS using the system certificate pool. (restart required, Commercial)
cache.ttlstring5mCACHE_TTLDefault cache TTL (duration string). (Commercial)
cache.typememory, redis, noopnoopCACHE_TYPECache implementation type. (restart required, Commercial)

credentials

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

KeyTypeDefaultEnv VarDescription
credentials.api_keys.default_ttlstringCREDENTIALS_API_KEYS_DEFAULT_TTLDefault API key TTL (duration string).
credentials.api_keys.max_ttlstring8760hCREDENTIALS_API_KEYS_MAX_TTLMaximum age for API keys with timestamps.
credentials.api_keys.prefix.currentstringory_akCREDENTIALS_API_KEYS_PREFIX_CURRENTCurrent prefix used for new API key generation.
credentials.api_keys.prefix.public_currentstringCREDENTIALS_API_KEYS_PREFIX_PUBLIC_CURRENTCurrent prefix used for new PUBLIC API key generation.
credentials.api_keys.prefix.public_retiredstring[][]CREDENTIALS_API_KEYS_PREFIX_PUBLIC_RETIREDRetired public prefixes accepted during verification for migration purposes.
credentials.api_keys.prefix.retiredstring[][]CREDENTIALS_API_KEYS_PREFIX_RETIREDRetired prefixes accepted during verification for migration purposes.
credentials.clock_skewstring5mCREDENTIALS_CLOCK_SKEWMaximum clock skew tolerance for timestamp and token validation.
credentials.derived_tokens.default_ttlstring1hCREDENTIALS_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_idstring""CREDENTIALS_DERIVED_TOKENS_JWT_SIGNING_KEY_IDOptional JWK 'kid' hint used to select the active signing key.
credentials.derived_tokens.jwt.signing_keys.urlsstring[][]CREDENTIALS_DERIVED_TOKENS_JWT_SIGNING_KEYS_URLSList of JWKS resources.
credentials.derived_tokens.macaroon.prefix.currentstringmcCREDENTIALS_DERIVED_TOKENS_MACAROON_PREFIX_CURRENTCurrent prefix used for new macaroon token generation.
credentials.derived_tokens.macaroon.prefix.retiredstring[][]CREDENTIALS_DERIVED_TOKENS_MACAROON_PREFIX_RETIREDRetired prefixes accepted during macaroon verification for rotation purposes.
credentials.issuerstringCREDENTIALS_ISSUERToken issuer (iss claim) for derived tokens. (min 1 chars)
credentials.issuer_retiredstring[][]CREDENTIALS_ISSUER_RETIREDRetired issuer URLs accepted during token verification.

db (restart required)

Database configuration.

KeyTypeDefaultEnv VarDescription
db.dsnstringDB_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_intervalstring30sLAST_USED_FLUSH_INTERVALMaximum time between batch flushes (Go duration string, e.g. '30s', '1m'). (restart required)
last_used.flush_sizeinteger100LAST_USED_FLUSH_SIZENumber of updates per shard that triggers a batch flush. (restart required)
last_used.num_workersinteger4LAST_USED_NUM_WORKERSNumber of goroutines processing last-used batches. (restart required)
last_used.queue_sizeinteger10000LAST_USED_QUEUE_SIZEBuffer size for the async last-used update queue. (restart required)

log (restart required)

Logging configuration.

KeyTypeDefaultEnv VarDescription
log.formatjson, textjsonLOG_FORMATLog format. (restart required)
log.leveldebug, info, warn, errorinfoLOG_LEVELLog level. (restart required)

multitenancy Commercial (restart required)

Multi-tenancy configuration.

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

quota

Resource caps for the current subscription tier.

KeyTypeDefaultEnv VarDescription
quota.api_keys_maxintegerQUOTA_API_KEYS_MAXMaximum number of non-revoked API keys (issued + imported) the tenant may hold.

rate_limit Commercial

Rate limit enforcement for API keys with a RateLimitPolicy.

KeyTypeDefaultEnv VarDescription
rate_limit.backendmemory, redismemoryRATE_LIMIT_BACKENDCounter backend. (restart required, Commercial)
rate_limit.enabledbooleanfalseRATE_LIMIT_ENABLEDEnable rate limit enforcement. (Commercial)

secrets

Centralized secrets management.

KeyTypeDefaultEnv VarDescription
secrets.hmac.currentstringSECRETS_HMAC_CURRENTCurrent HMAC secret for new key generation and checksum verification. (min 32 chars)
secrets.hmac.retiredstring[][]SECRETS_HMAC_RETIREDRetired HMAC secrets that remain valid for verification during 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_UNSPECIFIEDSERVE_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_credentialsbooleanfalseSERVE_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"]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"]SERVE_HTTP_CORS_ALLOWED_METHODSA list of methods the client is allowed to use with cross-domain requests.
serve.http.cors.allowed_originsstring[]["*"]SERVE_HTTP_CORS_ALLOWED_ORIGINSA list of origins a cross-domain request can be executed from.
serve.http.cors.debugbooleanfalseSERVE_HTTP_CORS_DEBUGSet to true to debug server side CORS issues.
serve.http.cors.enabledbooleanfalseSERVE_HTTP_CORS_ENABLEDIf set to true, CORS will be enabled and preflight-requests (OPTION) will be answered.
serve.http.cors.exposed_headersstring[]["Content-Type"]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_agenumber0SERVE_HTTP_CORS_MAX_AGEIndicates how long (in seconds) the results of a preflight request can be cached.
serve.http.hoststring0.0.0.0SERVE_HTTP_HOSTThe host (interface) that the endpoint listens on. (restart required)
serve.http.portinteger4420SERVE_HTTP_PORTThe port that the endpoint listens on. (restart required)
serve.http.request_log.exclude_health_endpointsbooleanfalseSERVE_HTTP_REQUEST_LOG_EXCLUDE_HEALTH_ENDPOINTSExclude /health/alive and /health/ready endpoints from request logs
serve.http.trust_forwarded_hostbooleanfalseSERVE_HTTP_TRUST_FORWARDED_HOSTTrust the X-Forwarded-Host header for tenant routing. (restart required)
serve.metrics.hoststring0.0.0.0SERVE_METRICS_HOSTThe host (interface) that the metrics endpoint listens on. (restart required, Commercial)
serve.metrics.portinteger4422SERVE_METRICS_PORTThe port that the metrics endpoint listens on. (restart required, Commercial)

tracing Commercial (restart required)

OpenTelemetry tracing configuration.

KeyTypeDefaultEnv VarDescription
tracing.enabledbooleanfalseTRACING_ENABLEDEnable tracing. (restart required, Commercial)
tracing.endpointstringTRACING_ENDPOINTTrace collector endpoint. (restart required, Commercial)
tracing.environmentstringdevelopmentTRACING_ENVIRONMENTDeployment environment tag in trace attributes. (restart required, Commercial)
tracing.exporterotlpTRACING_EXPORTERTrace exporter type. (restart required, Commercial)
tracing.sample_ratenumber0.001TRACING_SAMPLE_RATESampling rate (0.0 to 1.0). (restart required, Commercial)
tracing.service_namestringtalosTRACING_SERVICE_NAMEService name reported to OpenTelemetry. (restart required, Commercial)
tracing.service_versionstring0.0.0TRACING_SERVICE_VERSIONService version reported to OpenTelemetry. (restart required, Commercial)