HELLO, GUARDIAN

Protection starts here.

From your first request to your entire stack. Get GuardianWAF running in the way that fits your application.

One engine, three ways to deploy. Use Docker to protect any reachable HTTP service, embed the middleware in a Go application, or run the standalone reverse proxy. Examples below follow the official project documentation.

01. Pick your installation

Download a prebuilt binary for your platform, use the official container image, or install using a compatible Go toolchain. Check the repository’s go.mod for the current Go requirement.

Download the latest release

The source build includes a dashboard asset step; use the official source-build workflow if you are building a release yourself.

terminal · install with Go
go install github.com/guardianwaf/guardianwaf/cmd/guardianwaf@latest

02. Docker sidecar

The quickest way to protect an existing application. This example creates a demo backend and the WAF on a shared Docker network.

For your application, replace http://app:80 with its reachable upstream address. For production, choose a pinned container release. Automatic service discovery is also available with gwaf.* Docker labels.

Docker auto-discovery guide
terminal
docker network create guardian-demo
docker run -d --name app --network guardian-demo nginx:alpine
docker run -d --name guardianwaf --network guardian-demo \
  -p 8088:8088 \
  ghcr.io/guardianwaf/guardianwaf:latest \
  sidecar --upstream http://app:80

curl -i http://localhost:8088

03. Go middleware

Wrap a standard net/http handler. The engine runs inside your application, with no external Go module dependencies.

Start your application and send a request to http://localhost:8088. Use thresholds, exclusions, and event callbacks to adapt protection to your own traffic.

terminal
go get github.com/guardianwaf/guardianwaf
main.go
package main

import (
  "log"
  "net/http"
  "github.com/guardianwaf/guardianwaf"
)

func main() {
  waf, err := guardianwaf.New(guardianwaf.Config{
    Mode: guardianwaf.ModeEnforce,
  })
  if err != nil { log.Fatal(err) }
  defer waf.Close()

  app := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    w.Write([]byte("Hello, protected world."))
  })
  log.Fatal(http.ListenAndServe(":8088", waf.Middleware(app)))
}

04. Standalone reverse proxy

Install a binary, then save this file as guardianwaf.yaml. The proxy listens on port 8088 and forwards requests to a local app on port 3000.

Start with your traffic in mind. These examples use enforce mode. To observe existing traffic before enforcing a policy, set mode: monitor and review the findings first.
guardianwaf.yaml
mode: enforce
listen: ":8088"
upstreams:
  - name: app
    targets:
      - url: "http://localhost:3000"
routes:
  - path: /
    upstream: app
terminal
guardianwaf serve -c guardianwaf.yaml

05. Before you go live

Use the project’s production deployment guide for the complete configuration. At a minimum:

  • Start in monitor mode, review findings, and tune exclusions for your application.
  • Configure TLS certificates or place the WAF behind your trusted TLS terminator.
  • Keep the dashboard on a private interface with separate viewer and administrator keys.
  • Configure trusted proxy addresses so client IP handling matches your infrastructure.
  • Set up health probes, metrics, persistent configuration, and event retention.
  • Pin the release you deploy and follow the project’s upgrade guidance.
Production deployment guide

Go a little deeper.

The source repository is the authoritative reference for configuration and supported capabilities.