Immich on the NAS
The family's phone photos arriving on their own at the home NAS, with a Google Photos-style library — and a script that moves them into my hand-sorted archive without ever touching the archive itself.
The problem
I have a photo archive organised by hand, year by year, one folder per outing (“2024-07-15” plus the place): tidy, but with no search, no faces, no automatic backup from the phones. And there are three of us in the family, each with their own phone. I wanted the experience of a service like Google Photos, but on my own NAS, without touching or duplicating the archive I’ve curated over the years.
The choice: Immich as a landing zone
Immich is an open-source, self-hosted alternative to cloud photo services: phone backup, search, face recognition, a map. The idea is to use it as a landing zone: the photos from all three phones end up there automatically, and then I move them into the archive, with the place, when I have time. The existing archive, meanwhile, is mounted into Immich read-only as an external library: Immich reads and indexes it, but can neither modify it nor fill it with copies.
How it’s set up
- Immich v3 in a container on the Synology NAS, with video transcoding accelerated by the integrated graphics (Quick Sync) and a CPU cap so it doesn’t slow down everything else.
- Three users, each with a storage label, so uploaded photos land in folders with a
readable name and a
year/year-month-day/filetemplate, already close to the archive’s format — only the place is missing. - The landing zone sits in the same shared folder as the archive: moving a photo from one to the other is instant, a plain rename, with no data copied.
- The archive belongs to my user; the other two see it through partner sharing.
- The database lives on a separate path, and Immich’s daily dumps go into the photos folder, already covered by the NAS’s nightly backups.
- Access from outside goes through the home WireGuard VPN, without opening any ports on the router: in the app, the server address stays the same.
The script that moves the photos
Some manual work remained: moving the photos from the landing zone to the archive and telling Immich the files are no longer where it put them. I wrote a Python script, standard library only, that for each day shows how many files each user uploaded and asks for the place — or offers a folder that already exists for that day, so the photos merge into the ones already there. Then it moves the files, deletes the entries Immich is left with no file for, and starts a scan of the archive so the photos reappear in their new location.
It’s built carefully, because it works on a real archive:
- a trial mode (
--dry-run) shows what it would do without touching anything, and before acting it asks for confirmation with a summary; - it excludes the current day, because those photos might still be processing;
- files with the same name but different content already there are renamed; identical files are left alone and flagged;
- every run saves a log with source, destination and the ids deleted.
There’s one stated trade-off: the entries deleted from Immich are gone for good, so albums, favourites and descriptions assigned in the landing zone are lost — the file is safe in the archive, but Immich’s metadata isn’t.
The open risk
One detail I wanted written down before using the script for real: if a moved photo is still on the phone, the Immich app might consider it “not backed up” and upload it again. The defence is to free up space on the phone before running the script, and to try it on a single day first.
Status
Installed and running since 4 October 2026 (v3.2.4), with the first scan of the archive still in progress — on a large archive it can take hours or days across thumbnails, faces and search. Still to do: turn the VPN on automatically on the phone away from home, and try the moving script on a single day.
Stack
Immich · Docker · Synology Container Manager · PostgreSQL · Python · WireGuard