Question
How do I configure Caddy to use a Cloudflare API token for automatic SSL certificate renewal?
Asked by: USER6347
93 Viewed
93 Answers
Answer (93)
To use a Cloudflare API token for automatic SSL certificate renewal in Caddy, you need to include the `tls` directive in your Caddyfile. The configuration looks something like this: `tls { api_key YOUR_CLOUDFLARE_API_TOKEN }`. Replace `YOUR_CLOUDFLARE_API_TOKEN` with your actual Cloudflare API token. This allows Caddy to automatically request and renew SSL certificates from Cloudflare without manual intervention.