Turn a Raspberry Pi into an Apple Time Capsule

written July 2019

I recently followed some tutorials on the web about setting up Netatalk to mimic an Apple Time Capsule. I found most of the tutorials outdated and confusing. So I decided to document my own process here for you!

Formatting the Drive

Of course, you'll want an external hard drive or SSD connected to your Pi via USB. You can format your drive in any way you like--it doesn't need to be Apple HFS+ formatted. Ext 4 works just fine.

Mounting the Drive

Add an entry to your /etc/fstab as usual, and be sure to add the user_xattr, acl, and nofail options, like this:

PARTUUID=10f6be6e-25f4-4118-aee7-f4a913701bb8 /mnt/drive1 ext4 defaults,user_xattr,acl,noatime,nofail 0 1

You can get the PARTUUID for your drive and partition from the blkid command.

Make sure the directory exists. Then mount the drive with sudo mount -a.

Installing Netatalk

sudo apt install netatalk

Exposing the Drive on the Network

Create a file in the home directory of your pi user called AppleVolumes, e.g. /home/pi/AppleVolumes. In the file, add a single line for your drive, like this:

/mnt/drive1 "Time Machine Drive 1" options:tm

Lastly, restart netatalk: sudo systemctl restart netatalk

That's it! Now you can access the drive from any Mac on your network after logging in as the pi user. You can set the drive as a target for Time Machine too!

Hosting for this site is provided by

The SDF Public Access UNIX System