Use USB HDD under Raspberry Pi under Docker
I have followed https://immich.app/docs/install/docker-compose to start immich server on my raspberry pi 5 and it works fine. It is just that it has the default
UPLOAD_LOCATION=./library
When I changed this to /srv/dev-disk-by-uuid-54D0-BA0D/NAS/image_gallery
and also added a new line under volumes as below
/srv/dev-disk-by-uuid-54D0-BA0D/NAS/image_gallery:/srv/dev-disk-by-uuid-54D0-BA0D/NAS/image_gallery:ro
Post updating these values, when I restart the docker, the url just doesn't load
I am sure that these are the only two files which need some modification, but can anyone point me how can I get these values correct.

35 Replies
:wave: Hey @Ganesh070,
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. :ballot_box_with_check: 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.You shouldn't change the location without migrating files firstly
And secondly you're trying to add the same location as external library which will mess your system up very badly very fast
If you change the upload location in your env file you should never need to edit your compose
Thirdly you're specifying a read-only upload location
It's not even the upload location... š
I take that back. Guess actually looking at compose files is a good idea..
when you say -
migrating files firstly
do you mean the complete container setup or just the earlier existing files under library
since the linrary is empty at the momentthere should be a hidden .immich file inside each subfolder at the very least, if you had started immich before
But to elaborate on previous points, you using yuor env file like this translates to:
I hope you understand why this won't work at all
Okay. So some more reseach says i need to mount my usb drive so some path...
so just mounted that to a path
/media/ssd
What should be my env location post the above change ?UPLOAD_LOCATION=/media/ssd
and no changes in your compose
That's what the env file is for
If you would be using external libraries then you need to edit the composeTrying this now
If it fails, check
docker compose logs
and look for missing .immich
errors
If this is a new system, go to the folder of DB_DATA_LOCATION
and wipe everything inside, then restart immich.
If it is not new (pictures uploaded), I'll wait for your reply šit did fail, checking logs now
immich_server | [Nest] 7 - 12/26/2024, 2:29:30 PM ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
Just to be clear,
/srv/dev-disk-by-uuid-54D0-BA0D/NAS/image_gallery
is an empty folder right?now we are no longer using
/srv/dev-disk-by-uuid-54D0-BA0D/NAS/image_gallery
On another note, should the folder be empty??This does not answer my question so why go back and forth?
UPLOAD_LOCATION
should be empty before immich touches itlet me update that location to an empty folder right away
If you want to use an existing folder with pictures, that's external libraries and we need a different way of configuring things
Tried an empty folder too --
`immich_server | [Nest] 7 - 12/26/2024, 2:38:41 PM ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
immich_server | 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."
Yeah that's because of this
The database was initialized, the hidden
.immich
files were made, and then you started moving things around
So you either need to move the contents of the original location with cp -a
or wipe the database and start newyes... doing a copy now
To get back to the previous point, is
/media/ssd
a folder with pictures?Woooohhh... got this working now
I changed this to an empty subfolder --
/media/ssd/NAS/MEDIA/

If you're asking about the 200+GB, immich just counts everything on the drive regardless
It's just saying "your filesystem is x% full"
No, I just wanted to point that now the system is on HDD rather than sd card
Though I have once question - next time if my device reboots, will the usb mount back to the location
Because I had to do this explicity on terminal -- mount /dev/sda1 /media/ssd
Probably docker will start faster than your usb stick mounts š
If you mount it through fstab this should work fine
is there a way we can add a script to run before docker starts
Do you know what /etc/fstab is?
nope... got my rasp pi yesterday and started today
/etc/fstab is a list of filesystems that is auto mounted at boot
this will currently be your sd card and it's various partitions
You can add the usb drive as well
Raspberry Pi Stack Exchange
Auto mount with fstab not auto mounting
I'm new to Linux and the Raspberry pi. I'm having trouble mounting my USB 1TB HDD automatically using fstab. It mounts no problem when using something like this in the terminal:
sudo mount /dev/sda...
for instance
Here in the link it's
UUID=76634fc7-bf80-470e-9cf7-727e8e13581c /mnt/slave_hdd/ ext4 defaults,errors=remount-ro 0 0
Yours would probably be UUID=XYZ /media/ssd/ ext4 defaults,errors=remount-ro 0 0
Assuming you formatted the SSD as ext4Thanks buddy, will try it out
Remember to replace the XYZ with the actual UUID
š
This thread has been closed. To re-open, use the button below.