Skip to content

CLI Reference

dwaar is the single binary for running, managing, and inspecting the proxy. All subcommands share the global flags below.

dwaar [OPTIONS] [COMMAND]
FlagShortDefaultDescription
--config <PATH>-c./DwaarfilePath to Dwaarfile. Also set via DWAAR_CONFIG.
--test-tValidate configuration and exit. Does not start the server.
--daemon-dRun as a background daemon process.
--upgrade-uPerform a zero-downtime upgrade from a running instance using Pingora FD transfer.
--docker-socket [PATH]/var/run/docker.sockEnable Docker container auto-discovery. Pass a custom socket path or omit the value to use the default.
--admin-socket [PATH]/var/run/dwaar-admin.sockEnable Admin API on a Unix domain socket. Pass a custom socket path or omit the value to use the default.
--bareDisable all optional subsystems: logging, plugins, analytics, GeoIP, metrics, and cache. Implies all --no-* flags. Use for maximum throughput on CDN edge nodes.
--no-loggingDisable request logging. The log writer is not started and the log channel is not allocated.
--no-pluginsDisable the plugin chain (bot detection, rate limiting, compression, security headers).
--no-analyticsDisable the analytics subsystem (beacon, aggregation, JS injection).
--no-geoipDisable GeoIP lookups. Skips loading the MaxMind database.
--no-metricsDisable Prometheus metrics collection and the /metrics endpoint.
--no-cacheDisable HTTP response caching globally.
--workers <N|auto>autoNumber of worker processes to spawn. auto uses all available CPU cores. Each worker binds independently via SO_REUSEPORT. Zero is rejected.

When --bare is set, all individual --no-* flags are implied. Setting --bare together with any --no-* flag is redundant but not an error.

Print the Dwaar version and exit.

dwaar version
dwaar 0.9.0

Parse and validate a Dwaarfile without starting the server. Exits with code 0 on success, non-zero on error.

dwaar validate [--config <PATH>]
FlagDescription
-c, --config <PATH>Path to Dwaarfile. Overrides the global --config flag.
$ dwaar validate --config /etc/dwaar/Dwaarfile
Dwaarfile OK (3 sites, 12 routes)
$ dwaar validate --config /etc/dwaar/Dwaarfile
error: line 14: unknown directive 'proxzy'

Format a Dwaarfile to canonical style. Rewrites the file in-place unless --check is passed.

dwaar fmt [--config <PATH>] [--check]
FlagDescription
-c, --config <PATH>Path to Dwaarfile. Overrides the global --config flag.
--checkCheck formatting without modifying the file. Exits 0 if already formatted, 1 if changes would be made.

Use --check in CI to enforce consistent formatting:

$ dwaar fmt --check
Dwaarfile is not formatted. Run 'dwaar fmt' to fix.
$ echo $?
1

Display the active route table from a running Dwaar instance by querying the Admin API.

dwaar routes [--admin <ADDR>]
FlagDefaultDescription
--admin <ADDR>127.0.0.1:6190Admin API address to query.
$ dwaar routes
DOMAIN UPSTREAM TLS PLUGINS
api.example.com 10.0.1.5:8080 auto rate_limit, compress
static.example.com 10.0.1.6:8081 auto compress
*.example.com 10.0.1.7:8082 auto —

List managed TLS certificates with subject, expiry, and renewal status.

dwaar certs [--cert-dir <PATH>]
FlagDefaultDescription
--cert-dir <PATH>/etc/dwaar/certsPath to the certificate store directory.
$ dwaar certs
DOMAIN EXPIRES STATUS
api.example.com 2026-07-15 12:00 UTC valid
*.example.com 2026-07-20 08:30 UTC valid
dev.internal 2026-05-01 00:00 UTC renewing

Trigger a configuration reload on a running Dwaar instance without restarting. Dwaar re-parses the Dwaarfile and applies the new route table with zero dropped connections.

dwaar reload [--admin <ADDR>]
FlagDefaultDescription
--admin <ADDR>127.0.0.1:6190Admin API address to send the reload signal to.
$ dwaar reload
Config reloaded. 3 sites active.

Perform a zero-downtime binary upgrade using Pingora’s file descriptor transfer. Starts a new Dwaar process with --upgrade, waits for it to finish binding all listeners, then gracefully shuts down the old process. Active connections are not dropped.

dwaar upgrade [--binary <PATH>] [--pid-file <PATH>]
FlagDefaultDescription
--binary <PATH>current executablePath to the new Dwaar binary to exec. Defaults to the running binary’s path.
--pid-file <PATH>/tmp/dwaar.pidPID file of the running Dwaar instance to upgrade.
$ dwaar upgrade --binary /usr/local/bin/dwaar-new
Sending upgrade signal to PID 12345...
New process started. Waiting for handoff...
Upgrade complete. Old process exited cleanly.

Start with a custom config and 4 workers:

dwaar --config /etc/dwaar/Dwaarfile --workers 4

Validate before deploying:

dwaar validate --config /etc/dwaar/Dwaarfile && systemctl reload dwaar

Run in minimal throughput mode with no optional subsystems:

dwaar --bare --config /etc/dwaar/Dwaarfile

Run as a daemon and write a PID file for upgrade support:

dwaar --daemon --config /etc/dwaar/Dwaarfile

Check formatting in CI:

dwaar fmt --check --config ./Dwaarfile