Production-ready Caddy with Coraza WAF, rate limiting, Brotli, Souin cache and 6 DNS providers
1.4K
Published by easydigital · GitHub
Enterprise Caddy build with production-ready plugins. Same image as morsalin1342/caddy — published here for organizational deployments.
| Feature | Official image | This 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 challenge | Needs a custom build | ✅ 6 providers built in |
# production.yml
services:
caddy:
image: easydigital/caddy:2.11.4
restart: always
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
environment:
CLOUDFLARE_API_TOKEN: ${CF_TOKEN}
volumes:
caddy_data:
caddy_config:
*.example.com {
tls {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
}
reverse_proxy localhost:8080
}
latest, 2.11.4 — pin to a specific version for production.
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 / Tool | Description |
|---|---|
| easydigital/frankenphp | Caddy + PHP app server in one container (org) |
| easydigital/php | Traditional PHP-FPM & CLI images (org) |
| easydigital/nginx | nginx with ModSecurity 3, Brotli, zstd & GeoIP2 (org) |
| morsalin1342/caddy | Personal account 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!
Content type
Image
Digest
sha256:8ebfd08cf…
Size
45.6 MB
Last updated
27 days ago
docker pull easydigital/caddy