Availability
This page details the environment variables that can be used to configure Tyk AI Studio.
Configuration
Tyk AI Studio is configured primarily using environment variables.Configuration Precedence
The application loads configuration in the following order of precedence (highest to lowest):- Shell Environment Variables: Variables set in the OS/Shell (e.g.,
export SERVER_PORT=9090) always override everything else. .envFile: Variables loaded from the file specified by the-envflag.- Note: The application checks if a variable is already set in the environment before loading it from the file, ensuring shell variables are preserved.
Command Line Flags
You can specify a.env file using the -env flag when starting the binary:
Supported Formats
Only the.env format (key=value pairs) is supported via the -env flag.
Environment Variable Type Mapping
When configuring Tyk components using environment variables, it’s important to understand how different data types are represented. The type of each variable is based on its definition in the Go source code. This section provides a guide on how to format values for common data types.For complex types like
map[string]interface{}, the value should be a valid JSON string. For []string and map[string]string, ensure there are no spaces around the commas unless they are part of the value itself.Variables
SERVER_PORT
ENV: SERVER_PORTType:
stringDefault:
8080The port for the AI Studio server to listen on.
ALLOW_REGISTRATIONS
ENV: ALLOW_REGISTRATIONSType:
booleanDefault:
trueAllow new users to register.
SITE_URL
ENV: SITE_URLType:
stringThe public URL of the AI Studio.
FROM_EMAIL
ENV: FROM_EMAILType:
stringThe email address to send emails from.
DEVMODE
ENV: DEVMODEType:
booleanDefault:
falseEnable development mode.
DEBUG_HTTP
ENV: DEBUG_HTTPType:
booleanDefault:
falseEnable HTTP debugging.
DEBUG_HTTP_PROXY
ENV: DEBUG_HTTP_PROXYType:
booleanDefault:
falseEnable HTTP proxy debugging.
DATABASE_URL
ENV: DATABASE_URLType:
stringDefault:
midsommar.dbThe database connection string.
DATABASE_TYPE
ENV: DATABASE_TYPEType:
stringDefault:
sqliteThe type of database to use (e.g.,
sqlite, postgres).
ECHO_CONVERSATION
ENV: ECHO_CONVERSATIONType:
booleanDefault:
falseEcho conversation messages for debugging.
TYK_AI_SECRET_KEY
ENV: TYK_AI_SECRET_KEYType:
stringA secret key used for encrypting secrets and SSO.
DOCS_URL
ENV: DOCS_URLType:
stringThe URL for the documentation.
PROXY_URL
ENV: PROXY_URLType:
stringThe URL for the proxy.
TOOL_DISPLAY_URL
ENV: TOOL_DISPLAY_URLType:
stringThe display URL for tools in the UI.
DATASOURCE_DISPLAY_URL
ENV: DATASOURCE_DISPLAY_URLType:
stringThe display URL for datasources in the UI.
FILTER_SIGNUP_DOMAINS
ENV: FILTER_SIGNUP_DOMAINSType:
stringA comma-separated list of domains to allow for signup.
DEFAULT_SIGNUP_MODE
ENV: DEFAULT_SIGNUP_MODEType:
stringDefault:
bothThe default signup mode.
AI_STUDIO_OCI_CACHE_DIR
ENV: AI_STUDIO_OCI_CACHE_DIRType:
stringThe directory to cache OCI plugins.
AI_STUDIO_OCI_MAX_CACHE_SIZE
ENV: AI_STUDIO_OCI_MAX_CACHE_SIZEType:
integerDefault:
1073741824The maximum size of the OCI cache in bytes.
AI_STUDIO_OCI_REQUIRE_SIGNATURE
ENV: AI_STUDIO_OCI_REQUIRE_SIGNATUREType:
booleanDefault:
falseRequire OCI plugins to be signed.
AI_STUDIO_OCI_ALLOWED_REGISTRIES
ENV: AI_STUDIO_OCI_ALLOWED_REGISTRIESType:
stringA comma-separated list of allowed OCI registries.
AI_STUDIO_OCI_TIMEOUT
ENV: AI_STUDIO_OCI_TIMEOUTType:
stringDefault:
30sThe timeout for OCI operations.
AI_STUDIO_OCI_RETRY_ATTEMPTS
ENV: AI_STUDIO_OCI_RETRY_ATTEMPTSType:
integerDefault:
3The number of retry attempts for OCI operations.
AI_STUDIO_OCI_GC_INTERVAL
ENV: AI_STUDIO_OCI_GC_INTERVALType:
stringDefault:
24hThe garbage collection interval for the OCI cache.
AI_STUDIO_OCI_KEEP_VERSIONS
ENV: AI_STUDIO_OCI_KEEP_VERSIONSType:
integerDefault:
3The number of plugin versions to keep in the OCI cache.
AI_STUDIO_OCI_INSECURE_REGISTRIES
ENV: AI_STUDIO_OCI_INSECURE_REGISTRIESType:
stringA comma-separated list of insecure OCI registries.
OCI_PLUGINS_REGISTRY_*
ENV: OCI_PLUGINS_REGISTRY_*Type:
stringAuthentication for private OCI registries. See the
.env.example file for more details.
OCI_PLUGINS_PUBKEY_*
ENV: OCI_PLUGINS_PUBKEY_*Type:
stringPublic keys for verifying OCI plugin signatures. See the
.env.example file for more details.
ALLOW_INTERNAL_NETWORK_ACCESS
ENV: ALLOW_INTERNAL_NETWORK_ACCESSType:
booleanDefault:
falseAllow plugins to access internal network addresses.
LOG_LEVEL
ENV: LOG_LEVELType:
stringDefault:
infoThe log level (e.g.,
trace, debug, info, warn, error).
SESSION_DURATION
ENV: SESSION_DURATIONType:
stringDefault:
6hThe duration of user sessions.
TYK_AI_LICENSE
ENV: TYK_AI_LICENSEType:
stringThe license key for Enterprise Edition.
LICENSE_TELEMETRY_URL
ENV: LICENSE_TELEMETRY_URLType:
stringDefault:
https://telemetry.tyk.technology/api/trackThe URL for license telemetry.
LICENSE_TELEMETRY_PERIOD
ENV: LICENSE_TELEMETRY_PERIODType:
stringDefault:
1hThe period for sending license telemetry.
LICENSE_VALIDITY_CHECK_PERIOD
ENV: LICENSE_VALIDITY_CHECK_PERIODType:
stringDefault:
24hThe period for checking license validity.
LICENSE_DISABLE_TELEMETRY
ENV: LICENSE_DISABLE_TELEMETRYType:
booleanDefault:
falseDisable license telemetry.
LICENSE_TELEMETRY_CONCURRENCY
ENV: LICENSE_TELEMETRY_CONCURRENCYType:
integerDefault:
20The maximum number of concurrent telemetry requests.
GATEWAY_MODE
ENV: GATEWAY_MODEType:
stringDefault:
standaloneThe gateway mode (
standalone or control).
GRPC_PORT
ENV: GRPC_PORTType:
integerDefault:
50051The gRPC server port.
GRPC_HOST
ENV: GRPC_HOSTType:
stringDefault:
0.0.0.0The gRPC server host.
GRPC_TLS_INSECURE
ENV: GRPC_TLS_INSECUREType:
booleanDefault:
falseSet to
true to disable TLS for the gRPC server.
GRPC_TLS_CERT_PATH
ENV: GRPC_TLS_CERT_PATHType:
stringThe path to the TLS certificate for the gRPC server.
GRPC_TLS_KEY_PATH
ENV: GRPC_TLS_KEY_PATHType:
stringThe path to the TLS key for the gRPC server.
GRPC_AUTH_TOKEN
ENV: GRPC_AUTH_TOKENType:
stringThe authentication token for edge gateways to connect to the control plane.
GRPC_AUTH_TOKEN_NEXT
ENV: GRPC_AUTH_TOKEN_NEXTType:
stringThe next authentication token for zero-downtime rotation.
UNIFIED_ROUTER_PATH
ENV: UNIFIED_ROUTER_PATHType:
stringDefault:
/v1The base path of the Main Ingress (
/v1/chat/completions, /v1/completions, and /v1/models) on AI Studio. Set the Edge Gateway variable GATEWAY_UNIFIED_ROUTER_PATH to the same value. Available from v2.2.0.
UNIFIED_ROUTER_DISABLED
ENV: UNIFIED_ROUTER_DISABLEDType:
booleanDefault:
falseTurns off the Main Ingress on AI Studio. The per-LLM endpoints are not affected. Available from v2.2.0.
METRICS_AUTH_TOKEN
ENV: METRICS_AUTH_TOKENType:
stringThe bearer token that a scraper must send to read
/metrics. If you do not set this variable or METRICS_ALLOW_UNAUTHENTICATED, AI Studio does not serve /metrics. Available from v2.2.0.
METRICS_ALLOW_UNAUTHENTICATED
ENV: METRICS_ALLOW_UNAUTHENTICATEDType:
booleanDefault:
falseServes
/metrics without a token, for example for scrapes inside a cluster. Use it only where a firewall or network policy limits access to the endpoint. Available from v2.2.0.
METRICS_LEGACY_NAMES
ENV: METRICS_LEGACY_NAMESType:
booleanDefault:
trueKeeps the
aistudio_* metric names together with the OpenTelemetry GenAI gen_ai.* names. Set to false to export only the new names. Available from v2.2.0.
ENABLE_TRACING
ENV: ENABLE_TRACINGType:
booleanDefault:
falseExports OpenTelemetry trace spans. Trace propagation (
traceparent) works whatever this value is. Available from v2.2.0.
TRACING_ENDPOINT
ENV: TRACING_ENDPOINTType:
stringThe OTLP endpoint for trace spans, for example
otel-collector.observability:4317. A bare host:port uses no TLS. Use an https:// URL for TLS. Available from v2.2.0.
GATEWAY_SERVER_TIMING
ENV: GATEWAY_SERVER_TIMINGType:
booleanDefault:
falseAdds a
Server-Timing header to LLM responses from the embedded gateway. The header splits the latency into gateway time and upstream time. Available from v2.2.0.
CORS_ALLOWED_ORIGINS
ENV: CORS_ALLOWED_ORIGINSType:
stringDefault:
*A comma-separated list of origins for CORS on the OAuth, metadata, and plugin UI endpoints. In production, replace
* with the list of origins that you trust. Available from v2.2.0.
CSRF_TRUSTED_ORIGINS
ENV: CSRF_TRUSTED_ORIGINSType:
stringAdditional origins that CSRF protection trusts. Applies only when
DEVMODE is true, for local tests over plain HTTP. Available from v2.2.0.
LLM_UPSTREAM_ALLOWED_HOSTS
ENV: LLM_UPSTREAM_ALLOWED_HOSTSType:
stringA comma-separated allow list of LLM upstream hostnames. An entry that starts with
. matches the domain and all its subdomains, for example .anthropic.com. When not set, all hosts are allowed. In production, set this list to the LLM hosts that you use. Available from v2.2.0.
LLM_UPSTREAM_BLOCK_INTERNAL
ENV: LLM_UPSTREAM_BLOCK_INTERNALType:
booleanDefault:
falseRefuses connections to LLM upstreams that resolve to internal or reserved IP ranges. AI Studio checks the address when it connects. We recommend
true in production. If an LLM runs on an internal host, add that host to LLM_UPSTREAM_ALLOWED_INTERNAL_HOSTS. Available from v2.2.0.
LLM_UPSTREAM_ALLOWED_INTERNAL_HOSTS
ENV: LLM_UPSTREAM_ALLOWED_INTERNAL_HOSTSType:
stringA comma-separated list of internal hostnames that are allowed when
LLM_UPSTREAM_BLOCK_INTERNAL is true, for example a model server in the cluster. Available from v2.2.0.
AI_STUDIO_PLUGIN_ALLOWED_DIRS
ENV: AI_STUDIO_PLUGIN_ALLOWED_DIRSType:
stringA comma-separated list of directories that plugin binaries can run from. When not set, AI Studio uses a built-in list. Available from v2.2.0.
AI_STUDIO_OCI_MAX_PLUGIN_SIZE
ENV: AI_STUDIO_OCI_MAX_PLUGIN_SIZEType:
stringDefault:
512MBThe maximum size of one plugin layer that AI Studio downloads from an OCI registry. Available from v2.2.0.
ALLOW_SSO_USER_API_KEYS
ENV: ALLOW_SSO_USER_API_KEYSType:
booleanDefault:
falseLets users with the
users:write permission issue personal API keys to users that come from SSO. Available from v2.2.0.
SSO_API_KEY_LIVENESS
ENV: SSO_API_KEY_LIVENESSType:
durationDefault:
720hThe API key of an SSO user works only for this period after the user’s last SSO login. Set to
0 to turn off the check. Available from v2.2.0.
CHAT_UI_V2_ENABLED
ENV: CHAT_UI_V2_ENABLEDType:
booleanDefault:
trueSelects the chat interface that was added in v2.2.0. Set to
false to use the previous chat interface. Available from v2.2.0.
CHAT_SESSION_IDLE_TTL
ENV: CHAT_SESSION_IDLE_TTLType:
durationDefault:
10mHow long an idle chat or agent session stays in memory between turns. Keep it short when you use NATS queues, because each session holds a connection. Available from v2.2.0.
FILTER_SCRIPT_TIMEOUT
ENV: FILTER_SCRIPT_TIMEOUTType:
durationDefault:
5sThe maximum time for one filter script run. When a script times out, request filters block the request and response filters let it continue.
0 turns off the limit. A number without a unit is in seconds. Enterprise Edition only. Available from v2.2.0.
FILTER_SCRIPT_MAX_ALLOCS
ENV: FILTER_SCRIPT_MAX_ALLOCSType:
integerDefault:
10000000The maximum number of objects that one filter script run can allocate.
0 turns off the limit. Enterprise Edition only. Available from v2.2.0.
FILTER_SCRIPT_ALLOW_OS
ENV: FILTER_SCRIPT_ALLOW_OSType:
booleanDefault:
falseGives filter scripts access to the Tengo
os module (environment variables, file system, and processes). Set to true only for old scripts that need it, because the process environment holds the secrets key. Enterprise Edition only. Available from v2.2.0.
FILTER_HTTP_TIMEOUT
ENV: FILTER_HTTP_TIMEOUTType:
durationDefault:
10sThe maximum time for one
tyk.makeHTTPRequest call from a filter script. Enterprise Edition only. Available from v2.2.0.
FILTER_HTTP_MAX_RESPONSE_BYTES
ENV: FILTER_HTTP_MAX_RESPONSE_BYTESType:
integerDefault:
1048576The largest response body that
tyk.makeHTTPRequest returns. A larger body is an error. Enterprise Edition only. Available from v2.2.0.
FILTER_LLM_TIMEOUT
ENV: FILTER_LLM_TIMEOUTType:
durationDefault:
30sThe maximum time for one
tyk.llm call from a filter script. Enterprise Edition only. Available from v2.2.0.
SKIP_FILTER_DEFAULTS
ENV: SKIP_FILTER_DEFAULTSType:
booleanDefault:
falseDoes not create the four default guardrails on a new database. Enterprise Edition only. Available from v2.2.0.
AUDIT_ENABLED
ENV: AUDIT_ENABLEDType:
booleanDefault:
trueRecords management API actions in the audit trail. Enterprise Edition only. Available from v2.2.0.
AUDIT_STORE_TYPE
ENV: AUDIT_STORE_TYPEType:
stringDefault:
dbWhere AI Studio writes audit records:
db, file, or both. Enterprise Edition only. Available from v2.2.0.
AUDIT_FILE_PATH
ENV: AUDIT_FILE_PATHType:
stringDefault:
./data/audit/audit.logThe audit file when
AUDIT_STORE_TYPE is file or both. Enterprise Edition only. Available from v2.2.0.
AUDIT_FILE_FORMAT
ENV: AUDIT_FILE_FORMATType:
stringDefault:
jsonThe format of the audit file. Enterprise Edition only. Available from v2.2.0.
AUDIT_DETAILED_RECORDING
ENV: AUDIT_DETAILED_RECORDINGType:
booleanDefault:
falseAlso stores the request and response bodies of each audited action. The bodies can contain personal or confidential data. AI Studio redacts known secrets. Use
AUDIT_REDACT_KEYS and AUDIT_REDACT_HEADERS to redact more fields. Enterprise Edition only. Available from v2.2.0.
AUDIT_RECORD_READS
ENV: AUDIT_RECORD_READSType:
booleanDefault:
falseAlso records
GET requests. Enterprise Edition only. Available from v2.2.0.
AUDIT_RETENTION_DAYS
ENV: AUDIT_RETENTION_DAYSType:
integerDefault:
90The number of days that AI Studio keeps audit records.
0 keeps them forever. Enterprise Edition only. Available from v2.2.0.
AUDIT_MAX_BODY_BYTES
ENV: AUDIT_MAX_BODY_BYTESType:
integerDefault:
65536The maximum size of each stored request or response body. Enterprise Edition only. Available from v2.2.0.
AUDIT_QUEUE_SIZE
ENV: AUDIT_QUEUE_SIZEType:
integerDefault:
4096The size of the in-memory queue before the audit writer. Enterprise Edition only. Available from v2.2.0.
AUDIT_REDACT_KEYS
ENV: AUDIT_REDACT_KEYSType:
stringA comma-separated list of extra keys to redact from audit records, in addition to the built-in list. Enterprise Edition only. Available from v2.2.0.
AUDIT_REDACT_HEADERS
ENV: AUDIT_REDACT_HEADERSType:
stringA comma-separated list of extra headers to redact from audit records, in addition to the built-in list. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_ENABLED
ENV: WEBHOOKS_ENABLEDType:
booleanDefault:
trueTurns on outbound webhooks. Webhooks need
TYK_AI_SECRET_KEY. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_WORKER_ENABLED
ENV: WEBHOOKS_WORKER_ENABLEDType:
booleanDefault:
trueSet to
false to manage webhook targets on this node without sending deliveries. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_WORKER_COUNT
ENV: WEBHOOKS_WORKER_COUNTType:
integerDefault:
4The number of delivery workers on each node. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_MAX_ATTEMPTS
ENV: WEBHOOKS_MAX_ATTEMPTSType:
integerDefault:
10The number of attempts before a delivery goes to the dead-letter queue. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_BASE_BACKOFF
ENV: WEBHOOKS_BASE_BACKOFFType:
durationDefault:
5sThe first retry delay. Later delays increase exponentially, with jitter, and respect
Retry-After. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_MAX_BACKOFF
ENV: WEBHOOKS_MAX_BACKOFFType:
durationDefault:
1hThe maximum retry delay. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_REQUEST_TIMEOUT
ENV: WEBHOOKS_REQUEST_TIMEOUTType:
durationDefault:
10sThe HTTP timeout for each delivery attempt. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_ALLOW_INTERNAL_TARGETS
ENV: WEBHOOKS_ALLOW_INTERNAL_TARGETSType:
booleanDefault:
falseAllows webhook targets on loopback and private IP ranges, for example local receivers. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_ALLOWED_HOSTS
ENV: WEBHOOKS_ALLOWED_HOSTSType:
stringA comma-separated allow list of webhook target hosts. An entry that starts with
. matches the domain and all its subdomains. When not set, any public host is allowed. Internal targets (loopback, private ranges, link-local, and cloud metadata addresses) are always refused, unless WEBHOOKS_ALLOW_INTERNAL_TARGETS is true. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_DENIED_HOSTS
ENV: WEBHOOKS_DENIED_HOSTSType:
stringA comma-separated list of webhook target hosts that AI Studio always refuses. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_RETENTION_DAYS
ENV: WEBHOOKS_RETENTION_DAYSType:
integerDefault:
14The number of days that AI Studio keeps succeeded and cancelled deliveries.
0 keeps them forever. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_DEAD_LETTER_RETENTION_DAYS
ENV: WEBHOOKS_DEAD_LETTER_RETENTION_DAYSType:
integerDefault:
30The number of days that AI Studio keeps dead-lettered deliveries. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_MAX_RESPONSE_SNIPPET_BYTES
ENV: WEBHOOKS_MAX_RESPONSE_SNIPPET_BYTESType:
integerDefault:
4096The size of the response body that the delivery log keeps for each attempt. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_REQUIRE_DIFFERENT_APPROVER
ENV: WEBHOOKS_REQUIRE_DIFFERENT_APPROVERType:
booleanDefault:
falseWhen
true, the user who creates a webhook target cannot approve it. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_SECRET_ROTATION_GRACE
ENV: WEBHOOKS_SECRET_ROTATION_GRACEType:
durationDefault:
24hAfter you rotate a signing secret, AI Studio sends both signatures for this period. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_REDACT_KEYS
ENV: WEBHOOKS_REDACT_KEYSType:
stringA comma-separated list of extra key fragments to redact from webhook payloads. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_AUDIT_DELIVERIES
ENV: WEBHOOKS_AUDIT_DELIVERIESType:
booleanDefault:
falseAlso records successful deliveries in the audit trail. Dead-lettered deliveries are always recorded. Enterprise Edition only. Available from v2.2.0.
WEBHOOKS_SHUTDOWN_DRAIN_TIMEOUT
ENV: WEBHOOKS_SHUTDOWN_DRAIN_TIMEOUTType:
durationDefault:
15sThe time that in-flight deliveries get to finish when AI Studio stops. Enterprise Edition only. Available from v2.2.0.
TYK_MCP_ENABLED
ENV: TYK_MCP_ENABLEDType:
booleanDefault:
trueTurns on the Tyk Dashboard MCP integration. You can use it only to turn the integration off. Enterprise Edition only. Available from v2.2.0.
TYK_MCP_SYNC_MIN_INTERVAL
ENV: TYK_MCP_SYNC_MIN_INTERVALType:
durationDefault:
60sThe minimum sync interval for each Tyk Dashboard connection. Enterprise Edition only. Available from v2.2.0.
TYK_MCP_REQUEST_TIMEOUT
ENV: TYK_MCP_REQUEST_TIMEOUTType:
durationDefault:
10sThe timeout for reads from a Tyk Dashboard. Writes get three times this value. Enterprise Edition only. Available from v2.2.0.
TYK_MCP_RATE_LIMIT_PER_SECOND
ENV: TYK_MCP_RATE_LIMIT_PER_SECONDType:
integerDefault:
10The maximum number of outbound requests per second for each connection. Enterprise Edition only. Available from v2.2.0.
TYK_MCP_ALLOWED_HOSTS
ENV: TYK_MCP_ALLOWED_HOSTSType:
stringA comma-separated list of Tyk Dashboard and MDCB hosts that connections can use (exact names, or
.suffix). When not set, any public host is allowed. Enterprise Edition only. Available from v2.2.0.
TYK_MCP_DENIED_HOSTS
ENV: TYK_MCP_DENIED_HOSTSType:
stringA comma-separated list of hosts that connections can never use. Enterprise Edition only. Available from v2.2.0.
TYK_MCP_REQUIRE_DIFFERENT_ACTIVATOR
ENV: TYK_MCP_REQUIRE_DIFFERENT_ACTIVATORType:
booleanDefault:
falseWhen
true, the user who creates a connection cannot activate it. Enterprise Edition only. Available from v2.2.0.
TYK_MCP_SYNC_RUN_RETENTION
ENV: TYK_MCP_SYNC_RUN_RETENTIONType:
durationDefault:
720hHow long AI Studio keeps sync run records. Enterprise Edition only. Available from v2.2.0.
BASE_PATH
ENV: BASE_PATHType:
stringServes the API, OAuth, and the console under this path prefix.
SITE_URL keeps its path. Available from v2.2.1.
DATABASE_SCHEMA
ENV: DATABASE_SCHEMAType:
stringPostgreSQL only. Keeps all AI Studio tables in this schema. Use 41 characters or fewer. Available from v2.2.1.
MIGRATION_LOCK_TIMEOUT
ENV: MIGRATION_LOCK_TIMEOUTType:
durationDefault:
15mHow long an instance that starts waits for the database migrations of another instance. Available from v2.2.1.
CSRF_KEY
ENV: CSRF_KEYType:
stringThe secret for the CSRF key. When not set, AI Studio creates a random secret for each process. Set it so that CSRF tokens stay valid after a restart. Available from v2.2.1.
CSRF_COOKIE_NAME
ENV: CSRF_COOKIE_NAMEType:
stringDefault:
_gorilla_csrfThe name of the CSRF cookie. Available from v2.2.1.
GRPC_MAX_MESSAGE_SIZE
ENV: GRPC_MAX_MESSAGE_SIZEType:
stringDefault:
16MBThe send and receive limit for messages between AI Studio and Edge Gateways. Available on AI Studio from v2.2.1.
GRPC_MAX_CONNECTION_AGE
ENV: GRPC_MAX_CONNECTION_AGEType:
durationDefault:
0Closes Edge Gateway streams after this age, so that they rebalance behind a load balancer.
0 turns this off. Needs a non-zero GRPC_MAX_CONNECTION_AGE_GRACE. Each cycle disconnects an Edge Gateway for about 5 seconds, so use minutes or hours. Available from v2.2.1.
GRPC_MAX_CONNECTION_AGE_GRACE
ENV: GRPC_MAX_CONNECTION_AGE_GRACEType:
durationDefault:
0The time that open streams get to finish after
GRPC_MAX_CONNECTION_AGE. 0 means no limit: the server waits for open streams forever, and because an Edge Gateway stream stays open, it never closes. Set a non-zero value when you set GRPC_MAX_CONNECTION_AGE. Available from v2.2.1.
METRICS_ENABLED
ENV: METRICS_ENABLEDType:
booleanDefault:
trueEnables the Prometheus metrics endpoint. Set to
false or 0 to turn it off. From v2.2.0, AI Studio serves /metrics only when you also set METRICS_AUTH_TOKEN or METRICS_ALLOW_UNAUTHENTICATED.
METRICS_PATH
ENV: METRICS_PATHType:
stringDefault:
/metricsThe path of the metrics endpoint.