Hello, I have some big picture questions that could hopefully help me understand what my issue is. I have a homelab setup using Cloudlfare tunnel. I use Cloudflare for my domain name, TLS/SSL certificate, and all of the security that come with it. I’m not too smart to trust myself to do this.
From my understanding by watching a lot of videos and reading blogs, the certificate authentication and security happens between the user (Joe Smith sitting at the library) and Cloudflare. When Joe types “nginx.mydomain.com”, this gets proxied to Cloudflare (I do have the orange cloud enabled), and then Cloudflare sends the request down to my network/Traefik.
My confusion lies in the certificate stuff between Cloudflare and my network. Do I need to tell Traefik about the TLS certificate that Cloudflare is using? I’ve seen many videos that explain how to generate a Zone→DNS→Edit API token from Cloudflare and then add it to the environment variable CF_DNS_API_TOKEN. Is it a good idea to tell Traefik about the TLS certificate? Whenever I try to do this I get this error message “Firefox has detected that the server is redirecting the request for this address in a way that will never complete.”
I’ve also read some blogs saying that Traefik shouldn’t be doing the TLS or HTTPS redirection, all of that is taken care by Cloudflare. But then I’ve also seen plenty of videos where people are adding the label “traefik.http.routers.websecure.tls.domains[0].main=mydomain.com“ and “traefik.http.routers.websecure.tls.domains[0].sans=*.mydomain.com“ to the docker-compose file.
So how exactly does this work? When using Cloudflare tunnel what is the best practice? If I don’t do any of the TLS, redirection, or certificate stuff in Traefik, I am able to access my website from the outside, but is this good?