Jellyfin Forum
Error when reverse proxy with Caddy. - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Networking & Access (https://forum.jellyfin.org/f-networking-access)
+---- Thread: Error when reverse proxy with Caddy. (/t-error-when-reverse-proxy-with-caddy)

Pages: 1 2


Error when reverse proxy with Caddy. - chilledhobbit - 2025-02-17

Hi!

I have already asked the same question on Caddy's forum, so I just link the thread over here. I hope someone here have a clue.

https://caddy.community/t/http2-stream-closed-and-h3-request-cancelled/29955


RE: Error when reverse proxy with Caddy. - TheDreadPirate - 2025-02-17

If LAN client's don't need direct access to Jellyfin (not through reverse proxy) you should remove the port publishing for port 8096. Assuming that Caddy and Jellyfin are on the same bridge network, port publishing is not needed. This would reduce the number of times traffic needs to jump between the host and bridge network stacks.

Can you share the current state of your caddy and Jellyfin docker compose and the caddyfile?


RE: Error when reverse proxy with Caddy. - chilledhobbit - 2025-02-17

Yeah I know, but I'm temporarily using it without reverse proxy.

Code:
version: "3"
services:
  jellyfin:
    container_name: jellyfin
    image: jellyfin/jellyfin:latest
    volumes:
      - ./data/config:/config
      - ./data/cache:/cache
      - /mnt/data:/data
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
      - /dev/dri/card0:/dev/dri/card0
    ports:
      - 8096:8096
    restart: unless-stopped
    user: 1003:1003
    group_add:
      - "44"
      - "109"

Code:
version: "3.7"
services:
  caddy:
    container_name: caddy
    # image: caddy:latest
    build: .
    restart: unless-stopped
    ports:
      - 80:80
      - 443:443
      - 443:443/udp
    volumes:
      - ./data/Caddyfile:/etc/caddy/Caddyfile
      - ./data/data:/data
      - ./data/config:/config
    networks:
      - jellyfin_default

networks:
  jellyfin_default:
    external: true

Code:
jellyfin.domain.tld

reverse_proxy jellyfin:8096



RE: Error when reverse proxy with Caddy. - TheDreadPirate - 2025-02-18

For the caddyfile, can you try using the LAN IP of the host instead of "jellyfin"? If you removed the port publishing you'd use the container's bridge IP instead.


RE: Error when reverse proxy with Caddy. - chilledhobbit - 2025-02-18

I have actually already tested the LAN IP for the host, but I still get the error.


RE: Error when reverse proxy with Caddy. - TheDreadPirate - 2025-02-18

Have you made any changes to caddy? Besides disabling http3? Is http 1.1 still enabled for web sockets?


RE: Error when reverse proxy with Caddy. - chilledhobbit - 2025-02-18

I have tried disabling http3 and http2. I haven't done anything with http1.1.

From what I understand, web sockets are supposed to be handled automatically. So I haven't tried anything specific there.


RE: Error when reverse proxy with Caddy. - TheDreadPirate - 2025-02-18

I just noticed in your caddy docker compose that you aren't pulling an image, you are building something. What are you building and where was it sourced from? Are you running some development branch from Caddy's git or something?


RE: Error when reverse proxy with Caddy. - chilledhobbit - 2025-02-18

I'm building only to get cloudflare dns challenge. So it's from original source.


RE: Error when reverse proxy with Caddy. - TheDreadPirate - 2025-02-18

I'm assuming you are building from a released version and not from the master branch/dev branch, correct?

Are you behind a CGNAT?