imagegenius / docker-immich

Monolithic (Single) Docker Container for Immich
GNU General Public License v3.0
618 stars 28 forks source link

Is it possible to separate photo storage (library) and thumbs/encoded-video #437

Open stevetsanders opened 1 month ago

stevetsanders commented 1 month ago

I'm wondering if it's possible to separate the photo storage location from the generated thumbnails/encoded-video location. I've seen some posts about separating them to take advantage of unraid parity for the actual photos but keep the thumbnails/encoded-video/other stuff on the cache. Ideally the setup would this I think

unraid array:

unraid cache

I know it's possible when setting up your own docker container but wondering if it's still possible when using the community app here

hydazz commented 1 month ago

Yes, you can just map each folder to a different location on the host so /photos/thumbs mounts to /mnt/cache/immich/thumbs /photos/library mounts to /mnt/x/immich/thumbs and so on...

stevetsanders commented 1 month ago

Ah gotcha, so adding those additional subdirectories would be done via adding another path?

image
dilirity commented 1 month ago

Wondering the same thing! Is such a thing possible within unraid with the community app?

I couldn't find a variable that's used for the thumbnails directory.

EDIT:

I think I managed to do it as per @hydazz's suggestion (not sure how correct it is though):

image

For reference, this is my /photos and /libraries mounts:

image

hydazz commented 1 month ago

you'll want to try to avoid mounting a mount inside a mount, ie above you have /mnt/user/photos_immich mounted to /photos, but you also have /mnt/user/appdata/immich/thumbs mounted inside /photos - not the end of the world, but may cause issues

dilirity commented 1 month ago

I see, thanks.

What's the proper way of doing it?

martabal commented 1 month ago

You need to add these volumes (assuming you are using the storage template):

based on https://immich.app/docs/administration/backup-and-restore#filesystem

dilirity commented 1 month ago

I am not using the storage template.

Storage template engine was turned off by default so I didn't turn it on.

EDIT:

I had no idea I could edit the Path: /photos: variable 😅

Here are my variables:

VARIABLE NAME: Host Path -> Container Path

I also had to create an .immich file in each of them to get immich to work properly.

martabal commented 1 month ago

I am not using the storage template.

If you're not using the storage template, then you need to change that volume:

and remove /photos/library

dilirity commented 1 month ago

Awesome! Thanks @martabal!

Here's the updated mount list in case anyone needs to do a similar setup:

VARIABLE NAME: Host Path -> Container Path