# CheeseWAF

> Self-hosted Web Application Firewall. Install, configure, and operate it.

---

LLMS index: [llms.txt](/llms.txt)

---

CheeseWAF is a self-hosted Web Application Firewall.
It ships as one Go binary with an embedded SQLite store, a Web console, a CLI / TUI, and a REST management API.

The data plane inspects requests, then proxies them upstream.
It does not call a large language model on every request.
After the response is sent, an optional ALAP queue can review suspicious samples.


<div class="pageinfo pageinfo-info">

Download packaged builds from [GitHub Releases](https://github.com/LaokeQwQ/CheeseWAF/releases).
The project is licensed under [Apache License 2.0](https://github.com/LaokeQwQ/CheeseWAF/blob/master/LICENSE).

</div>


## How it works {#how-it-works}

1. **Data plane.** Parameters are decoded, then parsed. Deterministic SQL injection, XSS, and command execution can be blocked immediately.
2. **ALAP.** After the response is sent, ambiguous or embedded samples go to a background queue. Any OpenAI-compatible model can review them.
3. **Review results.** Findings marked `high` or `critical` can become lasting IP, fingerprint, or signature rules when auto-agree is on.

ALAP stands for **AI Large-Language-Model Auto Pilot**.

## Default listeners {#default-listeners}

| Plane | Default address | Role |
| --- | --- | --- |
| Data plane | `http://127.0.0.1:8080` | Receive site traffic, inspect, proxy upstream |
| Management plane | `http://127.0.0.1:9443` | Web console, REST API, setup wizard. Docker defaults to HTTPS |
| Cluster plane | `http://127.0.0.1:9444` | Node sync in cluster mode |
| Local controller | `http://127.0.0.1:17943` | Windows / macOS desktop controller only |

## Start here {#start-here}

<div id="td-nav-cards-8661fbff76099d9a309b0e92217d5921-1" class="td-content-cards" style="--td-card-columns: 2">
<article id="td-nav-card-8661fbff76099d9a309b0e92217d5921-nav-cards-1-0" class="td-content-card">
  <div class="td-content-card__body">
    <div class="td-content-card__head"><i class="fa-solid fa-download td-content-card__icon" aria-hidden="true"></i><a class="td-content-card__title" href="/docs/cheesewaf/install/">Install</a></div><p class="td-content-card__description">Linux, Docker, Windows, and macOS.</p>
  </div>
</article>

<article id="td-nav-card-8661fbff76099d9a309b0e92217d5921-nav-cards-1-1" class="td-content-card">
  <div class="td-content-card__body">
    <div class="td-content-card__head"><i class="fa-solid fa-rocket td-content-card__icon" aria-hidden="true"></i><a class="td-content-card__title" href="/docs/cheesewaf/tutorial/">Quick start</a></div><p class="td-content-card__description">Initialize, add a site, connect a model.</p>
  </div>
</article>

<article id="td-nav-card-8661fbff76099d9a309b0e92217d5921-nav-cards-1-2" class="td-content-card">
  <div class="td-content-card__body">
    <div class="td-content-card__head"><i class="fa-solid fa-diagram-project td-content-card__icon" aria-hidden="true"></i><a class="td-content-card__title" href="/docs/cheesewaf/concepts/">Concepts</a></div><p class="td-content-card__description">Pipeline, paranoia levels, isolated vs embedded.</p>
  </div>
</article>

<article id="td-nav-card-8661fbff76099d9a309b0e92217d5921-nav-cards-1-3" class="td-content-card">
  <div class="td-content-card__body">
    <div class="td-content-card__head"><i class="fa-solid fa-shield td-content-card__icon" aria-hidden="true"></i><a class="td-content-card__title" href="/docs/cheesewaf/protection/">Protection</a></div><p class="td-content-card__description">Semantic engine, IP, bot, rate limit, ACL.</p>
  </div>
</article>

</div>

---

Section pages:

- [How CheeseWAF works](/docs/cheesewaf/intro/): Data plane vs ALAP, why requests are not sent to a model in line, and what ships in one binary.
- [Install](/docs/cheesewaf/install/): Choose a CheeseWAF package for Linux, Docker, Windows, or macOS.
- [Quick start](/docs/cheesewaf/tutorial/): Initialize CheeseWAF, add the first site, and connect a model for ALAP.
- [Concepts](/docs/cheesewaf/concepts/): Pipeline, paranoia levels, isolated vs embedded payloads, and the three management surfaces.
- [Sites and reverse proxy](/docs/cheesewaf/sites/): Domains, upstreams, load balancing, health checks, and per-site WAF switches.
- [Protection](/docs/cheesewaf/protection/): Semantic engine, custom rules, IP and geo, bot challenges, rate limits, ACL, and block pages.
- [API security](/docs/cheesewaf/api-security/): Endpoint discovery, schema checks, JWT / JWKS, per-route rate limits, and RBAC.
- [Edge headers, cache, and compression](/docs/cheesewaf/edge/): Set or delete response headers, cache static prefixes, and compress JSON or HTML.
- [TLS and certificates](/docs/cheesewaf/tls/): Admin TLS, site certificates, ACME issuance, HTTP/3, and HSTS.
- [ALAP and the review queue](/docs/cheesewaf/alap/): Asynchronous model review, auto-agree, the assistant, tool approvals, and self-learning.
- [Monitor, logs, and attack map](/docs/cheesewaf/monitor/): Dashboard stats, access logs, Prometheus, alerts, notifications, and the attack map.
- [Cluster](/docs/cheesewaf/cluster/): Join tokens, mTLS interconnect, builtin consensus, rolling upgrade, and traffic peers.
- [Storage and scheduler](/docs/cheesewaf/storage/): SQLite, optional PostgreSQL and log sinks, backups, cleanup, and scheduled reports.
- [Web console](/docs/cheesewaf/console/): Pages in the management UI and how they map to this manual.
- [CLI and TUI](/docs/cheesewaf/cli/): cheesewaf and waf-cli share one binary. Default commands depend on the executable name.
- [REST API](/docs/cheesewaf/api/): Health endpoints, session login, management tokens, CSRF, and the permission map.
- [Configuration reference](/docs/cheesewaf/config/): Top-level keys in cheesewaf.yaml and where this manual explains each block.
- [Operations](/docs/cheesewaf/operations/): Users, 2FA, time sync, OTA updates, and system maintenance.
- [Build from source](/docs/cheesewaf/develop/): Go and Node versions, frontend build, tests, and the attack corpus tool.
- [License and related repositories](/docs/cheesewaf/license/): Apache-2.0 for CheeseWAF source. Names and logos are not a trademark grant.
