Apple file share server on FreeBSD 8.1

Lars Sommer, [email protected]

Makes it possible to use FreeBSD as a file server for multiple Apple OSX
clients via the Apple File Share protocol.

Install the ports:

Not used?:

Configuring netatalk:

netatalk gives the file server, and multiple other services via the afs protocol.

Edit the file describing the actual shares on the server:
vi /usr/local/etc/AppleVolumes.default

Add your shares to it. On one server I have the following:
~ “Lars home directory”
/mnt/tolv.data1/TimeMachine_backups/ “Time Machine backup”
/mnt/tolv.data1/ “Tolv Data 1”
/mnt/tolv.data2/ “Tolv Data 2”

The first part is the path to the folder on the server.
The second part is a freely chosen name, which is seen on the client.

Edit the configuration file for netatalks afp daemon:
vi /usr/local/etc/afpd.conf

Add the following line to let the daemon make use of the cnid file name translation service:

- -ipaddr -cnidserver localhost:4700

where should be the address of your own server.

Configuring mDNSResponder:
No, configuring howl, it is:

mDNSResponder broadcasts the service discovery information making the shares appear automagically on the OSX clients.

Edit the configuration file:
vi /usr/local/etc/mDNSResponder.conf

Add a line which describes the afs service:
Tolv _afpovertcp._tcp local. 548

The first word, here “Tolv”, names the discovered server for the clients.
You can choose it freely, but I typically names it identical to the hostname of the server, to make it easier for myself to remember who is who.

Starting up:

Add to /etc/rc.conf

And start the services:
/usr/local/etc/rc.d/netatalk start
/usr/local/etc/rc.d/mdnsresponder start

Leave a Reply

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *