Skip to content

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 - /admin

Flags ​

FlagTypeDefaultDescription
[path], --pathstring""Request path to evaluate (e.g. /.env or /api/v1)
-c, --configstring""Path to routewarden.json (or - for stdin)
-q, --querystring""Query string to evaluate for path evasion payloads
-b, --bodystring""Request body payload to evaluate for hostile content
-X, -m, --methodstring"GET"HTTP method (e.g. GET, POST, HEAD)
-H, --headerstring""Optional header in Key:Value format (repeatable)
--ipstring""Client IP address to evaluate against allowedIps
--check-querybooltrueEnable or disable query string inspection
--check-bodyboolfalseEnable or disable request body payload inspection
--bot-defense-levelstring""Bot defense preset tier (off, light, standard, strict, aggressive)
--block-ai-botsboolfalseEnable AI crawler and LLM training bot detection
--ai-bot-profilestring""AI bot profile: train_only (default), all, aggressive, or custom
--detect-browser-impersonationboolfalseCross-validate claimed browser UA against Client Hints and headers
--block-script-clientsboolfalseBlock automated HTTP client libraries and headless framework headers
--verify-search-engine-botsboolfalseCryptographically verify search engine bot authenticity via FCrDNS

Example Output ​

Simulation Outputplaintext
🔍 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)\.env

2. 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 ​

Validation Outputplaintext
✔ 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 evaluated

3. 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.json

4. 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.yaml

Supported Targets ​

TargetAliasDescription
traefik-yamltraefik, yamlTraefik Dynamic File Provider YAML
traefik-tomltomlTraefik Dynamic File Provider TOML
traefik-labelslabels, composeDocker Compose container label syntax
caddycaddyfileNative Caddyfile routewarden directive block
nginxopenresty, luaOpenResty init_by_lua_block Lua table
tcp-wardentcp, l4TCP 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:

rwarden sandboxbash
# 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-run

Sandbox Testing Probes ​

When running in sandbox mode, you can execute HTTP requests against http://localhost:8080:

HTTP Test Probesbash
# 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.txt

6. Cleanup Sandbox Containers (cleanup) ​

Stop and remove all running or detached Routewarden sandbox test containers:

rwarden cleanupbash
rwarden cleanup

7. Version Information (version) ​

Check installed binary version:

rwarden versionbash
rwarden version

8. 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:

rwarden dashboardbash
# 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 ./dashboard

Subcommands & Flags ​

Subcommand / FlagTypeDefaultDescription
up, startsubcommand—Spin up real-time SOC security dashboard (default)
down, stopsubcommand—Stop running background dashboard daemon
status, pssubcommand—Check running status, PID, and dashboard URL
export [dir]subcommand./dashboardExport compose and configuration assets to disk
-d, --detachboolfalseRun dashboard in background (detached) daemon mode
-a, --authstring""Require HTTP Basic Auth (user:pass) for dashboard UI and APIs
--userstring""Dashboard authentication username
--passwordstring""Dashboard authentication password
--hoststring""Host interface to bind server (127.0.0.1, 0.0.0.0)
--portint7890Port for SOC dashboard UI and SSE stream
-f, --filestring""Log file to monitor (default: auto-discovered Docker containers)
-c, --containerstring""Tail a specific Docker container by name or ID
-l, --labelstring"routewarden=true"Docker label to filter containers
--dirstring~/.routewarden/dashboardWorking directory storing SQLite events.db and keys
--no-openboolfalseDo not launch system default browser
--retentionstring"30d"Data retention window (30d, 7d, 48h, or 0 for unlimited)
--max-eventsint100000Maximum event row capacity before pruning (0 = unlimited)
--prune-intervalduration"1h"Background automated pruning frequency (1h, 30m)
--max-log-sizestring"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:

rwarden auditbash
# 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.sarif

Flags ​

FlagTypeDefaultDescription
[file]string"routewarden.json"Configuration file to audit (or - for stdin)
-f, --formatstring"text"Output format: text (default), json, or sarif
-s, --strictboolfalseStrict mode: exit code 1 on warnings as well as critical flaws

Key Audit Rules ​

CodeSeverityRule TitleDescription
RW-A001CriticalDisabled RouteWardenenabled explicitly set to false in production policy
RW-A003CriticalUniversal Block PatternblockPatterns contains universal wildcard (.* or ^/)
RW-A004CriticalUniversal Allow PatternallowPatterns contains universal wildcard (.* or ^/)
RW-A005WarningUnescaped Literal DotDot unescaped in pattern (e.g. .env instead of \.env)
RW-A006CriticalCatastrophic ReDoS RiskPattern contains nested quantifiers triggering catastrophic backtracking
RW-A007InfoDuplicate PatternRepeated pattern in blockPatterns or allowPatterns
RW-A008InfoDuplicate Body PatternRepeated pattern in checkBodyPatterns
RW-A009CriticalMalformed IP/CIDR NotationUnparseable IP address or CIDR notation in allowedIps
RW-A011CriticalInvalid HTTP Status CodeStatus code outside valid HTTP range (100–599)
RW-A012CriticalInvalid Response ModeUnrecognized response mode name
RW-A015CriticalInvalid Regex SyntaxUnclosed brackets or uncompilable regex in patterns or User-Agent rules
RW-A016WarningUnrecognized AI Bot ProfileaiBotProfile must be train_only, search_only, agents_only, all, aggressive, or custom
RW-A017WarningUnrecognized Bot Defense LevelUnrecognized level name in botDefenseLevel
RW-A018CriticalMissing ASN DatabaseASN allow/block or blockCloudHosts configured without providing asnDB file path
RW-A019CriticalMalformed ASN IdentifierUnparseable ASN format in allowedASNs or blockedASNs
RW-A020WarningInvalid Trap Ban DurationUnparseable duration string in trapBanDuration
RW-A022CriticalUniversal Allowlist CIDR0.0.0.0/0 or ::/0 in allowedIps unconditionally bypasses all security rules
RW-A023CriticalUniversal Trusted Proxy CIDR0.0.0.0/0 or ::/0 in trustedProxies enables arbitrary IP spoofing
RW-A024InfoCase-Sensitive Block PatternBlock pattern lacks (?i) flag, risking bypass on case-insensitive filesystems
RW-A025WarningInvalid HTTP MethodUnrecognized, lowercase, or empty method name in methods
RW-A026WarningMutation Methods MissingcheckBody enabled but methods contains only read-only verbs (e.g. GET)
RW-A027Critical/WarningMalformed Header NameHeader in checkHeaders contains colon, space, or invalid token characters
RW-A028Critical/WarningInvalid Body Buffer LimitNegative checkBodyMaxBytes or excessive limit (>10MB) risking memory exhaustion
RW-A029Critical/WarningHoneypot Trap MisconfigurationEmpty path or root path (/) in honeypotTrapPaths risking catastrophic lockouts
RW-A030InfoMissing Search Engine FCrDNS VerificationblockAIBots enabled without verifySearchEngineBots, risking search crawler blocking or impostor spoofing
RW-A031WarningRobots Honeypot Trap Shadowed by Allow PatternenableRobotsTxtHoneypot is active but an allowPatterns entry shadows /rw_trap paths, rendering honeypot defense ineffective
RW-A032InfoCloud Host Classifier Without Search Engine VerificationblockCloudHosts enabled without verifySearchEngineBots, risking blocking legitimate crawlers (Googlebot, Bingbot) hosted on cloud IP ranges
RW-A033WarningProof-of-Work Difficulty Out of BoundspowDifficulty 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):

rwarden diffbash
# 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.json

Flags ​

FlagTypeDefaultDescription
<base.json>string—Baseline policy file
<candidate.json>string—Candidate policy file to evaluate against base
-f, --formatstring"text"Output format: text (default) or json
--exit-codeboolfalseExit 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 ​

FlagShorthandTypeDefaultDescription
--file-fstring""Log file to read from (default: stdin or auto-discovered docker)
--follow-FboolfalseContinuously follow log file for new changes (auto-detects rotation and truncation)
--out-ostring""Output file to append monitored security events to (Combined log format)
--docker—boolfalseExplicitly enable Docker container auto-discovery
--container-cstring""Tail a specific Docker container by name or ID
--label-lstring""Docker label to filter containers (default: routewarden=true)
--wait-wboolfalseWait and retry if no matching containers are running initially
--tail—string"50"Initial lines to tail from Docker container(s) or file
--raw—boolfalseOutput 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:

rwarden tuibash
# Launch interactive terminal simulatorrwarden tui# Or with aliasrwarden interactive# Pre-load custom policy configurationrwarden tui ./routewarden.json

Interactive Commands ​

CommandDescription
<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: ValueSet or add custom request header
:clear-headersClear all custom headers
:load <file.json>Load a custom routewarden.json policy
:statusDisplay current test environment state
:clearClear terminal screen
:exit / quitExit interactive mode

13. Shell Autocompletion (completion) ​

Generate autocompletion scripts for subcommands, flags, and targets:

rwarden completionbash
# Bashsource <(rwarden completion bash)# Zshrwarden completion zsh > ~/.zsh/completion/_rwarden# Fishrwarden completion fish | source# PowerShellrwarden completion powershell | Out-String | Invoke-Expression

Supported 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:

rwarden manbash
# View system manual page directly in terminalrwarden man | man -l -# Save manual page to system directorysudo rwarden man -o /usr/share/man/man1/rwarden.1

15. 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:

rwarden keysbash
# 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/routewarden

Subcommands ​

SubcommandAliasesDescription
create <name>new, addGenerate a new remote agent authentication token (rw_sec_...)
listlsList all registered agent keys, token prefixes, status, and last seen
revoke <id>rm, deleteRevoke access for a specific agent by ID or name

Flags ​

FlagTypeDefaultDescription
--dirstring~/.routewarden/dashboardDashboard 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:

rwarden registerbash
# 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.json

Flags ​

FlagShorthandTypeRequiredDescription
--url-ustringYesRoutewarden Central Dashboard URL (e.g. http://dashboard.internal:7890)
--key-kstringYesRemote agent authentication key (rw_sec_...)
--config—stringNoCustom path to store agent configuration (default: ~/.routewarden/agent.json)
--status-s, --status-codes, --include-statusstringNoPersist default HTTP status codes or ranges to forward (e.g. '400-599, 301', '4xx, 5xx'). Can be used independently.
--include-failed-FboolNoLegacy alias: persist setting to ship all failed HTTP requests (status >= 400). Can be used independently.
--all-traffic—boolNoPersist default setting to ship all HTTP access traffic. Can be used independently.
--all-logs—boolNoPersist 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):

rwarden pushbash
# 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 10m

Subcommands & Flags ​

Command / FlagShorthandTypeDefaultDescription
status, ps—subcommand—Check running status, PID, and target URL of background shipper
stop, down—subcommand—Gracefully stop running background shipper daemon
--detach-dboolfalseRun shipper in background (detached) daemon mode
--docker—boolfalseAuto-discover and tail Docker containers. Can run concurrently with --file and --container
--container-cstring""Tail specific Docker container(s) by name or ID (repeatable or comma-separated)
--file-fstring""Tail and ship events from log file(s) (repeatable, comma-separated, glob pattern *.log, or - for stdin)
--event-estring""Push one or more specific JSON event strings directly to the dashboard (repeatable)
--stdin—boolfalseRead and push log events line-by-line from STDIN pipe
--label-lstring"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—int50Maximum events to buffer in memory before flushing
--flush-interval—duration1sMaximum duration before flushing partial buffer
--queue-size—int10000Maximum events to buffer in memory while disconnected from dashboard
--disconnect-timeout—duration5mDuration disconnected from dashboard before dropping stale events
--ping-interval—duration10sInterval between connection health pings when connected
--status-s, --status-codes, --include-statusstring""Forward HTTP requests matching status codes or ranges (e.g. '400-599, 301', '4xx, 5xx'). Can be used independently.
--include-failed-FboolfalseLegacy alias: ship all failed HTTP requests (status >= 400). Can be used independently; overridden by --status.
--all-traffic—boolfalseShip all HTTP access traffic and Layer 4 UDP/TCP sessions. Can be used independently; overrides status filters.
--all-logs—boolfalseShip all raw container lines without filtering (default filters for Routewarden events & security blocks)
--url-ustring""Override central dashboard URL from registered config
--key-kstring""Override agent authentication key from registered config
--config—string~/.routewarden/agent.jsonCustom path to agent configuration file
--verbose-vboolfalseEnable verbose event-level diagnostic logging

Environment Variables ​

Every CLI flag can alternatively be configured via environment variables, ideal for Docker, Compose, and Kubernetes:

Environment VariableShorthand AliasCLI Flag EquivalentDescriptionDefault
RW_DASHBOARD_URLRW_URL--url, -uCentral Routewarden dashboard URL""
RW_AGENT_KEYRW_KEY--key, -kRemote agent authentication token""
RW_CONFIG—--configCustom path to agent configuration file~/.routewarden/agent.json
RW_STATUSRW_STATUS_CODES, RW_INCLUDE_STATUS--status, -sForward HTTP requests matching status codes or ranges""
RW_INCLUDE_FAILED—--include-failed, -FShip all failed HTTP requests ($\ge 400$)false
RW_ALL_TRAFFIC—--all-trafficShip all HTTP access traffic (including 200 OK)false
RW_ALL_LOGS—--all-logsShip all raw container lines without filteringfalse
RW_DOCKER—--dockerAuto-discover and tail Docker containersfalse (true in container)
RW_LABEL—--label, -lDocker container discovery labelroutewarden=true
RW_TAIL—--tailInitial lines to tail from containers or files50
RW_BATCH_SIZE—--batch-sizeMaximum events to buffer before flushing50
RW_FLUSH_INTERVAL—--flush-intervalMaximum duration before flushing partial batches1s
RW_QUEUE_SIZE—--queue-sizeMaximum events to buffer in memory while offline10000
RW_DISCONNECT_TIMEOUT—--disconnect-timeoutDuration disconnected before dropping stale events5m
RW_PING_INTERVAL—--ping-intervalInterval between connection health pings10s
RW_VERBOSERW_DEBUG--verbose, -vEnable verbose event-level loggingfalse
RW_DETACH—--detach, -dRun shipper daemon in detached background modefalse

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:

rwarden status / stopbash
# 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 tcp

Daemon Subsystems & Files ​

SubsystemPID FileDetached Log FileDescription
dashboard~/.routewarden/dashboard.pid~/.routewarden/dashboard.logCentral SOC Security Dashboard web server and SSE stream
push~/.routewarden/push.pid~/.routewarden/push.logBackground remote log shipper daemon
tcp~/.routewarden/tcp.pid~/.routewarden/tcp.logHigh-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-redis

Subcommands & Flags ​

Command / FlagShorthandTypeDefaultDescription
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-vsubcommand—Display TCP proxy engine version (rwarden tcp version)
--config-cstringtcp-warden.yamlPath to YAML configuration file (falls back to ROUTEWARDEN_CONFIG)
--detach-dboolfalseRun proxy in background (detached) daemon mode
--verbose-vboolfalseEnable 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.

Released under the MIT License.