Use mDNS in Docker and TrueNas Scale

vega2004

Dabbler
Joined
Apr 18, 2021
Messages
19
I want to use Timemachine on TrueNas Scale.
In the latest versions is is a hard requirement to enable mDNS to have TimeMachine SMB shares.
I need mDNS also in a docker for homebridge to simulate homekit devices.

Is there any possibility to use both in parallel or to use TimeMachine without mDNS like in previous versions like disable mDNS manually via command line?
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
There is no problem with using mDNS for timemachine/smb.

Kubernetes is not, natively, compatible with mDNS, though you could add an external interface direct (your merrits may vary with that).
 

vega2004

Dabbler
Joined
Apr 18, 2021
Messages
19
I think there is a misunderstanding.
TrueNas mDNS with Timemachine works fine.
mDNS via Docker works fine.

But only once is working at the same time.

In early version it was allowed to disable mDNS in TrueNas and have TimeMachine active. This is not allowed anymore. Is there are a workaround to deactivate mDNS but still use a TimeMachine share.
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
mDNS via TrueNAS SCALE Apps (the only official way of doing it) is literally impossible unless you direct connect an interface or use HostNetworking, in which case it cannot conflict with the internal mDNS either.

We've seen our fair share of container related mDNS issues and are actively been working on the issue for a while now.
Besides it not working on normal kubernetes (without hostNetworking or directly attached interfaces), there is no conflict between it and the internal mDNS of TrueNAS SCALE.
 

vega2004

Dabbler
Joined
Apr 18, 2021
Messages
19
Sorry yes I talking about hostNetworking.
But there are conflicts if I use hap-nodejs or homebridge it Is not working until I deactivate the internal mDNS.
When I activate mDNS after starting homebridge macOS will not find the TimeMachine
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
Ahh shoot, yes... mDNS for SCALE hooks to all interfaces...
Damn, yeah you're kinda out of luck them. mDNS is simply an absolute mess.
 

vega2004

Dabbler
Joined
Apr 18, 2021
Messages
19
Can I kill the TrueNas Sale mDNS via command line. To have still a TimeMachine share but with deactivated mDNS
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Ahh shoot, yes... mDNS for SCALE hooks to all interfaces...
Damn, yeah you're kinda out of luck them. mDNS is simply an absolute mess.
Nightlies are changed to more actively exclude kubernetes-related interfaces.
Avahi in general will bind to all interfaces unless it's explicitly restricted.
 

vega2004

Dabbler
Joined
Apr 18, 2021
Messages
19
I know this options but my request is to add an option to disable mDNS with an activated time machine or to ignore the warning.
Or the same to activate a timemachine storage without mdns activated. The warning is good but it would be nice to have an option to ignore the warning
 
Joined
Aug 23, 2022
Messages
8
I am having the same issue. This is kind of annoying. I have to choose between home bridge and Time Machine. I would like to use both... :-(
 

vega2004

Dabbler
Joined
Apr 18, 2021
Messages
19
I was able to solve this the docker app is using the host network and the homekit simulator in the docker is using avahi as advertiser and not bonjour or ciao
 
Joined
Aug 23, 2022
Messages
8
Eher eure 3 options within the docker container BonjourHAP, Avahi and ciao. Ist that the setting I need to chance? Mine was set to Bonjour.
 
Joined
Aug 23, 2022
Messages
8
Sorry, I read it wrong. I am changing this. If that is the solution you made my day. I will let you know. Thanks a lot.
 
Joined
Aug 23, 2022
Messages
8
I was able to solve this the docker app is using the host network and the homekit simulator in the docker is using avahi as advertiser and not bonjour or ciao
Yes this works, but the docker container doesn't survive a restart of the NAS. It looks like it restarts but I can no longer reach the home bridge UI. Deploying the container again ist only possible if I deactivate mDNS of TrueNAS before that otherwise it won't start up. I need a solution that survives a restart of my NAS. I ended up setting up homebridge in a VM and changing the mDNS responder do Avahi there. So far it works.
 
Joined
Aug 23, 2022
Messages
8
What I ended up doing is setting ump Homebridge in an VM using the iso Homebridge offers for VMs. After that I changed the mDNS setting of Homebridge to Avahi. Now Homebridge survives a restart of the System and the VM automatically boots up. I'd rather use the Docker container but I can not get it to work without any hickups. The Truechart Homebridge app is another thing I tried, but I after setting it up my iPhone won't connect to the bridge eben after changing the mDNS responder to Avahi. With the small VM at least I can use Time Machine and Homebridge on the same machine and Homebridge works flawlessly.
 
Top