storage error
im using docker and the server works fine but i need it on my usb stick for where the photos go from the photo server and ive dont that in the .env but its not working how do i fix this
51 Replies
:wave: Hey @Dhr44ptel,
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. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time).
2. :blue_square: read applicable release notes.
3. :blue_square: reviewed the FAQs for known issues.
4. :blue_square: reviewed Github for known issues.
5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy).
6. :blue_square: uploaded the relevant information (see below).
7. :blue_square: 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.i dont see any problems
We need the logs
Are you trying to put your DB on a usb stick?
no just the phoros so when i upload somethign it goes onot the usb stick
its basically storage for the server
Your env is setting up the same root path
What is F:? Is this on windows?
Postgres has to be on a linux filesystem https://docs.immich.app/install/requirements#special-requirements-for-windows-users
Requirements | Immich
Hardware and software requirements for Immich:
F is the path to my usb stick
Then what bootz said. You probably can't store postgres there
do i need to do this then?

Yes
ive done this but i cant see the images on my usb stick after i upload something
We need the server logs then
PS Microsoft.PowerShell.Core\FileSystem::\wsl.localhost\docker-desktop\home> docker compose up -d
validating \wsl.localhost\docker-desktop\home\docker-compose.yml: additional properties '+ pgdata' not allowed this happened
thats alot are u sure u want me to copy and paste it all
Oh don't actually put the + in their, it just shows "add"
You left the + at the front of your file at the bottom
PS Microsoft.PowerShell.Core\FileSystem::\wsl.localhost\docker-desktop\home> docker compose up -d
yaml: line 9: did not find expected key
I'm going with "You did not replace the + with a space but just removed it"
what am i supposed to do
Don't just delete the +, you need to make sure it's spaced correctly. Should match the model-cache
volumes:
model-cache:
+ pgdata: this fine?
No, remove the + sign
thanks
its still not going to the usb
whats going on
@schuhbacca
Logs
server logs
database logs
docker run -it -v F:\library:/data alpine ls /data
i also tried this btw
here are the .yml and .env
What is your latest compose? If its the last one you sent it's still wrong.
Also when you are making these changes you are doing
docker compose down
then docker compose up -d
after correct?i did not know i wass meant to do that, and yes everything ive sent is the latest of what ive done
do you know whats wrong with it?
could you tell me please
Where did the volume section go in the latest compose you sent? Why does your env say Postgres is at
DB_DATA_LOCATION=F:\pgdata
again?
You need to docker compose down and up to reload setings when you change them.
As a warning if you are going to actually use immich for photo backup you should have an idea of how to do some admin things with docker. In the event that something goes wrong.
Also you should have your 3-2-1 backups sorted as wellmy env says that because i directed the postgres upload to the postgres folder on my usb stick
what should i put it as
and wdym the volumes section?
PS C:\WINDOWS\system32> docker compose down
[+] Running 5/5
✔ Container immich_machine_learning Removed 0.9s
✔ Container immich_server Removed 1.1s
✔ Container immich_redis Removed 0.6s
✔ Container immich_postgres Removed 0.8s
✔ Network immich_default Removed 0.5s
PS C:\WINDOWS\system32> docker compose up -d
[+] Running 2/4
✔ Network immich_default Created 0.1s
- Container immich_machine_learning Creating 0.0s
✘ Container immich_postgres Error response from daemon: mkdir C:\WINDOWS... 0.0s
- Container immich_redis Creating 0.0s
Error response from daemon: mkdir C:\WINDOWS\system32\postgres: Access is denied.
this is my powershell
@schuhbacca
You cannot put postgres on your C drive
And you probably can't put it on a usb stick either
Please read this link carefully
what can i put it on
i did what it said on there
PS C:\WINDOWS\system32> docker compose up -d
[+] Running 1/1
✘ Container immich_postgres Error response from daemon: mkdir C:\WINDOWS\system32... 0.0s
Error response from daemon: mkdir C:\WINDOWS\system32\postgres: Access is denied.
PS C:\WINDOWS\system32> docker compose down
[+] Running 3/3
✔ Container immich_machine_learning Removed 0.3s
✔ Container immich_redis Removed 0.3s
✔ Network immich_default Removed 0.8s
[+] Running 2/4ystem32> docker compose up -d
✔ Network immich_default Created 0.2s
✘ Container immich_postgres Error response from daemon: mkdir C:\WINDOWS... 0.0s
- Container immich_machine_learning Creating 0.0s
- Container immich_redis Creating 0.0s
Error response from daemon: mkdir C:\WINDOWS\system32\postgres: Access is denied.
DB_DATA_LOCATION=F:\pgdataThat's definitely not what it says on there That should just be
DB_DATA_LOCATION=pgdata
Currently both compose.yml and .env look mangled / invalid, perhaps a copy-paste issue?
Could you edit your post and format them using either "Code" block in rich text editor or three backticks in markdown editor?
I assume it was working before with default compose and .env, right? Then you changed UPLOAD_LOCATION and DB_DATA_LOCATION to point to "F:...", right?
You can try different syntax and see if it makes any difference.
Option 1. Forward slash, such as UPLOAD_LOCATION=F:/library in .env.
Option 2. Directly specify path enclosed in double quotes in compose.yml on the line with UPLOAD_LOCATION (I know there is a warning to avoid editing that line)
immich-server:
...
volumes:
- "F:/library:/data"
someone suggested this on reddit
thanks
sorry im new to this
I'll reemphasize this part
As a warning if you are going to actually use immich for photo backup you should have an idea of how to do some admin things with docker. In the event that something goes wrong. Also you should have your 3-2-1 backups sorted as wellConsider starting with something lower-stakes to learn the ropes

anything you suggest?
im looking for a server that is a replacement for gphotos and i can use a usb stick as the storage
i have tried plex as i already use it for tv shows and its not great for photos
No I'm suggesting starting with something other than photos
i need photos
my google one ran out
i didnt orginially want to do this but would this process be possible if i ran it on ubuntu as i have that on my laptop
might have a go with casa os if that doesnt work ill use ubuntu
I'd advise strongly to go straight to ubuntu
Is it easier to use a usb stick as storage on there
Yes, and also configuring and troubleshooting is easier. CasaOS looks great if you don't want to do anything special, but unfortunately setting your storage somewhere else already is special
ok thanks, i will try linux today
So good news I've got immich running well on Ubuntu but the only issue is I was unable to get it onto my SD card for the media upload
Anyone know how?
It's not recommended to use an SD card for anything really
They don't handle a lot of use well and will be destroyed pretty quickly
I have a HDD and an external SSD and a usb stick
Is there a way to get those working as the storage
Perfarbly the usb stick
This thread has been closed. To re-open, use the button below.