Backup your iCloud photos to your Synology NAS (and even convert to .jpg) automatically with icloudpd via docker

You recently posted a video about syncing google drive / dropbox

Sync Google Drive / Dropbox to your Synology NAS - Cloud Sync Tutorial

Loved it, as usual. I made a comment about the inability to sync iCloud photos which was my #1 wish. You replied it is possible to do somehow with an iPhone, but I went looking and found icloudpd, which can be run in docker on a Synology NAS.

It’s excellent. I found it via a reddit post by onestix made a year ago. How come I haven’t heard about it (and you haven’t made a video about it) before?

There’s not that much about it on YouTube, and there’s not even that much written about it on forums, especially for use with a Synology NAS.

It can regularly backup your icloud photos to your Synology NAS, and then you can use your NAS to index them (great that it now does objects as well as people BTW).

My workflow was:

(Install Portainer on the NAS if you don’t have it)
Create a directory in your docker directory for the config file
Create a directory in your photo folder for icloud photos
Create a .mounted file in that photo folder (easy to miss that in the git instructions)
Create a stack in Portainer (see below for mine)
Deploy the stack
Log into the container console (/bin/sh) via Portainer and run the authorisation
/usr/local/bin/ --Initialise
Then it starts downloading!
It will even convert .heic to .jpg if you tell it to!

You can find your user ID by SSHing into the NAS and typing “id”.

version: '3.3'
        container_name: icloudpd
        restart: always
            - user=xxxxx
            - user_id=1026
            - group=users
            - group_id=100
            - authentication_type=2FA
            - 'folder_structure={:%Y/%m}'
            - notification_days=7
            - synchronisation_interval=86400
            - TZ=Europe/London
            - 'download_path=/icloud'
            - skip_check=false
            - convert_heic_to_jpeg=true
            - auto_delete=true
        network_mode: host
            - '/volume1/docker/icloudpd:/config'
            - '/volume1/photo/icloud:/icloud'
        image: boredazfcuk/icloudpd:latest
1 Like

And if you have two accounts, one for you and one for your wife, you just create two docker containers!

1 Like

This is great info! Will have to look at it!