Introduction
Compared to traditional SMB solutions, Netatalk, as an open-source implementation of Apple Filing Protocol (AFP), offers the following advantages for Mac devices:
- Seamless compatibility with Time Machine backups
- Native-level file-sharing experience
- Better support for Mac metadata
- Print service integration
Project Repository
https://github.com/Netatalk/netatalk
Setup
The setup is straightforward—just a single Docker Compose file:
version: '3.8'
services:
netatalk:
image: netatalk/netatalk:4.2.4
container_name: netatalk
network_mode: host
cap_add:
- NET_ADMIN
volumes:
- "./share:/mnt/afpshare" # Regular shared directory
- "./backup:/mnt/afpbackup" # Time Machine dedicated directory
- "/var/run/dbus:/var/run/dbus"
- "/etc/localtime:/etc/localtime"
environment:
- AFP_USER=bboysoul
- AFP_PASS=xxxxxxxx # Cannot exceed 8 characters
- AFP_GROUP=afpusers
#- ATALKD_INTERFACE=ens192
- TZ=Asia/Shanghai
restart: always
Then run:
docker-compose up -d
After that, simply use Command+K
in Mac Finder, enter afp://your-server-IP
, and input the credentials to access.
Feel free to follow my blog at www.bboy.app
Have Fun