talira

iCloud Photos Downloader (icloudpd)

A command-line tool to download photos from iCloud

open sourceMITself-hostablefree

iCloud Photos Downloader (icloudpd) is a command-line tool that downloads every photo and video in an iCloud Photos library to a folder on Linux, Windows or macOS, a laptop, desktop or NAS. It runs once or watches for changes on an interval, in three modes: copy new photos (the default), sync (also delete local files that were removed in iCloud) and move (delete photos from iCloud once they're downloaded, keeping the most recent days). It saves Live Photos as an image and a video, RAW and RAW+JPEG, albums and iOS shared libraries, can set EXIF dates, de-duplicates by name and handles several Apple accounts in one run. It signs in with the account's password and two-factor code, typed in the console or in a small built-in web UI, accounts with Advanced Data Protection work with --adp-web-access, and security keys work from version 1.33.0. It ships as binaries for each platform, a Python package, a Docker image and an npm wrapper, and its docs show setups for TrueNAS and Synology NAS. Nathan Broadbent created it in 2016; volunteers in the icloud-photos-downloader GitHub organization maintain it today.

Ways to install

Problems it solves

  • download every photo and video in my iCloud library to a folder on my home server
  • back up my iCloud Photos to my Synology NAS automatically every night
  • keep a local copy of my iPhone photo library on a Linux machine, without a Mac
  • downloading my whole photo library from icloud.com in the browser is hopeless with tens of thousands of photos
  • move old photos off iCloud onto my own disk to free up iCloud storage
  • mirror my iCloud photo library so photos I delete on my phone also leave the backup
  • run a Docker container on my NAS that pulls new photos from iCloud every hour
  • back up the photos of everyone in my family's Apple accounts to one place
  • save iCloud Live Photos as both the still image and the video file
  • download RAW photos from iCloud along with their JPEG versions
  • get my iCloud photos into a self-hosted photo library like Immich by syncing them to a folder first
  • a script that downloads all my iCloud photos without opening the Photos app
  • back up the iCloud Shared Library my partner and I share to a local drive
  • iCloud photo backup that still works with Advanced Data Protection turned on
  • type the Apple two-factor code into a web page for a headless photo backup running on my NAS

View all 17 problems

Features

  • copy, sync (--auto-delete) and move (--keep-icloud-recent-days) modes
  • one-off download or continuous watch (--watch-with-interval)
  • Live Photos as separate image and video files
  • RAW and RAW+JPEG
  • albums, folders of albums and iOS 16 shared libraries (--library)
  • moves files that left a shared library into .icloudpd-pruned (--prune-orphans)
  • incremental runs with --until-found and --recent
  • EXIF date updates (--set-exif-datetime)
  • de-duplication of photos with the same name
  • several Apple accounts or configs in one run
View 9 more
  • password from a parameter, the system keyring, the console or the web UI
  • 2FA code by console, web UI or SMS; security keys (FIDO) from 1.33.0
  • Advanced Data Protection accounts with --adp-web-access
  • email notification when two-factor authentication expires
  • web UI for sign-in, status, progress and cancelling or resuming a run
  • --auth-only to create and check a session
  • binaries for Linux (glibc and musl; amd64, arm64, arm32v7), macOS (Apple Silicon and Intel) and Windows
  • Docker image, PyPI package, AUR package (icloudpd-bin) and npm wrapper
  • follows HTTPS_PROXY for proxies

Limitations

  • Doesn't work unless Access iCloud Data on the Web is turned on for the Apple account: Apple's servers return ACCESS_DENIED23
  • Can't stay signed in for good: Apple expires the two-factor session, currently every two months, and you enter a new code4
  • No graphical app: it's a command-line program, and its web UI only takes the password and 2FA code and shows progress25
  • The web UI has no login or password protection: it listens on port 8080 on every network interface5
  • No Windows build for ARM: the Windows binary is amd64 only2
  • Unreliable from mainland China: iCloud.com is blocked there and the --domain cn option has mixed results4

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what iCloud Photos Downloader (icloudpd) does.

  1. iCloud Photos Sync One-way sync engine for the iCloud Photos Library into the native file system
  2. iCloud-docker Dockerized iCloud client: make a local copy of your iCloud documents and photos, and keep it up to date
  3. kei Fast, parallel backups for cloud-hosted photos and videos
  4. PyiCloud A Python wrapper for accessing data from iCloud webservices
  5. OSXPhotos Python app to work with pictures and associated metadata from Apple Photos on macOS

Compare iCloud Photos Downloader (icloudpd) with the top 3