I want to run a minidlna server, since I’ve got an old Oppo 203 which doesn’t play nice with SMB (limited to V1 and keeps needing a login password) or NFS (can’t detect my TrueNAS NFS share).
The Oppo is DLNA capable, and I’ve got that running on an HTPC and working with the Oppo.
However, I’d like to run minidlna as a custom docker app. I’ve got it up and running using Dockge and the following compose file:
But the resultant dlna server isn’t detactable by any dlna capable clients on my LAN. I know this is because the docker container is in its own subnet. I’ve read that using host networking can overcome this (a recent post on Jellyfin in this board alluded to it: Setup DLNA Jellyfin), but how can I get this working for my minidlna container?
I run all my docker apps successfully under Dockge, using a bridge, br0.
I tried adding ‘network_mode: host’ to the compose, but then minidlna errors with:
'minidlna | minissdp.c:198: warn: Failed to add multicast membership for address 172.16.12.1"
minidlna | minidlna.c:1134: warn: Starting MiniDLNA version 1.3.3.
minidlna | minidlna.c:394: warn: Creating new database at /minidlna/cache/files.db
minidlna | minissdp.c:132: error: bind(udp): Address in use
minidlna | minissdp.c:84: error: setsockopt(udp, IP_ADD_MEMBERSHIP): Bad file descriptor
minidlna | minissdp.c:198: warn: Failed to add multicast membership for address 192.168.94.94
minidlna | minissdp.c:84: error: setsockopt(udp, IP_ADD_MEMBERSHIP): Bad file descriptor
minidlna | minissdp.c:198: warn: Failed to add multicast membership for address 192.168.94.91
Yep, that’s my conclusion too…but I don’t know how to do that for a docker container, managed by the (official) Dockge app in TrueNAS. I don’t have or use Plex (?!). As mentioned above, I’m setting this up since my client is an Oppo 203 UHD player, which lacks modern networking, but can browse dlna just fine. I’ve got a minidlna server running perfectly on an Arch Linux HTPC, but I’d rather it run on my always-on TrueNAS box, if possible.
Can it be that 1900 or 8200 ports are already in use on the host (it definitely can as long as you are running many containers on it)? sudo netstat -tulpn | grep "1900\|8200" to find out.
And I wonder why the IP subnet differs from the original post…
Well, you can spin up a VM on truenas. Passing media lib to it won’t be straightforward and probably will require an smb/nfs share connect inside a VM. However, I suppose that you already made those configurations on your HTPC.
I thought both should have been with host network mode. Otherwise, what is the point in posting this error?
If you have the same error with using the “standard” docker network and with using the “host” network, I do believe that the issue is within the container itself (or its configuration) and not with the network.
I’m guessing that because host networking is working in the second example, but the multicast error persists that it’s more likely there’s an issue with the container.
As more info, my TrueNAS networking is set up with enp36s0 as the NIC on 192.168.94.94/24, with br0 attached as enx6efxxxxxxxxxx at 192.168.94.91/24.
Anyway, will try a different image and report back - thanks all!
Wait, does it mean that your truenas technically has 2 addresses in the same subnet? Is the GUI accessible on both IPs?
If that’s so, you should know that having 2 IPs in the same subnet is highly discouraged and can cause problems.
Bugs me too. It gets added by Dockge automagically to the end of all my composed stacks.
Thanks again - I’ll get on to sorting that out pronto I think it’s a workaround I used a while ago after an update (may have been from Bluefin to Cobra) lost my GUI access.
Right - I’m now down to a single NIC (enp35s0) and IP address for my TrueNAS box and an associated bridge (br0), which I use so my Home Assistant VM can access the TrueNAS host as storage.
Still can’t get the minidlna docker container to multicast using host network.
Screens of my network setup, in case any of you boffins spot something…
I wonder if dockge is screwing you, because i used the compose file i posted and used the custom yaml function in the truenas gui to deploy the app and it would launch just fine. I could access it on hostip:port and would get to a basic info dashboard. It did not get a internal docker ip so i guess it deployed correctly with host networking.
Another good spot, thanks Yep, I was messing around with the bridge trying to see if that would work (it didn’t), so I’ve recreated the bridge properly again.
I’m not a network guy. For one, I’ve never used VLANs. However, I have some abstraction that helps me set them up inside my proxmox. Take these with a pinch spoon of salt:
When you create a bridge – it’s an equivalent of an unmanaged switch.
If you didn’t specify NIC or IP, this “switch” is still functional. For example, if you “connect” 2 VMs to this switch, they could “talk” to each other.
When you specify a port in the bridge – it’s an equivalent of an unmanaged switch having this exact port as its own. For example, if you have this port connected to a physical switch/router, your 2 VMs become accessible in your LAN.
When you specify an IP on the bridge – it’s the equivalent of your host being connected to this virtual unmanaged switch with this exact IP.
Hope this helps.
P.s. If network guys are reading this – critique is highly appreciated.