Skip to main content

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):
  1. Shell Environment Variables: Variables set in the OS/Shell (e.g., export SERVER_PORT=9090) always override everything else.
  2. .env File: Variables loaded from the file specified by the -env flag.
    • 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_PORT
Type: string
Default: 8080
The port for the AI Studio server to listen on.

ALLOW_REGISTRATIONS

ENV: ALLOW_REGISTRATIONS
Type: boolean
Default: true
Allow new users to register.

SITE_URL

ENV: SITE_URL
Type: string
The public URL of the AI Studio.

FROM_EMAIL

ENV: FROM_EMAIL
Type: string
The email address to send emails from.

DEVMODE

ENV: DEVMODE
Type: boolean
Default: false
Enable development mode.

DEBUG_HTTP

ENV: DEBUG_HTTP
Type: boolean
Default: false
Enable HTTP debugging.

DEBUG_HTTP_PROXY

ENV: DEBUG_HTTP_PROXY
Type: boolean
Default: false
Enable HTTP proxy debugging.

DATABASE_URL

ENV: DATABASE_URL
Type: string
Default: midsommar.db
The database connection string.

DATABASE_TYPE

ENV: DATABASE_TYPE
Type: string
Default: sqlite
The type of database to use (e.g., sqlite, postgres).

ECHO_CONVERSATION

ENV: ECHO_CONVERSATION
Type: boolean
Default: false
Echo conversation messages for debugging.

TYK_AI_SECRET_KEY

ENV: TYK_AI_SECRET_KEY
Type: string
A secret key used for encrypting secrets and SSO.

DOCS_URL

ENV: DOCS_URL
Type: string
The URL for the documentation.

PROXY_URL

ENV: PROXY_URL
Type: string
The URL for the proxy.

TOOL_DISPLAY_URL

ENV: TOOL_DISPLAY_URL
Type: string
The display URL for tools in the UI.

DATASOURCE_DISPLAY_URL

ENV: DATASOURCE_DISPLAY_URL
Type: string
The display URL for datasources in the UI.

FILTER_SIGNUP_DOMAINS

ENV: FILTER_SIGNUP_DOMAINS
Type: string
A comma-separated list of domains to allow for signup.

DEFAULT_SIGNUP_MODE

ENV: DEFAULT_SIGNUP_MODE
Type: string
Default: both
The default signup mode.

AI_STUDIO_OCI_CACHE_DIR

ENV: AI_STUDIO_OCI_CACHE_DIR
Type: string
The directory to cache OCI plugins.

AI_STUDIO_OCI_MAX_CACHE_SIZE

ENV: AI_STUDIO_OCI_MAX_CACHE_SIZE
Type: integer
Default: 1073741824
The maximum size of the OCI cache in bytes.

AI_STUDIO_OCI_REQUIRE_SIGNATURE

ENV: AI_STUDIO_OCI_REQUIRE_SIGNATURE
Type: boolean
Default: false
Require OCI plugins to be signed.

AI_STUDIO_OCI_ALLOWED_REGISTRIES

ENV: AI_STUDIO_OCI_ALLOWED_REGISTRIES
Type: string
A comma-separated list of allowed OCI registries.

AI_STUDIO_OCI_TIMEOUT

ENV: AI_STUDIO_OCI_TIMEOUT
Type: string
Default: 30s
The timeout for OCI operations.

AI_STUDIO_OCI_RETRY_ATTEMPTS

ENV: AI_STUDIO_OCI_RETRY_ATTEMPTS
Type: integer
Default: 3
The number of retry attempts for OCI operations.

AI_STUDIO_OCI_GC_INTERVAL

ENV: AI_STUDIO_OCI_GC_INTERVAL
Type: string
Default: 24h
The garbage collection interval for the OCI cache.

AI_STUDIO_OCI_KEEP_VERSIONS

ENV: AI_STUDIO_OCI_KEEP_VERSIONS
Type: integer
Default: 3
The number of plugin versions to keep in the OCI cache.

AI_STUDIO_OCI_INSECURE_REGISTRIES

ENV: AI_STUDIO_OCI_INSECURE_REGISTRIES
Type: string
A comma-separated list of insecure OCI registries.

OCI_PLUGINS_REGISTRY_*

ENV: OCI_PLUGINS_REGISTRY_*
Type: string
Authentication for private OCI registries. See the .env.example file for more details.

OCI_PLUGINS_PUBKEY_*

ENV: OCI_PLUGINS_PUBKEY_*
Type: string
Public keys for verifying OCI plugin signatures. See the .env.example file for more details.

ALLOW_INTERNAL_NETWORK_ACCESS

ENV: ALLOW_INTERNAL_NETWORK_ACCESS
Type: boolean
Default: false
Allow plugins to access internal network addresses.

LOG_LEVEL

ENV: LOG_LEVEL
Type: string
Default: info
The log level (e.g., trace, debug, info, warn, error).

SESSION_DURATION

ENV: SESSION_DURATION
Type: string
Default: 6h
The duration of user sessions.

TYK_AI_LICENSE

ENV: TYK_AI_LICENSE
Type: string
The license key for Enterprise Edition.

LICENSE_TELEMETRY_URL

ENV: LICENSE_TELEMETRY_URL
Type: string
Default: https://telemetry.tyk.technology/api/track
The URL for license telemetry.

LICENSE_TELEMETRY_PERIOD

ENV: LICENSE_TELEMETRY_PERIOD
Type: string
Default: 1h
The period for sending license telemetry.

LICENSE_VALIDITY_CHECK_PERIOD

ENV: LICENSE_VALIDITY_CHECK_PERIOD
Type: string
Default: 24h
The period for checking license validity.

LICENSE_DISABLE_TELEMETRY

ENV: LICENSE_DISABLE_TELEMETRY
Type: boolean
Default: false
Disable license telemetry.

LICENSE_TELEMETRY_CONCURRENCY

ENV: LICENSE_TELEMETRY_CONCURRENCY
Type: integer
Default: 20
The maximum number of concurrent telemetry requests.

GATEWAY_MODE

ENV: GATEWAY_MODE
Type: string
Default: standalone
The gateway mode (standalone or control).

GRPC_PORT

ENV: GRPC_PORT
Type: integer
Default: 50051
The gRPC server port.

GRPC_HOST

ENV: GRPC_HOST
Type: string
Default: 0.0.0.0
The gRPC server host.

GRPC_TLS_INSECURE

ENV: GRPC_TLS_INSECURE
Type: boolean
Default: false
Set to true to disable TLS for the gRPC server.

GRPC_TLS_CERT_PATH

ENV: GRPC_TLS_CERT_PATH
Type: string
The path to the TLS certificate for the gRPC server.

GRPC_TLS_KEY_PATH

ENV: GRPC_TLS_KEY_PATH
Type: string
The path to the TLS key for the gRPC server.

GRPC_AUTH_TOKEN

ENV: GRPC_AUTH_TOKEN
Type: string
The authentication token for edge gateways to connect to the control plane.

GRPC_AUTH_TOKEN_NEXT

ENV: GRPC_AUTH_TOKEN_NEXT
Type: string
The next authentication token for zero-downtime rotation.

UNIFIED_ROUTER_PATH

ENV: UNIFIED_ROUTER_PATH
Type: string
Default: /v1
The 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_DISABLED
Type: boolean
Default: false
Turns 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_TOKEN
Type: string
The 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_UNAUTHENTICATED
Type: boolean
Default: false
Serves /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_NAMES
Type: boolean
Default: true
Keeps 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_TRACING
Type: boolean
Default: false
Exports OpenTelemetry trace spans. Trace propagation (traceparent) works whatever this value is. Available from v2.2.0.

TRACING_ENDPOINT

ENV: TRACING_ENDPOINT
Type: string
The 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_TIMING
Type: boolean
Default: false
Adds 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_ORIGINS
Type: string
Default: *
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_ORIGINS
Type: string
Additional 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_HOSTS
Type: string
A 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_INTERNAL
Type: boolean
Default: false
Refuses 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_HOSTS
Type: string
A 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_DIRS
Type: string
A 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_SIZE
Type: string
Default: 512MB
The 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_KEYS
Type: boolean
Default: false
Lets 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_LIVENESS
Type: duration
Default: 720h
The 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_ENABLED
Type: boolean
Default: true
Selects 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_TTL
Type: duration
Default: 10m
How 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_TIMEOUT
Type: duration
Default: 5s
The 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_ALLOCS
Type: integer
Default: 10000000
The 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_OS
Type: boolean
Default: false
Gives 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_TIMEOUT
Type: duration
Default: 10s
The 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_BYTES
Type: integer
Default: 1048576
The 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_TIMEOUT
Type: duration
Default: 30s
The 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_DEFAULTS
Type: boolean
Default: false
Does not create the four default guardrails on a new database. Enterprise Edition only. Available from v2.2.0.

AUDIT_ENABLED

ENV: AUDIT_ENABLED
Type: boolean
Default: true
Records management API actions in the audit trail. Enterprise Edition only. Available from v2.2.0.

AUDIT_STORE_TYPE

ENV: AUDIT_STORE_TYPE
Type: string
Default: db
Where AI Studio writes audit records: db, file, or both. Enterprise Edition only. Available from v2.2.0.

AUDIT_FILE_PATH

ENV: AUDIT_FILE_PATH
Type: string
Default: ./data/audit/audit.log
The audit file when AUDIT_STORE_TYPE is file or both. Enterprise Edition only. Available from v2.2.0.

AUDIT_FILE_FORMAT

ENV: AUDIT_FILE_FORMAT
Type: string
Default: json
The format of the audit file. Enterprise Edition only. Available from v2.2.0.

AUDIT_DETAILED_RECORDING

ENV: AUDIT_DETAILED_RECORDING
Type: boolean
Default: false
Also 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_READS
Type: boolean
Default: false
Also records GET requests. Enterprise Edition only. Available from v2.2.0.

AUDIT_RETENTION_DAYS

ENV: AUDIT_RETENTION_DAYS
Type: integer
Default: 90
The 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_BYTES
Type: integer
Default: 65536
The maximum size of each stored request or response body. Enterprise Edition only. Available from v2.2.0.

AUDIT_QUEUE_SIZE

ENV: AUDIT_QUEUE_SIZE
Type: integer
Default: 4096
The size of the in-memory queue before the audit writer. Enterprise Edition only. Available from v2.2.0.

AUDIT_REDACT_KEYS

ENV: AUDIT_REDACT_KEYS
Type: string
A 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_HEADERS
Type: string
A 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_ENABLED
Type: boolean
Default: true
Turns on outbound webhooks. Webhooks need TYK_AI_SECRET_KEY. Enterprise Edition only. Available from v2.2.0.

WEBHOOKS_WORKER_ENABLED

ENV: WEBHOOKS_WORKER_ENABLED
Type: boolean
Default: true
Set 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_COUNT
Type: integer
Default: 4
The number of delivery workers on each node. Enterprise Edition only. Available from v2.2.0.

WEBHOOKS_MAX_ATTEMPTS

ENV: WEBHOOKS_MAX_ATTEMPTS
Type: integer
Default: 10
The 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_BACKOFF
Type: duration
Default: 5s
The 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_BACKOFF
Type: duration
Default: 1h
The maximum retry delay. Enterprise Edition only. Available from v2.2.0.

WEBHOOKS_REQUEST_TIMEOUT

ENV: WEBHOOKS_REQUEST_TIMEOUT
Type: duration
Default: 10s
The HTTP timeout for each delivery attempt. Enterprise Edition only. Available from v2.2.0.

WEBHOOKS_ALLOW_INTERNAL_TARGETS

ENV: WEBHOOKS_ALLOW_INTERNAL_TARGETS
Type: boolean
Default: false
Allows 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_HOSTS
Type: string
A 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_HOSTS
Type: string
A 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_DAYS
Type: integer
Default: 14
The 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_DAYS
Type: integer
Default: 30
The 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_BYTES
Type: integer
Default: 4096
The 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_APPROVER
Type: boolean
Default: false
When 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_GRACE
Type: duration
Default: 24h
After 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_KEYS
Type: string
A 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_DELIVERIES
Type: boolean
Default: false
Also 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_TIMEOUT
Type: duration
Default: 15s
The 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_ENABLED
Type: boolean
Default: true
Turns 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_INTERVAL
Type: duration
Default: 60s
The minimum sync interval for each Tyk Dashboard connection. Enterprise Edition only. Available from v2.2.0.

TYK_MCP_REQUEST_TIMEOUT

ENV: TYK_MCP_REQUEST_TIMEOUT
Type: duration
Default: 10s
The 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_SECOND
Type: integer
Default: 10
The 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_HOSTS
Type: string
A 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_HOSTS
Type: string
A 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_ACTIVATOR
Type: boolean
Default: false
When 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_RETENTION
Type: duration
Default: 720h
How long AI Studio keeps sync run records. Enterprise Edition only. Available from v2.2.0.

BASE_PATH

ENV: BASE_PATH
Type: string
Serves the API, OAuth, and the console under this path prefix. SITE_URL keeps its path. Available from v2.2.1.

DATABASE_SCHEMA

ENV: DATABASE_SCHEMA
Type: string
PostgreSQL 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_TIMEOUT
Type: duration
Default: 15m
How long an instance that starts waits for the database migrations of another instance. Available from v2.2.1.

CSRF_KEY

ENV: CSRF_KEY
Type: string
The 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. ENV: CSRF_COOKIE_NAME
Type: string
Default: _gorilla_csrf
The name of the CSRF cookie. Available from v2.2.1.

GRPC_MAX_MESSAGE_SIZE

ENV: GRPC_MAX_MESSAGE_SIZE
Type: string
Default: 16MB
The 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_AGE
Type: duration
Default: 0
Closes 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_GRACE
Type: duration
Default: 0
The 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_ENABLED
Type: boolean
Default: true
Enables 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_PATH
Type: string
Default: /metrics
The path of the metrics endpoint.