Caddyfile versus JSON configuration
The Caddyfile is a config adapter for Caddy. It is preferred for manually crafting configurations but is less expressive, flexible, or programmable than Caddy's native JSON structure. For automated deployments, use JSON with Caddy's API. The Caddyfile can also be used with the API to a limited extent.