// documentation

Read the manual.

Everything you need to deploy WafWay — quick-start, installation, configuration, deployment targets, and the API reference.

[ getting started ]

Quick start.

1. Download the binary

# single-binary install (Linux/macOS)
$ curl <wafway repo url>

2. Minimum configuration — wafway.yaml

listen: :443
backends:
  - host: api.app.com
    upstream: http://10.0.1.10:8080
inspectors: [ sqli, xss, xxe, cmdi, lfi, ssrf, path, bot, scan, geo, rate, proto, smug, ml ]
challenge: { enabled: true, pow_bits: 18 }

3. Start WafWay

$ wafway -config wafway.yaml
→ 14 inspectors loaded · :443 ready · /metrics live

4. Access the dashboard

Open http://localhost:9090. Default credentials are issued on first start and printed to the WafWay log. Change them immediately — the platform refuses to serve /admin with default creds.

[ getting started ]

System requirements.

OS

Linux (Debian 11+, Ubuntu 20.04+, RHEL/Rocky 8+), macOS 12+, Windows Server 2019+, FreeBSD 13+.

CPU

x86_64 or ARM64 (Graviton supported). 2 vCPU minimum for production.

Memory

512 MB minimum, 2 GB recommended per instance. Linear with concurrent connections.

Storage

~50 MB for the binary. Add storage for SQLite (~200 MB / 1 M req) or use external Postgres.

Network

Inbound 80/443. Outbound to backends, Redis, Postgres, SIEM.

TLS

Bring your own cert, ACME (Let's Encrypt), or terminate at an upstream LB.

[ installation ]

Linux install.

Via install script (recommended)

$ curl <wafway repo url>
$ sudo systemctl enable --now wafway

Manual install

# 1. download the binary for your arch
$ wget <wafway-binary-url>/wafway-linux-amd64
$ chmod +x wafway-linux-amd64
$ sudo mv wafway-linux-amd64 /usr/local/bin/wafway

# 2. config + service
$ sudo mkdir -p /etc/wafway /var/lib/wafway
$ sudo cp wafway.yaml /etc/wafway/
$ sudo cp wafway.service /etc/systemd/system/

# 3. start
$ sudo systemctl daemon-reload
$ sudo systemctl enable --now wafway
$ sudo systemctl status wafway
[ installation ]

Docker install.

$ docker run -d --name wafway \
    -p 80:80 -p 443:443 -p 9090:9090 \
    -v /etc/wafway:/etc/wafway:ro \
    -v /var/lib/wafway:/var/lib/wafway \
    wafway/wafway:1.0

Image is multi-arch (linux/amd64 + linux/arm64), rootless-compatible, and under 25 MB. Hot-reload by sending SIGHUP to PID 1.

[ installation ]

Standalone mode.

Run WafWay directly on the edge with TLS termination — no Nginx, no ALB required.

Config: standalone with SSL

server:
  listen: ":443"
  tls:
    enabled: true
    cert: /etc/wafway/tls/cert.pem
    key:  /etc/wafway/tls/key.pem
  redirect_http_to_https: true

backend:
  url: "http://127.0.0.1:8080"

SSL via Let's Encrypt

$ sudo certbot certonly --standalone -d yourdomain.com
$ sudo ln -s /etc/letsencrypt/live/yourdomain.com/fullchain.pem /etc/wafway/tls/cert.pem
$ sudo ln -s /etc/letsencrypt/live/yourdomain.com/privkey.pem   /etc/wafway/tls/key.pem
$ sudo systemctl restart wafway
[ installation ]

Behind Nginx.

For environments where Nginx already terminates TLS, place WafWay between Nginx and your app — Nginx → WafWay → app.

# /etc/nginx/sites-available/wafway
server {
    listen 443 ssl http2;
    server_name yourdomain.com;

    ssl_certificate     /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:8081;   # wafway listens here
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

Three deployment patterns are supported: Nginx-in-front (most common), WafWay-in-front (single-process), and Nginx-LB-across-WafWay (HA). See your engineering preference — performance is functionally identical.

[ configuration ]

Basic config.

WafWay reads a single YAML file (default: /etc/wafway/wafway.yaml). All sections are hot-reloaded — edit the file and send SIGHUP, or click "Reload" in the admin UI. No restart, no dropped connections.

server:
  listen:    ":443"
  log_level: info          # debug · info · warn · error
  request_timeout: 30s

backend:
  url:        "http://app-server:8080"
  timeout:    10s
  max_retries: 3

admin:
  enabled: true
  listen:  "127.0.0.1:9090"
  jwt_secret: "<128-char-secret>"
  mfa: required      # totp
[ configuration ]

Inspectors.

sqlixssxxecmdilfissrfpath botscangeorateprotosmugml
inspectors:
  sqli:   { enabled: true, mode: block,    paranoia: 2 }
  xss:    { enabled: true, mode: block }
  xxe:    { enabled: true, mode: block }
  cmdi:   { enabled: true, mode: block }
  ssrf:   { enabled: true, deny_cidrs: [ "169.254.0.0/16", "10.0.0.0/8" ] }
  bot:    { enabled: true, mode: challenge, verify_good_bots: true }
  scan:   { enabled: true, auto_ban_seconds: 3600 }
  geo:    { enabled: true, deny: [ "KP" ], tor_block: true }
  rate:   { enabled: true, soft_rpm: 60, hard_rpm: 300 }
  ml:     { enabled: true, sensitivity: medium }          # enterprise

Per-host overrides go under backends[].inspectors. Per-route overrides go under backends[].routes[].inspectors. Anything not overridden inherits the global block.

[ configuration ]

Rate & geo.

Three-tier rate limiting

rate:
  key:        "$ip"            # $ip · $ja3 · header:X-User · cookie:sid
  soft_rpm:   60               # presented PoW + click-to-verify
  hard_rpm:   300              # hard 429
  window:     60s
  scope:      route            # global · host · route

Geo blocking

geo:
  enabled:    true
  db_path:    /var/lib/wafway/GeoLite2-Country.mmdb
  allow:      [ "IN", "US", "GB", "DE", "FR", "JP", "AU" ]
  deny:       [ "KP" ]
  tor_block:  true
  vpn_block:  false
  asn_deny:   [ 12345, 67890 ]
[ configuration ]

Security headers.

WafWay injects HSTS, CSP, X-Frame-Options, Referrer-Policy and Permissions-Policy by default. Each can be tuned per host.

headers:
  hsts:
    enabled: true
    max_age: 31536000           # 1 year
    include_subdomains: true
    preload: false

  csp:
    enabled: true
    default_src: "'self'"
    script_src:  "'self' 'unsafe-inline'"
    style_src:   "'self' 'unsafe-inline'"
    frame_ancestors: "'none'"

  cors:
    enabled: true
    allow_origins: [ "https://app.example.com" ]
    allow_credentials: true
[ configuration ]

Custom rules.

Add CVE-specific rules or organisational policies from the admin UI or via the REST API. Hot-reloaded in < 5 s.

rules:
  - id:       block-log4shell
    pattern:  '\\$\\{jndi:.+\\}'
    field:    [ url, header, body ]
    action:   block
    severity: critical
    tags:     [ cve-2021-44228 ]

Actions: block, challenge, log, route, tag. Priorities resolve in declaration order.

[ operations ]

Analytics & logs.

Real-time traffic, top paths, top attacks, top sources — all queryable via REST or exported to your SIEM.

# last 100 blocked events
$ curl -H "Authorization: Bearer $TOKEN" \
    https://wafway.local:9090/api/v1/events?level=block&limit=100

# Prometheus metrics
$ curl https://wafway.local:9090/metrics
[ operations ]

API reference.

REST API over /api/v1/*. JWT auth, optional mTLS, RBAC scopes per endpoint, every call audited.

POST /api/v1/auth/login

Issue a JWT. Returns access + refresh.

GET /api/v1/rules

List custom rules.

POST /api/v1/rules

Create a rule. Hot-applies.

PATCH /api/v1/rules/{id}

Edit a rule.

GET /api/v1/events

Stream or query event log.

GET /api/v1/api-discovery

Inferred endpoint inventory.

POST /api/v1/ip/ban

Ban an IP — instant cluster-wide.

GET /healthz · /readyz

Liveness / readiness for Kubernetes.

[ deployment ]

Cloud deployment.

AWS

EC2 / ECS Fargate / EKS · ALB · ElastiCache · RDS · Graviton (ARM64).

GCP

GCE / Cloud Run / GKE · Cloud Load Balancing · Memorystore · Cloud SQL.

Azure

VMSS / Container Apps / AKS · Application Gateway · Cache for Redis · Database for PG.

DigitalOcean / Linode / Hetzner

Droplets / VMs · managed Postgres · managed Redis.

[ deployment ]

Kubernetes.

Deploy via Helm or raw manifests. The chart ships HPA, PodDisruptionBudget, and Redis-cluster connection out of the box.

# helm
$ helm repo add wafway https://charts.wafway.io
$ helm install wafway wafway/wafway -n wafway --create-namespace \
    --set replicaCount=3 \
    --set redis.cluster.enabled=true \
    --set postgres.host=pg.svc

# raw manifests
$ kubectl apply -f https://docs.wafway.io/k8s/manifest.yaml

Each pod exposes :8080 (proxy), :9090 (admin), and :9091 (Prometheus). Liveness uses /healthz, readiness /readyz. The HPA scales on http_requests_per_second and p95_latency_ms.

[ deployment ]

Docker Compose.

version: "3.8"
services:
  wafway:
    image: wafway/wafway:1.0
    ports: [ "80:80", "443:443", "9090:9090" ]
    volumes:
      - ./wafway.yaml:/etc/wafway/wafway.yaml:ro
      - ./tls:/etc/wafway/tls:ro
    environment:
      REDIS_URL: redis://redis:6379
      POSTGRES_URL: postgres://wafway:secret@pg/wafway
    depends_on: [ redis, pg ]

  redis:
    image: redis:7-alpine

  pg:
    image: postgres:16-alpine
    environment: { POSTGRES_PASSWORD: secret, POSTGRES_DB: wafway, POSTGRES_USER: wafway }

Still got questions?

We're a small, real team. Email us — you'll get a human reply.

Talk to us → 24 h reply    Download brochure