Linux

Where Is the Caddyfile Stored?

Caddy reads the Caddyfile from /etc/caddy on package installs, with automatic TLS data beside it. Validate with caddy validate before reloading.

Last updated

Caddy centers on one file. Package installs read the Caddyfile from the system caddy directory, watching it for site blocks, reverse proxies, and TLS settings. Docker setups mount their own path instead, so compose files decide the location there.

Certificates and OCSP data accumulate automatically in the storage folder next door. No renewal cron exists to maintain, which removes a whole failure class from self-hosting. Reload rather than restart after edits; active connections survive a reload.

Where Caddy Web Server stores this, by platform

Linux
/etc/caddy/Caddyfile

Main config plus automatic TLS storage beside it. Docker mounts differ; check compose volumes. Validate before every reload to avoid taking all sites down.

Frequently asked questions

How do I test a Caddyfile safely?

Run caddy validate with the config path before reloading. A typo takes down every site on reload, while validation catches it safely. Keep the previous Caddyfile copy until the new one serves correctly.

Where are the TLS certificates?

Beside the config in the storage directory, managed automatically. Certificates renew without cron jobs or hooks. Back up the storage folder with the Caddyfile or new installs reissue everything from scratch.

Notice an outdated path? Let us know.