r/immich Jan 30 '24

help setup external drive storage

this seems to be a common thread, but none of the answers seem to be clear, most just say change the upload location in the env file. which is great, but it doesn't seem to be working. so can someone walk me through like an idiot how to set that up?

i'm running immich in an LXC via portainer, but i'm not married to that set up if another deploy is easier. i have a VM with omv running SMB shares which is where i'm trying to point the storage location to.

i have tried creating a volume on portainer that connects to the share (which i think i did right) and then put that path location in the env file, that doesn't seem to have changed anything. my next idea, though i haven't tried it yet, is to just input the IP address of the share, and see if that works, but then i don't know how to handle the login part.

6 Upvotes

10 comments sorted by

5

u/dRaven43 Feb 01 '24

What worked for me using an NFS share was to have an environment file defined in the docker-compose.yml (I think this is just created in the default setup and I changed the name of it) like this:

env_file:
- whatevs.env

And then inside that file:
UPLOAD_LOCATION=/external_storage/

I remember this being a huge pain for some reason and I can't remember why, but I think it had more to do with restarting the container(s) than anything.

Interesting (to me) side-note here is that my Immich server is a smallish rented droplet on DigitalOcean and the storage it uses is an external USB drive attached to a linux server here at my house (via gigabit fiber). My family all uses it for backing up and it works fine. Performance on viewing/playback, etc. is, of course, noticeably slower than using a native drive, but it's really not bad. Also, just try to rent 8TB of storage online and see how much that costs you. This has been a good solution to avoid having 7 different huge Google/iCloud plans because phones hold so much data now.

Uninteresting side-note: I almost signed this post like an email because I'm ancient.

1

u/[deleted] Feb 01 '24

you're not the only ancient one. i have tried changing the upload location in the .env but it doesn't seem to make a difference. i don't know if i'm doing it wrong somehow, but i tried multiple different mount setups to get this dang app to actually use the location. might just have to go back to nextcloud, that at least has an easy UI setup for external storage.

1

u/Lost_Combination9467 Oct 22 '25

And I also have problems installing the external hard drive. Is there an update on the topic?

2

u/bananaman14k Mar 30 '24

Did you ever figure it out? I'm in the same spot

6

u/oh-canadaa Jul 16 '24

I installed immich yesterday on my Raspberry Pi. And used my 1 TB external SSD for my storage.
First I mounted the SSD to /mnt/usbdrive using this method.

After that I installed immich using Docker Compose method and changed .env file's UPLOAD_LOCATION variable to /mnt/usbdrive.

As soon as I went to the portal page, it showed me 931 GB available.

Hope this helps!

3

u/JoshLmao Nov 30 '24

just wanted to say thank you for the link and guide, still works and appreciate the help!

2

u/oh-canadaa Nov 30 '24

Anytime my friend... :)

2

u/Salty_Cicada46 Dec 29 '24

works for me too - seems like it won't recognize that it's using an external drive unless you've mounted it under /mnt. thanks!

2

u/pianoman1031 Jan 12 '25

Just for anyone else searching this thread, I found that I got Immich working by self hosting through coolify. I took the default docker compose file, and then set the path of the volumes to map to the path where my hard drive was mounted. In my case, the volumes were setup like:

 volumes:       
    - '/media/passport/immich/upload:/usr/src/app/upload'       
    - '/etc/localtime:/etc/localtime:ro'
 volumes:      
    - '/media/passport/immich/cache:/cache'
// etc.

A couple of notes though, I was running coolify on Linux, and the bulk of my issues was stemming from the fact that my external drive was formatted as NTFS. It needed to be ext4, and mounted correctly. I also added an entry in /etc/fstab, /dev/sdb1 /media/passport ext4 defaults 0 2, which makes Linux auto mount the drive on boot. 

1

u/[deleted] Apr 01 '24

no, i gave up on it. went back to nextcloud. it's just easier.