Environment Variables

All configuration values for both crates can be overridden at runtime via environment variables. No recompilation required.


stygian-browser

VariableDefaultDescription
STYGIAN_CHROME_PATHauto-detectAbsolute path to Chrome or Chromium binary
STYGIAN_HEADLESStruefalse for headed mode (displays browser window)
STYGIAN_HEADLESS_MODEnewnew (--headless=new) or legacy (classic --headless for Chromium < 112)
STYGIAN_STEALTH_LEVELadvancednone, basic, or advanced
STYGIAN_POOL_MIN2Minimum warm browser instances
STYGIAN_POOL_MAX10Maximum concurrent browser instances
STYGIAN_POOL_IDLE_SECS300Idle timeout before a browser is evicted
STYGIAN_POOL_ACQUIRE_SECS5Seconds to wait for a pool slot before error
STYGIAN_LAUNCH_TIMEOUT_SECS10Browser launch timeout
STYGIAN_CDP_TIMEOUT_SECS30Per-operation CDP command timeout
STYGIAN_CDP_FIX_MODEaddBindingaddBinding, isolatedworld, or enabledisable
STYGIAN_PROXYProxy URL (http://, https://, or socks5://)
STYGIAN_PROXY_BYPASSComma-separated proxy bypass list (e.g. <local>,localhost)
STYGIAN_DISABLE_SANDBOXauto-detecttrue inside containers, false on bare metal

Chrome binary auto-detection order

When STYGIAN_CHROME_PATH is not set, the library searches:

  1. google-chrome on $PATH
  2. chromium on $PATH
  3. /usr/bin/google-chrome
  4. /usr/bin/chromium-browser
  5. /Applications/Google Chrome.app/Contents/MacOS/Google Chrome (macOS)
  6. C:\Program Files\Google\Chrome\Application\chrome.exe (Windows)

stygian-proxy

stygian-proxy is configured by constructing ProxyConfig directly in code. There are no environment variable overrides; pass the struct to ProxyManager::with_round_robin or ProxyManager::with_strategy.

FieldDefaultDescription
health_check_urlhttps://httpbin.org/ipURL probed to verify proxy liveness
health_check_interval60 sHow often the background task runs
health_check_timeout5 sPer-probe HTTP timeout
circuit_open_threshold5Consecutive failures before circuit opens
circuit_half_open_after30 sCooldown before attempting recovery

stygian-graph

VariableDefaultDescription
STYGIAN_LOGinfoAlias for RUST_LOG if set; otherwise defers to RUST_LOG
STYGIAN_WORKERSnum_cpus * 4Default worker pool concurrency
STYGIAN_QUEUE_DEPTHworkers * 4Worker pool channel depth
STYGIAN_CACHE_CAPACITY10000Default LRU cache entry limit
STYGIAN_CACHE_TTL_SECS300Default DashMap cache TTL in seconds
STYGIAN_HTTP_TIMEOUT_SECS30HTTP adapter request timeout
STYGIAN_HTTP_MAX_REDIRECTS10HTTP redirect chain limit

AI provider variables

VariableUsed by
ANTHROPIC_API_KEYClaudeAdapter
OPENAI_API_KEYOpenAiAdapter
GOOGLE_API_KEYGeminiAdapter
GITHUB_TOKENCopilotAdapter
OLLAMA_BASE_URLOllamaAdapter (default: http://localhost:11434)

Distributed execution variables

VariableDefaultDescription
REDIS_URLredis://localhost:6379Redis/Valkey connection URL
REDIS_MAX_CONNECTIONS20Redis connection pool size
STYGIAN_QUEUE_NAMEstygian:workDefault work queue key
STYGIAN_VISIBILITY_TIMEOUT_SECS60Task visibility timeout for in-flight items

Tracing and logging

VariableExampleDescription
RUST_LOGstygian_graph=debug,stygian_browser=infoLog level per crate
RUST_LOGtraceEnable all tracing (very verbose)
OTEL_EXPORTER_OTLP_ENDPOINThttp://localhost:4317OTLP trace export endpoint
OTEL_SERVICE_NAMEstygian-scraperService name in trace metadata