Skip to content

Commit

Permalink
Updated docs for optional ENV_ICLOUD_PASSWORD
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarons committed Aug 7, 2024
1 parent c0a2ff0 commit e3e214d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,20 @@ Primary use case of iCloud-docker is to periodically sync wanted or all of your
### Installation using Docker Hub

```
docker run --name icloud -v ${PWD}/icloud:/icloud -v ${PWD}/config:/config -e ENV_ICLOUD_PASSWORD=<icloud_password> ENV_CONFIG_FILE_PATH=/config/config.yaml mandarons/icloud-drive
docker run --name icloud -v ${PWD}/icloud:/icloud -v ${PWD}/config:/config -e ENV_CONFIG_FILE_PATH=/config/config.yaml mandarons/icloud-drive
```

### Installation using docker-compose

```yaml
version: "3.4"
services:
icloud:
image: mandarons/icloud-drive
environment:
- PUID=<insert the output of `id -u $user`>
- PGID=<insert the output of `id -g $user`>
env_file:
- .env.icloud # Must contain ENV_ICLOUD_PASSWORD=<password> and ENV_CONFIG_FILE_PATH=/config/config.yaml
- .env.icloud # Must contain ENV_CONFIG_FILE_PATH=/config/config.yaml and optionally, ENV_ICLOUD_PASSWORD=<password>
container_name: icloud
restart: unless-stopped
volumes:
Expand All @@ -50,14 +49,14 @@ services:
```
# 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"
docker exec -it --user=abc icloud /bin/sh -c "icloud --username=<icloud-username> --session-directory=/config/session_data"
```

For China server users, Please add `--region=china` as follows:

```
# 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> --region=china --session-directory=/config/session_data"
docker exec -it --user=abc icloud /bin/sh -c "icloud --username=<icloud-username> --region=china --session-directory=/config/session_data"
```

Follow the steps to authenticate.
Expand Down
2 changes: 1 addition & 1 deletion src/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def send(config, username, last_send=None, dry_run=False):
sent_on = None
message = f"""Two-step authentication for iCloud Drive, Photos (Docker) is required.
Please login to your server and authenticate. Please run -
`docker exec -it icloud /bin/sh -c
`docker exec -it --user=abc icloud /bin/sh -c
"icloud --session-directory=/config/session_data --username={username}"`."""
subject = f"icloud-docker: Two step authentication is required for {username}"
notify_telegram(
Expand Down

0 comments on commit e3e214d

Please sign in to comment.