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/sync-icloud.sh --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”.
Thanks for sharing this! I think I almost got it but don’t fully understand the .mounted line. Can you explain how I created and upload that file into the folder?
“I have added a failsafe feature to this container so that it doesn’t make any changes to the filesystem unless it can verify the volume it is writing to is mounted correctly. The container will look for a file called “/home/${user}/iCloud/.mounted” (please note the capitalisation of iCloud) in the download destination directory inside the container. If this file is not present, it will not download anything from iCloud. This way, if underlying disk/volume/whatever gets unmounted, sync will not occur and this prevents the script from filling up the root volume of the host. This file MUST be created manually and sync will not start without it.”
Create the file using a text editor or touch. It just has to exist. If it doesn’t then it won’t work and the log file will tell you that the .mounted file is missing.
Thanks for getting back to me. I’m in the container console (using portainer) and I’m getting a file directory not found error when I try to use touch and pasting what the instructions for.
Any idea what I’m doing wrong? Sorry I’m new to all this.
(I run several icloudpd containers, one for each family member - I also ignored the capitalisation of iCloud when I set my path and hence my volume mounts)
My .mounted file is /volume1/photo/icloud/myname/.mounted on the NAS. Create a .txt file on the NAS and then rename it to .mounted. That’s probably the easiest way to create it and doesn’t need you to go into docker at all.
works great on my synology ! Great writeup ! I`ve used container manager to build the docker-compose however I still had to use portainer (agent) in my case to access the /bin/sh for the auth process …
Hello, I have a problem when Im trying to initialise I get error Keyring file does not exist. Please try again.
I dont want to authenticate with Keyring.