Skip to main content
Snare works without any external dependency. The Cloudflare Worker source is in the repo (worker/) and a full Go callback server is built into the CLI (snare serve).
Always run snare serve behind a reverse proxy you control (nginx, Caddy, Cloudflare Tunnel). Never bind directly to a public interface.The server trusts X-Forwarded-For headers for IP attribution. Without a trusted upstream proxy stripping or overwriting this header, any caller can spoof their source IP in alert metadata. A reverse proxy ensures the header reflects the real client address.

Why self-host?

  • Air-gapped environments — internal servers, no outbound traffic to snare.sh
  • Custom callback domains — canary.yourcompany.internal instead of snare.sh
  • Data sovereignty — events never leave your infrastructure
  • On-premises compliance — financial services, healthcare, defense

snare serve

--dashboard-token is required. The dashboard exposes all alert data — protect it with a strong token (min 16 chars). Generate one with openssl rand -hex 32.

Access the dashboard

Or pass Authorization: Bearer <token> for API access.

With TLS (Let’s Encrypt)

Requires port 443 to be accessible for the ACME challenge.

Docker

Point the CLI at your server

Edit ~/.snare/config.json after snare init:
Or set during arm:

Cloudflare Worker (managed backend alternative)

The worker/ directory contains the full Cloudflare Worker source. Deploy your own:
Set secrets:
Then update callback_base in ~/.snare/config.json to point at your worker URL.

Verifying webhook signatures

When WEBHOOK_SIGNING_SECRET is configured, outbound webhooks include:
Verify in your receiver: