Install and operate OWASP WAFControl
OWASP WAFControl is an open-source project that creates a user-friendly web dashboard for managing ModSecurity and the OWASP Core Rule Set (CRS). This project makes it easier for security teams to set up and manage these tools without needing advanced technical skills or command-line experience. The dashboard automates installation and configuration, allowing users to efficiently monitor and control web application security. Its goal is to help DevSecOps teams and security engineers improve their workflows while enhancing security and visibility. Overall, WAFControl aims to make advanced web application firewall management accessible to everyone.
Read this section carefully before running the installer. It explains what the system does, what it installs, how it behaves with existing services, and how to size and secure your deployment.
The system provides a full web dashboard to install, configure, and manage ModSecurity and the OWASP Core Rule Set (CRS) without command-line usage. It includes attack logging with a dedicated critical view, top attacker analytics, a CRS rule browser/editor with toggles, a CRS version switcher, a custom rule builder, and complete ModSecurity settings control—all from the browser.
The installer prepares the server and deploys ModSecurity + OWASP CRS alongside the dashboard. It can run in two modes:
SERVER_IP:PORT (default port 7000).Existing components are detected and reused. If your web server or database already exists, the installer does not reinstall or reconfigure networking; it only applies app configuration and creates the database if needed. If missing, the installer sets them up locally.
WAFControl uses PostgreSQL by default for reliability and performance. SQLite is supported for light or demo deployments but has inherent limitations.
systemctl status wafcontrol
systemctl status wafcontrol-celery-worker
systemctl status wafcontrol-celery-beat
journalctl -u wafcontrol -e
journalctl -u wafcontrol-celery-worker -e
journalctl -u wafcontrol-celery-beat -e
This installer will automatically set up Python, PostgreSQL, Redis, Celery, Django, Gunicorn, and your selected web server (Nginx/Apache). After completion, services will be up and running.
curl -fsSL https://wafcontrol.org/download/install.sh -o install.sh
chmod +x install.sh
sudo ./install.sh
After installation, check services:
systemctl status wafcontrol
systemctl status wafcontrol-celery-worker
systemctl status wafcontrol-celery-beat
Use journalctl -u to view detailed logs for each service.
WAFControl includes a safe uninstaller that removes only WAFControl components. It will not remove Nginx or PostgreSQL packages.
The uninstallation process is interactive and designed to avoid breaking existing infrastructure. It removes WAFControl services, runtime files, and WAFControl-specific Nginx configuration (if you choose).
Run the uninstaller:
curl -fsSL https://raw.githubusercontent.com/wafcontrol/install/refs/heads/main/uninstall.sh -o uninstall.sh
The script will ask before removing:
/run/wafcontrol/opt/WafControl/var/lib/wafcontrol-installer/state.env/etc/nginx/conf.d/wafcontrol.conf (if present)/etc/nginx/modsec/ (WAFControl ModSecurity + CRS directory)/etc/nginx/nginx.conf:
load_module ... ngx_http_modsecurity_module.so;# WAFCONTROL-BEGIN blocknginx -V), example:
/usr/lib/nginx/modules/ngx_http_modsecurity_module.so/etc/systemd/system/wafcontrol.service/etc/systemd/system/wafcontrol-celery-worker.service/etc/systemd/system/wafcontrol-celery-beat.service/run/wafcontrol/opt/WafControl (optional)If you do not have uninstall.sh, you can remove WAFControl manually:
sudo systemctl disable --now wafcontrol wafcontrol-celery-worker wafcontrol-celery-beat || true
sudo rm -f /etc/systemd/system/wafcontrol*.service
sudo systemctl daemon-reload
sudo rm -f /etc/nginx/conf.d/wafcontrol.conf
sudo rm -rf /etc/nginx/modsec
sudo sed -i '/load_module .*ngx_http_modsecurity_module.so/d' /etc/nginx/nginx.conf
sudo sed -i '/# WAFCONTROL-BEGIN/,/# WAFCONTROL-END/d' /etc/nginx/nginx.conf
MOD_DIR="$(nginx -V 2>&1 | sed -n 's/.*--modules-path=\([^ ]*\).*/\1/p' | tail -n1)"
sudo rm -f "$MOD_DIR/ngx_http_modsecurity_module.so"
sudo nginx -t && sudo systemctl reload nginx || sudo nginx -s reload
/opt/WafControl.