mandarons / icloud-docker

Dockerized iCloud Client - make a local copy of your iCloud documents and photos, and keep it automatically up-to-date.
BSD 3-Clause "New" or "Revised" License
1.19k stars 49 forks source link

[BUG] 2FA Prompt Every Time Starting the Docker Container #236

Closed s485lee closed 4 months ago

s485lee commented 4 months ago

Describe the bug 2FA popup shows up on my Apple devices every time the docker container is restarted. Unable to sync my iCloud drive.

Running the following command: icloud --username= --session-directory=/app/session_data Returns: root@XXXXXXXX:/app#

To Reproduce Restart Docker Container

Expected behavior Successful login, then download contents of my iCloud drive.

Screenshots

Screenshot 2024-06-28 at 11 15 55 PM Screenshot 2024-06-28 at 11 17 28 PM

Configuration

image

Additional context Add any other context about the problem here.

mandarons commented 4 months ago

Looks like you're using older session_data path. Please use the new path: From README

# Login manually if ENV_ICLOUD_PASSWORD is not specified and/or 2FA is required
docker exec -it icloud /bin/sh -c "icloud --username=<icloud-username> --session-directory=/config/session_data"
s485lee commented 4 months ago

Ok that solved it and now my drive is syncing. I will post my unraid plugin configuration for any unraid user having the same problem:

image