Sign inSign up

morsalin1342/caddy

By morsalin1342

•Updated 27 days ago

Production-ready Caddy with Coraza WAF, rate limiting, Brotli, Souin cache and 6 DNS providers

Image
Networking
Security
Web servers
1

965

morsalin1342/caddy repository overview

⁠Caddy — Production-Ready Web Server with Essential Plugins

Maintained by morsalin1342⁠ · GitHub⁠

Docker Pulls Image Size GitHub Stars License

A custom Caddy build with the OWASP Coraza WAF, rate limiting, AI-crawler blocking, Brotli compression, HTTP caching, and 6 DNS challenge providers for automatic HTTPS.

⁠✨ Why This Image?

FeatureOfficial imageThis image
Brotli compression❌✅ cbrotli
HTTP caching❌✅ Souin — Redis, Otter, SimpleFS
Web application firewall❌✅ OWASP Coraza, Core Rule Set compiled in
Rate limiting❌✅ Sliding-window, per IP / header / host
IP range blocking❌✅ Defender — AI crawlers, cloud ranges
DNS challengeNeeds a custom build✅ 6 providers built in

⁠Quick Start

docker run -d --name caddy \
    -p 80:80 -p 443:443 -p 443:443/udp \
    -v $(pwd)/Caddyfile:/etc/caddy/Caddyfile:ro \
    -v caddy_data:/data \
    morsalin1342/caddy:latest

⁠Example Caddyfile

{
    order coraza_waf first
}

example.com {
    encode zstd gzip
    cache
    coraza_waf {
        load_owasp_crs
        directives `
            Include @coraza.conf-recommended
            Include @crs-setup.conf.example
            Include @owasp_crs/*.conf
            SecRuleEngine DetectionOnly
        `
    }
    reverse_proxy localhost:8080
}

load_owasp_crs is required for the @ include paths to resolve. Start in DetectionOnly, tune out false positives, then switch to On.

⁠What's Included

CategoryPlugins
SecurityCoraza WAF (SecLang/ModSecurity compatible, OWASP CRS compiled in)
Rate limitingSliding-window, multi-zone, keyed on any request placeholder
Bot / IP blockingDefender — embedded AI-crawler and cloud-provider IP ranges
Compressioncbrotli (Brotli)
CachingSouin with Redis, Otter, and SimpleFS backends
DNS/ACMECloudflare, Route53, DigitalOcean, Vultr, Azure, Google Cloud DNS

⁠Available Tags

latest, 2.11.4 — version-tagged for production stability.

⁠❓ FAQ

Q: How do I turn the WAF on? A: Add order coraza_waf first to the global options, then a coraza_waf block with load_owasp_crs. Without load_owasp_crs the @ include paths do not resolve and Caddy fails at startup. Start at SecRuleEngine DetectionOnly.

Q: How do I get a wildcard certificate? A: All six DNS providers are pre-compiled. Set your provider's credentials and use the tls directive with dns <provider>.

Q: Can I use this with PHP? A: Use frankenphp⁠ for Caddy and PHP in one container, or pair this with php⁠ over FastCGI.


Image / ToolDescription
morsalin1342/frankenphp⁠Caddy + PHP app server in one container
morsalin1342/php⁠Traditional PHP-FPM & CLI images
morsalin1342/nginx⁠nginx with ModSecurity 3, Brotli, zstd & GeoIP2
easydigital/caddy⁠Enterprise org mirror
caddy-souin-cache-manager⁠Manage this image's Souin cache from WP Admin

⭐ If this image helps you, consider giving it a star on GitHub⁠!

Tag summary

Content type

Image

Digest

sha256:8ebfd08cf…

Size

45.6 MB

Last updated

27 days ago

docker pull morsalin1342/caddy