Jump to content

[Help Requested] Utilising Unraid Avahi for Docker Apps (like Homebridge, scrypted)


Recommended Posts

Hi,

 

I'm trying to utilise the underlying avahi-daemon and dbus services for scrypted. I'm using the scrypted app from Unraid apps.

 

If I apply everything I think I need to (see below), I get this error in the scrypted homekit log:

The selected advertiser, "avahi", isn't available on this platform. Reverting to "bonjour-hap"

 

I've pulled everything I think that scrypted docker-compose states it needs out of it and applied it to the services, volumes and security_opt sections, which I've added to my config:
 

# Avahi can be used for network discovery by passing in the host daemon
# or running the daemon inside the container. Choose one or the other.
# Uncomment next line to run avahi-daemon inside the container.
# See volumes and security_opt section below to use the host daemon.
# - SCRYPTED_DOCKER_AVAHI=true


# - /var/run/dbus:/var/run/dbus
# - /var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket


# Uncomment the following lines to use Avahi daemon from the host

# Without this, AppArmor will block the container's attempt to talk to Avahi via dbus
# security_opt:
#     - apparmor:unconfined

 

1. I added the variable SCRYPTED_DOCKER_AVAHI=true to the app config

2. I added the volumes "/var/run/dbus" and "/var/run/avahi-daemon/socket" as extra volume maps

3. I've put "--security-opt apparmor=unconfined" in the extra parameters field

4. I set the container to "Privileged" mode

 

In the container log, I see this:

 

Starting Avahi daemon...
Found user 'avahi' (UID 105) and group 'avahi' (GID 106).
Successfully dropped root privileges.
avahi-daemon 0.8 starting up.
bind(): Address already in use
avahi-daemon 0.8 exiting.
Starting dbus...
dbus-daemon[839]: Failed to start message bus: The pid file "/run/dbus/pid" exists, if the message bus is not running, remove this file

 

Any ideas?

 

Thanks,

Shane.

Edited by shanelord
Link to comment
Posted (edited)

I guess (a) no-one that has done this wants to share how, (b) no-one else has done this or (c) no-one wants to do it or they don't have time to discuss?

 

I'm hoping an unraid dev could assist - ideally it would be good to only have one mdns solution running to avoid conflicts etc.

 

 

Edited by shanelord
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...