Install and Run¶
There are three ways to run icloudpd:
Download the executable for your platform from the GitHub Release (see Which file do I download?) and run it, e.g.:
./icloudpd-1.35.0-linux-amd64 --username your@email.address --directory photos --watch-with-interval 3600
Use a package manager to install, update, and, in some cases, run (Docker, PyPI, AUR, npm)
Build and run from source
iCloud Prerequisites¶
Check these settings on your iPhone or iPad first, otherwise Apple’s servers return an ACCESS_DENIED error:
Access iCloud Data on the Web: enable
Settings > [your name] > iCloud > Access iCloud Data on the WebAdvanced Data Protection (ADP): either disable
Settings > [your name] > iCloud > Advanced Data Protection, or keep it enabled and run with--adp-web-access(see Authentication)
Which file do I download?¶
Each release has many files. Pick the one for your system:
System |
File |
|---|---|
Windows, 64-bit Intel/AMD |
|
macOS, Apple Silicon (M1 and later) |
|
macOS, Intel |
|
Linux (glibc: Debian, Ubuntu, Fedora, …), 64-bit Intel/AMD |
|
Linux (glibc), 64-bit ARM |
|
Linux (glibc), 32-bit ARM (armv7) |
|
Linux (musl: Alpine 3.20 and newer) |
|
There is no Windows build for ARM.
Ignore the other files unless you know you need them:
icloud-<version>-...is a different, small tool (icloud) for Find My devices and for managing the password in the system keyring (see Authentication). It does not download photos.*.whlare Python packages; install them with pip or pipx instead.icloudpd-<version>-oci.taris the Docker image as a file; use Docker instead.*.mdfiles are release notes and test results.
If you are not sure whether your Linux uses glibc or musl, use the glibc file; only Alpine and a few small distributions use musl. See Linux binaries for details.
Windows binary¶
icloudpd is a command-line program. Double-clicking the .exe only prints the help text, and the window closes right away. Open a terminal (Command Prompt or PowerShell) in the folder with the file and run it from there:
.\icloudpd-1.35.0-windows-amd64.exe --username your@email.address --directory C:\photos\icloud
Linux binaries¶
Linux binaries are available for amd64, arm64 and arm32v7, in two variants:
icloudpd-<version>-linux-<arch>for distributions based on glibc, e.g. Debian, Ubuntu, Fedoraicloudpd-<version>-linux-musl-<arch>for distributions based on musl, e.g. Alpine
The musl variant needs musl 1.2.5 or newer, which is Alpine 3.20 and newer. On older Alpine releases it fails to start (Error relocating ... or a segmentation fault). The same applies to the musl wheels on PyPI (musllinux), which contain the same binary.
Make the downloaded file executable and start it with ./ from the folder it is in:
chmod +x icloudpd-1.35.0-linux-amd64
./icloudpd-1.35.0-linux-amd64 --username your@email.address --directory photos
macOS binary¶
icloudpd is available as a binary for Apple Silicon Macs (icloudpd-<version>-macos-arm64) and for Intel Macs (icloudpd-<version>-macos-amd64). The Intel binary is built for as long as GitHub provides Intel macOS build machines; on Intel Macs after that, use Docker or PyPI.
Note
In 1.32.3, icloudpd-1.32.3-macos-amd64 was built for Apple Silicon by mistake and does not run on Intel Macs (bad CPU type in executable). Use 1.32.2 or 1.33.0 and later on Intel Macs.
Here are the steps to make it work (the examples use the Apple Silicon binary):
Download the binary from GitHub Releases into the desired local folder
Add the executable flag by running
chmod +x icloudpd-1.35.0-macos-arm64Start it from the terminal:
./icloudpd-1.35.0-macos-arm64Apple will tell you that it cannot check for malicious software and refuse to run the app; click “OK”
Open “System Settings”/”Privacy & Security” and find
icloudpd-1.35.0-macos-arm64as a blocked app; click “Allow”Start
./icloudpd-1.35.0-macos-arm64from the terminal againApple will show another warning; click “Open”
After that, you can run
./icloudpd-1.35.0-macos-arm64 --helpor any other supported command/option
Instead of the “Privacy & Security” steps, you can remove the download quarantine flag in the terminal:
xattr -d com.apple.quarantine icloudpd-1.35.0-macos-arm64
Docker¶
docker run -it --rm --name icloudpd \
-v $(pwd)/Photos:/data \
-v $(pwd)/icloudpd-config:/config \
-e TZ=America/Los_Angeles \
icloudpd/icloudpd:latest \
icloudpd --directory /data --cookie-directory /config --username my@email.address --watch-with-interval 3600
-v ...:/configwith--cookie-directory /configkeeps the session on the host. Without it, the session is stored in/root/.pyicloudinside the container and is lost every time the container is recreated (e.g. after an image update), so you have to do 2FA again.-itis needed to type the password and 2FA code in the console. Without a terminal, use the web UI instead.The image asset date is converted to the specified
TZand then used for creating folders (see the--folder-structureparameter).Files are written as
root, so on Linux hosts the downloaded files and the session folder are owned byroot.
To use the web UI (--password-provider webui and/or --mfa-provider webui), publish its port, e.g. -p 8080:8080; the web UI then is at http://localhost:8080. It has no login, so do not expose the port to the internet.
To update, pull the new image and recreate the container:
docker pull icloudpd/icloudpd:latest
The synchronization logic can be adjusted with command-line parameters. Run the following to get the full list:
docker run -it --rm icloudpd/icloudpd:latest icloudpd --help
Note
On Windows:
use
%cd%instead of$(pwd)in Command Prompt, and${PWD}in PowerShellor a full path, e.g.
-v c:/photos/icloud:/dataonly Linux containers are supported
the
\line continuations above are for Linux/macOS shells; put the command on one line on Windows
Note
Getting Docker:
On Windows and Mac Docker is available as Docker Desktop app.
On Linux, see the Docker Engine install guide for your distribution.
Appliances (e.g., NAS) will have their own way to install Docker engines and run containers - see the manufacturer’s instructions and NAS.
PyPI¶
pipx installs icloudpd in its own environment and is the recommended way:
pipx install icloudpd
Update:
pipx upgrade icloudpd
Run:
icloudpd --directory /data --username my@email.address --watch-with-interval 3600
You can also use pip (pip install icloudpd, update with pip install --upgrade icloudpd), preferably inside a virtual environment. On Debian 12+, Ubuntu 23.04+ and other distributions that mark the system Python as externally managed (PEP 668), pip install outside a virtual environment fails with externally-managed-environment; use pipx or a virtual environment.
Note
on Windows with pip:
pip install icloudpd --user
Also add C:\Users\<YourUserAccountHere>\AppData\Roaming\Python\Python<YourPythonVersionHere>\Scripts to PATH. The exact path will be given at the end of the icloudpd installation.
Note
on MacOS with pip:
Add /Users/<YourUserAccountHere>/Library/Python/<YourPythonVersionHere>/bin to PATH. The exact path will be given at the end of icloudpd installation.
AUR¶
AUR packages can be installed on Arch Linux. Installation can be done manually or with the use of an AUR helper.
The manual process would look like this:
git clone https://aur.archlinux.org/icloudpd-bin.git
cd icloudpd-bin
makepkg -sirc
With the use of an AUR helper, e.g., yay, the installation process would look like this:
yay -S icloudpd-bin
npm¶
npx --yes icloudpd --directory /data --username my@email.address --watch-with-interval 3600
Supported platforms¶
Python: 3.11 to 3.15 (for PyPI installs; the binaries and the Docker image include their own Python).
Operating systems: Linux (amd64, arm64, arm32v7), macOS (Apple Silicon and Intel) and Windows (amd64).
Linux distributions: each release is tested on the Debian, Ubuntu and Alpine releases that still get free security updates, plus those whose support ended less than a year ago (currently Debian 11 (binary only), 12 and 13, Ubuntu 22.04, 24.04 and 26.04, Alpine 3.20 to 3.24). The
compatibility-<version>.mdfile of each release has the full results.icloudpdmay work on older releases, but they are not tested.
Error on the First Run¶
When you run the script for the first time, you might see an error message like this:
Bad Request (400)
This error often happens because your account hasn’t used the iCloud API before, so Apple’s servers need to prepare some information about your photos. This process can take around 5-10 minutes, so please wait a few minutes and try again.
If you are still seeing this message after 30 minutes, then please open an issue on GitHub and post the script output.
Using a Proxy¶
icloudpd has no proxy parameter of its own, but it follows the standard proxy environment variables. Set HTTPS_PROXY (all traffic to Apple, including sign-in and downloads, uses HTTPS) before starting it:
HTTPS_PROXY=http://proxy.example.com:3128 icloudpd --username your@email.address --directory /data
Use NO_PROXY for hosts that should be reached directly. For Docker, pass the variable with -e HTTPS_PROXY=....