De-Apple your iCloud photos whilst keeping the nice 'Apple photos' UX

For years I’ve struggled to save my photos off my iPhone onto a regular file directory on my (Linux) computer. Which of course is a deliberate choice by Apple. And then always having problems taking pictures because my phone storage is full… having to download videos in order to watch them and it takes ages to load… most people with an iPhone know what I’m talking about.

I want to manage my backups myself. Have access to my photos at any time, without needing internet. This is what Apple is actively trying to prevent. It’s keeping me and my photos in their cage and I would need to constantly upgrade my paid subscription to buy a larger cage.

I know the feeling 😑 (1980 game for Apple II) The description is uncannily reminiscent of Apple's current business strategy
I know the feeling 😑 (1980 game for Apple II) The description is uncannily reminiscent of Apple's current business strategy

So I wanted a process that backs up my photos from iCloud and subsequently trashes them in iCloud (30 day retention).

I found icloudpd, an open source project that downloads from the same private endpoints the icloud.com web UI uses. It can download and delete from cloud, just as I needed. But icloudpd's delete options either only cover what it downloaded in the same run, or delete old photos whether a local copy exists or not. And there’s some unstable quirky behavior in the delete functionality. Which I believe is because Apple is reindexing the library at the same time.

So I ‘built’ (generated 😬) iCloud Offload which wraps icloudpd in a cli tool that is a little more useful for this. It downloads everything older than a given cutoff date, then asks iCloud which of those items are not on disk yet (same filename, same size in bytes), and only deletes when there are none of those. Anything newer than the cutoff date is never downloaded. And there are dry run modes.

Install by:

# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/hacktisch/icloud-offload/main/install.sh | bash

# Windows (PowerShell)
irm https://raw.githubusercontent.com/hacktisch/icloud-offload/main/install.ps1 | iex

Immich

So now we have all the photos in a backup file dir, per year and month.

But what I then miss about the Apple photo app is the browsing UX: search by face, map view, searching for "dog on the beach" etc. I found the awesome project Immich which does all of that! It runs in Docker on my machine and reads the backup folder in place as an external library. Immich runs some scans to build its own indexes of face scans and object recognition.

You can then even expose the Immich server to the internet and access it remotely, there’s account and access management; options to share the use of it with your family etc.

Immich's own screenshots
Immich's own screenshots

I’m now back on the smallest tier iCloud plan.