Setting up the discovery of a network share / server with Avahi
I recently replaced FreeNAS with FreeBSD after installing even basic tools in the main OS (without first using a jail) became tedious and I wanted to explore how each of the components (e.g sharing & plugins) were implemented.
Below is a service description file that Avahi will use to broadcast the server’s share capabilities. It allows an easy one-click to find shares on OS10 and will also appear / work when using “Browse Network” in nautilus (tested on CentOS running Gnome Shell).
Or, to include the hostname in the displayed server name:
Save the above as
fileshares.service and place the file in
/usr/local/etc/avahi/services as appropriate. For some more info about the tags, there’s
The file describes both CIFS / SMB (Windows) shares and also AFP shares (Apple) so should work on OS10, Linux/Unix & Windows (with Bonjour installed).