caddy validate --config /etc/caddy/Caddyfile

Category: Self-Hosting

caddy validate --config /etc/caddy/Caddyfile

Check the Caddyfile for syntax errors before applying it

Checks the Caddyfile for errors before applying it — equivalent to nginx -t. Prevents taking your server offline with a bad config.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.