docker-immich icon indicating copy to clipboard operation
docker-immich copied to clipboard

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

Open stevetsanders opened this issue 1 year ago • 9 comments

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:

  • library folder

unraid cache

  • thumbs
  • encoded video
  • everything else

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

stevetsanders avatar Sep 25 '24 03:09 stevetsanders

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...

hydazz avatar Sep 25 '24 06:09 hydazz

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

image

stevetsanders avatar Sep 25 '24 20:09 stevetsanders

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

dilirity avatar Sep 28 '24 07:09 dilirity

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

hydazz avatar Sep 29 '24 00:09 hydazz

I see, thanks.

What's the proper way of doing it?

dilirity avatar Sep 29 '24 07:09 dilirity

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

  • /mnt/user/photos_immich/photos/library
  • /mnt/user/appdata/immich/thumbs/photos/thumbs
  • /mnt/user/appdata/immich/profile/photos/profile
  • /mnt/user/appdata/immich/encoded-video/photos/encoded-video
  • /mnt/user/appdata/immich/upload/photos/upload

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

martabal avatar Sep 29 '24 13:09 martabal

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

  • Path: /photos:: /mnt/user/photos_immich/ -> /photos/library
  • Path: /libraries:: /mnt/user/pictures/ -> /libraries
  • thumbnails: /mnt/user/appdata/immich/thumbs -> /photos/thumbs
  • encoded-video: /mnt/user/appdata/immich/encoded-video -> /photos/encoded-video
  • profile: /mnt/user/appdata/immich/profile -> /photos/profile
  • upload: /mnt/user/appdata/immich/upload -> /photos/upload

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

dilirity avatar Sep 29 '24 19:09 dilirity

I am not using the storage template.

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

  • upload: /mnt/photos_immich/photos/upload

and remove /photos/library

martabal avatar Sep 29 '24 20:09 martabal

Awesome! Thanks @martabal!

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

VARIABLE NAME: Host Path -> Container Path

  • Path: /photos:: /mnt/user/photos_immich/ -> /photos/upload
  • Path: /libraries:: /mnt/user/pictures/ -> /libraries
  • thumbnails: /mnt/user/appdata/immich/thumbs -> /photos/thumbs
  • encoded-video: /mnt/user/appdata/immich/encoded-video -> /photos/encoded-video
  • profile: /mnt/user/appdata/immich/profile -> /photos/profile

dilirity avatar Sep 29 '24 20:09 dilirity