Migrating to a new instance
I have my immich instance on a slow NAS box. It's working fine, but is slow. I now have a mini PC running Windows and have docker installed. I want to setup Immich on the new windows PC, and store all my large (original) images in the current location on the NAS.
So I have mapped a folder on my Windows PC (P:) to the folder on the NAS with everything. Photo attached of my mapped drive.
So P: has encoded-video, library, upload etc.
I have a backup of the database.
On my new PC, I want to store the thumbs, encoded-video and database in my C:\Storage\Immich folder (Photo attached). I've just created a Datbase folder so far, hoping Immich will create the encoded-video, thumbs etc.
In my compose, I'm guessing DB_DATA_LOCATION should be c:\Storage\Immich\Database ?
UPLOAD_LOCATION should be P: ?
But then, Unsure how it 'knows' to generate encoded video and thumbs on C:\Storage\Immich\thumbs etc.
Seeking assistance on what to do.


196 Replies
:wave: Hey @SantasGolfClub,
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:Where did all your history go? π
Anyway check this out for instance https://discord.com/channels/979116623879368755/1307866341029707887/1307867028081737838
ahah.. In the old chat... some chap (YOU) made me type it out here. π Hope the question makes sense and I provided enough details. It's maybe simple to you. Just terrified I lose my families photos.
You can map anything to anything in the docker container
(Sometimes this breaks things)
But what people do a lot is indeed map the
UPLOAD_LOCATION
to something like a NAS
and then make a seperate mount like THUMBS_LOCATION
and ENCODED_LOCATION
or such for the files you mentioned
These don't exist in the default compose file but you can add them as you wish
Then you would do something like this:
Env:
Compose:
But all these in the env can be any folder you want, on any drive, as long as your host system can reach them
they can be P:\Library
and next to it C:\Thumbs
for instance
There will be a 'penalty' for doing it like this, which is to say initial ingest might be slower
The key here @SantasGolfClub is that immich won't delete/override anything in the photos folders without asking, so unless you delete it yourself that should be safeThanks very much. That's helpful.
What's the difference between LIBRARY_LOCATION and UPLOAD_LOCATION?
Is UPLOAD_LOCATION just a temporary location for incomplete/busy uploads, and then they get moved to LIBRARY_LOCATION?
Yes π
OK, so UPLOAD is probably empty most of the time. Got it.
it should be π
sometimes there are leftover files
At the moment, my compose file has:
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
env_file:
- stack.env
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
healthcheck:
disable: false
So I should add those volumes to that section?
replacing:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
with
volumes:
- ${LIBRARY_LOCATION}:/photos/library
- ${UPLOAD_LOCATION}:/photos/upload
- ${THUMBS_LOCATION}:/photos/thumbs
- ${PROFILE_LOCATION}:/photos/profile
- ${VIDEO_LOCATION}:/photos/encoded-video
Is that right?
(Formatting screwed up)oh wew good thing you asked because no π
haha. Wonderful! π
These are the correct paths
Note that you can name these env vars whatevr you want
They're just named to be legible
You could go all LL UL TL PL VL for all docker is concerned
Thanks. That helps... and I'll stcik with this naming. Seems easier. β
So now I have:
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:
- ${LIBRARY_LOCATION}:/usr/src/app/upload/library
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${THUMBS_LOCATION}:/usr/src/app/upload/thumbs
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- ${VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
- /etc/localtime:/etc/localtime:ro
env_file:
- stack.env
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
healthcheck:
disable: false
Next step is then to populate the 'real' values.
So:
LIBRARY_LOCATION=/mnt/user/immich-library/
THUMBS_LOCATION=/mnt/user/immich-cache/thumbs/
UPLOAD_LOCATION=/mnt/user/immich-cache/upload/
PROFILE_LOCATION=/mnt/user/immich-cache/profile/
VIDEO_LOCATION=/mnt/user/immich-cache/encoded-video/
will be, for me:
LIBRARY_LOCATION=P:/library
THUMBS_LOCATION=C:/Storage/Immich/thumbs/
UPLOAD_LOCATION=C:/Storage/Immich/upload/
PROFILE_LOCATION=C:/Storage/Immich/profile/
VIDEO_LOCATION=C:/Storage/Immich/encoded-video/
So this means that all 'generated' stuff would be on my local SSD (C:), and the main unedited files will be on P?I'm not sure it matters but you may need to drop the trailing
/
on the paths for your env file
And yes that should be how it works
Be sure to put your database on the SSD as wellOK, so new env:
LIBRARY_LOCATION=P:/library
THUMBS_LOCATION=C:/Storage/Immich/thumbs
UPLOAD_LOCATION=C:/Storage/Immich/upload
PROFILE_LOCATION=C:/Storage/Immich/profile
VIDEO_LOCATION=C:/Storage/Immich/encoded-video
DB_DATA_LOCATION=C:/Storage/Immich/Database
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
I'm not sure if it should be P:/library or P:\library
Will it create C:/Storage/Immich/thumbs
etc? I just have C:/Storage/Immich
at the moment.I'm not 100% sure, you could start it up and see π
I think you'll need to make the folders
ok. So I start it, and try login? Or shouod I start it, and then try restore the DB beforew logging in?
You should read the restore page carefully π
And it won't effect my existing files? I guess it can't as the user folders have a pretty random ID.
It says to start the db container only first
then restore
then up the rest
OK, so Deploy the Stack won't start it?

If this is portainer then yes it will start all containers
Damn... It is indeed Portainer.
Instructions seem to indicate I just
docker compose down
once I deploy. Is that not right?
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch
## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
# rm -rf DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
docker compose pull # Update to latest version of Immich (if desired)
docker compose create # Create Docker containers for Immich apps without running them
docker start immich_postgres # Start Postgres server
sleep 10 # Wait for Postgres server to start up
# Check the database user if you deviated from the default
gunzip < "/path/to/backup/dump.sql.gz" \
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
| docker exec -i immich_postgres psql --username=postgres # Restore Backup
docker compose up -d # Start remainder of Immich apps
docker compose down -v
doesn't really delete all data because the DB is not saved on a volume anymore
I guess the docs are not up to date on that yet
the rm -rf DB_DATA_LOCATION
does do that howeverI deployed. And see it did do stuff...
Database folder on new server has files in it now.
But no thumbs, upload etc. Am I right in saying I should copy those from the old location? thumbs, upload, video-encoded and profile?

Oh, it created empty upload, video etc folders on the local in the right spot... So I will stop the stack, copy the folders across, and then somehow bring up the db and restore?
Stop everything, wipe the DB folder, start the DB container, do the restore, copy over the files and start the rest
the files = everything that is not the DB
β¦ everything that is not the DB and the library file, right?
On it.
Any idea what could be causing this? Trying to restore a backup:
PS C:\Users\Craig> gc "P:\backups\immich-db-backup-1733104800023.sql.gz" | docker exec -i immich_postgres psql --username=postgres
invalid command \?$??????
invalid command \???Β§??)8β£n8?'?h???
invalid command \β??s?β?x??????R???ΒΆ??
invalid command \?O[?r???!$5???<??4???|?β¨RYi?β¨???|??5x"?b^????w?I?*??
%??
invalid command \??8?^????βox#??&βΌ
maybe .gz not recognised? I can ask in main channel if more appropriate.Youβre not un gzipping the file
Not sure how to do that on windows, you can Google
7zip will do that for you
OK, managed to restore database. A 1.4gb file is a huge issue.... Maybe add this to documentation for Windows users?
Unzip the SQL file to a folder.
In Docker Desktop, in the terminal, copy the large file into the container:
docker cp "C:\Storage\immich-db-backup-1733191200016.sql" immich_postgres:/tmp/backup.sql
Then, restore the database
docker exec -i immich_postgres psql --username=postgres -f /tmp/backup.sql
Bypasses the crazy out of memroy error I got..... Hope that helps.
BUT...
Now getting an error when server starts:
Nest] 7 - 12/03/2024, 9:51:41 AM ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
So... One of my paths are wrong?
But ts there. π¦

Oh wait....
Something not right...

why does upload, have 'encoded-video', library etc?
Do the subfolders have an .immich file?
I believe so. I am seeing this error:
[Nest] 7 - 12/03/2024, 8:47:33 PM LOG [Microservices:StorageService] Verifying system mount folder checks, current state: {"mountFiles":true,"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}}
[Nest] 7 - 12/03/2024, 8:47:33 PM ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
microservices worker error: Error: Failed to read "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information."
My compose has this:
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:
- ${LIBRARY_LOCATION}:/usr/src/app/library
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${THUMBS_LOCATION}:/usr/src/app/thumbs
- ${PROFILE_LOCATION}:/usr/src/app/profile
- ${VIDEO_LOCATION}:/usr/src/app/encoded-video
- /etc/localtime:/etc/localtime:ro
env_file:
- stack.env
ports:
- '2283:2283'
depends_on:
(Are the volumes right?)
And my Environments has this:
LIBRARY_LOCATION=P:/library
THUMBS_LOCATION=C:/Storage/Immich/thumbs
UPLOAD_LOCATION=C:/Storage/Immich/upload
PROFILE_LOCATION=C:/Storage/Immich/profile
VIDEO_LOCATION=P:/encoded-video
DB_DATA_LOCATION=C:/Storage/Immich/Database
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
I'll post an image of my local drive. Not sure why upload, profile etc are being created IN each folder.No, all of those mounts should be under /usr/src/app/upload

Ok... let me check that.
Yeah this is broken
OK, so new volumes:
volumes:
- ${LIBRARY_LOCATION}:/usr/src/app/upload/library
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${THUMBS_LOCATION}:/usr/src/app/upload/thumbs
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- ${VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
- /etc/localtime:/etc/localtime:ro
Confusing why everything is under upload
. I thought that upload
was just a holding place for uploaded videos... But seems it's not.
So that looks right now? βοΈ
And then my environment:
LIBRARY_LOCATION=P:/library
THUMBS_LOCATION=C:/Storage/Immich/thumbs
UPLOAD_LOCATION=C:/Storage/Immich/upload
PROFILE_LOCATION=C:/Storage/Immich/profile
VIDEO_LOCATION=P:/encoded-video
DB_DATA_LOCATION=C:/Storage/Immich/Database
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
This is what my structure looks like on my local drive. Has the .immich file in each 'root'.

And this is my P:, specifically my encoded-video. again, with a .immich file.

So the path the encoded-video is:
"P:\encoded-video\.immich"
Which matches my environment: VIDEO_LOCATION=P:/encoded-video
But when starting, I get an error im the immich-server container:
[Nest] 7 - 12/03/2024, 9:36:12 PM LOG [Microservices:StorageService] Verifying system mount folder checks, current state: {"mountFiles":true,"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}}
[Nest] 7 - 12/03/2024, 9:36:12 PM ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
microservices worker error: Error: Failed to read "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information."
I've tried //NAS/Media/Photos/Immich/encoded-video/
which is the UNC path. Same issue.Strangely, when ever I start up the stack, it creates these folders here: So in my C: drive, under upload, it creates all the blank folders: encoded-video, libary etc...

That's not very strange considering
UPLOAD_LOCATION=C:/Storage/Immich/upload
What you actually want is
And
The names are woefully confusing @SantasGolfClub π¦Don't mind me, I'll just sit here and see how this unfolds, because I have the same issues. And I'm not even trying to split the config, yet. Just a plain default install with upload location on the NAS. Windows machine, NAS drive mounted to Windows and the darn thing keep spitting the same error @SantasGolfClub has.
ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
I didn't realize this thread would be so relatable considering the name πPlease make your own thread @MattTheCzech and post the info the bot requests there π
Santas has accidental wrong mounts, I bet you have windows heebiejeebies
Oh I did, don't worry. Like I said, just a fly on the wall here, not going to interfere, anymore π
My thread is https://discord.com/channels/979116623879368755/1313617671098601482
LIBUP? π Excellent. "Library Upload"? π
OK, so now I'll have:
volumes:
- ${LIBRARY_LOCATION}:/usr/src/app/upload/library
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${LIBUP_LOCATION}:/usr/src/app/upload/upload
- ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- ${ENCODED_VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
- /etc/localtime:/etc/localtime:ro
and
LIBRARY_LOCATION=//NAS/Media/Photos/Immich/library
THUMB_LOCATION=C:/Storage/Immich/thumbs
UPLOAD_LOCATION=C:/Storage/Immich
LIBUP_LOCATION=C:/Storage/Immich/upload
PROFILE_LOCATION=C:/Storage/Immich/profile
ENCODED_VIDEO_LOCATION=//NAS/Media/Photos/Immich/encoded-video
DB_DATA_LOCATION=C:/Storage/Immich/Database
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
Lets try this... π€
Failed. π¦
[Nest] 7 - 12/04/2024, 8:27:19 AM LOG [Microservices:StorageService] Verifying system mount folder checks, current state: {"mountFiles":true,"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}}
[Nest] 7 - 12/04/2024, 8:27:19 AM ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
microservices worker error: Error: Failed to read "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information."
microservices worker exited with code 1
Killing api process
Initializing Immich v1.121.0
Detected CPU Cores: 20
Well the good news is it won't make all those directories again π
Do those files exist?
So
UPLOAD_LOCATION
is "C:/Storage/Immich", so the path it seeks is C:/Storage/Immich/encoded-video/.immich
No, encoded video should be on P:
ENCODED_VIDEO_LOCATION=//NAS/Media/Photos/Immich/encoded-video
If it's P: why did you put //NAS
Use the mounted folder on your windows host
Mm... I'll change to P: - I changed to //NAS as I was worried Docker coun;t access my share. I'll change to P:
OK, changing.
//NAS might work but you'll probably need to use a CIFS mount then
Strange. My Env file is:
LIBRARY_LOCATION=P:/library
THUMB_LOCATION=C:/Storage/Immich/thumbs
UPLOAD_LOCATION=C:/Storage/Immich
LIBUP_LOCATION=C:/Storage/Immich/upload
PROFILE_LOCATION=C:/Storage/Immich/profile
ENCODED_VIDEO_LOCATION=P:/encoded-video
DB_DATA_LOCATION=C:/Storage/Immich/Database
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
I'm confusing myself now. I'd hate to know how you're feeling... hahaNo worries
try
docker inspect immich_server
well that might be a lot of info π€
essentially we're looking for whether the mounts are done correctlyOK. assume stack must be running?
Because immich_server is just in a restart loop.
So I stop it.
That's all looking good
Check your local mount for the .immich files and make really sure they're there π
The path is right and I can see the .immich file. π¦

I wonder if docker is trying to access the P: using some service account, which maybe doesn't have authenticcation on P:?
Maybe it runs under some service account.
it shouldn't really
I could change the share to allow everyone maybe and see. Just not sure how. π
Is there a way I can run a command from the docker image? Problem its in a boot loop. As soon as I connect to it - it terminates and restarts.
You can also try to mount the volume directly in the compose
That's above my pay grade. π No idea how.
It's not that hard but I'm trying to find the user/password parameter
ah it's literally
username=myuser,password=mypw
in the compose file at the bottom volumes section:
And then
Ah this volume mount might be applicable to you @MattTheCzechOK, will create an immich user on my NAS, and then try this.
If you don't have a user/pass just remove the parameters
The paths in
device:
are specific for Santa's case just FYIAlready tried, but always returned the same issues. But I didn't have the
soft,rw
parameters at the end.
Will try as well.You may need to specify either
nfsvers=4
or nfsvers=3
I really don't want to take over your thread here, but one small question that I have.
The
device: ":/Media/Photos/Immich/upload"
is specific for Santa, I know.
How can I look that up inside my NAS? I have some older Zyxel crap and I always get lost in the internal naming.
I have a logical volume of disks called Volume1
. And then a shared folder called Ares
which I map to my windows computers.
Should I be trying the device:
path as follows, then?
device:"Volume1/Ares/Immich"

How do you mount it on windows?
Same path there
With a slash at the front probably
\10.13.2.3\Ares - that's how I got my M:\ drive in windows.
yeah so it's :/Ares then
ahhh, okay. I'll try. Thanks.
Didn't work for me. Followed the same steps (minus the library split), defined the NFS share, created a new Immich-specific user, and the issue seems to be the same.
It does see the folders, but not able to read the
.immch
files.I'm not sure where, in that, to add the:
volumes:
immich-upload:
driver_opts:
type: "nfs"
o: "addr=ip.addr.of.nas,nolock,username=myuser,password=mypw,soft,rw"
device: ":/Media/Photos/Immich/upload"
immich-encoded-video:
driver_opts:
type: "nfs"
o: "addr=ip.addr.of.nas,nolock,username=myuser,password=mypw,soft,rw"
device: ":/Media/Photos/Immich/encoded-video"
At the bottom you see:
Just add the rest below it:
If you are not using user/pass, just remove the username=... etc
keep the soft,rw of course
I've removed my P: drive, as it looks like we'll be using the IP and path.
But now it fails early because
${LIBRARY_LOCATION}:/usr/src/app/upload/library
is still pointing to P:
Should there not be a change the LIBRARY_LOCATION
?Comment the lines with P: out with a # at the front for now
Should I add one:
immich-library:
driver_opts:
type: "nfs"
o: "addr=ip.addr.of.nas,nolock,username=myuser,password=mypw,soft,rw"
device: ":/Media/Photos/Immich/upload"
OK.
π¦
Failed to deploy a stack: Network immich_default Creating Network immich_default Created Container immich_postgres Creating Container immich_machine_learning Creating Container immich_redis Creating Container immich_postgres Created Container immich_machine_learning Created Container immich_redis Created Container immich_server Creating Container immich_server Created Container immich_machine_learning Starting Container immich_redis Starting Container immich_postgres Starting Container immich_machine_learning Started Container immich_redis Started Container immich_postgres Started Container immich_server Starting Error response from daemon: error while mounting volume '/var/lib/docker/volumes/immich_immich-upload/_data': failed to mount local volume: mount /Media/Photos/Immich/upload:/var/lib/docker/volumes/immich_immich-upload/_data, data: addr=192.168.1.5,nolock,username=immich,password=**,soft: invalid argument
could you post that part of your compose and env files ?
volumes:
model-cache:
immich-upload:
driver_opts:
type: "nfs"
o: "addr=192.168.1.5,nolock,username=immich,password=xxx,soft,rw"
device: ":/Media/Photos/Immich/upload"
immich-encoded-video:
driver_opts:
type: "nfs"
o: "addr=192.168.1.5,nolock,username=immich,password=xxx,soft,rw"
device: ":/Media/Photos/Immich/encoded-video"
and
THUMB_LOCATION=C:/Storage/Immich/thumbs
UPLOAD_LOCATION=C:/Storage/Immich
LIBUP_LOCATION=C:/Storage/Immich/upload
PROFILE_LOCATION=C:/Storage/Immich/profile
DB_DATA_LOCATION=C:/Storage/Immich/Database
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
and you didn't do anything super funky in your password
it's the username, backwards. High level security here. π
smart
I checked and I can connect to that IP and path using that u/p.
I've screwed something else...
Should the device start with a :
Browsing the
\\192.168.1.5\Media\Photos\Immich\encoded-video
works and i see the .immich file.yes it should
Maybe I broke something here?
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:
#- ${LIBRARY_LOCATION}:/usr/src/app/upload/library
- immich-upload:/usr/src/app/upload
- ${LIBUP_LOCATION}:/usr/src/app/upload/upload
- ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- immich-encoded-video:/usr/src/app/upload/encoded-video
- /etc/localtime:/etc/localtime:ro
env_file:
- stack.env
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
All looks fine to me :/
type: "nfs" is "Network File Share"?
yes
immich_server Starting Error response from daemon: error while mounting volume '/var/lib/docker/volumes/immich_immich-upload/_data': failed to mount local volume: mount /Media/Photos/Immich/upload:/var/lib/docker/volumes/immich_immich-upload/_data, data: addr=192.168.1.5,nolock,username=immich,password=********,soft: invalid argument
Invalid argument. No idea which argument it's unhappy with.I think you might need to add
uid=xyz,gid=xyz
to the arguments but other than that no ideasIs that replcaing username/password?
Β―\_(γ)_/Β―
I really am out of ideas
the uid and gid arguments don't replace username and password. they would be added like the other arguments after a comma.
for the "default admin" the uid and gid are always 1000.
uid=1000,gid=1000
But since you're creating a new user just for immich, I'm not sure. There are commands you would have to run in the NAS to figure those out.
I dabbled with those myself, but never resolved the issues. Still the same thing...
OK, I've reverted back to where we started.
This is my current full compose file:
And this is my environments:
LIBRARY_LOCATION=P:/library
THUMB_LOCATION=C:/Storage/Immich/thumbs
UPLOAD_LOCATION=C:/Storage/Immich
LIBUP_LOCATION=C:/Storage/Immich/upload
PROFILE_LOCATION=C:/Storage/Immich/profile
ENCODED_VIDEO_LOCATION=P:/encoded-video
DB_DATA_LOCATION=C:/Storage/Immich/Database
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
I've mapped P: again to \\192.168.1.5\Media\Photos\Immich
In that folder, I see:
I'm not sure it's a permission issue. But can't be sure. It must be? If the compose is right, the env is right. Must be permission.
I agree but the question remains on how to solve it π
Yes... When I run it, the immich server container keeps restarting when it gets the error...
You could disable the healtcheck perhaps, to prevent the container from restarting, and then you can shell inside with
docker exec -it immich_server /bin/bash
Can I maybe terminal into another container, say the database one, and see if I can get a directory listing of p:?
Or that.
It won't wreck any data?
I thought maybe trying it in another contain3r qould be safe, if I can somehow create the env for another container?
spelling... bad. π
mmmm the other containers won't have it mounted
you could mount it to another container in a custom path of course π€
Rocket science. I'm just a lowly .Net dev who is afraid of docker. π
Can I just add another one to that compose? A 'dummy' one that does nothing?
It works the same way, just add it under -volumes for any other container, but use a better path like for the ML one:
You could mount however many folders you want to π
I can be the experimental bunny if you want me to. And I'm no dev π
I don't have any data, yet, so I'm ok with wrecking the whole thing and starting over.
I'm verry scared of wrecking.... 3 kids and a wifes photos at stake here... haha
I did put the
IMMICH_IGNORE_MOUNT_CHECK_ERRORS=true
in the .env
file and although the error is still there, the app boots up and is accessible via web.
What do I loko for now, though?
Very undertsood. We're in the "app-that-shall-not-be-named" so I'm still good to experiment.browse the container with
docker exec -it immich_server /bin/bash
and check whether the files are all in place at /usr/src/app/upload
ran
docker exec -it immich_server /bin/bash
/usr/src/app/upload
contains only library
/usr/src/app/upload/library
seems to conatin all the usual suspects - backups, encoded-video, etc.that doesn't sound right
you've mounted it wrong then π
that's all very possible! π
that would explain why it doesn't find the files
UPLOAD_LOCATION
corresponds with /usr/src/app/upload
For a confusing legacy reason, the default name of this folder in the env file is library
this is NOT the same folder as /usr/src/app/upload/library
I define the volume like:
- smb_mount:/usr/src/app/upload
then the NFS definition is:
volumes:
model-cache:
smb_mount:
driver_opts:
type: "nfs"
o: "addr=10.13.2.3,nolock,username=immichuser,password=gpVQwfl7uBRknH,soft,rw"
device: ":/Ares/Immich"
the original # - ${UPLOAD_LOCATION}:/usr/src/app/upload
is commented out, obviouslyAnd inside of /Ares/Immich is what?
is it also a folder 'library' that contains upload and so on?
If so, you'll need to change
device: ":/Ares/Immich"
to device: ":/Ares/Immich/library"
Correct. I just took the default library folder and placed it under /Ares/Immich
Resulting in /Ares/Immich/library and then the structure.
I actually just cut and paste the content out of that redundant library folder.
let's see
That would work if you also moved the .immich file π
I did.
I hope, lol π
ohmygod I think it worked
I KNEW it would be something this stupid
Alright so at least we know the options are viable
Next up is solving Santas issues π¦
Yup, uploaded a single file and something is happening in the upload subfolder

let me remove that
IMMICH_IGNORE_MOUNT_CHECK_ERRORS=true
just to make sure
Seems good after another compose.
So - Santa, I'm sorry I've hijacked your thread, so let's try to help you.
Here's my actual working solution for now. Maybe there's an inspiration.I think Santa's issue will be with an option for his specific NAS device
Though now i think about it, you don't need to specify encoded-video as well if you're already putting the upload "superfolder" somewhere else @SantasGolfClub
Ah. So possibly remove reference to the encoded video?
Yes, it will be in the right place regardless so we'll eliminate one variable with that π
plus all the duplicate settings/code
OK, so now I'll try with:
volumes:
- ${LIBRARY_LOCATION}:/usr/src/app/upload/library
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${LIBUP_LOCATION}:/usr/src/app/upload/upload
- ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- /etc/localtime:/etc/localtime:ro
and
LIBRARY_LOCATION=P:/library
THUMB_LOCATION=C:/Storage/Immich/thumbs
UPLOAD_LOCATION=C:/Storage/Immich
LIBUP_LOCATION=C:/Storage/Immich/upload
PROFILE_LOCATION=C:/Storage/Immich/profile
DB_DATA_LOCATION=C:/Storage/Immich/Database
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
How will it 'know' where encoded-video should go?
Is LIBRARY_LOCATION like a root?Because it seems
library
is a level too high.
P:\library just has a few album type folders in it.

Not sure how it goes back a folder and then up again to
encoded-video
.Ah my bad I got confused in all the mounts myself >.<
here I'll type it all out
This is what I meant
Drat. π¦
I wouldn't mount profile on C: as well but that's just nitpicking
Profile should be on NAS as well?
Not should, it just doesn't matter all that much
All it stores is user profile images
Could you disable the healtcheck? just change it with
disable: true
it should stop restarting and you could browse the containerStill rebooting....
restart: always
should that change?
maybe it's time for the
IMMICH_IGNORE_MOUNT_CHECK_ERRORS=true
It sure helped me realizing what the issue was :peepoAwesome:
How do I set that? Iβm keen. π Living on the edge.
Anywhere in the .env file
Whatβs in the folder P:\encoded-video ?
Post a screenshot
Here's my P:\encoded-video screenshot, @Zeus

OK, with
IMMICH_IGNORE_MOUNT_CHECK_ERRORS=true
it starts
I terminal into immich_server, and see this. But not sure what I should check.
Seems like your P drive just isnt accessible to docker
Yeah.. from within the container, is there a way to try connect to a drive using an IP? My NAS is on 192.168.1.5... can I somehow do a [Some Linux command]\192.168.1.5\path ?
You could try the way that worked for me, no? Mount it as a cifs/nfs share
I know it didn't work for you, but with the ignore_mount_check you could attempt this one library at a time?
No, you cannot do this *inside the container
I'm pretty sure this is just "windows bad" at this point and I am not sure what more we can do
volumes:
model-cache:
smb_mount:
driver_opts:
type: "nfs"
o: "addr=10.13.2.3,nolock,username=immichuser,password=gpVQwfl7uBRknH,soft,rw"
device: ":/Ares/Immich"
This stuff worked for me in the end. Maybe define each library separately and then use the variables?
Really just trying to use this newly gained knowledge
When i just used the M:\ directory my windows sees, it always failed on permissions.
Only this way worked, where i defined the IP, username and password
Not all NASes are the same, he might be missing some specific mount options
Let me try that again.... So you're connecting from a docker container running on Windows. You have no mapped drives. In your case,
device
is the path to the folder you care about, which contains the folders you have data in, such as library, encoded-video etc? So mine would be :/Media/Photos/Immich
?
I have added that...
volumes:
model-cache:
smb_mount:
driver_opts:
type: "nfs"
o: "addr=192.168.1.5,nolock,username=immich,password=hcimmi,soft,rw"
device: ":/Media/Photos/Immich"
Should I not be able to see this somehow in the container via terminal? Like, see smb_mount
somewhere?uh, no you would have to map it to a docker volume
- smb_mount:/test_mount
OK, and I'd add that in the volumes section?
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:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${LIBUP_LOCATION}:/usr/src/app/upload/upload
- ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- /etc/localtime:/etc/localtime:ro
env_file:
- stack.env
mhm
I feel like we've been over this?
Yup, error starting up:
rror response from daemon: error while mounting volume '/var/lib/docker/volumes/immich_smb_mount/_data': failed to mount local volume: mount :/Media/Photos/Immich:/var/lib/docker/volumes/immich_smb_mount/_data, data: addr=192.168.1.5,nolock,username=immich,password=********,
Maybe I need to add it to Docker as a volume?

This should be done automatically by docker/compose
we have squarely left the area of immich issues lol
but I guess doing it like this could work
maybe you can debug that, then you can use that volume for immich
Amazing. I can't even add a mount from the UI. π¦

But in docker desktop, I can see the volumes created, including that test one.
Is there a way to view the contents of those volumes?

Pretty sure it's a nonsense volume
Not sure what my options are now. Seem @MattTheCzech got it working using a share on his NAS. But for some reason - I canβt. Weβre both running docker on windows. His nas might be different? Not Synology maybe?
My options are:
find a fix. But thatβs seeming more and more like a lost cause.
Get a large SSD into the mini PC and just copy all the photos and videos onto the mini PC. Worry is - no backup. NAS has raid etc.
Install another OS on the mini pc and run docker there. But Iβm a windows guy. So will be tricky. And I want to run a DCS server on the mini PC which is windows based.
Also. Not convinced windows is the issue. As @MattTheCzech got it working.
Arggh.
Idk in my experience docker on linux "just works"
it's certainly either 1) windows stuff or 2) your SMB server is misconfigured
Also RAID is not a backup
mmm.. I wonder if this is the issue. Not sure what it means, but... maybe?

Have you confirmed that the windows NAS mount is accessible in WSL in the first place? As in you can do
ls /mnt/p
in WSL and see the contentsI'm not sure what that is, @Keev - but sounds like something I should be doing. Would that be in the immich_server container?
My /mnt 'folder' in the container was empty. Not sure if that is right.
I'd like to check if you can guide me.
I mean in WSL itself

Thats over my head. Not sure how to get into that terminal.
Let me google.
in the windows cmd, typing
wsl
and enter should take you to the linux terminal
So from there, can I try mount a drive? Or see if I can access the share which is on 192.168.1.5?
I'm not fully sure where you've ended up
what does it show in the
/mnt
folder? Not the longer file path you are looking atMmm... I can get to my files on the NAS, like this:


Sorry, that should from the /mnt folder.
So that means docker can somehow see that?
Both folders are empty though. π¦
I think those may be from when you tried making volumes in docker
If you mount the drive in WSL it should be seen from
/mnt
Yup. I agree... and the error was 'cannot find .immich'. Which, seems right then. π¦
OK, need to work out how to do that.
You should try reading through this https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-disk
I used the process described there to mount my drives to WSL, which I think will help docker see it when you're mounting it to immich
I'll try to be helpful (hopefully). I've dabbled with the different mounting options in my troubleshooting, but whatever I tried, always created a new container and it was pretty much a dead end.
The reason I keep coming back to that CIFS/SMB method that worked for me, is because you can clearly see the definitions in the compose file.
First, you define the mount point, right? The details are specific to you, of course, but in my case, that mount point is called smb_mount.
Now, you can change this to whatever you want. In your case, you have a lot of directories, so my gut tells me that you either have to specify multiple ones OR if it's possible, mount to a root folder (in my case Ares/Immich) and then we go from there? Let me expand on that.

Then, we establish that connection in the volumes up top.
The red line is the variable we define below - in my case
smb_mount
The blue line is the tager volume INSIDE the container that we're mapping towards
Now, I think you can do the thing you did. Create global variables like
${LIBUP_LOCATION}
and then reference those elsewhere, but if you're not super deep into that, I'd suggest a different route.
My spin on the issue would be something like this.
Let's take your approach:
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${LIBUP_LOCATION}:/usr/src/app/upload/upload
- ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- /etc/localtime:/etc/localtime:ro
And let's adapt it to my smb_mount
to make a point.
volumes:
- smb_mount:/usr/src/app/upload
- smb_mount/upload:/usr/src/app/upload/upload
- smb_mount/thumbs:/usr/src/app/upload/thumbs
- smb_mount/profile:/usr/src/app/upload/profile
- /etc/localtime:/etc/localtime:ro
Now, my only worry is IF we are able to go deeper into that smb_mount I creted by adding /upload, /thumbs, etc. If that works, I think it could be a way.
I really hope my theory is correct as I seem to be a self-proclaimed expert all of a sudden π but it clicked for me at some point and I'd like to help you.
And really, the only thing I can say in defense of my theory is that I keep seeing you using the windows paths in those global variables:
UPLOAD_LOCATION=P:/
THUMB_LOCATION=C:/Storage/Immich/thumbs
LIBUP_LOCATION=C:/Storage/Immich/upload
PROFILE_LOCATION=C:/Storage/Immich/profile
DB_DATA_LOCATION=C:/Storage/Immich/Database
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
Maybe, you can keep the C:\ drive? Maybe the only thing you need to change is that P:\ location to the SMB mount point like I said and you will be sailing smooth. At least that's my hope.Oh oh and one more thing. I was able to find the file structure in docker desktop. Maybe that's a way to verify easily in a GUI instead of a command line?
