September 15, 2025Sep 15 Hello Everyone, I've been trying to set up secure remote access to my Docker containers using Cloudflare Tunnels and Traefik. I have run into a persistent "502 Bad Gateway" error and have exhausted all configuration troubleshooting. I'm hoping someone with deeper Unraid networking knowledge can spot the issue.My Goal: Securely expose services like Jellyfin via https://jellyfin.mydomain.com.My Architecture:Unraid version 7.1.4 running on a server with a bonded/aggregated network port.cloudflared Docker container running on a custom bridge network named proxynet.traefik Docker container running on the same proxynet network.A Cloudflare Tunnel is configured with a Public Hostname (jellyfin.mydomain.com) pointing to the service http://traefik:80.The Problem: When I access https://jellyfin.mydomain.com, I can log in successfully with Cloudflare Access, but I then receive a 502 Bad Gateway error. This indicates the cloudflared container cannot connect to the traefik container.Key Diagnostic Steps I've Already Taken:I have confirmed my Traefik container is working. If I access it locally from another computer on my LAN at http://<unraid-ip>:8001, I correctly receive a 404 Not Found page from Traefik.I have confirmed my cloudflared container is running, connected, and has pulled the correct configuration from Cloudflare (I can see the jellyfin.mydomain.com -> http://traefik:80 rule in its logs).Most importantly: I have opened a console inside the cloudflared container and run the command curl -v http://traefik:80. This command succeeds and returns the 404 Not Found page from Traefik.This proves that container-to-container name resolution and networking on the proxynet network is working at a basic level. However, the cloudflared service itself seems unable to make this same connection, resulting in the 502 error.I have tried restarting the containers and even doing a "hard reset" (deleting the container and its appdata) to no avail. I suspect there may be a subtle issue with Unraid's networking, firewall, or how Docker interacts with my bonded network interface.I've also attached my diagnostics file. Any ideas would be greatly appreciated. Thank you! watchpoint-diagnostics-20250916-0024.zip
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.