Changing "UPLOAD_LOCATION" cause immich to be unavailable
I'm trying to change my upload location to a known good directory on a seperate drive. I went through the hassel of getting the drive setup and availible. The file path if good. But when I switch the .env file to change the upload location to the other path, and re-deploy my container, I loose access to my immich. But if I go in and switch it back to library and deploy again it works again.
How do I go about switching the picture upload location to a directory on a separate disk without breaking my immich?
Default .env:
I am changing the file path to /home/void/auxdrive/immich
--------------------------------------------------------------
Running immich with docker on Ubuntu server 24.04.1.
Immich is setup on the 128gb booth drive currently.
Trying to point the uploads to my 2TB HDD for mass storage.
26 Replies
:wave: Hey @Bright,
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:You need to stop immich, then move the folder to the new location, when changing the variable
Otherwise immich is missing data
So I installed a GUI just so I could try to get this working. I moved the files via the GUI, and I changed the .env file to match the new file path, but it still leaves immich unavailable. I reverted everything back, and did an immich reset and now its unavailbie. I think I broke my immich.
docker logs would be helpful in this situation so we could know what immich maybe complaining about
or rather logs from immich would be helpful
Ok. I cleared out my entire immich instances and I'm rebuilding it. Before I spin up the docker container, how do I need to change the .env to put all my uploads into a different location on a different drive?
I copied that from the other sub.
So I just wiped my old instance and setup a new container. Before I up the container I want to get it pointed at the right location to start with.
well based off of what you posted above
I'm scouring their site, reading about all the environment variables, but its not anything that I can get info from.
I did it that way and it broke immich. lol
well there is another problem with the location of your db as well
so ./ means store all my data in the folder that the compose was run from
so you may want to specify your db location as well
I wonder if its something I have to do during initial install so that it sets it up automatically. I'm going to just try that .env file right there and spin it up and see what happens. Worst case, I just delete it again...
thats the beauty of docker
So I just setup the container on the 2tb drive and ran everything default minus the password and now it works and it stores everything on the bigger drive.. lol. it might make the container run a little slower being on an HDD rather than an nvme, but oh well. I just need it to actually hold my stuff.. lol
you could use custom locations
https://immich.app/docs/guides/custom-locations/
split your db, thumb, and encoded videos on the ssd and your upload to the spindle drive
this is the solution I ended up doing btw
AHA! that's the issue.... it doesn't tell you that you need to change the docker-compose.yaml. In the file it specifically says not to change it in that file, and to change it in the .env file only.....
unless you are using custom locations
remember you need to add the handles for the new custom config in the compose and the .env
that makes sense.. I knew it did the whole time.. but the compose file says not to touch it..
here is my compose. dont use it as there are environment variables that may not work for your config
and my env
they do that prob in part because the custom locations thing is sort of recent
and the other reason I can think of is to keep the newbs at bay
yup.. and it worked.. kinda.. lol
it just sent me in circles....
gotta know what you are doing when it comes to docker
they need to refer to the page for info on customer locations lol.
yet there are a lot of newbies that are kinda just winging it not taking any security into account either
oh for sure...
but now youve got my compose and .env as sort of a reference so you should be good to go
yup. I'll take another crack at it. lol
whew. I got it working! Running it from my sata drive, uploading photos/videos to the HDD, and thumbs on the NVME. I made all the directories and it seems to be uploading and working just fine.
You should notice a performance boost in comparison to running immich just on a spindle disk