From Apple Photos to Immich
I deleted my entire Apple Photes library and moved everything into a self-hosted Immich instance
Well, I finally did it. I deleted my 50,000-photo iCloud photo library and moved everything to self-hosted Immich.
Here are some of my notes from the process1. It was actually much easier than expected. Shout out to a couple of tools, first.
Python app to work with pictures and associated metadata from Apple Photos on macOS. Also includes a package to provide programmatic access to the Photos library, pictures, and metadata.
I installed it with using Homebrew:
# Add the tap
# Install osxphotos
This thing is brilliant. It has a million options and can do pretty much anything with an Apple Photos library. Here’s the command I ran to export the entire library in a way intended to work well with an Immich import, along with its output.
If there’s a better combination of options for that export command, it’s too late now. Besides, just look at the README. It’s overwhelming!
Immich has a handy CLI. I used it to import that entire Apple Photos export.
Installed the CLI via npm:
npm i -g @immich/cli
Then, after authenticating with immich login, I ran the following:
Three hours later, all of my photos were in Immich, with the original Albums and metadata intact. Most of the duplicates were skipped, and I used the Immich duplicate finder to remove the remaining ones. Immich is still chugging away at scanning for faces and running OCR on text in the images. This will take a while, but my library is all there.
After running a backup on the Immich library, I deleted all of my photos from iCloud. Scary, but they’ll be in “Recently Deleted” for 30 days, just in case.
The plan is to treat my iPhone as just another camera. I configured the Immich iPhone app to import everything from Photos automatically, so all I’ll need to do is clean things up and delete them from Photos every so often.
This is a big change, but it alleviates some of my concerns about relying on Apple/iCloud. It feels good having everything locally on my NAS. Sure, I’m now responsible for everything, but when it comes to my photo library, that’s OK.