Commands Reference
rwarden provides a unified command-line interface for path testing, configuration verification, schema export, and gateway generation.
1. Test URL Paths & Queries (test)
Simulate candidate path extraction, normalization, and pattern matching on an arbitrary path without starting Traefik, Caddy, or NGINX:
# Test a sensitive file path (positional or --path)rwarden test /.envrwarden test --path "/.env"# Test double URL encoding anti-evasionrwarden test "/static/%252e%252e/.env"# Test query string inspection (-q or --query)rwarden test -q "file=secret.conf" /search# Test custom HTTP methods (-X, -m, or --method)rwarden test -X POST /wp-config.php# Test custom HTTP headers (-H or --header, repeatable)rwarden test -H "X-Forwarded-Uri: /.env" /api# Test against a custom Routewarden config file (-c or --config)rwarden test -c routewarden.json /admin/dashboard# Test client IP whitelistingrwarden test -c routewarden.json --ip "10.0.0.1" /admin# Test request body payload inspection (-b or --body)rwarden test -X POST -b "grant_type=password&user=admin" --check-body /identity/token# Test bot defense preset level (--bot-defense-level)rwarden test -H "User-Agent: GPTBot/1.0" --bot-defense-level standard /docs# Test AI bot blocking (--block-ai-bots, --ai-bot-profile)rwarden test -H "User-Agent: GPTBot/1.0" --block-ai-bots /docs# Test browser impersonation detection (--detect-browser-impersonation)rwarden test -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/120.0" --detect-browser-impersonation /dashboard# Test script client & headless automation blocking (--block-script-clients)rwarden test -H "User-Agent: python-requests/2.31.0" --block-script-clients /api/v1/data# Test search engine bot FCrDNS verification (--verify-search-engine-bots)rwarden test -H "User-Agent: Googlebot/2.1" --ip "198.51.100.1" --verify-search-engine-bots /# Pipe configuration via stdincat routewarden.json | rwarden test -c - /adminFlags
| Flag | Type | Default | Description |
|---|---|---|---|
[path], --path | string | "" | Request path to evaluate (e.g. /.env or /api/v1) |
-c, --config | string | "" | Path to routewarden.json (or - for stdin) |
-q, --query | string | "" | Query string to evaluate for path evasion payloads |
-b, --body | string | "" | Request body payload to evaluate for hostile content |
-X, -m, --method | string | "GET" | HTTP method (e.g. GET, POST, HEAD) |
-H, --header | string | "" | Optional header in Key:Value format (repeatable) |
--ip | string | "" | Client IP address to evaluate against allowedIps |
--check-query | bool | true | Enable or disable query string inspection |
--check-body | bool | false | Enable or disable request body payload inspection |
--bot-defense-level | string | "" | Bot defense preset tier (off, light, standard, strict, aggressive) |
--block-ai-bots | bool | false | Enable AI crawler and LLM training bot detection |
--ai-bot-profile | string | "" | AI bot profile: train_only (default), all, aggressive, or custom |
--detect-browser-impersonation | bool | false | Cross-validate claimed browser UA against Client Hints and headers |
--block-script-clients | bool | false | Block automated HTTP client libraries and headless framework headers |
--verify-search-engine-bots | bool | false | Cryptographically verify search engine bot authenticity via FCrDNS |
Example Output
🔍 Testing: GET /static/%252e%252e/.env Candidate paths extracted (2): - /static/%252e%252e/.env - /.envResult: 🛑 BLOCKED (HTTP Status 403) Reason: block_pattern_match Target: /.env Pattern: (?i)\.env2. Validate Configurations (validate)
Validate a Routewarden JSON or TCP Warden YAML configuration file before deploying:
# Validate routewarden.json directly (positional or --config)rwarden validate routewarden.jsonrwarden validate -c routewarden.json# Auto-detects routewarden.json in current directory if omittedrwarden validate# Validate tcp-warden.yaml configurationrwarden validate tcp-warden.yaml# Validate piped config via stdincat routewarden.json | rwarden validate -c -Example Output
✔ Schema validation passed: routewarden.json is valid! - 14 built-in block patterns active - 5 allow rules configured - Response mode: json (HTTP 403) - 3 allowed IP CIDR blocks evaluated3. Output JSON Schema (schema)
Output the official Routewarden JSON Schemas directly to stdout:
# Output HTTP Gateway Schema (routewarden.json)rwarden schema > routewarden.schema.json# Output TCP Warden L4 Proxy Schema (tcp-warden.yaml)rwarden schema --tcp > tcp-warden.schema.json4. Generate Gateway Configs (generate)
Compile a universal routewarden.json policy into target reverse proxy syntax:
# Traefik: dynamic YAML middleware definitionrwarden generate traefik-yaml routewarden.json > traefik-middleware.yaml# Traefik: dynamic TOML middleware definitionrwarden generate traefik-toml routewarden.json > traefik-middleware.toml# Traefik: Docker Compose labels blockrwarden generate traefik-labels routewarden.json# Caddy: Caddyfile directive blockrwarden generate caddy routewarden.json# NGINX / OpenResty: Lua init table for nginx.confrwarden generate nginx routewarden.json# TCP Warden: tcp-warden.yaml configurationrwarden generate tcp-warden routewarden.json > tcp-warden.yamlSupported Targets
| Target | Alias | Description |
|---|---|---|
traefik-yaml | traefik, yaml | Traefik Dynamic File Provider YAML |
traefik-toml | toml | Traefik Dynamic File Provider TOML |
traefik-labels | labels, compose | Docker Compose container label syntax |
caddy | caddyfile | Native Caddyfile routewarden directive block |
nginx | openresty, lua | OpenResty init_by_lua_block Lua table |
tcp-warden | tcp, l4 | TCP Warden daemon YAML configuration |
5. Live Gateway Sandbox (sandbox)
Spin up an ephemeral, isolated container running Traefik, Caddy, or NGINX loaded with your security policy for live testing:
# Start a Traefik sandbox on localhost:8080rwarden sandbox traefik routewarden.json# Start a Caddy sandbox with automatic test suite executionrwarden sandbox caddy routewarden.json --test# Start an NGINX sandbox in detached background moderwarden sandbox nginx routewarden.json --detach# Dry-run: view generated container command without launchingrwarden sandbox traefik routewarden.json --dry-runSandbox Testing Probes
When running in sandbox mode, you can execute HTTP requests against http://localhost:8080:
# Sensitive file attack (should return 403 Forbidden)curl -i http://localhost:8080/.env# Directory traversal attempt (should return 403 Forbidden)curl -i "http://localhost:8080/static/..%2f.env"# Safe RFC endpoint (should return 200 or upstream response)curl -i http://localhost:8080/robots.txt6. Cleanup Sandbox Containers (cleanup)
Stop and remove all running or detached Routewarden sandbox test containers:
rwarden cleanup7. Version Information (version)
Check installed binary version:
rwarden version8. Security Dashboard (dashboard)
Launch and manage an ultra-lightweight, real-time security dashboard powered by Routewarden's embedded SOC engine and SQLite persistence. It replaces heavy multi-container monitoring stacks with an in-memory dashboard consuming only ~8MB of RAM:
# Launch real-time SOC security dashboard (opens http://localhost:7890)rwarden dashboardrwarden dashboard up# Launch in background (detached daemon mode)rwarden dashboard -d# orrwarden dashboard up --detach# Launch with password protection (HTTP Basic Auth)rwarden dashboard up --auth admin:supersecret# Launch on a custom host/port without auto-opening browserrwarden dashboard up --host 127.0.0.1 --port 8080 --no-open# Monitor a specific container by namerwarden dashboard --container traefik# Check status of running dashboardrwarden dashboard status# orrwarden status dashboard# Stop background dashboard daemonrwarden dashboard stop# orrwarden stop dashboard# Configure automated data retention, event row cap, and log rotationrwarden dashboard up --retention 30d --max-events 100000 --prune-interval 1h --max-log-size 50MB# Export standalone Docker Compose and configuration files to diskrwarden dashboard export ./dashboardSubcommands & Flags
| Subcommand / Flag | Type | Default | Description |
|---|---|---|---|
up, start | subcommand | — | Spin up real-time SOC security dashboard (default) |
down, stop | subcommand | — | Stop running background dashboard daemon |
status, ps | subcommand | — | Check running status, PID, and dashboard URL |
export [dir] | subcommand | ./dashboard | Export compose and configuration assets to disk |
-d, --detach | bool | false | Run dashboard in background (detached) daemon mode |
-a, --auth | string | "" | Require HTTP Basic Auth (user:pass) for dashboard UI and APIs |
--user | string | "" | Dashboard authentication username |
--password | string | "" | Dashboard authentication password |
--host | string | "" | Host interface to bind server (127.0.0.1, 0.0.0.0) |
--port | int | 7890 | Port for SOC dashboard UI and SSE stream |
-f, --file | string | "" | Log file to monitor (default: auto-discovered Docker containers) |
-c, --container | string | "" | Tail a specific Docker container by name or ID |
-l, --label | string | "routewarden=true" | Docker label to filter containers |
--dir | string | ~/.routewarden/dashboard | Working directory storing SQLite events.db and keys |
--no-open | bool | false | Do not launch system default browser |
--retention | string | "30d" | Data retention window (30d, 7d, 48h, or 0 for unlimited) |
--max-events | int | 100000 | Maximum event row capacity before pruning (0 = unlimited) |
--prune-interval | duration | "1h" | Background automated pruning frequency (1h, 30m) |
--max-log-size | string | "50MB" | Maximum access.log size before rotating to access.log.1 |
9. Policy Static Analyzer & Linter (audit)
Perform deep static analysis and linting on a Routewarden policy file to catch ReDoS vulnerabilities, unescaped dots, universal wildcard traps, and header spoofing risks before deployment:
# Audit default routewarden.jsonrwarden audit# Audit custom configuration filerwarden audit ./config/routewarden.json# Strict mode: fail on warnings as well as critical flawsrwarden audit --strict routewarden.json# Output as JSONrwarden audit --format json routewarden.json# Output in OASIS SARIF v2.1.0 format for GitHub Code Scanningrwarden audit --format sarif routewarden.json > results.sarifFlags
| Flag | Type | Default | Description |
|---|---|---|---|
[file] | string | "routewarden.json" | Configuration file to audit (or - for stdin) |
-f, --format | string | "text" | Output format: text (default), json, or sarif |
-s, --strict | bool | false | Strict mode: exit code 1 on warnings as well as critical flaws |
Key Audit Rules
| Code | Severity | Rule Title | Description |
|---|---|---|---|
RW-A001 | Critical | Disabled RouteWarden | enabled explicitly set to false in production policy |
RW-A003 | Critical | Universal Block Pattern | blockPatterns contains universal wildcard (.* or ^/) |
RW-A004 | Critical | Universal Allow Pattern | allowPatterns contains universal wildcard (.* or ^/) |
RW-A005 | Warning | Unescaped Literal Dot | Dot unescaped in pattern (e.g. .env instead of \.env) |
RW-A006 | Critical | Catastrophic ReDoS Risk | Pattern contains nested quantifiers triggering catastrophic backtracking |
RW-A007 | Info | Duplicate Pattern | Repeated pattern in blockPatterns or allowPatterns |
RW-A008 | Info | Duplicate Body Pattern | Repeated pattern in checkBodyPatterns |
RW-A009 | Critical | Malformed IP/CIDR Notation | Unparseable IP address or CIDR notation in allowedIps |
RW-A011 | Critical | Invalid HTTP Status Code | Status code outside valid HTTP range (100–599) |
RW-A012 | Critical | Invalid Response Mode | Unrecognized response mode name |
RW-A015 | Critical | Invalid Regex Syntax | Unclosed brackets or uncompilable regex in patterns or User-Agent rules |
RW-A016 | Warning | Unrecognized AI Bot Profile | aiBotProfile must be train_only, search_only, agents_only, all, aggressive, or custom |
RW-A017 | Warning | Unrecognized Bot Defense Level | Unrecognized level name in botDefenseLevel |
RW-A018 | Critical | Missing ASN Database | ASN allow/block or blockCloudHosts configured without providing asnDB file path |
RW-A019 | Critical | Malformed ASN Identifier | Unparseable ASN format in allowedASNs or blockedASNs |
RW-A020 | Warning | Invalid Trap Ban Duration | Unparseable duration string in trapBanDuration |
RW-A022 | Critical | Universal Allowlist CIDR | 0.0.0.0/0 or ::/0 in allowedIps unconditionally bypasses all security rules |
RW-A023 | Critical | Universal Trusted Proxy CIDR | 0.0.0.0/0 or ::/0 in trustedProxies enables arbitrary IP spoofing |
RW-A024 | Info | Case-Sensitive Block Pattern | Block pattern lacks (?i) flag, risking bypass on case-insensitive filesystems |
RW-A025 | Warning | Invalid HTTP Method | Unrecognized, lowercase, or empty method name in methods |
RW-A026 | Warning | Mutation Methods Missing | checkBody enabled but methods contains only read-only verbs (e.g. GET) |
RW-A027 | Critical/Warning | Malformed Header Name | Header in checkHeaders contains colon, space, or invalid token characters |
RW-A028 | Critical/Warning | Invalid Body Buffer Limit | Negative checkBodyMaxBytes or excessive limit (>10MB) risking memory exhaustion |
RW-A029 | Critical/Warning | Honeypot Trap Misconfiguration | Empty path or root path (/) in honeypotTrapPaths risking catastrophic lockouts |
RW-A030 | Info | Missing Search Engine FCrDNS Verification | blockAIBots enabled without verifySearchEngineBots, risking search crawler blocking or impostor spoofing |
RW-A031 | Warning | Robots Honeypot Trap Shadowed by Allow Pattern | enableRobotsTxtHoneypot is active but an allowPatterns entry shadows /rw_trap paths, rendering honeypot defense ineffective |
RW-A032 | Info | Cloud Host Classifier Without Search Engine Verification | blockCloudHosts enabled without verifySearchEngineBots, risking blocking legitimate crawlers (Googlebot, Bingbot) hosted on cloud IP ranges |
RW-A033 | Warning | Proof-of-Work Difficulty Out of Bounds | powDifficulty is set outside recommended range (8–24), risking either ineffective deterrence (<8) or client browser freeze (>24) |
10. Policy Diffing (diff)
Compare two Routewarden policy files and evaluate the security posture delta (e.g. relaxed, hardened, or neutral):
# Compare production policy against candidate updaterwarden diff prod.json candidate.json# Output diff as machine-readable JSONrwarden diff --format json prod.json candidate.json# Fail with exit code 1 if differences exist, or code 2 if security posture is relaxedrwarden diff --exit-code prod.json candidate.jsonFlags
| Flag | Type | Default | Description |
|---|---|---|---|
<base.json> | string | — | Baseline policy file |
<candidate.json> | string | — | Candidate policy file to evaluate against base |
-f, --format | string | "text" | Output format: text (default) or json |
--exit-code | bool | false | Exit code 1 if differences exist, 2 if posture is relaxed |
11. Live Terminal Threat Monitoring (monitor)
Tail, multiplex, and colorize live reverse proxy security events directly in the terminal from Docker containers, log files, or standard input.
When invoked without --file or a pipe, rwarden monitor automatically discovers running Docker containers tagged with routewarden=true (or routewarden.logs=true) and streams them simultaneously with container attribution tags ([traefik], [nginx], etc.).
Turnkey Live Web Dashboard
To view live reverse proxy telemetry with a real-time web UI, world map, and threat intelligence, run rwarden dashboard directly.
# Auto-discover & multiplex all containers labeled routewarden=truerwarden monitor# Tail a specific container by name or IDrwarden monitor --container traefik# Filter by custom Docker labelrwarden monitor --label "env=production"# Stream raw unformatted logs for external processing or jqrwarden monitor --raw | jq .# Tail an NGINX or Apache access log filerwarden monitor --file /var/log/nginx/access.log# Filter exclusively for blocked threats or specific IP / pathrwarden monitor --verdict BLOCKrwarden monitor --path "/.env" --ip "192.168.1."Flags
| Flag | Shorthand | Type | Default | Description |
|---|---|---|---|---|
--file | -f | string | "" | Log file to read from (default: stdin or auto-discovered docker) |
--follow | -F | bool | false | Continuously follow log file for new changes (auto-detects rotation and truncation) |
--out | -o | string | "" | Output file to append monitored security events to (Combined log format) |
--docker | — | bool | false | Explicitly enable Docker container auto-discovery |
--container | -c | string | "" | Tail a specific Docker container by name or ID |
--label | -l | string | "" | Docker label to filter containers (default: routewarden=true) |
--wait | -w | bool | false | Wait and retry if no matching containers are running initially |
--tail | — | string | "50" | Initial lines to tail from Docker container(s) or file |
--raw | — | bool | false | Output raw unformatted log lines (ideal for piping into analyzers or jq) |
--verdict | — | string | "" | Filter events by verdict (BLOCK, ALLOW, TARPIT) |
--ip | — | string | "" | Filter events by client IP substring |
--path | — | string | "" | Filter events by request path substring |
12. Interactive Terminal REPL (tui)
Launch an interactive terminal simulator to experiment with paths, query strings, headers, and client IPs in real time:
# Launch interactive terminal simulatorrwarden tui# Or with aliasrwarden interactive# Pre-load custom policy configurationrwarden tui ./routewarden.jsonInteractive Commands
| Command | Description |
|---|---|
<path> | Evaluate path directly (e.g. /.env or /api/v1/health?token=abc) |
:method <METHOD> | Switch active HTTP method (GET, POST, PUT, DELETE, etc.) |
:ip <address> | Set client IP for allowlist / trusted proxy checks |
:query <querystring> | Set default query string |
:body <payload> | Set request body for body inspection tests |
:header Key: Value | Set or add custom request header |
:clear-headers | Clear all custom headers |
:load <file.json> | Load a custom routewarden.json policy |
:status | Display current test environment state |
:clear | Clear terminal screen |
:exit / quit | Exit interactive mode |
13. Shell Autocompletion (completion)
Generate autocompletion scripts for subcommands, flags, and targets:
# Bashsource <(rwarden completion bash)# Zshrwarden completion zsh > ~/.zsh/completion/_rwarden# Fishrwarden completion fish | source# PowerShellrwarden completion powershell | Out-String | Invoke-ExpressionSupported Shells
- Bash:
source <(rwarden completion bash) - Zsh:
rwarden completion zsh > "${fpath[1]}/_rwarden" - Fish:
rwarden completion fish | source - PowerShell:
rwarden completion powershell | Out-String | Invoke-Expression
14. System Manpage (man)
Output the standard system manual page formatted in roff/troff:
# View system manual page directly in terminalrwarden man | man -l -# Save manual page to system directorysudo rwarden man -o /usr/share/man/man1/rwarden.115. Manage Remote Agent API Keys (keys)
Manage distributed enrollment keys for remote log shippers. When running a central Routewarden security dashboard, use rwarden keys to create and revoke credentials:
# Generate a new remote agent authentication keyrwarden keys create edge-node-01# List all registered remote agent keys and their statusrwarden keys list# Revoke an agent key by name or IDrwarden keys revoke edge-node-01rwarden keys revoke agent_8f9a2b4c1e0d3f7a# Specify a custom dashboard storage directoryrwarden keys list --dir /data/routewardenSubcommands
| Subcommand | Aliases | Description |
|---|---|---|
create <name> | new, add | Generate a new remote agent authentication token (rw_sec_...) |
list | ls | List all registered agent keys, token prefixes, status, and last seen |
revoke <id> | rm, delete | Revoke access for a specific agent by ID or name |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--dir | string | ~/.routewarden/dashboard | Dashboard storage directory holding server.key and api_keys.json |
16. Remote Agent Enrollment (register)
Enroll a remote node with a central Routewarden dashboard. This one-time handshake validates the agent token, downloads the central server's X25519 public key, and saves configuration to ~/.routewarden/agent.json:
# One-time registration with Routewarden Central Dashboardrwarden register --url http://198.51.100.10:7890 --key rw_sec_8f9a2b4c1e0d3f7a...# Register with flag aliases (-u and -k)rwarden register -u http://dashboard.internal:7890 -k rw_sec_8f9a...# Register and persist default filtering modes into agent.jsonrwarden register -u http://dashboard.internal:7890 -k rw_sec_8f9a... --status "400-599, 301"# Store configuration in a custom filerwarden register --url http://dashboard.internal:7890 --key rw_sec_... --config /etc/routewarden/agent.jsonFlags
| Flag | Shorthand | Type | Required | Description |
|---|---|---|---|---|
--url | -u | string | Yes | Routewarden Central Dashboard URL (e.g. http://dashboard.internal:7890) |
--key | -k | string | Yes | Remote agent authentication key (rw_sec_...) |
--config | — | string | No | Custom path to store agent configuration (default: ~/.routewarden/agent.json) |
--status | -s, --status-codes, --include-status | string | No | Persist default HTTP status codes or ranges to forward (e.g. '400-599, 301', '4xx, 5xx'). Can be used independently. |
--include-failed | -F | bool | No | Legacy alias: persist setting to ship all failed HTTP requests (status >= 400). Can be used independently. |
--all-traffic | — | bool | No | Persist default setting to ship all HTTP access traffic. Can be used independently. |
--all-logs | — | bool | No | Persist default setting to ship all raw container lines without filtering. Can be used independently. |
17. Distributed Log Shipper (push)
Stream live security events and gateway access logs from remote edge nodes, cloud servers, or local containers to the central Routewarden dashboard with end-to-end asymmetric encryption (X25519 ECDH + AES-256-GCM):
# Zero-flag push: reads ~/.routewarden/agent.json and auto-discovers containersrwarden push# Run in background (detached daemon mode)rwarden push -d# orrwarden push --detach# Check status of running background shipperrwarden push status# orrwarden status push# Stop background shipper daemonrwarden push stop# orrwarden stop push# Auto-discover and stream all containers with label 'routewarden=true'rwarden push --docker# Stream multiple log files concurrently (repeatable -f, comma-separated, or globs)rwarden push -f /var/log/nginx/access.log -f /var/log/caddy/access.logrwarden push --file "/var/log/nginx/*.log"# Concurrent hybrid streaming: monitor files AND auto-discover Docker containersrwarden push --docker -f /var/log/nginx/access.log -f /var/log/syslog# Tail multiple specific containers and files concurrentlyrwarden push -c traefik,api-gateway -f /var/log/nginx/access.log# Push directly with URL and key flags (skipping registration)rwarden push --url http://198.51.100.10:7890 --key rw_sec_... --docker# Manually push one or more specific events directly (one-shot)rwarden push -e '{"client_ip":"198.51.100.1","path":"/.env","verdict":"BLOCK"}'rwarden push -e "event1" -e "event2"# Pipe events line-by-line via STDIN (or -f -)cat access.log | rwarden push --stdinecho '{"client_ip":"198.51.100.1","path":"/.env","verdict":"BLOCK"}' | rwarden push -f -# Forward HTTP requests matching status codes or ranges (e.g. 400-599, 301, 4xx, 5xx)rwarden push --status "400-599, 301"# Shorthand:rwarden push -s 400-599,301# Ship failed HTTP requests (status >= 400, legacy alias)rwarden push --include-failed# Stream all HTTP access traffic including 200 OKrwarden push --all-traffic# Stream Layer 4 (UDP & TCP) traffic logs from tcp-wardenrwarden push -f /var/log/routewarden/tcp-warden.jsonlrwarden push -c tcp-warden --all-traffic# Configure offline queue capacity and disconnect drop timeoutrwarden push --queue-size 20000 --disconnect-timeout 10mSubcommands & Flags
| Command / Flag | Shorthand | Type | Default | Description |
|---|---|---|---|---|
status, ps | — | subcommand | — | Check running status, PID, and target URL of background shipper |
stop, down | — | subcommand | — | Gracefully stop running background shipper daemon |
--detach | -d | bool | false | Run shipper in background (detached) daemon mode |
--docker | — | bool | false | Auto-discover and tail Docker containers. Can run concurrently with --file and --container |
--container | -c | string | "" | Tail specific Docker container(s) by name or ID (repeatable or comma-separated) |
--file | -f | string | "" | Tail and ship events from log file(s) (repeatable, comma-separated, glob pattern *.log, or - for stdin) |
--event | -e | string | "" | Push one or more specific JSON event strings directly to the dashboard (repeatable) |
--stdin | — | bool | false | Read and push log events line-by-line from STDIN pipe |
--label | -l | string | "routewarden=true" | Custom Docker label filter for auto-discovery |
--tail | — | string | "50" | Initial lines to tail from Docker container(s) and log file(s) |
--batch-size | — | int | 50 | Maximum events to buffer in memory before flushing |
--flush-interval | — | duration | 1s | Maximum duration before flushing partial buffer |
--queue-size | — | int | 10000 | Maximum events to buffer in memory while disconnected from dashboard |
--disconnect-timeout | — | duration | 5m | Duration disconnected from dashboard before dropping stale events |
--ping-interval | — | duration | 10s | Interval between connection health pings when connected |
--status | -s, --status-codes, --include-status | string | "" | Forward HTTP requests matching status codes or ranges (e.g. '400-599, 301', '4xx, 5xx'). Can be used independently. |
--include-failed | -F | bool | false | Legacy alias: ship all failed HTTP requests (status >= 400). Can be used independently; overridden by --status. |
--all-traffic | — | bool | false | Ship all HTTP access traffic and Layer 4 UDP/TCP sessions. Can be used independently; overrides status filters. |
--all-logs | — | bool | false | Ship all raw container lines without filtering (default filters for Routewarden events & security blocks) |
--url | -u | string | "" | Override central dashboard URL from registered config |
--key | -k | string | "" | Override agent authentication key from registered config |
--config | — | string | ~/.routewarden/agent.json | Custom path to agent configuration file |
--verbose | -v | bool | false | Enable verbose event-level diagnostic logging |
Environment Variables
Every CLI flag can alternatively be configured via environment variables, ideal for Docker, Compose, and Kubernetes:
| Environment Variable | Shorthand Alias | CLI Flag Equivalent | Description | Default |
|---|---|---|---|---|
RW_DASHBOARD_URL | RW_URL | --url, -u | Central Routewarden dashboard URL | "" |
RW_AGENT_KEY | RW_KEY | --key, -k | Remote agent authentication token | "" |
RW_CONFIG | — | --config | Custom path to agent configuration file | ~/.routewarden/agent.json |
RW_STATUS | RW_STATUS_CODES, RW_INCLUDE_STATUS | --status, -s | Forward HTTP requests matching status codes or ranges | "" |
RW_INCLUDE_FAILED | — | --include-failed, -F | Ship all failed HTTP requests ($\ge 400$) | false |
RW_ALL_TRAFFIC | — | --all-traffic | Ship all HTTP access traffic (including 200 OK) | false |
RW_ALL_LOGS | — | --all-logs | Ship all raw container lines without filtering | false |
RW_DOCKER | — | --docker | Auto-discover and tail Docker containers | false (true in container) |
RW_LABEL | — | --label, -l | Docker container discovery label | routewarden=true |
RW_TAIL | — | --tail | Initial lines to tail from containers or files | 50 |
RW_BATCH_SIZE | — | --batch-size | Maximum events to buffer before flushing | 50 |
RW_FLUSH_INTERVAL | — | --flush-interval | Maximum duration before flushing partial batches | 1s |
RW_QUEUE_SIZE | — | --queue-size | Maximum events to buffer in memory while offline | 10000 |
RW_DISCONNECT_TIMEOUT | — | --disconnect-timeout | Duration disconnected before dropping stale events | 5m |
RW_PING_INTERVAL | — | --ping-interval | Interval between connection health pings | 10s |
RW_VERBOSE | RW_DEBUG | --verbose, -v | Enable verbose event-level logging | false |
RW_DETACH | — | --detach, -d | Run shipper daemon in detached background mode | false |
18. Daemon Process Management (status, stop)
Manage background daemons spawned with --detach (-d). Routewarden manages daemon state via PID files in ~/.routewarden/*.pid and redirects detached logs to ~/.routewarden/*.log:
# Check status of all running daemons (dashboard, shipper, tcp)rwarden status# Check status of a specific daemonrwarden status dashboardrwarden status pushrwarden status tcp# Stop all running background daemonsrwarden stop# Stop a specific background daemonrwarden stop dashboardrwarden stop pushrwarden stop tcpDaemon Subsystems & Files
| Subsystem | PID File | Detached Log File | Description |
|---|---|---|---|
dashboard | ~/.routewarden/dashboard.pid | ~/.routewarden/dashboard.log | Central SOC Security Dashboard web server and SSE stream |
push | ~/.routewarden/push.pid | ~/.routewarden/push.log | Background remote log shipper daemon |
tcp | ~/.routewarden/tcp.pid | ~/.routewarden/tcp.log | High-performance L4 TCP/UDP security proxy daemon |
19. L4 TCP/UDP Reverse Proxy (tcp)
Routewarden CLI natively integrates an ultra-high performance Layer 4 reverse proxy with protocol-aware inspection (HTTP, TLS SNI, SSH, Redis, PostgreSQL, MySQL), geo-fencing, IP ban persistence, rate limiting, and CrowdSec remediation:
# Start TCP/UDP proxy in foreground (auto-loads tcp-warden.yaml)rwarden tcprwarden tcp up# Start proxy in background (detached daemon mode)rwarden tcp up -d# or with custom configrwarden tcp up -c /etc/routewarden/tcp-warden.yaml --detach# Check status of running TCP proxy daemonrwarden tcp status# orrwarden status tcp# Reload configuration on running daemon without dropping live connections (zero-downtime)rwarden tcp reload# Stop background TCP proxy daemonrwarden tcp stop# orrwarden stop tcp# Validate TCP proxy configuration file syntax and protocol rulesrwarden tcp validate -c tcp-warden.yaml# Check TCP proxy engine versionrwarden tcp version# List registered L4 protocol inspection pluginsrwarden tcp plugins list# Run self-tests on registered pluginsrwarden tcp plugins test# Install a modular protocol plugin from Gitrwarden tcp plugins install github.com/routewarden/plugin-redisSubcommands & Flags
| Command / Flag | Shorthand | Type | Default | Description |
|---|---|---|---|---|
up, start | — | subcommand | — | Start TCP/UDP proxy (default action when omitting subcommand) |
down, stop | — | subcommand | — | Gracefully stop running background proxy daemon |
status, ps | — | subcommand | — | Check running status, PID, and uptime of background proxy daemon |
reload | — | subcommand | — | Reload configuration file on running daemon without dropping live connections (SIGHUP) |
validate | — | subcommand | — | Validate proxy configuration YAML syntax and protocol definitions |
plugins | — | subcommand | — | Manage protocol inspection plugins (list, test, install) |
version | -v | subcommand | — | Display TCP proxy engine version (rwarden tcp version) |
--config | -c | string | tcp-warden.yaml | Path to YAML configuration file (falls back to ROUTEWARDEN_CONFIG) |
--detach | -d | bool | false | Run proxy in background (detached) daemon mode |
--verbose | -v | bool | false | Enable verbose operational logging |
Standalone Binary & Container
For edge architectures where only L4 proxying is desired, a dedicated standalone binary (tcp-warden), native Linux packages (.deb, .rpm, .apk), Homebrew Cask (brew install routewarden/tap/tcp-warden), and minimal Alpine container (ghcr.io/routewarden/tcp-warden:latest, <15MB) are provided alongside the unified rwarden binary. See Getting Started with TCP Warden and Installation Guide for full installation instructions.