Documentation · Guide

Host onboarding

Install a new Linux agent, enrol it, and tune it from detect to enforce — fail-open the whole way, so onboarding never risks the site.

← All documentation

Fastest path: the hub one-liner

Once an agent release is published to the hub, its console Fleet tab → Add a host mints a one-time token and shows a copy-paste command. On the new Linux host, as root:

curl -fsSL https://hub.example.com/install | sudo sh -s -- --token <TOKEN> --hub-key <HUB_POLICY_KEY>

It downloads the prebuilt, checksummed binary from the hub, installs via install.sh (transparent mode, TLS auto-discovery, firewall integration), starts in detect mode, and enrols — no Go toolchain or source tree on the target.

From source (air-gapped hosts)

For air-gapped hosts, or to build the release itself, copy the complete project source from a trusted build host — never a binary built for a different OS or CPU architecture — then build and install locally:

# transfer the source tree from a trusted build host
rsync -a ./ root@NEW_SERVER:/root/obsidianwaf/

# on the target: build the native binary and install the service
go test ./...
go build -mod=vendor -o obsidianwaf ./cmd/obsidianwaf
sudo ./deploy/install.sh

The installer creates the service account, configuration, state and log locations, and the transparent-mode firewall integration. See deploy/README.md for the non-transparent path and OS prerequisites.

From detect to enforce

Agents are fail-open and the WAF is complete without the hub, so none of this risks taking a site down. Enrol in detect mode, learn, then enforce.

  1. Point it at your upstream

    Edit /etc/obsidianwaf/config.yaml to set routes, TLS, dashboard auth, and (when ready) hub enrollment, then reload with no downtime.

    sudo nano /etc/obsidianwaf/config.yaml
    sudo systemctl reload obsidianwaf
  2. Watch it in detect mode

    It logs what it would block without blocking anything. Keep the dashboard bound to 127.0.0.1:9090 and reach it over an SSH tunnel.

    # trigger a detection through the WAF
    curl "https://your-site/?q=1%20UNION%20SELECT%20password%20FROM%20users"

    # reach the dashboard over an SSH tunnel
    ssh -L 9090:127.0.0.1:9090 root@your-host
  3. Tune, then enforce

    Review detect-mode events for false positives, scope exceptions by host:, and when you are confident set rules.mode to block and reload. Blocked responses carry X-ObsidianWAF: blocked and X-ObsidianWAF-Rule headers.

Next: Configuration reference · Detection quality

Prefer a guided setup?

We'll help you roll out in detect mode and tune for your traffic before you enforce.