Configuration File Reference

Complete structure navigation for cheesewaf.yaml, top-level key index, timeout controls, and hot-reload scopes.

CheeseWAF automatically generates a default cheesewaf.yaml configuration file within its runtime data directory under config/ upon first launch (default ./data/config/cheesewaf.yaml). A baseline template is maintained in the source repository at configs/cheesewaf.yaml.

configs/cheesewaf.yaml is a source template, not a runtime state file. Setup, site management, and console saves write to the runtime configuration. For source builds, copy it first to ./data/config/cheesewaf.yaml or another dedicated data directory so database paths, certificates, secrets, and site changes never modify the Git working tree.

Top-Level Configuration Index

Top-Level KeyFunctional Area & RoleDocumentation Reference
serverNetwork listener sockets, management endpoints, and connection timeoutsArchitecture & Overview · TLS & Certificates
tlsData Plane TLS/HTTPS certificates and HSTS enforcementTLS & Certificates
setupInitialization state tracking and runtime data directory pathSystem Initialization · Storage & Scheduling
deployment / clusterDeployment topology (standalone vs. HA cluster) and interconnectsHigh Availability Clustering
consoleWeb console UI preferences and administrative login securityBot & CAPTCHA · Monitoring & Logs
sitesReverse proxy sites, domain bindings, and upstream origin poolsSite Management
protectionGlobal security baseline (AST engines, IP, Bot, rate limiting, ACL)Security Protection Policies
block_pageBlock response templates and custom HTML branding sanitizationBlock Response Pages
storagetemporary SQLite management profile; reserved, currently rejected production profile; optional external log sinksStorage & Scheduling
loggingAccess log verbosity, structured JSON formats, and log rotationMonitoring & Logs
aiALAP LLM provider endpoints and asynchronous review parametersALAP Review & Self-Learning
updateReserved OTA settings; updater worker is not implemented in the current runtimeSystem Operations
schedulerAutomated log cleanup, configuration snapshots, and daily security reports; snapshots are not complete database exportsStorage & Scheduling
edgeEdge response header manipulation, static caching, and Brotli compressionEdge Features
monitorPrometheus metrics export, Remote Write, and alert notifiersMonitoring & Logs
apisecAPI asset discovery, request schema contracts, and RBAC matrixAPI Security & Governance
performanceGo runtime Garbage Collection (GC) adaptive tuning (memory_limit_ratio / min_gogc)Architecture & Overview
time_syncNTP sources, synchronization intervals, and clock-offset consensus limitsMonitoring & Logs
captcha_assetsLocal or S3 CAPTCHA image/font assets and resource limitsBot & CAPTCHA
acmeACME certificate issuance and DNS challenge provider settingsTLS & Certificates
vulnerabilityVulnerability CVE feed subscription configurationsSystem Operations

Network Timeout Controls

  • Ingress Connection Timeouts: server.read_timeout, server.write_timeout, and server.idle_timeout govern the lifecycle of HTTP connections between clients and the WAF.
  • Reverse Proxy Timeouts: sites[].waf.performance.proxy_timeout defines the maximum allowable duration when connecting and streaming responses to/from backend origin servers.

Protection Modes & Request Body Limits

  • WAF Modes (waf.mode): Supports block (actively drops and mitigates attacks), monitor (logs alerts without blocking), and off (disables inspection). The legacy alias log is automatically recognized and normalized to monitor.
  • Request Body Size Guard (max_body_bytes): If an incoming request body exceeds the configured max_body_bytes limit, the data plane immediately responds with HTTP 413 Request Entity Too Large, preventing memory exhaustion and partial-body evasion.

Gateway Adapter Authentication & Proxy Ingress

  • Dedicated Adapter Token (CHEESEWAF_ADAPTER_TOKEN): When integrating with external reverse proxy adapters (CheeseWAF-Adapters), callers must supply the token via the dedicated X-CheeseWAF-Adapter-Token HTTP header. It is not a Bearer token and must never be placed in the Authorization header.
  • Trusted CIDR Blocks (trusted_cidrs): By default, the trusted CIDR list is empty. When running behind an upstream proxy (such as a CDN or cloud load balancer), configure sites[].waf.access_control.trusted_cidrs (e.g., 127.0.0.1/32 or ::1/128) to securely parse client IP addresses from X-Forwarded-For.

Dynamic Hot-Reload Scopes

  • Atomic In-Memory Hot Reload: Modifying site definitions, custom regex rules, IP access lists, bot challenge policies, or ACL rules via the Web console or REST API takes effect immediately in memory without process restarts.
  • Restart Required: Alterations to physical socket listeners (such as server.listen or server.admin_listen) require restarting the daemon process via cheesewaf restart or systemd.