Step 1: Install Netatalk

Step 2: Configure /etc/nsswitch.conf

locate the line that reads:

Add “mdns” at the end. You should have that:

Step 3: edit /etc/netatalk/AppleVolumes.default

Check that you have:

Add a line in the shares like this:

For me it looks like this for user “stfb”

Step 4: add time machine dir + user

Step 5:  in /etc/default/netatalk find section which looks like this

and edit it so it looks like this:

Restart netatalk:

Open time machine preferences on your Mac and select the Time Machine drive we just setup which should be recognisable by the <hostname> of your server.
Initiate the backup.
That’s it !