I
Immich•2y ago
idmann

Wrong upload location - how to save photos on host machine?

Hi all How do I get the photos saved on my host machine, it seems Immich does not recognise/accept my upload location and saves everything in the container location ie /usr/src/app/upload - this is obviously not my chosen location and will be gone if the container is deleted. Please help Running Windows, wsl2, Docker and Immich installed using docker compose - everything else seems to work except this. Attached: .env and docker-compose files
7 Replies
Cantello
Cantello•2y ago
Two things: What is the env-file called on your computer? .env oder env? The attachement here is listed as without the dot, whereas in the yml file it is referred to as with the dot. Second, can the container access the volume path? Try to enter the container with docker exec -it immich-server bash and cd to /usr/src/app/upload and see if there is something there and if it is identical to the folder you have mounted. If not, check the log if there is some error about the mounted folder.
idmann
idmannOP•2y ago
the files are appropriately named as .env and docker-compose.yml I can see the uploaded photos in /usr/src/app/upload through the docker gui, it seems to me the host folder I mount fails to mount. It appears Immich just saves to /usr/src/app/upload without saving to /path/to/host_folder because it can't reach it? I have other containers, with mounted volumes and no issues.
Cantello
Cantello•2y ago
Did you use the same naming conventions in you other containers? Paths on Windows machines tend to be tricky if translated to unix paths via WSL. What do the logs say when your container tries to mount the volume/path?
idmann
idmannOP•2y ago
looking at the file path in the container, adding a test photo adds it as such but not on the physical host. I'm stumped, I have tried various combinations of mount, no difference. The only thing I've noted is the upload path is not loaded to the mnt directory in the container. Please share your working docker-compose and env files for me to compare. I am losing it with this stuff
No description
No description
Cantello
Cantello•2y ago
My yml is attached but it runs on a linux system, hence the folder names are much easier to define.
idmann
idmannOP•2y ago
Thanks. How about you env? Your compose file looks like the default with just 1 or 2 changes. I just don't understand why my photos are being saved in the container rather than on the host machine. Using Windows 😦
Cantello
Cantello•2y ago
My .env is as follows, probably not very enlightening:
# The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/Photos/immich

# The Immich version to use.
IMMICH_VERSION=release

# Connection secrets for postgres and typesense.
TYPESENSE_API_KEY=random-secret-key
DB_PASSWORD=postgres

# The values below this line do not need to be changed
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis
# The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/Photos/immich

# The Immich version to use.
IMMICH_VERSION=release

# Connection secrets for postgres and typesense.
TYPESENSE_API_KEY=random-secret-key
DB_PASSWORD=postgres

# The values below this line do not need to be changed
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Did you find this page helpful?