caddy
Skill15 starsChanged 2 months agoMITView on GitHub
Expert Caddy web server assistance covering automatic HTTPS, Caddyfile configuration, reverse proxying, and load balancing. Use when deploying modern, zero-config HTTPS web servers.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Ghost7802/awesome-api-skillstheir own version, first seen Nov 29, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Ghost7802/awesome-api-skills★ 13same name
- conjure-3301/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 107
Use Caddy's declarative Caddyfile:
- Very specific: line 132
Use encode zstd gzip on static routes to reduce bandwidth and speed up client loading.
- Very specific: line 133
Use try_files {path} /index.html for client-side Single Page Application (SPA) routing.
- Very specific: line 134
Test configuration files with caddy validate before reloading in production pipelines.
- Very specific: line 140
Use Caddy without persistent storage volumes for /data in containers.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Caddy
Caddy is an enterprise-grade web server written in Go, featuring automatic TLS certificate provisioning by default, modern HTTP/3 support, and concise configuration syntax.
When to Use
- Automated TLS & Reverse Proxying: Instant HTTPS certificates issued via Let's Encrypt / ZeroSSL with zero manual setup.
- Modern Microservice Edge Proxy: HTTP/2 and HTTP/3 reverse proxying with clean, human-readable Caddyfiles.
- Local Development HTTPS: Issuing trusted local root certificates automatically for development environments.
- Zero-Downtime Hot Reloading: Updating configurations via REST API or
caddy reloadwithout dropping connections.
Quick Start
# Caddyfile
example.com {
reverse_proxy localhost:3000
encode zstd gzip
file_server
}Core Concepts
Production Reverse Proxy Caddyfile with Security Headers
Clean reverse proxy configuration with automatic HTTPS:
# /etc/caddy/Caddyfile
api.example.com {
# Automatic TLS enabled by default!
# Reverse proxy to backend application cluster
reverse_proxy 127.0.0.1:8080 {
header_up Host {host}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-Proto {scheme}
# Health checks and failover
lb_policy round_robin
health_path /healthz
health_interval 10s
}
# Security headers
header {
Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
-Server # Remove server fingerprint header
}
# Structured JSON access logging
log {
output file /var/log/caddy/access.log {
roll_size 50mb
roll_keep 10
}
format json
}
}Static File Server with Gzip & Zstandard Compression
Serving high-performance frontends with fallback for Single Page Apps (SPAs):
app.example.com {
root * /var/www/app/dist
encode zstd gzip
# SPA routing: try file, then fallback to index.html
try_files {path} /index.html
file_server
}Live Configuration Updates via Admin API
Modifying configuration dynamically without server restarts:
# Validate Caddyfile syntax
caddy validate --config /etc/caddy/Caddyfile
# Zero-downtime configuration reload
caddy reload --config /etc/caddy/Caddyfile
# Query current running config via Admin API
curl http://localhost:2019/config/ | jq .Common Patterns
Reverse Proxy with Automated Let's Encrypt and Security Headers
Problem: Tedious manual SSL certificate provisioning, renewal cron jobs, and complex Nginx configs.
Solution: Use Caddy's declarative Caddyfile:
api.example.com {
# Automatic HTTPS via Let's Encrypt / ZeroSSL
# Security headers
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
}
# Reverse proxy to internal microservice
reverse_proxy 127.0.0.1:8080 {
health_uri /health
health_interval 10s
}
}Best Practices
Do:
- Use
encode zstd gzipon static routes to reduce bandwidth and speed up client loading. - Use
try_files {path} /index.htmlfor client-side Single Page Application (SPA) routing. - Test configuration files with
caddy validatebefore reloading in production pipelines. - Configure structured JSON logging with automated log rolling.
Don't:
- Expose Caddy's internal Admin API port (
2019) to public network interfaces. - Use Caddy without persistent storage volumes for
/datain containers; certificates will be re-requested on restart. - Disable automatic HTTPS (
http://) unless strictly operating behind an external cloud load balancer.
Troubleshooting
| Error | Cause | Solution |
certificate obtained error: acme: error: 400 | Domain DNS A/AAAA record does not point to Caddy server IP. | Verify DNS propagation and ensure ports 80 and 443 are reachable. |
caddy.service: Failed with result 'exit-code' | Syntax error in /etc/caddy/Caddyfile. | Run caddy validate --config /etc/caddy/Caddyfile to identify syntax errors. |
502 Bad Gateway | Upstream service port down or listening on localhost only inside container. | Verify upstream service is active: curl http://127.0.0.1:8080. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

