I
Immichβ€’5mo ago
SantasGolfClub

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.
No description
No description
196 Replies
Immich
Immichβ€’5mo ago
: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:
Mraedis
Mraedisβ€’5mo ago
Where did all your history go? πŸ‘€ Anyway check this out for instance https://discord.com/channels/979116623879368755/1307866341029707887/1307867028081737838
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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.
Mraedis
Mraedisβ€’5mo ago
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:
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/
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/
Compose:
volumes:
- ${LIBRARY_LOCATION}:/photos/library
- ${UPLOAD_LOCATION}:/photos/upload
- ${THUMBS_LOCATION}:/photos/thumbs
- ${PROFILE_LOCATION}:/photos/profile
- ${VIDEO_LOCATION}:/photos/encoded-video
- /etc/localtime:/etc/localtime:ro
volumes:
- ${LIBRARY_LOCATION}:/photos/library
- ${UPLOAD_LOCATION}:/photos/upload
- ${THUMBS_LOCATION}:/photos/thumbs
- ${PROFILE_LOCATION}:/photos/profile
- ${VIDEO_LOCATION}:/photos/encoded-video
- /etc/localtime:/etc/localtime:ro
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 safe
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Thanks 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?
Mraedis
Mraedisβ€’5mo ago
Yes πŸ™‚
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
OK, so UPLOAD is probably empty most of the time. Got it.
Mraedis
Mraedisβ€’5mo ago
it should be πŸ˜„ sometimes there are leftover files
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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)
Mraedis
Mraedisβ€’5mo ago
oh wew good thing you asked because no πŸ˜„
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
haha. Wonderful! πŸ˜†
Mraedis
Mraedisβ€’5mo ago
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
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
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
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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?
Mraedis
Mraedisβ€’5mo ago
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 well
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
OK, 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.
Mraedis
Mraedisβ€’5mo ago
I'm not 100% sure, you could start it up and see πŸ˜› I think you'll need to make the folders
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
ok. So I start it, and try login? Or shouod I start it, and then try restore the DB beforew logging in?
Mraedis
Mraedisβ€’5mo ago
You should read the restore page carefully πŸ˜›
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
And it won't effect my existing files? I guess it can't as the user folders have a pretty random ID.
Mraedis
Mraedisβ€’5mo ago
It says to start the db container only first then restore then up the rest
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
OK, so Deploy the Stack won't start it?
No description
Mraedis
Mraedisβ€’5mo ago
If this is portainer then yes it will start all containers
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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
Mraedis
Mraedisβ€’5mo ago
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 however
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
I 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?
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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?
Mraedis
Mraedisβ€’5mo ago
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
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
… 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.
Zeus
Zeusβ€’5mo ago
You’re not un gzipping the file Not sure how to do that on windows, you can Google
Mraedis
Mraedisβ€’5mo ago
7zip will do that for you
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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?
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
But ts there. 😦
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Oh wait.... Something not right...
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
why does upload, have 'encoded-video', library etc?
Mraedis
Mraedisβ€’5mo ago
Do the subfolders have an .immich file?
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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.
Zeus
Zeusβ€’5mo ago
No, all of those mounts should be under /usr/src/app/upload
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Ok... let me check that.
Zeus
Zeusβ€’5mo ago
Yeah this is broken
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
This is what my structure looks like on my local drive. Has the .immich file in each 'root'.
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
And this is my P:, specifically my encoded-video. again, with a .immich file.
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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.
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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...
No description
Mraedis
Mraedisβ€’5mo ago
That's not very strange considering UPLOAD_LOCATION=C:/Storage/Immich/upload What you actually want is
UPLOAD_LOCATION=C:/Storage/Immich
LIBUP_LOCATION=C:/Storage/Immich/upload
UPLOAD_LOCATION=C:/Storage/Immich
LIBUP_LOCATION=C:/Storage/Immich/upload
And
${LIBUP_LOCATION}:/usr/src/app/upload/upload
${LIBUP_LOCATION}:/usr/src/app/upload/upload
The names are woefully confusing @SantasGolfClub 😦
MattTheCzech
MattTheCzechβ€’5mo ago
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 πŸ™‚
Mraedis
Mraedisβ€’5mo ago
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
MattTheCzech
MattTheCzechβ€’5mo ago
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
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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
Mraedis
Mraedisβ€’5mo ago
Well the good news is it won't make all those directories again πŸ‘€ Do those files exist?
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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
Mraedis
Mraedisβ€’5mo ago
If it's P: why did you put //NAS Use the mounted folder on your windows host
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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.
Mraedis
Mraedisβ€’5mo ago
//NAS might work but you'll probably need to use a CIFS mount then
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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... haha
Mraedis
Mraedisβ€’5mo ago
No worries try docker inspect immich_server well that might be a lot of info πŸ€” essentially we're looking for whether the mounts are done correctly
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
OK. assume stack must be running? Because immich_server is just in a restart loop. So I stop it.
Mraedis
Mraedisβ€’5mo ago
That's all looking good Check your local mount for the .immich files and make really sure they're there πŸ˜›
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
The path is right and I can see the .immich file. 😦
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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.
Mraedis
Mraedisβ€’5mo ago
it shouldn't really
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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.
Mraedis
Mraedisβ€’5mo ago
You can also try to mount the volume directly in the compose
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
That's above my pay grade. πŸ™‚ No idea how.
Mraedis
Mraedisβ€’5mo ago
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:
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"
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"
And then
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
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
Ah this volume mount might be applicable to you @MattTheCzech
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
OK, will create an immich user on my NAS, and then try this.
Mraedis
Mraedisβ€’5mo ago
If you don't have a user/pass just remove the parameters The paths in device: are specific for Santa's case just FYI
MattTheCzech
MattTheCzechβ€’5mo ago
Already tried, but always returned the same issues. But I didn't have the soft,rw parameters at the end. Will try as well.
Mraedis
Mraedisβ€’5mo ago
You may need to specify either nfsvers=4 or nfsvers=3
MattTheCzech
MattTheCzechβ€’5mo ago
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"
No description
Mraedis
Mraedisβ€’5mo ago
How do you mount it on windows? Same path there With a slash at the front probably
MattTheCzech
MattTheCzechβ€’5mo ago
\10.13.2.3\Ares - that's how I got my M:\ drive in windows.
Mraedis
Mraedisβ€’5mo ago
yeah so it's :/Ares then
MattTheCzech
MattTheCzechβ€’5mo ago
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.
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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"
Mraedis
Mraedisβ€’5mo ago
At the bottom you see:
volumes:
model-cache:
volumes:
model-cache:
Just add the rest below it:
volumes:
model-cache:
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"
volumes:
model-cache:
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"
If you are not using user/pass, just remove the username=... etc keep the soft,rw of course
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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?
Mraedis
Mraedisβ€’5mo ago
Comment the lines with P: out with a # at the front for now
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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
Mraedis
Mraedisβ€’5mo ago
could you post that part of your compose and env files ?
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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
Mraedis
Mraedisβ€’5mo ago
and you didn't do anything super funky in your password
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
it's the username, backwards. High level security here. πŸ™‚
Mraedis
Mraedisβ€’5mo ago
smart
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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.
Mraedis
Mraedisβ€’5mo ago
yes it should
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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
Mraedis
Mraedisβ€’5mo ago
All looks fine to me :/
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
type: "nfs" is "Network File Share"?
Mraedis
Mraedisβ€’5mo ago
yes
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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.
Mraedis
Mraedisβ€’5mo ago
I think you might need to add uid=xyz,gid=xyz to the arguments but other than that no ideas
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Is that replcaing username/password?
Mraedis
Mraedisβ€’5mo ago
Β―\_(ツ)_/Β― I really am out of ideas
MattTheCzech
MattTheCzechβ€’5mo ago
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...
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
OK, I've reverted back to where we started. This is my current full compose file:
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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:
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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.
Mraedis
Mraedisβ€’5mo ago
I agree but the question remains on how to solve it πŸ‘€
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Yes... When I run it, the immich server container keeps restarting when it gets the error...
Mraedis
Mraedisβ€’5mo ago
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
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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. πŸ™‚
Mraedis
Mraedisβ€’5mo ago
mmmm the other containers won't have it mounted you could mount it to another container in a custom path of course πŸ€”
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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?
Mraedis
Mraedisβ€’5mo ago
It works the same way, just add it under -volumes for any other container, but use a better path like for the ML one:
volumes:
- model-cache:/cache
- ${LIBRARY_LOCATION}:/mnt/p_library
volumes:
- model-cache:/cache
- ${LIBRARY_LOCATION}:/mnt/p_library
You could mount however many folders you want to πŸ˜›
MattTheCzech
MattTheCzechβ€’5mo ago
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.
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
I'm verry scared of wrecking.... 3 kids and a wifes photos at stake here... haha
MattTheCzech
MattTheCzechβ€’5mo ago
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.
Mraedis
Mraedisβ€’5mo ago
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
MattTheCzech
MattTheCzechβ€’5mo ago
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.
Mraedis
Mraedisβ€’5mo ago
that doesn't sound right you've mounted it wrong then πŸ‘€
MattTheCzech
MattTheCzechβ€’5mo ago
that's all very possible! πŸ™‚
Mraedis
Mraedisβ€’5mo ago
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
MattTheCzech
MattTheCzechβ€’5mo ago
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, obviously
Mraedis
Mraedisβ€’5mo ago
And 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"
MattTheCzech
MattTheCzechβ€’5mo ago
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
Mraedis
Mraedisβ€’5mo ago
That would work if you also moved the .immich file πŸ™‚
MattTheCzech
MattTheCzechβ€’5mo ago
I did. I hope, lol πŸ˜„ ohmygod I think it worked I KNEW it would be something this stupid
Mraedis
Mraedisβ€’5mo ago
Alright so at least we know the options are viable Next up is solving Santas issues 😦
MattTheCzech
MattTheCzechβ€’5mo ago
Yup, uploaded a single file and something is happening in the upload subfolder
No description
MattTheCzech
MattTheCzechβ€’5mo ago
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.
Mraedis
Mraedisβ€’5mo ago
I think Santa's issue will be with an option for his specific NAS device
Mraedis
Mraedisβ€’5mo ago
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
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Ah. So possibly remove reference to the encoded video?
Mraedis
Mraedisβ€’5mo ago
Yes, it will be in the right place regardless so we'll eliminate one variable with that πŸ™‚ plus all the duplicate settings/code
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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?
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Because it seems library is a level too high.
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
P:\library just has a few album type folders in it.
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Not sure how it goes back a folder and then up again to encoded-video.
Mraedis
Mraedisβ€’5mo ago
Ah my bad I got confused in all the mounts myself >.< here I'll type it all out
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
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
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
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
This is what I meant
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Drat. 😦
Mraedis
Mraedisβ€’5mo ago
I wouldn't mount profile on C: as well but that's just nitpicking
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Profile should be on NAS as well?
Mraedis
Mraedisβ€’5mo ago
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 container
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Still rebooting.... restart: always should that change?
Mraedis
Mraedisβ€’5mo ago
maybe it's time for the IMMICH_IGNORE_MOUNT_CHECK_ERRORS=true
MattTheCzech
MattTheCzechβ€’5mo ago
It sure helped me realizing what the issue was :peepoAwesome:
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
How do I set that? I’m keen. πŸ™‚ Living on the edge.
MattTheCzech
MattTheCzechβ€’5mo ago
Anywhere in the .env file
Zeus
Zeusβ€’5mo ago
What’s in the folder P:\encoded-video ? Post a screenshot
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Here's my P:\encoded-video screenshot, @Zeus
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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.
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
No description
Zeus
Zeusβ€’5mo ago
Seems like your P drive just isnt accessible to docker
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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 ?
MattTheCzech
MattTheCzechβ€’5mo ago
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?
Zeus
Zeusβ€’5mo ago
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
MattTheCzech
MattTheCzechβ€’5mo ago
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
Mraedis
Mraedisβ€’5mo ago
Not all NASes are the same, he might be missing some specific mount options
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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?
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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?
Zeus
Zeusβ€’5mo ago
uh, no you would have to map it to a docker volume - smb_mount:/test_mount
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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
Zeus
Zeusβ€’5mo ago
mhm
Mraedis
Mraedisβ€’5mo ago
I feel like we've been over this?
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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=********,
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Maybe I need to add it to Docker as a volume?
No description
Mraedis
Mraedisβ€’5mo ago
This should be done automatically by docker/compose
Zeus
Zeusβ€’5mo ago
we have squarely left the area of immich issues lol
Mraedis
Mraedisβ€’5mo ago
but I guess doing it like this could work
Zeus
Zeusβ€’5mo ago
maybe you can debug that, then you can use that volume for immich
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Amazing. I can't even add a mount from the UI. 😦
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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?
No description
Mraedis
Mraedisβ€’5mo ago
Pretty sure it's a nonsense volume
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
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.
Zeus
Zeusβ€’5mo ago
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
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
mmm.. I wonder if this is the issue. Not sure what it means, but... maybe?
No description
Keev
Keevβ€’5mo ago
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 contents
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
I'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.
Keev
Keevβ€’5mo ago
I mean in WSL itself
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Thats over my head. Not sure how to get into that terminal. Let me google.
Keev
Keevβ€’5mo ago
in the windows cmd, typing wsl and enter should take you to the linux terminal
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
So from there, can I try mount a drive? Or see if I can access the share which is on 192.168.1.5?
Keev
Keevβ€’5mo ago
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 at
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Mmm... I can get to my files on the NAS, like this:
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
No description
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Sorry, that should from the /mnt folder. So that means docker can somehow see that? Both folders are empty though. 😦
Keev
Keevβ€’5mo ago
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
SantasGolfClub
SantasGolfClubOPβ€’5mo ago
Yup. I agree... and the error was 'cannot find .immich'. Which, seems right then. 😦 OK, need to work out how to do that.
Keev
Keevβ€’5mo ago
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
MattTheCzech
MattTheCzechβ€’5mo ago
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.
MattTheCzech
MattTheCzechβ€’5mo ago
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.
No description
MattTheCzech
MattTheCzechβ€’5mo ago
Then, we establish that connection in the volumes up top.
MattTheCzech
MattTheCzechβ€’5mo ago
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
No description
MattTheCzech
MattTheCzechβ€’5mo ago
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.
MattTheCzech
MattTheCzechβ€’5mo ago
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?
No description

Did you find this page helpful?