This page is for a DNS record with the Cloudflare proxy on (the orange cloud), in front of Caddy or nginx on the server. For a tunnel, see Cloudflare Tunnel.
SSL mode
In the Cloudflare dashboard, open SSL/TLS > Overview. Set the mode to Full (strict).
| Mode | Result |
|---|---|
| Full (strict) | Correct. Cloudflare connects to the server with HTTPS and checks the certificate. |
| Full | Works. Cloudflare does not check the certificate. |
| Flexible | Does not work. Cloudflare connects with HTTP. The server sends a redirect to HTTPS. The browser shows a redirect loop. |
| Off | Does not work. Sign-in needs HTTPS. |
The first certificate
Caddy and certbot get the certificate from Let's Encrypt. Let's Encrypt connects to the server through Cloudflare.
Error 525 means that the server has no certificate yet. Do these steps:
- In Cloudflare, set the DNS record to DNS only (grey cloud).
- Wait until the server has a certificate. For Caddy, open the address one time. For nginx, run certbot.
- Set the DNS record to Proxied (orange cloud) again.
Caddy and certbot renew the certificate through the proxy. You do not do these steps again.
The IP address check
At the end, the installer compares the DNS record with the IP address of the server. With the Cloudflare proxy, the record shows a Cloudflare address. The installer then shows a warning. You can ignore it.
Limits
- Cloudflare stops a request after 100 seconds.
- Cloudflare stops uploads over 100 MB (on the Free and Pro plans).
The IP address of the client
Zerodot reads the client address from X-Forwarded-For. Caddy and nginx set it to the Cloudflare address. The IP(s) Allowlist option of the Webhook node then sees a Cloudflare address.
To get the real address, configure the proxy to trust Cloudflare and read CF-Connecting-IP. In nginx, use the realip module with the Cloudflare IP ranges. In Caddy, use the trusted_proxies global option.