0
Fork 0
My Caddy configuration
Find a file
2026-11-28 05:51:04 +00:00
shared Fixup HSTS preload support 2026-11-28 05:51:04 +00:00
sites Fixup HSTS preload support 2026-11-28 05:51:04 +00:00
utils Document the config and snippets a bit more 2026-11-28 01:11:05 +00:00
.gitignore migrate remaining configs 2026-10-06 09:16:48 +00:00
Caddyfile Employ IP blocking via gayint blocklist on git.nexy7574.co.uk 2026-11-27 20:38:10 +00:00
LICENSE Document the config and snippets a bit more 2026-11-28 01:11:05 +00:00
README.md Document the config and snippets a bit more 2026-11-28 01:11:05 +00:00

Caddyfiles

All caddyfiles that power my web server.

Deploying

A custom caddy build is required:

xcaddy build --with github.com/caddy-dns/porkbun

A caddy.service override is also required:

# /etc/systemd/system/caddy.service.d/override.conf
[Service]
EnvironmentFile=-/etc/caddy/.env

The config is very large and will take a few seconds to reload.

Not HA ready! (yet).

Environment variables

In /etc/caddy/.env:

  • PORKBUN_API_KEY=... - required for DNS-01 challenges (wildcard certs)
  • PORKBUN_SECRET_KEY=... - required for DNS-01 challenges (wildcard certs)

Regenerating dynamic configs

Some shared config is dynamic, such as IP-based blocklists. Refer to each script in utils/.

Updating

This repo is the ENTIRE caddy configuration, including the root Caddyfile. Just git pull and caddy reload.