What is it?
Caddy is a simple, yet powerful web server and reverse proxy extensible with plugins.
How I use it
I use Caddy in my homelab to serve parts of my NoteVault using Quartz and also as a reverse proxy. This allows all my services to have reasonable URLs and HTTPS.
Setup
Caddy runs on my servers as a Docker or LXC container. This allows for relatively easy and straightforward deployment.
Custom build
I use custom build with plugins. Docker image builds are being built and hosted on my git instance. There are Dockerfiles and custom Forgejo Actions, which build an up-to-date version once a week. From here, I can pull it and update at any time.
Currently used plugins:
- Cloudflare DNS
- Caddy L4
Useful Caddyfile directives and snippets
Deny access
Example for private ranges - 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8 127.0.0.1/8
example.com {
@denied not remote_ip private_ranges
abort @denied
}