One-way sync engine for the iCloud Photos Library into the native file system
10K+
Back up your complete iCloud Photos Library to your own disk or NAS, and keep it in sync.
Runs unattended in Docker. A small web UI handles the Apple sign-in, including MFA codes and Advanced Data Protection.
Quick start · Get Started guide · CLI reference
You need Docker with docker compose and an Apple ID with two-factor authentication.
1. Create a folder for the library and a docker-compose.yml next to it.
mkdir library
services:
photos-sync:
image: steilerdev/icloud-photos-sync:latest
container_name: photos-sync
restart: unless-stopped
user: "1000:1000" # your user's `id -u`:`id -g`, needs write access to ./library
environment:
APPLE_ID_USER: "<iCloud username>"
APPLE_ID_PWD: "<iCloud password>"
TZ: "Europe/Berlin"
SCHEDULE: "0 2 * * *" # sync every night at 2:00
ENABLE_CRASH_REPORTING: true # optional, helps fixing bugs
ports:
- 80:80 # web UI
volumes:
- ./library:/opt/icloud-photos-library
2. Start it.
docker compose up -d
3. Sign in through the web UI. Open http://<your-host> and select Renew Authentication. Apple sends a code to your trusted devices; enter it in the web UI. Then select Sync Now to start the first sync, or wait for the schedule.
That's it. From now on the library syncs on the schedule. Apple asks for a new MFA code about every 30 days: select Enable Notifications in the web UI to get a push notification when that happens.
Good to know:
APPLE_ID_PWD_FILE with Docker secrets, or leave the password out and enter it on startup. See Installation.Where are my photos? Every photo and video is in library/_All-Photos (and library/_Shared-Photos for the iCloud Shared Library), named by its iCloud checksum. Your iCloud folders and albums appear as folders next to it, linking to those files. A readable, date-based layout with the original file names is planned for v6 (#354).
Without Docker: npm install -g icloud-photos-sync (Node.js 26 or newer), then run icloud-photos-sync --help. See the Get Started guide for all options.
icloud-photos-sync is an independent project, and is not affiliated, endorsed, recommended by or otherwise affiliated with Apple Inc.
The only official way to keep a local copy of the full library is a Mac that keeps Photos.app running with Download Originals enabled, and those files can't easily be used outside Photos.app. This project syncs the library to a plain folder on any Linux host or NAS. Read more about the motivation and the maintainer's own workflow.
This application uses an undocumented iCloud API, which comes with a few limitations:
_Shared-Photos and can't be archived.Unknown filetype descriptor warning, please report it.Please also check the open and known issues and existing feature requests.
The Docker image is available for linux/amd64 and linux/arm64. The npm package runs wherever Node.js 26 runs, except Windows.
Please check the contributing guidelines to learn how to engage with this project.
Special thanks to:
Content type
Image
Digest
sha256:b04f08666…
Size
42.1 MB
Last updated
20 days ago
docker pull steilerdev/icloud-photos-sync