Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Unraid 7.1.4: 502 Bad Gateway with Cloudflare Tunnel & Traefik - All Configs Seem Correct

Featured Replies

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:

  1. 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.

  2. 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).

  3. 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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.