Womabre Posted February 3, 2020 Share Posted February 3, 2020 Hi all! In search of a way to get my iCloud pictures on my array and keep them in sync with iCloud (pull only). I ended up writing a docker template for the boredazfcuk/icloudpd docker container. This is my first template so bear with me. If someone has suggestions or comments about it please let me know! The template is located here. https://github.com/Womabre/unraid-docker-templates Known issues - Your iCloud password cannot contain special characters (I know of * and & to be problematic). 2 Quote Link to comment
calebcoverdale Posted May 15, 2020 Share Posted May 15, 2020 Hey! I just found this - it's exactly what I need! I used to boot up my macOS VM and have to manually export the images.... I am not able to run it, it has the following error: 2020-05-15 04:46:51 ERROR Destination volume not mounted - retry in 5 minutes Quote Link to comment
Womabre Posted May 15, 2020 Author Share Posted May 15, 2020 Did you create a .mounted file? Quote VOLUME CONFIGURATION It also requires a named volume mapped to /config. This is where is stores the authentication cookie. Without it, it will lose the cookie information each time the container is recreated. It will download the photos to the "/home/${user}/iCloud" photos directory. You need to create a bind mount into the container at this point I also have a failsafe built in. The launch script will look for a file called .mounted in the "/home/${user}/iCloud" folder. If this file is not present, it will not sync with iCloud. This is so that if the underlying disk/volume/whatever gets unmounted, sync will not occur. This prevents the script from filling up the root volume if the underlying volume isn't mounted for whatever reason. This file MUST be created manually and sync will not start without it https://hub.docker.com/r/boredazfcuk/icloudpd Quote Link to comment
ghulican Posted May 15, 2020 Share Posted May 15, 2020 I created the mounted file, but now I am getting some strange errors: last): -bash: syntax error near unexpected token `)' [email protected]:~# File "/usr/bin/icloudpd", line 11, in <module> -bash: syntax error near unexpected token `newline' [email protected]:~# load_entry_point('icloudpd==1.5.0', 'console_scripts', 'icloudpd')() -bash: syntax error near unexpected token `'icloudpd==1.5.0',' [email protected]:~# File "/usr/lib/python3.8/site-packages/click-6.7-py3.8.egg/click/core.py", line 722, in __call__ -bash: File: command not found [email protected]:~# return self.main(*args, **kwargs) -bash: syntax error near unexpected token `(' [email protected]:~# File "/usr/lib/python3.8/site-packages/click-6.7-py3.8.egg/click/core.py", line 697, in main -bash: File: command not found [email protected]:~# rv = self.invoke(ctx) -bash: syntax error near unexpected token `(' [email protected]:~# File "/usr/lib/python3.8/site-packages/click-6.7-py3.8.egg/click/core.py", line 895, in invoke -bash: File: command not found [email protected]:~# return ctx.invoke(self.callback, **ctx.params) -bash: syntax error near unexpected token `(' [email protected]:~# File "/usr/lib/python3.8/site-packages/click-6.7-py3.8.egg/click/core.py", line 535, in invoke -bash: File: command not found [email protected]:~# return callback(*args, **kwargs) -bash: syntax error near unexpected token `(' [email protected]:~# File "/usr/lib/python3.8/site-packages/icloudpd-1.5.0-py3.8.egg/icloudpd/base.py", line 292, in main -bash: File: command not found [email protected]:~# File "/usr/lib/python3.8/posixpath.py", line 336, in norm Any thoughts? Quote Link to comment
Drazzilb Posted May 16, 2020 Share Posted May 16, 2020 (edited) On 5/14/2020 at 11:22 PM, Womabre said: Did you create a .mounted file? https://hub.docker.com/r/boredazfcuk/icloudpd I have created this file ".mounted" placed it w/in my /mnt/user/media/pictures/iCloud/ directory. Still seeing the same error. When I bash into the container I navigate to /home/user/icloud/ I can see the .mounted file there. after running ls -A to see the hidden file. Destination volume not mounted - retry in 5 minutes My docker command: [email protected]:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='icloudpd' --net='bridge' -e TZ="America/Los_Angeles" -e HOST_OS="Unraid" -e 'apple_id'='[email protected]' -e 'apple_password'='PASSWORD' -e 'synchronisation_interval'='21600' -e 'command_line_options'='' -e 'authentication_type'='2FA' -e 'UMASK'='000' -e 'directory_permissions'='777' -e 'file_permissions'='666' -e 'notification_type'='' -e 'prowl_api_key'='' -e 'pushbullet_api_key'='' -e 'telegram_token'='' -e 'telegram_chat_id'='' -e 'PUID'='99' -e 'PGID'='100' -e 'TZ'='America/Los Angeles' -v '/mnt/user/appdata/icloudpd':'/config':'rw' -v '/mnt/user/media/pictures/iCloud/':'/home/user/icloud':'rw' 'boredazfcuk/icloudpd' EDIT: got it working change mapping for /home/user/icloud to /home/user/iCloud , the capital C does make a difference. Edited May 17, 2020 by Drazzilb Quote Link to comment
Womabre Posted May 17, 2020 Author Share Posted May 17, 2020 8 hours ago, Drazzilb said: EDIT: got it working change mapping for /home/user/icloud to /home/user/iCloud , the capital C does make a difference. Thanks! I will adjust the default value to be with a capital C. Quote Link to comment
boredazfcuk Posted May 17, 2020 Share Posted May 17, 2020 On 2/3/2020 at 8:53 PM, Womabre said: Known issues - Your iCloud password cannot contain special characters (I know of * and & to be problematic). Think I've fixed this today. I've tested with * and & and that works OK. I've not tried others like "$()'<> which may cause issues though. Quote Link to comment
principino1984 Posted May 18, 2020 Share Posted May 18, 2020 I had to run the docker configuration manually cause the automatic from CA is not mapping correctly the "iCloud" name too. But now I have another problem when I start it: "Error: Invalid value for "-d" / "--directory": Path "/home//iCloud" does not exist" Quote Link to comment
Womabre Posted May 18, 2020 Author Share Posted May 18, 2020 6 hours ago, principino1984 said: I had to run the docker configuration manually cause the automatic from CA is not mapping correctly the "iCloud" name too. But now I have another problem when I start it: "Error: Invalid value for "-d" / "--directory": Path "/home//iCloud" does not exist" I'm getting this error as well since the update last night. @boredazfcuk maybe this is something that has to do with changes on your end? Quote Link to comment
Lasbo55 Posted May 18, 2020 Share Posted May 18, 2020 8 hours ago, principino1984 said: I had to run the docker configuration manually cause the automatic from CA is not mapping correctly the "iCloud" name too. But now I have another problem when I start it: "Error: Invalid value for "-d" / "--directory": Path "/home//iCloud" does not exist" Also getting this error. Quote Link to comment
Drazzilb Posted May 18, 2020 Share Posted May 18, 2020 Same. Seems to be a new issue Error: Invalid value for "-d" / "--directory": Path "/home//iCloud" does not exist. Quote Link to comment
chazman88 Posted May 19, 2020 Share Posted May 19, 2020 Looks like the character ! is an issue in passwords? When filling in the following command and running it i get a bash error "docker run -it --rm --network host --env user=user --env user_id=1000 --env group=admins --env group_id=1010 --env apple_id="[email protected]_id.com" --env apple_password="PASSWORD" --volume /mnt/user/appdata/icloudpd:/config boredazfcuk/icloudpd" -bash: !ng: event not found "!ng" is a small part of my password, trying to escape the ! with a backslash (\!ng) within the password string allows it to work but then i all sorts of other python errors. The scrips thinks it completed as it says 2FA cookie is generated but the log for the docker gets stuck at "Check 2FA Cookie" 2020-05-19 18:22:36 DEBUG Authenticating... Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/pyicloud_ipd/base.py", line 209, in authenticate req = self.session.post( File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 578, in post return self.request('POST', url, data=data, json=json, **kwargs) File "/usr/lib/python3.8/site-packages/pyicloud_ipd/base.py", line 100, in request self._raise_error(code, reason) File "/usr/lib/python3.8/site-packages/pyicloud_ipd/base.py", line 122, in _raise_error raise api_error pyicloud_ipd.exceptions.PyiCloudAPIResponseError: Unknown reason During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/icloudpd", line 11, in <module> load_entry_point('icloudpd==1.5.0', 'console_scripts', 'icloudpd')() File "/usr/lib/python3.8/site-packages/click-6.7-py3.8.egg/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3.8/site-packages/click-6.7-py3.8.egg/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/lib/python3.8/site-packages/click-6.7-py3.8.egg/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3.8/site-packages/click-6.7-py3.8.egg/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/usr/lib/python3.8/site-packages/icloudpd-1.5.0-py3.8.egg/icloudpd/base.py", line 253, in main File "/usr/lib/python3.8/site-packages/icloudpd-1.5.0-py3.8.egg/icloudpd/authentication.py", line 29, in authenticate File "/usr/lib/python3.8/site-packages/pyicloud_ipd/base.py", line 193, in __init__ self.authenticate() File "/usr/lib/python3.8/site-packages/pyicloud_ipd/base.py", line 216, in authenticate raise PyiCloudFailedLoginException(msg, error) pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseError('Unknown reason')) 2020-05-19 18:22:37 INFO Please ignore the 'expected str, bytes or os.PathLike object, not NoneType' error. This is a fault with the underlying icloud_photos_downloader Python application 2020-05-19 18:22:37 INFO Two factor authentication cookie generated. Sync should now be successful. Quote Link to comment
Womabre Posted May 20, 2020 Author Share Posted May 20, 2020 On 5/18/2020 at 5:48 PM, Lasbo55 said: "Error: Invalid value for "-d" / "--directory": Path "/home//iCloud" does not exist" This error seems to be fixed in the update from last night. Quote Link to comment
principino1984 Posted May 20, 2020 Share Posted May 20, 2020 Thanks, I had to reinstall the docker, but now it is working thanks a lot! Quote Link to comment
Lasbo55 Posted May 20, 2020 Share Posted May 20, 2020 Now working for me too. Thank you very much. Quote Link to comment
Drazzilb Posted May 21, 2020 Share Posted May 21, 2020 Looking for some thoughts in regards to this warning. not really an error. Just curious how I can make it right. WARNING Using Apple ID password from variable. This password will be visible in the process list of the host. Please add your password to the system keyring instead Thanks Quote Link to comment
Yoram Posted May 24, 2020 Share Posted May 24, 2020 (edited) Thank you for creating this! I have always wanted a way to do this! Now a quick question: Setup has worked, I can see in the log how it is listing file after file of my iCloud photos. It seems to be only creating folders, without actually saving any files. Is there a setting somewhere that I missed? Have you ever experienced this? In the log it will list the following for example: home/user/iCloud/2020/02/20/IMG_7207.HEIC /home/user/iCloud/2020/02/19/8ea11b5c-f26b-4d93-96c3-c6a037ee01dd.jpg /home/user/iCloud/2020/02/18/2ac47d72-f515-4b26-b975-bdae319f1b52.jpg /home/user/iCloud/2020/02/19/ec6770bc-b98c-422a-a602-d459f7272189.jpg /home/user/iCloud/2020/02/19/IMG_7202.HEIC /home/user/iCloud/2020/02/19/43cf780a-d9a6-4fbf-874f-d1ce19d465dc.jpg /home/user/iCloud/2020/02/20/5ba84dce-c350-4355-8a71-9e02f7355176.jpg /home/user/iCloud/2020/02/19/IMG_7203.HEIC /home/user/iCloud/2020/02/19/2bf9c153-ba57-4a59-8eee-8dca104342e6.jpg thank you! Edited May 24, 2020 by Yoram Quote Link to comment
Womabre Posted June 5, 2020 Author Share Posted June 5, 2020 On 5/24/2020 at 7:21 PM, Yoram said: Now a quick question: Setup has worked, I can see in the log how it is listing file after file of my iCloud photos. It seems to be only creating folders, without actually saving any files. Is there a setting somewhere that I missed? Have you ever experienced this? In the log it will list the following for example: home/user/iCloud/2020/02/20/IMG_7207.HEIC /home/user/iCloud/2020/02/19/8ea11b5c-f26b-4d93-96c3-c6a037ee01dd.jpg /home/user/iCloud/2020/02/18/2ac47d72-f515-4b26-b975-bdae319f1b52.jpg /home/user/iCloud/2020/02/19/ec6770bc-b98c-422a-a602-d459f7272189.jpg /home/user/iCloud/2020/02/19/IMG_7202.HEIC /home/user/iCloud/2020/02/19/43cf780a-d9a6-4fbf-874f-d1ce19d465dc.jpg /home/user/iCloud/2020/02/20/5ba84dce-c350-4355-8a71-9e02f7355176.jpg /home/user/iCloud/2020/02/19/IMG_7203.HEIC /home/user/iCloud/2020/02/19/2bf9c153-ba57-4a59-8eee-8dca104342e6.jpg If I'm not mistaking it first scans and creates the folder structure. After this is done it will download the files. Quote Link to comment
Rowanhs Posted July 14, 2020 Share Posted July 14, 2020 Thanks so much for this @Womabre. Been looking for something like this for ages! I've had this up and running no troubles for a few weeks but in the last couple of days I've started getting the following error. Traceback (most recent call last): File "/usr/bin/icloudpd", line 11, in <module> load_entry_point('icloudpd==1.5.0', 'console_scripts', 'icloudpd')() File "/usr/lib/python3.8/site-packages/click-6.7-py3.8.egg/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3.8/site-packages/click-6.7-py3.8.egg/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/lib/python3.8/site-packages/click-6.7-py3.8.egg/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3.8/site-packages/click-6.7-py3.8.egg/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/usr/lib/python3.8/site-packages/icloudpd-1.5.0-py3.8.egg/icloudpd/base.py", line 276, in main File "/usr/lib/python3.8/site-packages/pyicloud_ipd/services/photos.py", line 194, in albums folder['fields']['albumNameEnc']['value']).decode('utf-8') KeyError: 'albumNameEnc' 2020-07-14 15:43:47 ERROR Check failed - Exit code: 1 I'm not sure what's happened as i don't think I've changed anything? Server restarted one day and now throwing this error. Any ideas? Quote Link to comment
Womabre Posted July 14, 2020 Author Share Posted July 14, 2020 4 hours ago, Rowanhs said: folder['fields']['albumNameEnc']['value']).decode('utf-8') KeyError: 'albumNameEnc' Maybe an album with a special character that causes issues?? Quote Link to comment
Rowanhs Posted July 14, 2020 Share Posted July 14, 2020 13 hours ago, Womabre said: Maybe an album with a special character that causes issues?? See..... @Womabre this is why you earn the big bucks. I humbly submit my thanks and appreciation! Somehow I had created a Folder in Albums with no name. Did not show up on my iphone or ipad but it did show up on my mac. Renamed it and that's fixed it. Really appreciate your time in responding, i wouldn't have come across that for weeks as i don't use the Photos app on mac to edit my photos. Cheers! Quote Link to comment
Alex.b Posted July 16, 2020 Share Posted July 16, 2020 (edited) I'm trying to use this template without succes. Everythiong is set, creditentials, 2FA, but folder remains empty Edited July 16, 2020 by Alex.b Quote Link to comment
Womabre Posted July 22, 2020 Author Share Posted July 22, 2020 On 7/16/2020 at 9:19 PM, Alex.b said: I'm trying to use this template without succes. Everythiong is set, creditentials, 2FA, but folder remains empty What does the log say? Quote Link to comment
Alex.b Posted July 27, 2020 Share Posted July 27, 2020 (edited) I just found the problem, I had a album without name on icloud.com (not visible on my iPhone). Everything works now Edited July 27, 2020 by Alex.b Quote Link to comment
UknownPerson00 Posted August 22, 2020 Share Posted August 22, 2020 Hello u have any idea why i am having this problem? (/bin/sh: /tmp/icloud/sync-icloud.sh: not found ) I have place the files correctly. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.