Skip to content

Environment Variables

All Thunder configuration can be set via environment variables prefixed with EDGE_RUNTIME_. Environment variables take the lowest precedence — CLI flags override them, and manifest-level settings override both where applicable.


VariableCLI flagDefaultDescription
EDGE_RUNTIME_ADMIN_HOST--admin-host127.0.0.1Bind address for the admin API listener.
EDGE_RUNTIME_ADMIN_PORT--admin-port9001Port for the admin API listener.
EDGE_RUNTIME_API_KEY--api-keyNoneShared secret for admin API authentication. Sent as Authorization: Bearer <key>.
EDGE_RUNTIME_ADMIN_TLS_CERT--admin-tls-certNonePath to TLS certificate file for the admin listener.
EDGE_RUNTIME_ADMIN_TLS_KEY--admin-tls-keyNonePath to TLS private key file for the admin listener.

VariableCLI flagDefaultDescription
EDGE_RUNTIME_HOST--host0.0.0.0Bind address for the ingress (user-facing) listener.
EDGE_RUNTIME_PORT--port9000Port for the ingress listener.
EDGE_RUNTIME_UNIX_SOCKET--unix-socketNonePath to a Unix domain socket. When set, the ingress listener binds to this socket instead of TCP.
EDGE_RUNTIME_TLS_CERT--tls-certNonePath to TLS certificate file for the ingress listener.
EDGE_RUNTIME_TLS_KEY--tls-keyNonePath to TLS private key file for the ingress listener.

VariableCLI flagDefaultDescription
EDGE_RUNTIME_MAX_HEAP_MIB--max-heap-mib128Maximum V8 heap size per isolate in MiB.
EDGE_RUNTIME_CPU_TIME_LIMIT_MS--cpu-time-limit-ms50000Maximum CPU time per isolate in milliseconds.
EDGE_RUNTIME_WALL_CLOCK_TIMEOUT_MS--wall-clock-timeout-ms60000Maximum wall-clock time per request in milliseconds.
EDGE_RUNTIME_VFS_TOTAL_QUOTA_BYTES--vfs-total-quota-bytes10485760Total writable bytes in /tmp per isolate.
EDGE_RUNTIME_VFS_MAX_FILE_BYTES--vfs-max-file-bytes5242880Maximum size of a single file in /tmp.

VariableCLI flagDefaultDescription
EDGE_RUNTIME_DISABLE_SSRF_PROTECTION--disable-ssrf-protectionfalseSet to true to allow outbound requests to private/internal IP ranges. Not recommended for production.
EDGE_RUNTIME_ALLOW_PRIVATE_NET--allow-private-netNoneComma-separated list of CIDR ranges to allow even when SSRF protection is enabled. Example: 10.0.0.0/8,172.16.0.0/12.
EDGE_RUNTIME_REQUIRE_BUNDLE_SIGNATURE--require-bundle-signaturefalseRequire that deployed bundles are signed.
EDGE_RUNTIME_BUNDLE_PUBLIC_KEY_PATH--bundle-public-key-pathNonePath to the public key file used to verify bundle signatures.

VariableCLI flagDefaultDescription
EDGE_RUNTIME_MAX_REQUEST_BODY_SIZE--max-request-body-size5242880Maximum request body size in bytes (5 MiB).
EDGE_RUNTIME_MAX_RESPONSE_BODY_SIZE--max-response-body-size10485760Maximum response body size in bytes (10 MiB).

VariableCLI flagDefaultDescription
EDGE_RUNTIME_MAX_CONNECTIONS--max-connections10000Maximum concurrent TCP connections on the ingress listener.
EDGE_RUNTIME_RATE_LIMIT--rate-limit0 (unlimited)Maximum requests per second. 0 disables rate limiting.

VariableCLI flagDefaultDescription
EDGE_RUNTIME_HTTP_OUTGOING_PROXY--http-outgoing-proxyNoneHTTP proxy URL for outbound HTTP requests. Example: http://proxy:3128.
EDGE_RUNTIME_HTTPS_OUTGOING_PROXY--https-outgoing-proxyNoneHTTP proxy URL for outbound HTTPS requests (CONNECT tunneling).
EDGE_RUNTIME_TCP_OUTGOING_PROXY--tcp-outgoing-proxyNoneSOCKS5 or HTTP CONNECT proxy for outbound TCP connections.
EDGE_RUNTIME_HTTP_NO_PROXY--http-no-proxyNoneComma-separated list of hosts/domains to bypass the HTTP proxy.
EDGE_RUNTIME_HTTPS_NO_PROXY--https-no-proxyNoneComma-separated list of hosts/domains to bypass the HTTPS proxy.
EDGE_RUNTIME_TCP_NO_PROXY--tcp-no-proxyNoneComma-separated list of hosts/domains to bypass the TCP proxy.

VariableCLI flagDefaultDescription
EDGE_RUNTIME_POOL_ENABLED--pool-enabledtrueEnable the isolate pool. When disabled, a fresh isolate is created per request.
EDGE_RUNTIME_POOL_GLOBAL_MAX_ISOLATES--pool-global-max-isolates256Maximum number of live isolates across all functions.
EDGE_RUNTIME_POOL_MIN_FREE_MEMORY_MIB--pool-min-free-memory-mibNoneMinimum free system memory in MiB. The pool evicts idle isolates to maintain this threshold.

VariableCLI flagDefaultDescription
EDGE_RUNTIME_CONTEXT_POOL_ENABLED--context-pool-enabledfalseEnable context pooling within isolates for request-level isolation.
EDGE_RUNTIME_MAX_CONTEXTS_PER_ISOLATE--max-contexts-per-isolate10Maximum V8 contexts per isolate when context pooling is enabled.
EDGE_RUNTIME_MAX_ACTIVE_REQUESTS_PER_CONTEXT--max-active-requests-per-context1Maximum concurrent requests per context.

VariableCLI flagDefaultDescription
EDGE_RUNTIME_OTEL_ENABLED--otel-enabledfalseEnable OpenTelemetry export.
EDGE_RUNTIME_OTEL_ENDPOINT--otel-endpointhttp://localhost:4317OTEL collector endpoint URL.
EDGE_RUNTIME_OTEL_SERVICE_NAME--otel-service-namethunderService name reported in OTEL telemetry.
EDGE_RUNTIME_OTEL_PROTOCOL--otel-protocolgrpcExport protocol: grpc or http.
EDGE_RUNTIME_OTEL_TRACES_ENABLED--otel-traces-enabledtrueEnable trace export (when OTEL is enabled).
EDGE_RUNTIME_OTEL_METRICS_ENABLED--otel-metrics-enabledtrueEnable metrics export (when OTEL is enabled).
EDGE_RUNTIME_OTEL_LOGS_ENABLED--otel-logs-enabledtrueEnable log export (when OTEL is enabled).
EDGE_RUNTIME_OTEL_TRACES_SAMPLE_RATE--otel-traces-sample-rate1.0Trace sampling rate between 0.0 and 1.0.

VariableCLI flagDefaultDescription
EDGE_RUNTIME_LOG_FORMAT--log-formatjsonLog output format: json or text.
EDGE_RUNTIME_PRINT_ISOLATE_LOGS--print-isolate-logsfalsePrint console.* output from isolates to the server log. Useful for development.
EDGE_RUNTIME_SOURCE_MAP--source-mapfalseEnable source map support for stack traces.
EDGE_RUNTIME_DNS_DOH_ENDPOINT--dns-doh-endpointhttps://cloudflare-dns.com/dns-queryDNS-over-HTTPS endpoint for node:dns resolution.
EDGE_RUNTIME_GRACEFUL_SHUTDOWN_TIMEOUT_MS--graceful-shutdown-timeout-ms30000Time to wait for in-flight requests to complete during shutdown.

Configuration values are resolved in this order (highest to lowest precedence):

  1. CLI flags--max-heap-mib 256
  2. Environment variablesEDGE_RUNTIME_MAX_HEAP_MIB=256
  3. Built-in defaults

Function-level overrides in the deployment manifest can further override server-level defaults for per-isolate settings (heap, CPU, timeout, VFS quotas).