#add External Library

1 messages · Page 1 of 1 (latest)

prime monolith
#

Accessing Windows D: Drive in Immich Server Setup on Docker with WSL 2
Overview of the Issue
I have been trying to set up immich using Docker on a WSL 2 environment while allowing the immich-server to access files on my Windows D: drive (D:\Images). I updated the docker-compose.yml file to include a volume mount for the Windows directory. However, the immich-server container has been unable to see or access the specified directory. Despite correctly setting up the volume mount in Docker, the issue persists.

Setup Details
Operating System: Windows with WSL 2 enabled.
Docker: Using Docker Desktop with WSL 2 backend.
Target Directory: The Windows directory D:\Images, which is mounted in WSL at /mnt/host/d/Images.
Docker Compose File: The docker-compose.yml file is configured to mount the Windows path to the container for the immich-server and immich-web services.
Environment File: .env file used to set UPLOAD_LOCATION and database connection details.
Steps Taken
Modified the docker-compose.yml to include the volume mount:
volumes:

  • /mnt/host/d/Images:/app/images
    Verified that Docker Desktop is set up correctly with WSL 2 integration.
    Updated the .env file to ensure the correct UPLOAD_LOCATION is set.
    Tried accessing the directory within the container using docker exec for debugging purposes.
    Problems Encountered
    Permissions Issues: The container seems to be unable to access files within the /mnt/host/d/Images directory.
    Volume Mount Conflicts: Possible conflicts between the UPLOAD_LOCATION environment variable and the paths in the volume mounts.
    WSL Path Handling: Potential issues in how Docker Desktop handles WSL paths, causing the server to not see the intended files.
stuck pagodaBOT
#

:wave: Hey @prime monolith,

Thanks for reaching out to us. Please follow the recommended actions below; this will help us be more effective in our support effort and leave more time for building Immich immich.

References

Checklist

  1. :ballot_box_with_check: I have verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: I have read applicable release notes.
  3. :ballot_box_with_check: I have reviewed the FAQs for known issues.
  4. :ballot_box_with_check: I have reviewed Github for known issues.
  5. :ballot_box_with_check: I have tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: I have uploaded the relevant logs, docker compose, and .env files, making sure to use code formatting.
  7. :ballot_box_with_check: I have 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)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

prime monolith
#
#
# 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}
    # 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}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /mnt/host/d/Images:/app/images
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:2d1463258f2764328496376f5d965f20c6a67f66ea2b06dc42af351f75248792
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
      interval: 5m
      start_interval: 30s
      start_period: 5m
    command: ["postgres", "-c", "shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"]
    restart: always

volumes:
  model-cache:
#
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/host/d/Images
# The location where your database files are stored
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
# TZ=Etc/UTC

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=**********


# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
normal tangle
upper bridge
#

/mnt/host/d/Images:/app/images
The path inside the container here is /app/images, so that's what you should put in the UI

prime monolith
#

that works but no images or anything there

normal tangle
#

are the host files located at /mnt/host/d/Images

prime monolith
#

in windows they are in d/images but in wsl yeah i can see them at that path

upper bridge
prime monolith
#

okay so images is seen but gui doesnt see any images

#

i dont think it mounted properly as non of the folder that are suppost to be in the directory are

#

heres what should be seen

fathom flume
#

You can’t use the external library also as the UPLOAD_LOCATION

#

so you should fix that first

warped cargo
#

Hah totally missed that

#

I mean maybe you can, but your system will be broken beyond belief once a single image starts generating thumbs

prime monolith
#

Oh okay so how would i get it to see an external drive or does it need to transfer the data off ther drive onto the pc to be used ?

warped cargo
#

UPLOAD_LOCATION is for new files only, preferably an empty map

prime monolith
#

this is my problem i cant add it to external library that why ive tried all the backward shit ive tried up to now :p
New question i have an excternal drive how to i add it to the external library.
This is rinning in docker desktop on windows docker desktop is running a wsl2 backend can wsl can see the file windows can see the files but they fail to validate on the software x

warped cargo
#

My default answer is do you really need it to be on windows ?

#

windows sucks for this

prime monolith
#

Sadly yeah, im stuck on it for multiple reasons sorry I know it not ideal 😞