[Guide/Feature Request] The "Unified Library" Architecture (Dual-Mount Strategy for External + Primary integration) #28288
Closed
moorew
started this conversation in
Feature Request
Replies: 1 comment
|
This discussion has automatically been closed as it is likely a duplicate. We get a lot of duplicate threads each day, which is why we ask you in the template to confirm that you searched for duplicates before opening one. If you're sure this is not a duplicate, please leave a comment and we will reopen the thread if necessary. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have searched the existing feature requests, both open and closed, to make sure this is not a duplicate request.
The feature
The Problem
Many users migrating to Immich have massive, pre-existing photo libraries meticulously organized in flat
YYYY/MM/DDstructures. When adopting Immich, it forces a difficult choice:admin/) in the upload path, breaking a user's existing flat directory structure.The Solution: The "Dual-Mount" Architecture
I wanted a single, clean
Photo Libraryfolder on my hard drive that contains both my old archive AND my new phone uploads, side-by-side in a singleYYYY/MM/DDstructure, without duplicating files or waiting days for a CLI import.I achieved this using a specific Docker volume routing hack that I'm proposing as a standard community guide (or as inspiration for a future native feature to unify External and Primary libraries).
How it works
This architecture splits data into two physical folders on the host:
Immich System/: Contains the database,docker-compose.yml, and system overhead (thumbnails, transcoded videos).Photo Library/: Contains ONLY actual photos in a cleanYYYY/MM/DDstructure.In the
docker-compose.yml, we map thePhoto Librarytwice:Required UI Steps
Once the container runs, configure the UI to respect this structure:
{{y}}/{{MM}}/{{dd}}/{{filename}}(Do not include anylibrary/prefix)./usr/src/app/externaland run a scan.Why this is awesome
adminsub-mount hack, when a phone uploads a new photo, Immich saves it to/usr/src/app/upload/library/admin/2026/05/06/img.jpg, which seamlessly tunnels to the root/Photo Library/2026/05/06/img.jpgon the host machine.I wrote an automated bash script that sets up this entire structure,
.env, anddocker-compose.ymlfor a fresh system. I wanted to share this with the community for anyone else struggling to merge massive existing archives with new uploads while keeping their hard drive perfectly organized!Usage
setup_immich_unified.sh.ROOT_MEDIA_DIRDB_PASSWORDPUBLIC_SERVER_URLchmod +x setup_immich_unified.sh./setup_immich_unified.shsetup_immich_unified.sh
Platform
All reactions