为隐私迁移照片:用风扇给 iPhone 散热跑 ente 自托管图库
Aircooling My iPhone for Privacy
为把约 70,000 张照片(700 GB)从 iCloud 迁到自托管图库,作者选用端到端加密的 ente,并利用其支持任意 S3 兼容存储的特性,把加密文件放在云端 S3 上。由于 ente iOS 应用会反复扫描媒体库并触发 iCloud 下载,迁移在 iPhone 15 Pro 上严重降频甚至崩溃,作者用 Shortcut 每分钟唤起 ente、关闭自动锁屏并外接风扇散热来硬扛。
I am currently in the process of moving my personal data to self-hosted, E2EE or at least EU-hosted providers due to recent developments.
I operate multiple Kubernetes clusters, one of which is my homelab with a 3 node cluster and a storage server. I already run services to sync my e-book collection, RSS feeds, collect recipes and track my location - besides the obvious stuff like Home Assistant, media streaming via Jellyfin and Forgejo.
Storing movies was an easy task since I already had my old Unraid storage server with 24 TB HDDs in RAID1 standing around. One thing I was always aiming at was self-hosting my image library since up to this day around 70.000 memories (700 GB) are stored on Apple’s iCloud*.
Image management platforms
Software wise, there are only two viable open source tools available for self-hosting one’s image library.
Immich
Immich started as a community project and is now founded by FUTO, but still involves the community greatly. It looks and feels a lot like Google Photos and had their first stable release just a year ago. 116k stars on Github.
Pro: Heavy community involvement, plenty of features
Con: Only supports local filesystem mounts for storage, no E2EE, serverside AI features
ente
Led by Ente Technologies, Inc., ente is more of an ever developing suite of tools with photos at the core. ente was founded by an ex-Google employee and publishes all components from server to apps under AGPL-3.0. 29k stars on Github.
Pro: Everything E2EE, they seem to focus on the underlying tech rather than nice-to-have features, on-device AI for image detection
Con: Mainly developed by a company and with that unsure future if they go bankrupt
Self-hosting
Since prices for hardware, including SDDs, went through the roof in the past years, spending thousands of Euros for new fast storage was out of scope for this project.
I did not want to rely on my existing storage server’s HDDs for image storage because of their obvious poor performance when reading & writing many small files. Besides that, they have done their years and I expect some of the drives to fail at any moment.
What else
One feature that stands out on ente: You can use any S3 compatible endpoint as storage for ente’s image assets. This means I can self-host the ente API, key infrastructure and web platform while all files are end to end encrypted on an S3 storage.
Luckily I work at a cloud provider, which means I can utilize some of those resources for dogfooding – and what better way to test this than a couple of ten-thousand small files. Everything was, of course, agreed upon with my boss.
The title
Well you’re here because of that clickbaity title. Let me lay out the problem.
I chose to migrate my photos using ente’s iOS app instead of going the route over macOS since the latter required me to export “unmodified originals” to my disk, then upload them to ente which 1. would only work in stages on ~200 GB free disk space and 2. will not preserve albums and favorites.
On iOS, ente will…
- scan your existing media library
- encrypt & upload a single image which leads to iOS downloading that file before from iCloud in the case it is not available offline
- then again scan your whole library since it detected a change in the library – due to the downloaded file
At least this is what I could read from the iOS app log files and there is even a Github issue about that. As you can image this makes the migration process rather slow and CPU intensive.
Adding to that, on an iPhone 15 Pro with a not-so heat-conducting titanium frame you can also expect a lot of CPU throttling, which furthermore leads to crashes.
2-Step plan to success
To mitigate all of those issues I came up with a master plan.
- Write a Shortcut which opens the ente app every minute for 8 hours straight while disabling auto-locking of the screen
- Point a damn fan at my phone

What an experience.
* yes, Apple Photos (and with ADP even more data) is end to end encrypted. But if I at some point choose to switch to Android or Linux I must rely on icloud.com to access my photos. Don’t like that idea very much.
来源:Hacker News · romanzipp.com