#Immich won't read external library

1 messages ยท Page 1 of 1 (latest)

quiet ether
#

I will provide my docker-compose

#

Matrexx has all the photos

civic turret
#

This is the path to your external library I assume? /mnt/media:/Matrexx:ro ?

civic turret
#

what is the relationship of your D drive with /mnt/media on your Windows?

quiet ether
#

What do you mean

#

Oh

quiet ether
#

I thought mnt media is what you tell it

#

On the external path

civic turret
#

the left handside is the path on your machine

#

the right handside of the colon is the path in the container

#

<path-on-your-machine>:<path-in-container>

#

like so

quiet ether
#

So I would write D:/External Libraries:/Matrexx:ro

#

Is that right?

civic turret
#

Yes, I advise remove the space of External Libraries or use "D:/External Libraies:/Matrexx:ro"

quiet ether
#

Ok

#

is this right (i fixed the typo on libraries after sending)

quiet ether
civic turret
#

you have space in your directory name

#

so you should put them around double quote

#

as shown above

quiet ether
#

i did this

#
  • D:/External Libraies:D:/External Libraies:ro
#

ooh

quiet ether
#

is this right

#

i changed folder name accordingly

#

and external path name

#

this is my import path on my user

#

matrexx is a folder inside external libraries

quiet ether
civic turret
quiet ether
#

im really lost

#

ok

#

what would the import path be then

civic turret
#

this is wrong

#

the left hand size is D:/ExternalLibraries

#

the right handside is /Matrexx

quiet ether
#

but i want to have a subfolder

civic turret
#

the right handside is the starting mount in the container

quiet ether
#

should i do D::ExternalLibraries:ro

civic turret
#

so in the container you can access the subfolder with /Matrexx/Matrexx

civic turret
#

I suggesst the value would be D:/ExternalLibraries:/mnt/libraries:ro

quiet ether
#

what does mnt libraries represent

civic turret
#

So the external path setting would be /mnt/libraries

#

just the mount path you specifies as /mnt/libraries

#

but it is what the container see

#

the container doesn't see D:/ExternalLibraries

#

/mnt/libraries is an example, you can pick anything you want

quiet ether
#

does it just represent a folder inside external libraries

civic turret
#

it represents the folder inside the docker's container

quiet ether
civic turret
#

basically you tell docker to "hey, mmount this D drive location into mnt/libraries path inside the container so Immich can read it"

quiet ether
#

so i have to create a folder called mnt/libraries?

civic turret
#

it will automatically create it for you when you spin up the containers

quiet ether
#

Alright

#

and you said i can call mnt libraries anything

#

mnt represents mount

#

that cant be changed correct?

civic turret
#

just a directory, it can be changed to anything

#

it is a common convention for Linux related system to specify the mount point starting with /mnt

#

so your USB can be mounted into something like /mnt/usb1

quiet ether
#

ok

#

sorry im not getting these seemingly basic things im very new

civic turret
#

no worry

quiet ether
#

thanks for the help i greatly appreciate it

civic turret
#

Docker has some good documentation on the internet that can help cement these concepts

quiet ether
#

okay wil look into it

civic turret
#

let's say you are specifing the volume as D:/ExternalLibrabies:/mnt/libraies:ro

#

then in your external path it would be /mnt/libraies

quiet ether
civic turret
#

and when you setup a new library, it would be /mnt/libraies/Matrexx

civic turret
#

in the admin page it would be /mnt/libraies

quiet ether
quiet ether
#

giving it a shot

civic turret
#

okat

#

gtg, shout to the general-dicussion if you can't figure it out, other folks can help as well

quiet ether
#

ok

#

is a folder supposed to be created in external library

#

I DID IT

quaint sphinx
# quiet ether I DID IT

could you tell me how you made it to work. I tried both / and \ slash. amount path with just /LaptopPhotos:ro , /mnt/LaptopPhotos:ro etc. Restarted my docker but it still didn't work

civic turret
quaint sphinx
#

This is the one currently I have setup.

civic turret
#

Can you capture that screenshot?

#

as well as the screenshot for the external library path?

quaint sphinx
civic turret
#

can you help capture the screenshot of the user's setting as well?

quaint sphinx
#

I tried without exclusion pattern as well

quaint sphinx
quiet ether
quaint sphinx
civic turret
#

No, in the administration page > User > click on the pencil icon, there is an external path entry there

#

Yep, you will have to fill in that entry as well

quaint sphinx
quiet ether
quaint sphinx
quaint sphinx
civic turret
#

/mnt/LaptopPhotos

quiet ether
#

this is the real folder structure: D:\ExternalLibraries\Matrexx

#

one windows

quaint sphinx
#

I added here also now. restarted docker. But job not refreshing

civic turret
#

Have you trigger the rescan?

quaint sphinx
# civic turret

I selected that. and also all three options. but still below job shows 0

civic turret
quaint sphinx
#

sorry I am not sure how to troubleshoot the log

civic turret
#

You said you restart the container

#

I think that won't register the changes

#

try to bring stop/bring down the containers

#

then bring them backup

quaint sphinx
#

right side top corner buttons

civic turret
#

Now can you go into the microservices container, meaning going into the shell

#

and check if you can see the folder at /mnt/LaptopPhotos?

quaint sphinx
#

Mount has only these two

#

i tried to search the log for LaptopPhotos under Logs and Inspect. it doesn't have anything

civic turret
#

So the container doesn't actually registered the changes you made in your docker-compose file

#

I don't use docker for windows so I am not sure

#

try to delete the stack and bring them back up

quaint sphinx
#

and how do i bring it back after deletion?

civic turret
#

this red button

quaint sphinx
#

delete everything?

civic turret
#

yeah, those are just the container, the persistent data stay in tack

#

if you see any option ask you to delete the VOLUME, say no

quaint sphinx
#

I had my photos imported from my phone. Will they be affected or will I end up importing the phone photos again? like facial recognizaiton jobs of my phone photos are already completed. will they be affected due to this deletion?

civic turret
civic turret
#

Hmm

#

Fuck I hate Docker on Windows

#

hit cancel

#

click on this

quaint sphinx
civic turret
#

now try to bring them backup

quaint sphinx
#

docker-compose up -d

#

Is this the command to run?

civic turret
#

yes

quaint sphinx
civic turret
#

can you find out which is line 35?

quaint sphinx
civic turret
#

change \ to /

quaint sphinx
#

same error

#

originally it had like this

#

34 to 36 was commented out. I uncommented to add NVDA hard decoding

civic turret
#

ah

#

you see the extends word

quaint sphinx
civic turret
#

you need to have it on the same indentation with the word image above

#

yaml is space/indentation sensitive

quaint sphinx
#

should i replace like 34 like below?

#

copy pasted image sytax to extends

#

I don't know if this correct

civic turret
#

no

#

that is incorrect

#

just remove the space here

quaint sphinx
#

got it. but the yml file was downloadedfrom the website itself

civic turret
#

Can you post the content of your docker-compose file?

quaint sphinx
#

let me get yaml file

#

line 7 is commented out

civic turret
# quaint sphinx got it. but the yml file was downloadedfrom the website itself
version: "3.8"

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - D:/Fun/Photos:/mnt/LaptopPhotos:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    extends:
      file: hwaccel.yml
      service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - D:/Fun/Photos:/mnt/LaptopPhotos:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - tsdata:/data
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:80cc8518800438c684a53ed829c621c94afd1087aaeb59b0d4343ed3e7bcf6c5
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:50d9be76e9a90da4c781554955e0ffc79d9d5c4226838e64b36aacc97cbc35ad
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:
  tsdata:
#

copy this and try again

quaint sphinx
#

still same error

#

yaml: line 7: did not find expected key

civic turret
#

try docker compose up -d

quaint sphinx
#

should i remove the space on 36 and 37 to bring to extends level?

civic turret
quaint sphinx
civic turret
#

sec

#
version: "3.8"

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - D:/Fun/Photos:/mnt/LaptopPhotos:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    extends:
      file: hwaccel.yml
      service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - D:/Fun/Photos:/mnt/LaptopPhotos:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - tsdata:/data
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:80cc8518800438c684a53ed829c621c94afd1087aaeb59b0d4343ed3e7bcf6c5
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:50d9be76e9a90da4c781554955e0ffc79d9d5c4226838e64b36aacc97cbc35ad
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:
  tsdata:
#

now try this

quaint sphinx
#

i added # to 35 to 37 like the original file and its running now

#

But tech note says 35 to 37 is needed for NVDA transcoding ๐Ÿ˜ฆ

civic turret
#

Did you have hwaccel.yml file in the folder?

quaint sphinx
civic turret
#

pretty sure the indentation is wrong with that file when you modified it

quaint sphinx
#

if i add back, its coming back with same error

#

so must be something with 35 to 37

civic turret
#
version: "3.8"

# Hardware acceleration for transcoding - Optional
# This is only needed if you want to use hardware acceleration for transcoding.
# Depending on your hardware, you should uncomment the relevant lines below.

services:
  hwaccel:
    # devices:
    #   - /dev/dri:/dev/dri  # If using Intel QuickSync or VAAPI
    # volumes:
    #   - /usr/lib/wsl:/usr/lib/wsl # If using VAAPI in WSL2
    environment:
      - NVIDIA_DRIVER_CAPABILITIES=all # If using NVIDIA GPU
    #   - LD_LIBRARY_PATH=/usr/lib/wsl/lib # If using VAAPI in WSL2
    #   - LIBVA_DRIVER_NAME=d3d12 # If using VAAPI in WSL2
    deploy: # Uncomment this section if using NVIDIA GPU
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu,video]
#

Here is the new content for the hwaccel.yml file

quaint sphinx
#

let me try to scan the folder

#

Library scan also working now

civic turret
#

Great!

quaint sphinx
#

Thanks a lot for your time

civic turret
#

No problem

#

enjoy

quaint sphinx
#

One last question ๐Ÿ™‚

#

if I want to add more external paths, I shoudl edit the composer file correct?

#

but which one should be updated under user account settings?

#

because it has only one option

#

here only one option

civic turret
#

that would be the root the mount, does it make sense

#

so you woulh mount D:/Fun instead

quaint sphinx
#

if I add another external library called /mnt/LaptopAnotherPhoto

civic turret
#

The external path is the top level folder

#

the library can be treated as subfolder

quaint sphinx
#

oh. SO if my photos sitting under E:\Photos what happens then?

civic turret
quaint sphinx
#

do I need to bring all my photos under one Parent folder?

quaint sphinx
#

Now I mapped D:\Fun\Photos

#

But if I want to do the same with C:\photos, it seems it won't work?

#

is it?

quaint sphinx
#

yes

civic turret
#

each user can only have 1 parent path get mounted for external library

civic turret
#

then in the parent folder, you can have different subfolder and specified as different library

quaint sphinx
#

will it allow me to amount C:/Fun/Photos:/mnt/LaptopPhotos/anotherDrive:ro

#

so I can load both C drive and D drive photos together in my user?

#

D:/Fun/Photos:/mnt/LaptopPhotos:ro

#

C:/Fun/Photos:/mnt/LaptopPhotos/anotherDrive:ro

#

both together?

civic turret
#

I haven't try this scenario yet, feel free to try

formal pivot
#

Hello chaps, just wondering if you have some time to help a complete newbie to Immich - I'm trying to configure Immich (set up on a Pi 4 to recognise (and scan successfully) photos on an external USB hard drive. The path of the photos on the hard drive on the OS is:

media/mwraspberrypi/Backup/Pictures/Pictures

so in my docker-compose file, I've got: -

${UPLOAD_LOCATION}:/usr/src/app/upload

  • - /mnt/media/mwraspberrypi/Backup/Pictures/Pictures:ro
    
#

In my env file, I've also set this HDD to be the upload location as follows:

(comment) The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/media/mwraspebrrypi/Backup/immich_library

and further down in this file as

UPLOAD_LOCATION=/mnt/media/mwraspberrypi/Backup/immich_library

#

Finally, in the immich setup, I've tried to add an external library and to set the correct path as the image shows

#

However, Immich doesn't find the images in the above photos folder when scanning

#

Any pointers would be much appreciated, thanks for your time!

civic turret
#

can you post the content of the docker-compose file?

formal pivot
#

Here it is, thanks

civic turret
#

that "+" should be removed

#

volume mount should be - /mnt/media/mwraspberrypi/Backup/Pictures/Pictures:/mnt/library:ro

formal pivot
#

Ah OK - thank you!

civic turret
#

use /mnt/library as the value of the user's external path

#

and the path of the external library

formal pivot
#

Hi again @civic turret just checking my understanding: under 'volumes', UPLOAD_LOCATION, the path to the left of the colon (:) is the mount point in the OS and to the left is the mount point in the container. So I'm mapping my external HD to where the library is located inside the 2 containers (immich_server and immich_microservices). Do I also need to add anything information about the external HD in the 'volumes' section of the immich_proxy container?

#

Also do I need to mirror the above mapping for UPLOAD_LOCATION in the .env file?

#

Thanks again for your time, appreciate the support as I learn all this!

unkempt flare
formal pivot
#

Hello again people - just wondering whether - in order for Immich to scan images successfully - the location where external library files are stored needs to have read-write-execute (full) permissions? If this was an NTFS formatted drive, is there an extra step needed for Immich to be able to scan the contents?

#

I think I've followed all the steps including checking that the immich_server and immich_microservices can 'see' the location I've mapped (/mnt/library mapped to a folder on a test USB drive) but it's still not 'seeing' the files in Immich

#

This is what the container can 'see' at /mnt/library

#

This is the external path of the user in Immich

#

This is the external path of the new library in Immich

#

How I've set it up in docker-compose

#

Finally this is the actual path in the filesytem

#

Many, many thanks in advance and apologies if you were about to make a cup of tea and really didn't need the interruption

formal pivot
#

TLDR: I'm trying to add the images within an external usb drive at /media/mwraspberrypi/2GB/immich_test_gallery (mapped to /mnt/library in the container) to the gallery and can't work out what's missing to get it to see these images.

eternal escarp
#

try without the /mnt @formal pivot