Skip to content
Proyek

Tentang

Fast, parallel backups for cloud-hosted photos and videos - one-time exports, local mirrors, and unattended Docker runs.

Sistem dan infrastruktur

Cara angka ini diukur

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
+1
dalam 15 hari
Mengumpulkan riwayat
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

kei logo

kei: fast, parallel backups
for cloud-hosted photos and videos.

Main CI Scheduled nightly qualification
Rust MSRV 1.91+ License: MIT Version
Homebrew Downloads Docker Pulls

kei backs up your iCloud Photos library to a folder you choose, on your computer, a server or a NAS. It saves originals, edits, RAW files and Live Photos as ordinary files, sorted into album and date folders. Run it once, or leave it running to keep the backup up to date.

[!WARNING] kei is pre-release software, and a new minor version can change how it works. Before you update an existing backup, read the upgrade checklist and the changelog.

Before you install

  • Your Apple ID must get two-factor codes on an iPhone, iPad or Mac. Codes by text message only, and security keys such as a YubiKey, are not supported.
  • Advanced Data Protection (ADP) must be off, and iCloud web access on. kei reads your photos the way iCloud.com does, which ADP blocks. Turning ADP off removes end-to-end encryption for Photos and other data. Read Apple's explanation and what kei needs before you decide.
  • A folder on a local disk with room for your whole library. See Storage support for external drives and network shares.

Already have photos from icloudpd? Follow Migrating from icloudpd so kei reuses them instead of downloading them again.

You can run kei directly on your computer or server, or in Docker. Pick whichever suits you.

Quick start on your computer

1. Install. With Homebrew on macOS or Linux:

brew install rhoopr/kei/kei

Or download the file for your system from Releases, unpack it and put kei somewhere on your PATH. Install also covers building from source.

2. Set up.

kei config setup

This asks for your Apple ID, where to save photos, how to sort them into folders, and which libraries and albums to back up. It saves a config file at ~/.config/kei/config.toml, and can save your iCloud password so you don't have to type it again.

3. Run it.

kei sync

The first time, kei asks for the six-digit code Apple sends to your devices. It then lists your library and downloads everything. A large library can take hours. You can stop it with Ctrl-C at any time: the next kei sync carries on where it left off. kei status shows what is saved and what is still to do.

4. Keep it up to date.

kei service run

This syncs once a day until you stop it. To keep it running after you log out or restart, start it from systemd, launchd or Task Scheduler; Background sync has ready-made examples.

Quick start with Docker

1. Make the folders and config.

mkdir -p kei/config kei/photos
cd kei

Save this as config/config.toml, with your Apple ID:

config_version = 2

[auth]
username = "[email protected]"

[download]
directory = "/photos"

And this as compose.yaml, with your user's IDs from id -u and id -g:

services:
  kei:
    image: ghcr.io/rhoopr/kei:latest
    restart: unless-stopped
    stop_grace_period: 30s
    environment:
      PUID: "1000"
      PGID: "1000"
    volumes:
      - ./config:/config
      - ./photos:/photos

2. Sign in. Save your password, then enter the code Apple sends to your devices:

docker compose run --rm -it kei password set
docker compose run --rm -it kei login

3. Start it.

docker compose up -d

kei downloads your library, then syncs once a day. First backup with Docker explains each step, how to check progress and what to do when Apple asks for a new code. On a NAS, see Docker: Synology.

Choose what to back up

With the defaults, kei backs up your personal library. Each album gets its own folder, and photos in no album go into date folders such as 2024/03/15. A photo in three albums is saved three times. To keep one copy of each photo in the date folders instead, add this to your config before the first sync:

[filters]
albums = ["none"]

Configuration covers Shared Libraries, choosing albums, leaving out videos, folder names and every other setting. Leave out the config_version line for v0.26 and earlier.

Later syncs download only what is new or changed. Sync never deletes files, and it never replaces a file you changed.

Apple asks you to sign in again from time to time. Sign in explains how to send a new code to kei when it runs in the background, and Monitor kei shows how to get an alert when that happens.

Get help

  • Commands lists what each command does. kei <command> --help shows its options.
  • Backup maintenance covers checking files with kei verify, finding missing ones and repairing a damaged copy.
  • For a bug or a confusing result, open an issue with your kei version, what you expected and what happened. kei support-export --output kei-support.json saves a support file with private details removed; read it before you attach it. See Support export.

Docs

The documentation index lists every guide. The ones most people need:

Want to help? Start with CONTRIBUTING.md. Planned work is in milestones.

License

MIT - see LICENSE

Acknowledgments

kei's iCloud support builds on reverse-engineering from icloud-photos-downloader. kei was originally published as icloudpd-rs before broadening beyond iCloud Photos.

Jelajahi proyek terkait

Memuat…