Configuration
Environment variables and runtime settings for Wraith Browser
Wraith Browser is configured through a combination of CLI flags and environment variables. Environment variables are read at startup and cannot be changed without restarting the process.
Logging
| Variable | Description | Default |
|---|---|---|
RUST_LOG | Standard Rust log filter. Controls verbosity for all crates. | wraith=info,tower_http=warn |
The --verbose CLI flag sets the filter to wraith=trace,tower_http=debug,
but RUST_LOG takes precedence if set.
Examples:
# Minimal output
RUST_LOG=warn wraith-browser serve
# Trace-level for the browser engine only
RUST_LOG="wraith_browser_core=trace,wraith=info" wraith-browser serve
# Debug everything
RUST_LOG=debug wraith-browser serve --verboseBrowser Engine
| Variable / Flag | Description | Default |
|---|---|---|
--engine (CLI flag) | Engine selection: auto, sevro, native | auto |
WRAITH_CDP_CHROME | Path to a Chrome/Chromium binary for CDP engine | (auto-detected) |
WRAITH_CDP_AUTO | Enable automatic CDP fallback (true/false) | false |
CHROME_PATH | Alternative Chrome path (checked during CDP discovery) | (auto-detected) |
Engine modes:
auto(default) -- tries the Sevro engine first, falls back to native.sevro-- Sevro headless engine (Rust-native, no Chrome dependency, fastest).native-- Native HTTP+DOM engine (pure Rust, no JS execution).
When CDP features are enabled and a Chrome binary is found, CDP-backed sessions are available for sites that require full JavaScript rendering.
Network and Proxy
| Variable | Description | Default |
|---|---|---|
--proxy (CLI flag) | HTTP or SOCKS5 proxy URL | (none) |
WRAITH_PROXY | Same as --proxy, used when running as MCP server | (none) |
--fallback-proxy (CLI flag) | Fallback proxy for access-restricted sites | (none) |
WRAITH_FALLBACK_PROXY | Same as --fallback-proxy | (none) |
--flaresolverr (CLI flag) | FlareSolverr endpoint for challenge handling | (none) |
WRAITH_FLARESOLVERR | Same as --flaresolverr | (none) |
CLI flags take precedence over environment variables. Proxy format examples:
http://user:pass@proxy.example.com:8080
socks5://127.0.0.1:1080Caching
| Variable | Description | Default |
|---|---|---|
REDIS_URL | Redis connection string. Enables persistent cache. | (none, caching disabled) |
Without Redis, Wraith uses an in-memory LRU cache that is lost when the process
exits. The knowledge store at ~/.wraith/knowledge/ provides a local on-disk
cache independent of Redis.
Agent Loop (Task Command)
These variables configure the autonomous task subcommand.
| Variable | Description | Default |
|---|---|---|
WRAITH_LLM | LLM backend: claude or ollama | claude |
WRAITH_MODEL | Model name override | claude default model / llama3.1 for Ollama |
ANTHROPIC_API_KEY | Anthropic API key (required for Claude backend) | (none) |
CLAUDE_API_KEY | Alias for ANTHROPIC_API_KEY | (none) |
OLLAMA_URL | Ollama API base URL | http://localhost:11434 |
To use a local Ollama model instead of Claude:
export WRAITH_LLM=ollama
export WRAITH_MODEL=llama3.1
wraith-browser task "Find the latest Rust release notes" --url https://blog.rust-lang.orgSearch Providers
| Variable | Description | Default |
|---|---|---|
SEARXNG_URL | Custom SearXNG instance URL | (uses built-in instance list) |
BRAVE_SEARCH_API_KEY | Brave Search API key | (none) |
RAPIDAPI_KEY | RapidAPI key (for additional search backends) | (none) |
ADZUNA_APP_ID | Adzuna job search app ID | (none) |
ADZUNA_APP_KEY | Adzuna job search app key | (none) |
Search works out of the box via SearXNG. API keys for Brave, RapidAPI, and Adzuna are optional and enable additional result sources.
CAPTCHA Integration
| Variable | Description | Default |
|---|---|---|
TWOCAPTCHA_API_KEY | 2Captcha API key for CAPTCHA service integration | (none) |
Webhooks
| Variable | Description | Default |
|---|---|---|
WRAITH_WEBHOOK_URL | Webhook endpoint for task completion events | (none) |
WRAITH_WEBHOOK_SECRET | HMAC secret for webhook signature verification | (none) |
WRAITH_WEBHOOK_FORMAT | Payload format: json or slack | json |
Data Directories
Wraith stores state in ~/.wraith/ by default. The directory is created
automatically on first use.
| Path | Purpose |
|---|---|
~/.wraith/vault.db | Encrypted credential vault (AES-256-GCM) |
~/.wraith/knowledge/ | On-disk page cache and knowledge store |
~/.wraith/fingerprints/ | Browser fingerprint profiles (JSON) |
There is no configuration variable to change these paths. To relocate them, use symlinks or bind mounts.