I
Immich2mo ago
God

External Library - 0 Images

Hello, I'm running Immich v1.140.1 via Docker Compose on Ubuntu. My photo library is on an external NTFS drive mounted via /etc/fstab with uid=1000,gid=1000,umask=002. The external library path (/data) validates correctly in the UI. From inside the immich-server container, I can confirm the volume is mounted and all files are visible. Running the command find /data -type f | wc -l returns 48,879. However, when I run a library scan from the UI, it completes instantly and finds 0 files. The immich-server logs do not show any permission errors during the scan. I have already done a full database reset. It seems the scanner is not processing the files it has access to. Can you offer any advice?
15 Replies
Immich
Immich2mo ago
:wave: Hey @God, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time). 2. :ballot_box_with_check: read applicable release notes. 3. :ballot_box_with_check: reviewed the FAQs for known issues. 4. :ballot_box_with_check: reviewed Github for known issues. 5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy). 6. :ballot_box_with_check: uploaded the relevant information (see below). 7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed. Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
Sergey Katsubo
Sergey Katsubo2mo ago
Hey, have you tried with another mounted path inside the container, not /data? Just in case: https://github.com/immich-app/immich/issues/17224#issuecomment-2833275453
Immich
Immich2mo ago
[Issue] Missing nested subfolders in external library (immich-app/immich#17224)
God
GodOP2mo ago
Yes. Just used /data to confirm it sees the files
Sergey Katsubo
Sergey Katsubo2mo ago
Got it. Anyway for troubleshooting I suggest to switch to another dir, e.g. /photos Increase logging level to "debug" (or "verbose" if debug will not be enough) through Admin settings > Logging. Add new library and import path, save, rescan ext libraries. What's there in logs?
God
GodOP2mo ago
So I saw this after I moved the photos to another directory and re-added it and ran it again, I got the log, just not verbose: [Nest] 18 - 09/02/2025, 8:11:34 AM LOG [Api:Bootstrap] Immich Server is listening on http://[::1]:2283 [v1.140.1] [production] [Nest] 18 - 09/02/2025, 8:11:39 AM LOG [Api:EventRepository] Websocket Connect: PpFJFlwSOA3iTk7hAAAB [Nest] 18 - 09/02/2025, 8:12:07 AM LOG [Api:LibraryService~9wh6i0on] Starting to scan library 38ed5229-48fb-4ed9-9a07-084cbbf19318 [Nest] 7 - 09/02/2025, 8:12:07 AM LOG [Microservices:LibraryService] Starting disk crawl of 1 import path(s) for library 38ed5229-48fb-4ed9-9a07-084cbbf19318... [Nest] 7 - 09/02/2025, 8:12:07 AM LOG [Microservices:LibraryService] Finished disk crawl, 0 file(s) found on disk and queued 0 file(s) for import into 38ed5229-48fb-4ed9-9a07-084cbb Now the folder it is pointing to has no pictures in root, but there are photos in the subfolders This is the verbose log: [Nest] 18 - 09/02/2025, 8:16:50 AM LOG [Api:LibraryService~3jnyrn7l] Starting to scan library 38ed5229-48fb-4ed9-9a07-084cbbf19318 [Nest] 18 - 09/02/2025, 8:16:50 AM DEBUG [Api:LoggingInterceptor~3jnyrn7l] POST /api/libraries/38ed5229-48fb-4ed9-9a07-084cbbf19318/scan 204 2.56ms ::ffff:192.168.2.13 [Nest] 7 - 09/02/2025, 8:16:50 AM DEBUG [Microservices:LibraryService] Validating import paths for library 38ed5229-48fb-4ed9-9a07-084cbbf19318... [Nest] 7 - 09/02/2025, 8:16:50 AM LOG [Microservices:LibraryService] Starting disk crawl of 1 import path(s) for library 38ed5229-48fb-4ed9-9a07-084cbbf19318... [Nest] 7 - 09/02/2025, 8:16:50 AM LOG [Microservices:LibraryService] Finished disk crawl, 0 file(s) found on disk and queued 0 file(s) for import into 38ed5229-48fb-4ed9-9a07-084cbbf19318 [Nest] 7 - 09/02/2025, 8:16:50 AM LOG [Microservices:LibraryService] Library 38ed5229-48fb-4ed9-9a07-084cbbf19318 is empty, no need to check assets This is my docker-compose:
name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.transcoding.yml # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding volumes: # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file - ${UPLOAD_LOCATION}:/data - /etc/localtime:/etc/localtime:ro - /mnt/PhotoDrive/Library env_file: - .env ports: - '2283:2283' depends_on: - redis - database This is my .ev: # The location where your uploaded files are stored UPLOAD_LOCATION=/mnt/PhotoDrive/immich/uploads The location where your database files are stored. Network shares are not supported for the database DB_DATA_LOCATION=./postgres I have reviewed the issues, I don't believe I am having the same issue for the same reason, I have indeed saved the external library before scanning, it is present on reboot.
Sergey Katsubo
Sergey Katsubo2mo ago
Got it, thanks The volumes section, is it like below (without the backticks it lost its formatting above)?
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/data
- /etc/localtime:/etc/localtime:ro
- /mnt/PhotoDrive/Library
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/data
- /etc/localtime:/etc/localtime:ro
- /mnt/PhotoDrive/Library
God
GodOP2mo ago
that is correct, just as you have it
Sergey Katsubo
Sergey Katsubo2mo ago
Was it different before, with /data mapping? I mean, the current short syntax (without colon : and omitted rightmost part) - /mnt/PhotoDrive/Library creates anonymous volume without data inside the container at that path. So it's expected to have no files. Or are they actually present inside the container? As you mentioned in OP previously there were files at /data docker exec immich_server sh -c 'find /data -type f | wc -l' - I would assume the mount was different, non-anonymous.
God
GodOP2mo ago
I am new at this and I was using gemini to guide me so I am unsure I understand exactly what you are saying. At /mnt/PhotoDrive/Library there are subfolders with 48k images nested in /Pictures/. previously, the Pictures directory was in /mnt/PhotoDrive/immich/uploads/Pictures and that is when I confirmed that /data could see the 48k photos, I moved it to the current location in order to take it out of a path that was expected for my uploads as set in the .ev file to see if that would make a diffeence. btw all folders were originally owned by root, but gemini had me set it up so that the ntfs mounts would load with my user
Sergey Katsubo
Sergey Katsubo2mo ago
I see. For now let's leave /mnt/PhotoDrive/immich/uploads solely for Immich's own internal library / uploads. For external library I suggest to set it up similarly to https://immich.app/docs/guides/external-library/ For example
volumes:
- ${UPLOAD_LOCATION}:/data
- /etc/localtime:/etc/localtime:ro
- /mnt/PhotoDrive/Library:/mnt/PhotoDrive/Library:ro
volumes:
- ${UPLOAD_LOCATION}:/data
- /etc/localtime:/etc/localtime:ro
- /mnt/PhotoDrive/Library:/mnt/PhotoDrive/Library:ro
Using the same path /mnt/PhotoDrive/Library both on host and inside the container, to keep things simple. Also, mounting it read-only (ro) at first. You can change it later. After docker compose up -d the container should see files docker exec immich_server sh -c 'find /mnt/PhotoDrive/Library -type f | wc -l' Then proceed with adding the import path /mnt/PhotoDrive/Library To make config and paths more clear I'd also suggest to use "data" for inside- and outside-container Immich data: - ${UPLOAD_LOCATION}:/data UPLOAD_LOCATION=/mnt/PhotoDrive/immich/data (renaming "upload" to "data")
God
GodOP2mo ago
i will try that now. appreciate your time I'm pretty sure if i change that .ev to data it will break something else, i recall trying that before.
Sergey Katsubo
Sergey Katsubo2mo ago
You can do both changes simultaneously - set UPLOAD_LOCATION=/mnt/PhotoDrive/immich/data in .env - rename the folder on host /mnt/PhotoDrive/immich/upload -> data So effectively Immich container will still see the same files in its internal /data Then docker compose up -d. Of course no rush here, it can be done any time later if you wish. Or kept as is )
God
GodOP2mo ago
This is what it breaks when i change the ev location, but i did rename uploads to data first: [Nest] 7 - 09/02/2025, 10:42:02 AM ERROR [Microservices:StorageService] Failed to read (/data/encoded-video/.immich): Error: ENOENT: no such file or directory, open '/data/encoded-video/.immich' microservices worker error: Error: Failed to read: "<UPLOAD_LOCATION>/encoded-video/.immich (/data/encoded-video/.immich) - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information.", stack: Error: Failed to read: "<UPLOAD_LOCATION>/encoded-video/.immich (/data/encoded-video/.immich) - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information." at StorageService.verifyReadAccess (/usr/src/app/server/dist/services/storage.service.js:129:19) Killing api process i had to trim the log due to character limitations magnus@MagnusMedia:/mnt/PhotoDrive/immich$ mv uploads data magnus@MagnusMedia:/mnt/PhotoDrive/immich$ ls data magnus@MagnusMedia:/mnt/PhotoDrive/immich$ cd data magnus@MagnusMedia:/mnt/PhotoDrive/immich/data$ ls backups encoded-video library profile thumbs upload magnus@MagnusMedia:/mnt/PhotoDrive/immich/data$ corrected the issue i am in still working on the library scan issue And it appears to be working, the jobs have populated! thank you for your help now I just have to figure out how to make this accessible from outside my network but that is for another day.
Immich
Immich2mo ago
This thread has been closed. To re-open, use the button below.

Did you find this page helpful?