Netatalk is an AFP server, useful for network file shares on macOS clients. It's commonly to host destinations for Time Machine, though Samba is becoming more common and may offer improved performance.

System configuration

sudo apt install netatalk

We'll provide some default configuration in /etc/netatalk/afp.conf which:

  • Causes afpd to register with D-Bus to enable the afpstats command to print basic client statistics.
  • Sets the hostname of the server (as registered with mDNS) such that it won't conflict with the Samba server's NETBIOS name. This allows both sets of shares to be advertised to clients.
  • Gives us a pretty Xserve icon. RIP, Xserve, you were taken from us too soon.
afpstats = yes

hostname = store0-afp
mimic model = Xserve

Start the server on boot, and now:

sudo systemctl enable --now netatalk


Then configure per-machine shares in /etc/netatalk/afp.conf:

path = /backups/$user/$machine
time machine = yes