Skip to content

nicx/icloud-drive-docker

 
 

iCloud-drive-docker

CI - Main Tests Coverage Docker Discord Buy Me A Coffee

🤟 Please star this repository if you end up using the container. It will help me continue supporting this product. 🙏

iCloud-drive-docker is a simple iCloud drive client in Docker environment. It uses pyiCloud python library to interact with iCloud drive server.

Primary use case of iCloud-drive-docker is to periodically sync wanted or all of your iCloud drive contents, using your iCloud username and password. Please note that this application only downloads the files from server. It does not upload the local files to the server (yet).

Installation

Installation using Docker Hub

docker run --name icloud-drive -v ${PWD}/drive:/app/drive mandarons/icloud-drive 

Installation using docker-compose

version: "3.4"
services:
  icloud-drive:
    image: mandarons/icloud-drive
    environment:
      - PUID=<insert the output of `id -u $user`>
      - GUID=<insert the output of `id -g $user`>
    container_name: icloud-drive
    restart: unless-stopped
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - ${PWD}/icloud-drive/config.yaml:/app/config.yaml
      - ${PWD}/icloud-drive/drive:/app/drive

Authentication (required after container creation)

docker exec -it icloud-drive /bin/sh -c "icloud --username=<icloud-username>"

Follow the steps to authenticate.

Sample Configuration File

credentials:
  # iCloud drive username: required
  username: [email protected]
  # iCloud drive password: optional
  password:
settings:
  # Auto-sync interval in seconds: optional, default: 1800
  sync_interval: 1800
  # Destination to sync: required
  destination: './drive'
  # Flag if remove files/folders that are present locally but not on iCloud server: optional, default: false
  remove_obsolete: false
  # Verbosity of messages: optional, default: false
  verbose: false
smtp:
  # If you want to recieve email notifications about expired/missing 2FA credentials then uncomment
  # email: [email protected]
  # password:
  # host: smtp.test.com
  # port: 587
  # If your email provider doesn't handle TLS
  # no_tls: true
filters:
  # Paths to be 'included' in syncing iCloud drive content
  folders:
    - Documents
  file_extensions: #Optional, leave empty for syncing all the content recursively
    # File extensions to be included in syncing iCloud drive content
    - pdf
    - png
    - jpg
    - jpeg

Note: On every sync, this client iterates all the files and folders. Depending on number of files in your iCloud drive, syncing can take longer.

Use Cases

Make scanned documents from iCloud Drive, searchable

About

Dockerized iCloud drive

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.7%
  • Other 0.3%