• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting 502 Bad Gateway

     
    • 0 Vote(s) - 0 Average

    502 Bad Gateway

    502 error using cloudfare tunnel with caddy
    babatremblay
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2024 Jun
    Reputation: 0
    #1
    2024-06-11, 09:08 PM (This post was last modified: 2024-06-11, 09:30 PM by TheDreadPirate. Edited 2 times in total.)
    I'm using Cloudflare tunnels to connect babamovies.com with my local Jellyfin instance, but I'm encountering a connection refused error. Here’s the  error message from my wsl cmd line:
    ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp <jellyfin WAN IP>:8096: connect: connection refused" connIndex=3 dest=https://babamovies.com/favicon.ico event=0 ip=198.41.200.113 type=http

    here is my docker-compose.yml:
    Code:
    version: '3.8'

    services:
      jellyfin:
        image: jellyfin/jellyfin
        container_name: jellyfin
        network_mode: 'host'
        volumes:
          - ./config:/config
          - ./cache:/cache
          - type: bind
            source: ./Movies
            target: /media/movies
            read_only: true
        restart: unless-stopped
        environment:
          - JELLYFIN_PublishedServerUrl=https://babamovies.com
        extra_hosts:
          - 'host.docker.internal:host-gateway'
      caddy:
        image: iarekylew00t/caddy-cloudflare:latest
        container_name: caddy
        ports:
          - 80:80
          - 443:443
        volumes:
          - ./Caddyfile:/etc/caddy/Caddyfile
          - caddy_data:/data
          - caddy_config:/config
        restart: 'unless-stopped'
        depends_on:
          - jellyfin
        environment:
          - CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}

    volumes:
      caddy_data:
      caddy_config:


    and here is my caddyfile:
    Code:
    babamovies.com {
        reverse_proxy <jellyfin WAN IP>:8096
        tls {
            dns cloudflare {env.CLOUDFLARE_API_TOKEN}
        }
    }

    I have verified that my jellyfin server is accessible locally and that the CLOUDFLARE_API_TOKEN is correct, but can't access it via babamovies.com (it's showing a 502 gateway error). 
    Any suggestions for debbugging this issue?
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    Messages In This Thread
    502 Bad Gateway - by babatremblay - 2024-06-11, 09:08 PM
    RE: 502 Bad Gateway - by pcm - 2024-06-11, 10:01 PM
    RE: 502 Bad Gateway - by babatremblay - 2024-06-11, 11:04 PM
    RE: 502 Bad Gateway - by TheDreadPirate - 2024-06-12, 01:02 AM
    RE: 502 Bad Gateway - by babatremblay - 2024-06-12, 01:30 AM
    RE: 502 Bad Gateway - by TheDreadPirate - 2024-06-12, 01:36 AM
    RE: 502 Bad Gateway - by babatremblay - 2024-06-12, 01:39 AM
    RE: 502 Bad Gateway - by TheDreadPirate - 2024-06-12, 03:30 PM

    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode