Coolify, Cloudflare Tunnels, and SSL redirect loops

I spent some time setting up Coolify on my home server. Since I use Cloudflare Tunnels to route traffic to a wildcard subdomain, I had to put Nginx Proxy Manager (NPM) in front of Coolify.

Coolify uses its own reverse proxy (like Traefik) and it automatically detects if it should serve HTTPS based on the domain URL you set for the server.

Initially, I forwarded traffic from NPM to Coolify using plain HTTP port 80. Because I set my Coolify address with https://, Coolify immediately tried to redirect the incoming HTTP request to HTTPS. NPM would catch it, forward it to HTTP again, and boom: infinite “too many redirects” loop.

The fix was straightforward. I had to configure NPM to use SSL and forward the traffic directly to Coolify’s internal IP on port 443. Coolify stays happy, the protocols match, and everything loads securely. That’s it, folks!