michis0806/icloud-backup-docker

By michis0806

Updated 20 days ago

A Docker-based backup service for iCloud Drive and iCloud Photos with a user-friendly web interface.

Image
Security
1

7.9K

michis0806/icloud-backup-docker repository overview

iCloud Backup Docker

Back up your iCloud Drive and iCloud Photos automatically with a simple web interface.

Features

  • Multi-account support with 2FA (device push & SMS)
  • iCloud Drive backup (folder selection or manual paths)
  • iCloud Photos backup (including family library)
  • Configurable sync policy per backup type: keep, delete, or archive removed files
  • Scheduled backups via cron expressions
  • Password-protected web UI
  • Exclusion patterns (glob, paths)
  • Etag caching for fast incremental backups
  • Live progress, backup duration & built-in log viewer
  • Pushover push notifications for backup errors and expiring tokens
  • Multi-arch: linux/amd64 and linux/arm64

Quick Start

# docker-compose.yml
version: "3.8"
services:
  icloud-backup:
    image: michis0806/icloud-backup-docker:latest
    container_name: icloud-backup
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - ./backups:/backups
      - ./config:/config
      - ./archive:/archive    # for sync policy "archive"
    environment:
      - TZ=Europe/Berlin
      - AUTH_PASSWORD=my-secure-password
      - SECRET_KEY=change-me-in-production
docker compose up -d

Open http://localhost:8080 and log in.

If AUTH_PASSWORD is not set, a random password is generated and printed to the container log on startup.

Environment Variables

VariableDefaultDescription
AUTH_PASSWORD(random)Web UI password. Random if not set (check logs).
SECRET_KEY(uses AUTH_PASSWORD)Secret for cookie signing. Falls back to AUTH_PASSWORD if not set.
LOG_LEVELINFOLog level (DEBUG, INFO, WARNING, ERROR).
ARCHIVE_PATH./archiveHost path for archived files (sync policy "archive").
TZEurope/BerlinContainer timezone.

Pushover notifications are configured in the web UI under Einstellungen and stored in /config/config.yaml.

Volumes

PathDescription
/backupsBackup destination
/configConfig file, session tokens, caches
/archiveArchived files when sync policy is set to "archive"

How It Works

  1. Add account – Enter your Apple ID and app-specific password, confirm 2FA (device push or SMS)
  2. Configure – Select folders/photos, set exclusions, choose schedule and sync policy
  3. Back up – Run manually or let the scheduler handle it
Sync Policy

For each backup type (Drive / Photos) you can choose independently what happens when files are deleted in iCloud:

  • Keep – local files remain untouched (default for Photos)
  • Delete – local files are removed (default for Drive)
  • Archive – files are moved to /archive, preserving the folder structure

Session tokens are cached so you don't need to re-authenticate on every run. 2FA tokens typically last ~2 months.

Synology NAS

Works great on Synology NAS via Container Manager, SSH, or Portainer. See the full documentation for detailed Synology setup instructions.


[Unreleased]

[0.10.6] 2026-06-29

Fixed
  • Backups failed for accounts without Notes or Reminders – When an account never used Notes or Reminders, the corresponding CloudKit zone does not exist and Apple answers with ZONE_NOT_FOUND (Notes surface it as a 404, Reminders as a wrapped "Changes response validation failed"). Both were treated as hard errors, which marked the whole backup as failed and triggered the failure notification. A missing zone is now recognised as a benign empty result (zero items, no error), so the backup succeeds and only the genuinely failing sources count as errors.

Tag summary

Content type

Image

Digest

sha256:ec27dfd2b

Size

71.6 MB

Last updated

20 days ago

docker pull michis0806/icloud-backup-docker