Tech Digest

Migration

Replace Google Photos

Immich is the only self-hosted photo service with phone apps your family will tolerate. Getting there means understanding Google Takeout better than Google explains it.

Last reviewed

What is the best self-hosted replacement for Google Photos?

Immich. It is the only self-hosted photo service with maintained iOS and Android apps that back up the camera roll in the background, and it does face grouping and natural-language search locally. The single biggest thing you give up is search quality: Google reads text inside your images and understands vague queries about receipts, screenshots and landmarks, and nothing you can run at home matches that. You also become the redundancy: Immich holds one copy of each original, and emptying its trash deletes the file for real.

What you are actually giving up#

Google Photos search is better than anything you can run at home, and it is not close. Google reads the text inside your images, so "receipt", "boarding pass" and "whiteboard" are real queries. It recognizes obscure landmarks and dog breeds. It understands "the wedding in Portugal" without you ever having made an album called that. Immich gives you CLIP-based semantic search, which handles "red bicycle in snow" well and "the form I photographed at the doctor's office in 2019" not at all. PhotoPrism gives you TensorFlow labels and a calendar. Neither reads your receipts.

Second, you are giving up redundancy you never had to think about. Google keeps your library in multiple facilities. After the move you have one copy on one disk, and Immich is emphatically not a backup of itself: its trash deletes originals from UPLOAD_LOCATION when it is emptied or when retention expires. If the mobile app has also offered to free up space on the phone, that single copy is the only one.

Third, sharing. A Google Photos link opens for anyone, instantly, on any device, with no account and no app. Self-hosted shared albums work, but they are a link to your server, which has to be reachable, on a domain with a valid certificate, and fast enough for someone on hotel wifi.

Get your data out first#

Do this before you install anything. The export is the long pole and it has a clock on it.

At takeout.google.com, deselect all, select only Google Photos. Choose .tgz (better compression, and no 4 GB member limit surprises) and set the maximum archive size to 50 GB so you get fewer parts. Google delivers by email link, or straight into Drive, Dropbox, OneDrive or Box. The link expires in about 7 days and each archive allows 5 downloads. If Google Photos is the only product selected you can also schedule automatic exports every 2 months for a year, which is a useful safety net while you run both systems in parallel.

What comes out is a Takeout/Google Photos/ tree of year folders and album folders, and this is the part that matters:

  • Every image has a JSON sidecar carrying photoTakenTime, geoData, the description and the favorite flag. That sidecar is authoritative. The exported image file's own timestamps are not: import the media without the sidecars and your entire timeline collapses onto the date Google built the archive.
  • Sidecar filenames get mangled. Long names are truncated, -edited copies pair oddly, and the naming moved to .supplemental-metadata.json in 2025, which broke a generation of hand-written scripts. Do not write your own matcher.
  • A photo and its sidecar can land in different archives. Extract every part into one directory before you import anything.
  • Albums are folders, and a photo in three albums appears three times. A dumb import gives you triplicates.
bash
# extract every part into a single tree: sidecars often live in a different archive
mkdir -p ~/takeout
for f in takeout-*.tgz; do tar -xzf "$f" -C ~/takeout; done
find ~/takeout -type f \( -iname '*.jpg' -o -iname '*.heic' \
  -o -iname '*.mp4' -o -iname '*.mov' \) | wc -l

# import with a tool that reads the sidecars and rebuilds albums
immich-go upload from-google-photos \
  --server=http://immich.lan:2283 --api-key="$IMMICH_KEY" ~/takeout

immich-go's from-google-photos command matches each file to its JSON, restores album membership, descriptions and locations, and de-duplicates the copies that album folders create. Its own README asks you to keep the source archives until you have checked the result, which is exactly right: keep them until the count and the spot checks pass.

Which one to pick#

Pick Immich unless something specific rules it out. Background upload from several phones is the feature the household actually judges you on, and Immich is the only one of the three that ships its own maintained apps for it. The cost is honest: the docs ask for 6 GB of RAM minimum and 8 GB recommended, four containers including a PostgreSQL image with the VectorChord extension, and a database directory that must sit on local disk rather than an NFS or SMB share.

Your situationPickWhy
Several phones, family library, background backup is the pointImmichOnly option with first-party mobile apps that back up reliably
A decades-deep folder tree you refuse to hand overPhotoPrismIndexes originals in place, and PHOTOPRISM_READONLY=true keeps its hands off
4 GB of RAM or a low-power ARM boardPhotoPrismTwo containers, 450 MB idle, no ML container holding models resident
You already run Nextcloud and photos are secondaryNextcloudMemories and Photos on an instance you already back up, no new stack
Strict open source supply chainImmich or PhotoPrism ceThe default photoprism/photoprism:latest image ships under the Plus License, not AGPL

What the migration actually costs#

Take a 400 GB library with 120,000 items, which is an ordinary decade of two phones.

  • Export: hours to days for Google to build it. Eight 50 GB archives.
  • Download: 400 GB is about 9 hours of wall clock on a 100 Mbit connection, and it has to complete inside the 7 day window.
  • Disk at peak: 400 GB of archives, plus 400 GB extracted, plus the imported library. Budget 1.3 TB free.
  • Steady state: 400 GB of originals plus 10 to 20 percent for thumbnails and transcoded video, so 440 to 480 GB, plus 1 to 3 GB of PostgreSQL that belongs on an SSD.
  • First import: thumbnail generation, video transcoding and machine learning jobs all queue at once and saturate every core. On a four-core N100 with 120,000 items, that is an overnight run at best and two days at worst. Leave it alone.
  • Ongoing: Immich scores 3 out of 5 for operational load. Realistically that is 30 minutes a month reading release notes and pulling images, plus one restore rehearsal a year. Major versions still carry breaking changes and downgrades are not supported at all, so a database dump before every major upgrade is not optional.

Add a real backup on top: the library/ directory plus a pg_dumpall, sent somewhere else with restic or BorgBackup. See Backups that actually restore and, if this is your first array, ZFS, btrfs, mdadm or one disk.

What breaks and how to tell early#

Shared links. Every Google Photos link you have ever sent stops working when the underlying photos are deleted from Google. If a family album is the shared memory of a wedding, export it and re-share it deliberately before you delete anything.

Family access. Google's partner sharing has no equivalent. Everyone in the house installs an app, logs into a URL and trusts a certificate. Expect one person to never finish that and to keep taking photos that never leave their phone. The tell: check the Immich admin user list a week in and see whose upload count is zero.

Motion and Live Photos. These come out of Takeout as a still plus a separate short video for some accounts, which imports as two items. You will notice it as a suspiciously high item count.

The silent backup failure. The moment that actually costs you photos is when the phone stops uploading because a certificate expired, a VPN dropped, or battery optimization killed the app. Test it deliberately: turn off wifi, take a photo, turn wifi on, and confirm it lands. Do that once a month. If you reach your server over Tailscale or WireGuard rather than a public port, read Remote access without port forwarding first, because that link is now part of your backup path.

The point of no return#

Do not delete anything from Google until all four of these pass:

  1. Counts match. The number of media files you extracted equals the item count in Immich, allowing for the duplicates album folders create.
  2. Spot check across a decade. Pick 20 photos from different years. Dates, locations and album membership all correct? A wrong date on one is a wrong date on thousands.
  3. A restore worked. Restore your database dump and library into a scratch instance on another machine and log in. An untested backup is not a backup, and this is the moment your photos have exactly one home.
  4. Sixty days in parallel. Keep Google Photos receiving uploads while Immich also receives them. Sixty days catches the seasonal failure modes: a holiday, a phone upgrade, a router reboot.

Then downgrade rather than delete. Turn off Google Photos backup on every device, let the Google One plan lapse at renewal, and leave the library in place for another billing cycle. Deleting a Google Photos library is recoverable from trash for a limited window and then it is not, and the cost of waiting one more month is a few dollars.

Next: size the disks and the backup target with the Backup planner, pick hardware with Choosing home server hardware, and if you are also moving documents, Replace Google Drive is the other half of this job. For a straight feature comparison, see Immich vs PhotoPrism and Immich vs Nextcloud for photos, or browse the rest of Photos and files.

Questions#

Does Google Takeout keep photo dates?

Not in the image files you can rely on. The authoritative capture time, GPS coordinates, description and favorite flag are written into a JSON sidecar next to each photo, and the timestamp on the exported file is often the date Google built the archive. Import the folder with a tool that reads those sidecars, such as immich-go, and your timeline is correct. Drag the JPEGs into a web uploader on their own and you get a library that thinks every photo was taken last Tuesday.

How long does a Google Takeout export take?

Google builds the archive asynchronously and mails you a link when it is ready, which is hours for a small account and can run into days for a large one. The link expires in about 7 days and each archive can be downloaded 5 times before you have to request it again. Set the maximum archive size to 50 GB so you get fewer parts, and start the download the moment the mail arrives rather than on the weekend.

How much disk do I need to migrate 400 GB of photos?

About 1.3 TB free at the peak. You need room for the downloaded archives (400 GB), the extracted tree (another 400 GB) and the imported library (400 GB plus 10 to 20 percent for thumbnails and transcoded video, per the Immich docs). You can delete the archives once the import verifies, which brings you back to roughly 480 GB steady state plus a few GB of PostgreSQL on SSD.

Can I run Immich without the machine learning container?

Yes, set IMMICH_MACHINE_LEARNING_ENABLED=false. The server runs happily in well under a gigabyte, and you lose face grouping and semantic search entirely, which is most of the reason to leave Google Photos. If your machine has 4 GB or less, PhotoPrism is a better fit than a crippled Immich.

Is Immich a backup of my photos?

No. Immich stores one copy of each original under UPLOAD_LOCATION. Its trash is not a protected copy: emptying it, or letting the retention period expire, removes the file from disk. Combined with the mobile app offering to free up space on your phone after upload, it is entirely possible to end up with exactly one copy and then delete it from a web UI. You need a separate backup of the library directory and a database dump.

Should I use PhotoPrism instead of Immich?

Use PhotoPrism if you already have a hand-sorted folder tree that you want indexed in place rather than ingested, or if your server cannot spare the RAM Immich wants. The tradeoff is that PhotoPrism ships no first-party mobile backup app: the documented phone-side option is PhotoSync or a WebDAV client, which is the main functional gap against Immich.

Sources#

Published . Last reviewed . Found something out of date? Tell us and we will fix it and log the change.