DLNA not discovered - Docker & Traefik #987

Closed
opened 2026-02-06 20:20:56 +03:00 by OVERLORD · 16 comments
Owner

Originally created by @swratten on GitHub (Oct 15, 2019).

Describe the bug
Devices on local network are unable to find the Jellyfin DLNA server on local network when running in docker.
I am using traefik as a reverse proxy.
Have no problem accessing Jellyfin interface through browser on 8096 from LAN or through reverse proxy via internet.

System (please complete the following information):

  • OS: Docker on Fedora 30
  • Jellyfin Version: 10.4.0
  • Reverse proxy: Traefik 2.0.1

Additional context
docker-compose.yml

version: '3'

services:
  jellyfin:
    image: jellyfin/jellyfin:10.4.0
    container_name: jellyfin
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    networks:
      - proxy
    ports:
      - 8096:8096
      - 9000:9000
      - 9000:9000/udp
    environment:
      - uid=1000
      - gid=1000
    volumes:
      - ./config:/config
      - ./cache:/cache
      - /media/external:/media
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.jellyfin.entrypoints=http"
      - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.example.com`)"
      - "traefik.http.middlewares.jellyfin-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.jellyfin.middlewares=jellyfin-https-redirect"
      - "traefik.http.routers.jellyfin-secure.entrypoints=https"
      - "traefik.http.routers.jellyfin-secure.rule=Host(`jellyfin.example.com`)"
      - "traefik.http.routers.jellyfin-secure.tls=true"
      - "traefik.http.routers.jellyfin-secure.tls.certresolver=http"
      - "traefik.http.routers.jellyfin-secure.tls.domains[0].main=*.example.com"
      - "traefik.http.routers.jellyfin-secure.tls.domains[0].sans=jellyfin.example.com"
      - "traefik.http.routers.jellyfin-secure.service=jellyfin"
      - "traefik.http.services.jellyfin.loadbalancer.server.port=8096"
      - "traefik.docker.network=proxy"
networks:
  proxy:
    external: true
$ sudo netstat -tlpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp6       0      0 :::80                   :::*                    LISTEN      1519/docker-proxy   
tcp6       0      0 :::8080                 :::*                    LISTEN      1491/docker-proxy    
tcp6       0      0 :::443                  :::*                    LISTEN      1506/docker-proxy   
tcp6       0      0 :::8096                 :::*                    LISTEN      29925/docker-proxy  
tcp6       0      0 :::9000                 :::*                    LISTEN      29892/docker-proxy  

sudo netstat -ulapn
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
udp6       0      0 :::9000                 :::*                                29911/docker-proxy  
Originally created by @swratten on GitHub (Oct 15, 2019). **Describe the bug** Devices on local network are unable to find the Jellyfin DLNA server on local network when running in docker. I am using traefik as a reverse proxy. Have no problem accessing Jellyfin interface through browser on 8096 from LAN or through reverse proxy via internet. **System (please complete the following information):** - OS: Docker on Fedora 30 - Jellyfin Version: 10.4.0 - Reverse proxy: Traefik 2.0.1 **Additional context** docker-compose.yml ```yml version: '3' services: jellyfin: image: jellyfin/jellyfin:10.4.0 container_name: jellyfin restart: unless-stopped security_opt: - no-new-privileges:true networks: - proxy ports: - 8096:8096 - 9000:9000 - 9000:9000/udp environment: - uid=1000 - gid=1000 volumes: - ./config:/config - ./cache:/cache - /media/external:/media devices: - /dev/dri/renderD128:/dev/dri/renderD128 labels: - "traefik.enable=true" - "traefik.http.routers.jellyfin.entrypoints=http" - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.example.com`)" - "traefik.http.middlewares.jellyfin-https-redirect.redirectscheme.scheme=https" - "traefik.http.routers.jellyfin.middlewares=jellyfin-https-redirect" - "traefik.http.routers.jellyfin-secure.entrypoints=https" - "traefik.http.routers.jellyfin-secure.rule=Host(`jellyfin.example.com`)" - "traefik.http.routers.jellyfin-secure.tls=true" - "traefik.http.routers.jellyfin-secure.tls.certresolver=http" - "traefik.http.routers.jellyfin-secure.tls.domains[0].main=*.example.com" - "traefik.http.routers.jellyfin-secure.tls.domains[0].sans=jellyfin.example.com" - "traefik.http.routers.jellyfin-secure.service=jellyfin" - "traefik.http.services.jellyfin.loadbalancer.server.port=8096" - "traefik.docker.network=proxy" networks: proxy: external: true ``` ``` $ sudo netstat -tlpn Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp6 0 0 :::80 :::* LISTEN 1519/docker-proxy tcp6 0 0 :::8080 :::* LISTEN 1491/docker-proxy tcp6 0 0 :::443 :::* LISTEN 1506/docker-proxy tcp6 0 0 :::8096 :::* LISTEN 29925/docker-proxy tcp6 0 0 :::9000 :::* LISTEN 29892/docker-proxy sudo netstat -ulapn Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name udp6 0 0 :::9000 :::* 29911/docker-proxy ```
OVERLORD added the bug label 2026-02-06 20:20:56 +03:00
Author
Owner

@PrplHaz4 commented on GitHub (Oct 15, 2019):

This is not a bug in Jellyfin - it is a limitation of docker networking. DLNA (port 1900 UDP) works fine if you put the Jellyfin container on the "host" network, but then Traefik will no longer work as it can't communicate with the host (per docker design). Containers also aren't allowed to be on the host and a user-defined network at the same time.

I'm currently working on getting this sorted too - I have seen a couple proposed solutions that use a macvlan network as a go-between but haven't gotten a working implementation yet.

@PrplHaz4 commented on GitHub (Oct 15, 2019): This is not a bug in Jellyfin - it is a limitation of docker networking. DLNA (port 1900 UDP) works fine if you put the Jellyfin container on the "host" network, but then Traefik will no longer work as it can't communicate with the host (per docker design). Containers also aren't allowed to be on the host and a user-defined network at the same time. I'm currently working on getting this sorted too - I have seen a couple proposed solutions that use a macvlan network as a go-between but haven't gotten a working implementation yet.
Author
Owner

@swratten commented on GitHub (Oct 15, 2019):

This is not a bug in Jellyfin - it is a limitation of docker networking. DLNA (port 1900 UDP) works fine if you put the Jellyfin container on the "host" network, but then Traefik will no longer work as it can't communicate with the host (per docker design). Containers also aren't allowed to be on the host and a user-defined network at the same time.

I'm currently working on getting this sorted too - I have seen a couple proposed solutions that use a macvlan network as a go-between but haven't gotten a working implementation yet.

I was hoping this was not the case :/ I tried most of today to get it to run in host network mode and have traefik reverse proxy it to no avail

I cant get Jellyfin to work on my Xbox One via Kodi because of bugs in the plugin / OS, so I thought I would try DLNA until that is resolved...

Maybe I'll have to install Jellyfin Natively until one of the bugs are resolved in their appropriate domains. My wife really wants me to go back to Plex, but I really like this project when it works..

@swratten commented on GitHub (Oct 15, 2019): > This is not a bug in Jellyfin - it is a limitation of docker networking. DLNA (port 1900 UDP) works fine if you put the Jellyfin container on the "host" network, but then Traefik will no longer work as it can't communicate with the host (per docker design). Containers also aren't allowed to be on the host and a user-defined network at the same time. > > I'm currently working on getting this sorted too - I have seen a couple proposed solutions that use a macvlan network as a go-between but haven't gotten a working implementation yet. I was hoping this was not the case :/ I tried most of today to get it to run in host network mode and have traefik reverse proxy it to no avail I cant get Jellyfin to work on my Xbox One via Kodi because of bugs in the plugin / OS, so I thought I would try DLNA until that is resolved... Maybe I'll have to install Jellyfin Natively until one of the bugs are resolved in their appropriate domains. My wife really wants me to go back to Plex, but I really like this project when it works..
Author
Owner

@JustAMan commented on GitHub (Oct 15, 2019):

As stated above, this is not a bug in Jellyfin, but a limitation in Docker and stuff, so closing.

@JustAMan commented on GitHub (Oct 15, 2019): As stated above, this is not a bug in Jellyfin, but a limitation in Docker and stuff, so closing.
Author
Owner

@PrplHaz4 commented on GitHub (Oct 15, 2019):

@swratten here is what I've hacked together so far - it seems to be working but is minimally tested.

To-Do:

  • Trim down to essentials
  • Adjust to be more "generic"
  • Identify security implications

Docker, Traefik, Jellyfin, DLNA

  1. Create macvlan network that mirrors your hosts' internal network
    • Warning: Assign containers static IPs that are outside your DHCP range (or use a smaller, non-overlapping CIDR range)
    docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=eno1 home-net
    
  2. Create Traefik container
    Use macvlan network, assign static IP, use static MAC for DHCP address reservation:
    --net=home-net \
    --ip=192.168.1.13 \
    --mac-address=02:42:c0:a8:01:0d \
    --label traefik.docker.network=home-net \
    
  3. Connect Traefik container to bridge network (or traefik docker network)
    docker network connect bridge traefik
    
  4. Create Jellyfin container
    Use macvlan network, assign static IP, use static MAC for DHCP address reservation:
    --net=home-net \
    --mac-address=02:42:c0:a8:01:0f \
    --ip=192.168.1.15 \
    
    Publish DLNA port
    -p 1900:1900/udp
    

Reference

@PrplHaz4 commented on GitHub (Oct 15, 2019): @swratten here is what I've hacked together so far - it seems to be working but is minimally tested. To-Do: - Trim down to essentials - Adjust to be more "generic" - Identify security implications ## Docker, Traefik, Jellyfin, DLNA 1. Create macvlan network that mirrors your hosts' internal network * Warning: Assign containers static IPs that are outside your DHCP range (or use a smaller, non-overlapping CIDR range) ``` docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=eno1 home-net ``` 2. Create Traefik container Use macvlan network, assign static IP, use static MAC for DHCP address reservation: ``` --net=home-net \ --ip=192.168.1.13 \ --mac-address=02:42:c0:a8:01:0d \ --label traefik.docker.network=home-net \ ``` 3. Connect Traefik container to `bridge` network (or traefik docker network) ``` docker network connect bridge traefik ``` 3. Create Jellyfin container Use macvlan network, assign static IP, use static MAC for DHCP address reservation: ``` --net=home-net \ --mac-address=02:42:c0:a8:01:0f \ --ip=192.168.1.15 \ ``` Publish DLNA port ``` -p 1900:1900/udp ``` [Reference](https://blog.jjhayes.net/wp/2019/10/15/docker-traefik-jellyfin-dlna/)
Author
Owner

@JustAMan commented on GitHub (Oct 16, 2019):

@PrplHaz4 this should be a PR in https://github.com/jellyfin/jellyfin-docs IMO

@JustAMan commented on GitHub (Oct 16, 2019): @PrplHaz4 this should be a PR in https://github.com/jellyfin/jellyfin-docs IMO
Author
Owner

@PrplHaz4 commented on GitHub (Oct 16, 2019):

@JustAMan agreed - but I would not consider this config production ready at this point, and would like to see some feedback/testing from others first. It still feels more like a hack than "the way"...

@PrplHaz4 commented on GitHub (Oct 16, 2019): @JustAMan agreed - but I would not consider this config production ready at this point, and would like to see some feedback/testing from others first. It still feels more like a hack than "the way"...
Author
Owner

@PrplHaz4 commented on GitHub (Dec 9, 2019):

@swratten and anyone else following this thread...

This PR contains updated documentation for successfully running Jellyfin in host mode with Traefik (and working DLNA/HDHR).
https://github.com/jellyfin/jellyfin-docs/pull/168

@PrplHaz4 commented on GitHub (Dec 9, 2019): @swratten and anyone else following this thread... This PR contains updated documentation for successfully running Jellyfin in host mode with Traefik (and working DLNA/HDHR). https://github.com/jellyfin/jellyfin-docs/pull/168
Author
Owner

@nappy commented on GitHub (Jul 14, 2020):

Just for the future readers here. I discovered that using host networking and a static route configuration was not necessary. What I did was to create a macvlan and let the jellyfin container be in both macvlan and traefik networks. This simplifies the whole setup.

This way you could also make jellyfin DLNA available on different subnets / VLANs than your docker host resides on (using parent interfaces like eth0.30 etc.).

version: "3.8"
services:
    traefik:
        image: traefik
        restart: always
        command:
            - "--providers.docker=true"
            - "--providers.docker.exposedByDefault=false"
            - "--entryPoints.web.address=:80"
            - "--entryPoints.websecure.address=:443"
        ports:
            - 80:80
            - 443:443
        volumes:
            - /var/run/docker.sock:/var/run/docker.sock:ro
        labels:
            - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
            - "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true"
    jellyfin:
        image: jellyfin/jellyfin
        restart: unless-stopped
        user: 1000:1000
        networks:
            - macvlan
            - default
        volumes:
            - jellyfin_config:/config
            - jellyfin_cache:/cache
            - media:/media:ro
        labels:
            - "traefik.enable=true"
            - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.${DOMAIN}`)"
            - "traefik.http.routers.jellyfin.entrypoints=web"
            - "traefik.http.routers.jellyfin.middlewares=redirect-to-https"
            - "traefik.http.routers.jellyfinsecure.rule=Host(`jellyfin.${DOMAIN}`)"
            - "traefik.http.routers.jellyfinsecure.entrypoints=websecure"
            - "traefik.http.routers.jellyfinsecure.tls=true"
            - "traefik.http.services.jellyfinsecure.loadbalancer.server.port=8096"
networks:
    macvlan:
        driver: macvlan
        driver_opts:
            parent: eth0 # replace with your host interface / vlan to use
        ipam:
            config:
                - subnet: 10.0.0.0/16 # docker will assign ip addresses from this subnet,
                                      # check your DHCP configuration
volumes:
    jellyfin_config:
        driver: local
    jellyfin_cache:
        driver: local
    media:
        driver: local

I think the documentation https://jellyfin.org/docs/general/networking/traefik.html could be improved.
It should deliver the essential information on common pitfalls, like to make treafik auto configuration work with DLNA, and not a hugely over complex copy-paste solution, trying to cover everything like ACME, TLS, optimization headers etc.

@nappy commented on GitHub (Jul 14, 2020): Just for the future readers here. I discovered that using host networking and a static route configuration was not necessary. What I did was to create a macvlan and let the jellyfin container be in both macvlan and traefik networks. This simplifies the whole setup. This way you could also make jellyfin DLNA available on different subnets / VLANs than your docker host resides on (using parent interfaces like eth0.30 etc.). ```yml version: "3.8" services: traefik: image: traefik restart: always command: - "--providers.docker=true" - "--providers.docker.exposedByDefault=false" - "--entryPoints.web.address=:80" - "--entryPoints.websecure.address=:443" ports: - 80:80 - 443:443 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro labels: - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" - "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true" jellyfin: image: jellyfin/jellyfin restart: unless-stopped user: 1000:1000 networks: - macvlan - default volumes: - jellyfin_config:/config - jellyfin_cache:/cache - media:/media:ro labels: - "traefik.enable=true" - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.${DOMAIN}`)" - "traefik.http.routers.jellyfin.entrypoints=web" - "traefik.http.routers.jellyfin.middlewares=redirect-to-https" - "traefik.http.routers.jellyfinsecure.rule=Host(`jellyfin.${DOMAIN}`)" - "traefik.http.routers.jellyfinsecure.entrypoints=websecure" - "traefik.http.routers.jellyfinsecure.tls=true" - "traefik.http.services.jellyfinsecure.loadbalancer.server.port=8096" networks: macvlan: driver: macvlan driver_opts: parent: eth0 # replace with your host interface / vlan to use ipam: config: - subnet: 10.0.0.0/16 # docker will assign ip addresses from this subnet, # check your DHCP configuration volumes: jellyfin_config: driver: local jellyfin_cache: driver: local media: driver: local ``` I think the documentation https://jellyfin.org/docs/general/networking/traefik.html could be improved. It should deliver the essential information on common pitfalls, like to make treafik auto configuration work with DLNA, and not a hugely over complex copy-paste solution, trying to cover everything like ACME, TLS, optimization headers etc.
Author
Owner

@itmecho commented on GitHub (Aug 6, 2020):

@nappy Thanks, I managed to use your compose file to get it working but I had to make two changes.

I had to statically assign the IP address for my jellyfin container as by default it was just assigning the first IP in the subnet, 192.168.0.2, which is already used. This is the networks section of my jellyfin service:

    networks:
      macvlan:
        ipv4_address: 192.168.0.200
      default: {}

The other change was to add this flag to the traefik pod as without it, I just get Bad Gateway when trying to access jellyfin via traefik:

      # Where server_default is the default network created by docker-compose
      - "--providers.docker.network=server_default"
@itmecho commented on GitHub (Aug 6, 2020): @nappy Thanks, I managed to use your compose file to get it working but I had to make two changes. I had to statically assign the IP address for my jellyfin container as by default it was just assigning the first IP in the subnet, 192.168.0.2, which is already used. This is the networks section of my jellyfin service: ```yaml networks: macvlan: ipv4_address: 192.168.0.200 default: {} ``` The other change was to add this flag to the traefik pod as without it, I just get Bad Gateway when trying to access jellyfin via traefik: ``` # Where server_default is the default network created by docker-compose - "--providers.docker.network=server_default" ```
Author
Owner

@craxrev commented on GitHub (Dec 14, 2020):

For anyone struggling to get this working on wlan0 interface, use ipvlan instead, as macvlan does not go well with wireless interfaces..
Here's my configs running on a raspberry pi 4, I'm using also nginx-proxy-manager and portainer containers:

  1. Jellyfin container:
docker run -d \
	--name=jellyfin \
	--restart=unless-stopped \
	--log-driver none \
	--net proxy_network \
	--ip 172.18.10.1 \
	--device /dev/dri/renderD128:/dev/dri/renderD128 \
	--device /dev/vchiq:/dev/vchiq \
	-v /home/pi/docker/jellyfin/config:/config \
	-v /home/pi/docker/jellyfin/cache:/cache \
	-v /mnt/media:/media:ro \
	jellyfin/jellyfin

The proxy_network network here, is a bridge network I use to connect the container with nginx-proxy-manager container

  1. Now we create ipvlan_network network:
docker network create -d ipvlan \
	--subnet=192.168.41.1/24 \
	--gateway=192.168.41.1 \
        -o ipvlan_mode=l2 \
	-o parent=wlan0 \
	ipvlan_network
  1. Finally, we attach Jellyfin container to the ipvlan_network network:
docker network connect ipvlan_network jellyfin --ip 192.168.41.12
  1. A restart to the Jellyfin container may be needed for the dlna service to start using the new interface, I'm not sure though..

References:

@craxrev commented on GitHub (Dec 14, 2020): For anyone struggling to get this working on wlan0 interface, use ipvlan instead, as macvlan does not go well with wireless interfaces.. Here's my configs running on a raspberry pi 4, I'm using also `nginx-proxy-manager` and `portainer` containers: 1. Jellyfin container: ```sh docker run -d \ --name=jellyfin \ --restart=unless-stopped \ --log-driver none \ --net proxy_network \ --ip 172.18.10.1 \ --device /dev/dri/renderD128:/dev/dri/renderD128 \ --device /dev/vchiq:/dev/vchiq \ -v /home/pi/docker/jellyfin/config:/config \ -v /home/pi/docker/jellyfin/cache:/cache \ -v /mnt/media:/media:ro \ jellyfin/jellyfin ``` The `proxy_network` network here, is a bridge network I use to connect the container with `nginx-proxy-manager` container 2. Now we create `ipvlan_network` network: ```sh docker network create -d ipvlan \ --subnet=192.168.41.1/24 \ --gateway=192.168.41.1 \ -o ipvlan_mode=l2 \ -o parent=wlan0 \ ipvlan_network ``` 3. Finally, we attach Jellyfin container to the `ipvlan_network` network: ```sh docker network connect ipvlan_network jellyfin --ip 192.168.41.12 ``` 4. A restart to the Jellyfin container may be needed for the dlna service to start using the new interface, I'm not sure though.. References: - https://hicu.be/macvlan-vs-ipvlan
Author
Owner

@pablocpas commented on GitHub (Mar 23, 2021):

I've gotten DLNA to work but I can't advance movies, I think it's because jellyfin thinks I'm off the local network and transcodes. I have tried adding local ip ranges but neither. Any suggestion?

@pablocpas commented on GitHub (Mar 23, 2021): I've gotten DLNA to work but I can't advance movies, I think it's because jellyfin thinks I'm off the local network and transcodes. I have tried adding local ip ranges but neither. Any suggestion?
Author
Owner

@theo546 commented on GitHub (Apr 5, 2021):

I've gotten DLNA to work but I can't advance movies, I think it's because jellyfin thinks I'm off the local network and transcodes. I have tried adding local ip ranges but neither. Any suggestion?

I also have the same issue as of today, I can start playing a video from VLC but I cannot fast forward.
I tried adding local network IPs but it doesn't change anything.

@theo546 commented on GitHub (Apr 5, 2021): > I've gotten DLNA to work but I can't advance movies, I think it's because jellyfin thinks I'm off the local network and transcodes. I have tried adding local ip ranges but neither. Any suggestion? I also have the same issue as of today, I can start playing a video from VLC but I cannot fast forward. I tried adding local network IPs but it doesn't change anything.
Author
Owner

@divStar commented on GitHub (Jun 20, 2022):

I would like to add the following as I have just successfully completed setting up JellyFin with Traefik and docker-compose (via Portainer, but that doesn't make a difference). This assumes you have Traefik up and running.

docker-compose.yaml that I will be referring to:

services:
  jellyfin:
    container_name: jellyfin
    image: jellyfin/jellyfin:latest
    restart: unless-stopped
    environment:
      TZ: 'Europe/Berlin'
      DOMAIN_NAME: 'https://jellyfin.my.family'
    volumes:
      - '/home/strange/stacks/jellyfin/config:/config'
      - 'jellyfin-cache:/cache'
      - '/mnt/storage/_music:/media/music:ro'
    networks:
      - macvlan
      - default
    labels:
      # Routing
      - "traefik.enable=true"
      - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.my.family`)"
      - "traefik.http.routers.jellyfin.entrypoints=websecure"
      - "traefik.http.routers.jellyfin.tls=true"
      - "traefik.http.services.jellyfin.loadbalancer.server.port=8096"
      # Redirect to /web
      - "traefik.http.routers.jellyfin.middlewares=redirect-to-web"
      - "traefik.http.middlewares.redirect-to-web.redirectregex.regex=^https:\\/\\/([^\\/]+)\\/?$$"
      - "traefik.http.middlewares.redirect-to-web.redirectregex.replacement=https://$$1/web/index.html"
    deploy:
      resources:
        limits:
          cpus: '2'
          memory: 1024M

volumes:
  jellyfin-cache:
    external: true

networks:
  macvlan:
    driver: macvlan
    driver_opts:
      parent: enp3s0
    ipam:
      config:
        - subnet: 192.168.178.0/28
  default:
    external:
      name: "services-network"

Notes:

  1. enp3s0 describes the actual host interface (I got it via ip link command from my host OS).
  2. 192.168.178.0/28 describes my actual physical network, that I want DLNA to be available in (all devices on 192.168.178.x).
  3. Passing port 1900/udp was necessary, because else DLNA still wouldn't be discovered from my experience (perhaps I am wrong though, but I am too lazy to check right now). It does not seem necessary.
  4. services-network is my Traefik-managed network, in which all services are collected, which are exposed via SUBDOMAIN.my.family. I don't think this is necessary and I could probably have them on different networks, if I introduced Traefik to each of them, but it seemed a bit overkill for a simple homelab setup.
@divStar commented on GitHub (Jun 20, 2022): I would like to add the following as I have just successfully completed setting up JellyFin with Traefik and docker-compose (via Portainer, but that doesn't make a difference). This assumes you have Traefik up and running. **`docker-compose.yaml` that I will be referring to:** ```yaml services: jellyfin: container_name: jellyfin image: jellyfin/jellyfin:latest restart: unless-stopped environment: TZ: 'Europe/Berlin' DOMAIN_NAME: 'https://jellyfin.my.family' volumes: - '/home/strange/stacks/jellyfin/config:/config' - 'jellyfin-cache:/cache' - '/mnt/storage/_music:/media/music:ro' networks: - macvlan - default labels: # Routing - "traefik.enable=true" - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.my.family`)" - "traefik.http.routers.jellyfin.entrypoints=websecure" - "traefik.http.routers.jellyfin.tls=true" - "traefik.http.services.jellyfin.loadbalancer.server.port=8096" # Redirect to /web - "traefik.http.routers.jellyfin.middlewares=redirect-to-web" - "traefik.http.middlewares.redirect-to-web.redirectregex.regex=^https:\\/\\/([^\\/]+)\\/?$$" - "traefik.http.middlewares.redirect-to-web.redirectregex.replacement=https://$$1/web/index.html" deploy: resources: limits: cpus: '2' memory: 1024M volumes: jellyfin-cache: external: true networks: macvlan: driver: macvlan driver_opts: parent: enp3s0 ipam: config: - subnet: 192.168.178.0/28 default: external: name: "services-network" ``` **Notes:** 1. `enp3s0` describes the actual host interface (I got it via `ip link` command from my host OS). 2. `192.168.178.0/28` describes my actual physical network, that I want DLNA to be available in (all devices on `192.168.178.x`). 3. ~Passing port `1900/udp` was necessary, because else DLNA still wouldn't be discovered from my experience (perhaps I am wrong though, but I am too lazy to check right now).~ It does not seem necessary. 4. `services-network` is my Traefik-managed network, in which all services are collected, which are exposed via `SUBDOMAIN.my.family`. I don't think this is necessary and I could probably have them on different networks, if I introduced Traefik to each of them, but it seemed a bit overkill for a simple homelab setup.
Author
Owner

@manero6 commented on GitHub (Dec 12, 2022):

Sorry to reopen but how about adding macvlan/ipvlan as network connection options for docker in the documentation?

Right now only the network configuration "host" is mentioned, but Jellyfin's DLNA works very well with macvlan/ipvlan too.
I'm talking about this page: https://jellyfin.org/docs/general/administration/installing/#docker
and this: https://jellyfin.org/docs/general/networking/dlna

This is how I got DLNA working without setting the container's network as "host", similar to the other configurations above.

docker network create -d ipvlan --subnet 192.168.0.0/24 -o parent=wlan0 ipvlan
docker run -dit --name jellyfin \
  -v /path/to/cache:/cache \
  -v /path/to/config:/config \
  -v /path/to/media:/media \
  --net ipvlan --ip 192.168.0.10 \
  --restart unless-stopped \
  jellyfin/jellyfin

Jellyfin is available under 192.168.0.10, DLNA is visible and accessible by other devices on the same subnet (192.168.0.0/24)

@manero6 commented on GitHub (Dec 12, 2022): Sorry to reopen but how about adding macvlan/ipvlan as network connection options for docker in the documentation? Right now only the network configuration "host" is mentioned, but Jellyfin's DLNA works very well with macvlan/ipvlan too. I'm talking about this page: https://jellyfin.org/docs/general/administration/installing/#docker and this: https://jellyfin.org/docs/general/networking/dlna This is how I got DLNA working without setting the container's network as "host", similar to the other configurations above. ```bash docker network create -d ipvlan --subnet 192.168.0.0/24 -o parent=wlan0 ipvlan ```` ```bash docker run -dit --name jellyfin \ -v /path/to/cache:/cache \ -v /path/to/config:/config \ -v /path/to/media:/media \ --net ipvlan --ip 192.168.0.10 \ --restart unless-stopped \ jellyfin/jellyfin ``` Jellyfin is available under 192.168.0.10, DLNA is visible and accessible by other devices on the same subnet (192.168.0.0/24)
Author
Owner

@PrplHaz4 commented on GitHub (Dec 12, 2022):

Sorry to reopen but how about adding macvlan/ipvlan as network connection options for docker in the documentation?

Right now only the network configuration "host" is mentioned, but Jellyfin's DLNA works very well with macvlan/ipvlan too. I'm talking about this page: https://jellyfin.org/docs/general/administration/installing/#docker and this: https://jellyfin.org/docs/general/networking/dlna

This is how I got DLNA working without setting the container's network as "host", similar to the other configurations above.

docker network create -d ipvlan --subnet 192.168.0.0/24 -o parent=wlan0 ipvlan
docker run -dit --name jellyfin \
  -v /path/to/cache:/cache \
  -v /path/to/config:/config \
  -v /path/to/media:/media \
  --net ipvlan --ip 192.168.0.10 \
  --restart unless-stopped \
  jellyfin/jellyfin

Jellyfin is available under 192.168.0.10, DLNA is visible and accessible by other devices on the same subnet (192.168.0.0/24)

I think a lot of people are running it this way for the same reason (and DLNA + reverse proxy). I think it was left out of docs because of the additional complexity (and support questions), but a PR to the docs repo would prob be welcome (or at least a better place for discussion).

@PrplHaz4 commented on GitHub (Dec 12, 2022): > Sorry to reopen but how about adding macvlan/ipvlan as network connection options for docker in the documentation? > > Right now only the network configuration "host" is mentioned, but Jellyfin's DLNA works very well with macvlan/ipvlan too. I'm talking about this page: https://jellyfin.org/docs/general/administration/installing/#docker and this: https://jellyfin.org/docs/general/networking/dlna > > This is how I got DLNA working without setting the container's network as "host", similar to the other configurations above. > > ```shell > docker network create -d ipvlan --subnet 192.168.0.0/24 -o parent=wlan0 ipvlan > ``` > > ```shell > docker run -dit --name jellyfin \ > -v /path/to/cache:/cache \ > -v /path/to/config:/config \ > -v /path/to/media:/media \ > --net ipvlan --ip 192.168.0.10 \ > --restart unless-stopped \ > jellyfin/jellyfin > ``` > > Jellyfin is available under 192.168.0.10, DLNA is visible and accessible by other devices on the same subnet (192.168.0.0/24) I think a lot of people are running it this way for the same reason (and DLNA + reverse proxy). I think it was left out of docs because of the additional complexity (and support questions), but a PR to the docs repo would prob be welcome (or at least a better place for discussion).
Author
Owner

@divStar commented on GitHub (May 30, 2024):

I've had issues with Jellyfin and UPNP / DLNA again.

I ended up using the following Jellyfin docker-compose.yml:

services:
  jellyfin:
    container_name: jellyfin
    image: jellyfin/jellyfin:latest
    restart: unless-stopped
    environment:
      TZ: 'Europe/Berlin'
      DOMAIN_NAME: 'https://jellyfin.my.family'
    ports:
      - "8096:8096"
      - "1900:1900/udp"
    volumes:
      - 'jellyfin-config:/config'
      - '/home/strange/stacks/jellyfin/config:/config/config'
      - 'jellyfin-data:/config/data'
      - 'jellyfin-log:/config/log'
      - 'jellyfin-metadata:/config/metadata'
      - 'jellyfin-plugins:/config/plugins'
      - 'jellyfin-root:/config/root'
      - 'jellyfin-transcodes:/config/transcodes'
      - 'jellyfin-cache:/cache'
      # Music
      - '/mnt/storage/_music:/media/music'
    networks:
      services-network:
      jellyfin-ipvlan:
        ipv4_address: 192.168.178.82
    labels:
      # Routing
      - "traefik.enable=true"
      - "traefik.docker.network=services-network"
      - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.my.family`)"
      - "traefik.http.routers.jellyfin.entrypoints=websecure"
      - "traefik.http.routers.jellyfin.tls=true"
      - "traefik.http.services.jellyfin.loadbalancer.server.port=8096"
      # Redirect to /web
      - "traefik.http.routers.jellyfin.middlewares=redirect-to-web"
      - "traefik.http.middlewares.redirect-to-web.redirectregex.regex=^https:\\/\\/([^\\/]+)\\/?$$"
      - "traefik.http.middlewares.redirect-to-web.redirectregex.replacement=https://$$1/web/index.html"
    deploy:
      resources:
        limits:
          cpus: '2'
          memory: 4096M

volumes:
  jellyfin-config:
    external: true
  jellyfin-data:
    external: true
  jellyfin-log:
    external: true
  jellyfin-metadata:
    external: true
  jellyfin-plugins:
    external: true
  jellyfin-root:
    external: true
  jellyfin-transcodes:
    external: true
  jellyfin-cache:
    external: true

networks:
  jellyfin-ipvlan:
    name: "jellyfin-ipvlan"
    external: true
  services-network:
    name: "services-network"
    external: true

Note jellyfin-ipvlan has been created as a IPVLAN network, subnet 192.168.178.0/24, gateway 192.168.178.1, parent bound to the physical interface, default ipvlan mode (l2). See https://docs.docker.com/network/drivers/ipvlan/ for more information.

I decided to expose both UDP 1900 and the default 8096 ports.

Note: I am using Traefik v3.0.1 and Docker Engine 26.1.3.

@divStar commented on GitHub (May 30, 2024): I've had issues with Jellyfin and UPNP / DLNA again. I ended up using the following Jellyfin `docker-compose.yml`: ```yaml services: jellyfin: container_name: jellyfin image: jellyfin/jellyfin:latest restart: unless-stopped environment: TZ: 'Europe/Berlin' DOMAIN_NAME: 'https://jellyfin.my.family' ports: - "8096:8096" - "1900:1900/udp" volumes: - 'jellyfin-config:/config' - '/home/strange/stacks/jellyfin/config:/config/config' - 'jellyfin-data:/config/data' - 'jellyfin-log:/config/log' - 'jellyfin-metadata:/config/metadata' - 'jellyfin-plugins:/config/plugins' - 'jellyfin-root:/config/root' - 'jellyfin-transcodes:/config/transcodes' - 'jellyfin-cache:/cache' # Music - '/mnt/storage/_music:/media/music' networks: services-network: jellyfin-ipvlan: ipv4_address: 192.168.178.82 labels: # Routing - "traefik.enable=true" - "traefik.docker.network=services-network" - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.my.family`)" - "traefik.http.routers.jellyfin.entrypoints=websecure" - "traefik.http.routers.jellyfin.tls=true" - "traefik.http.services.jellyfin.loadbalancer.server.port=8096" # Redirect to /web - "traefik.http.routers.jellyfin.middlewares=redirect-to-web" - "traefik.http.middlewares.redirect-to-web.redirectregex.regex=^https:\\/\\/([^\\/]+)\\/?$$" - "traefik.http.middlewares.redirect-to-web.redirectregex.replacement=https://$$1/web/index.html" deploy: resources: limits: cpus: '2' memory: 4096M volumes: jellyfin-config: external: true jellyfin-data: external: true jellyfin-log: external: true jellyfin-metadata: external: true jellyfin-plugins: external: true jellyfin-root: external: true jellyfin-transcodes: external: true jellyfin-cache: external: true networks: jellyfin-ipvlan: name: "jellyfin-ipvlan" external: true services-network: name: "services-network" external: true ``` Note `jellyfin-ipvlan` has been created as a IPVLAN network, subnet `192.168.178.0/24`, gateway `192.168.178.1`, parent bound to the physical interface, default ipvlan mode (`l2`). See https://docs.docker.com/network/drivers/ipvlan/ for more information. I decided to expose both UDP 1900 and the default 8096 ports. Note: I am using Traefik `v3.0.1` and Docker Engine `26.1.3`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#987