Immich external library
Hi. I've managed to successfully setup Immich as a container in docker.
However wanted to add external data source for uploading content. From within docker I can successfully access smb mount on True Nas but even I try to add external library from within Immich using the same path it counts back with
67 Replies
:wave: Hey @Tazam,
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.
You haven’t included any information
We need the compose, env, all logs, screenshots of your filesystem on the host and the exact path you’re trying to add in immich
I am running proxmox and have created
Container with docker running the Immich instance
Truenas Scale with SMB Volume.
I have managed to mount the SMB folder and is visible from within the container.
ls /mnt/Media/Immich/uploads - I can see the contents which reside on the TrueNAS server.
When I try to and external library with the same path it fails validation.
Let me know any additional info you require.

I need everything I asked for
Also the contents of /etc/fstab, commands df -h , fdisk -l and docker inspect immich_server
how can I obtain the logs?
You haven’t mounted any external folder in your compose
You should review how docker works and read our docs in detail please
If I'm correct this would be done in the .env file UPLOAD_LOCATION=
is so I tried that aswell
First time I'm doing this
Nope, that’s the internal library
and new to the whole world of docker
You can read about how docker works and what host files it sees (hint: only the ones you specifically mount) also our docs are pretty detailed
I tried following this link
https://immich.app/docs/install/docker-compose/
Did you read this link I sent you?
It’s pretty long so I would be surprised if you read and tried it already..
sorry no I missed it
I can see it
I will go and read on that
There’s examples like 2/3 down of exactly how to add an external library
It has nothing to do with the UPLOAD_LOCATION it will be a new line in your compose
If you have any questions after reading we are here
Is this it?

Yes
Thank you for being very patient with a newbie, its appreciated
@Tazam
This what I've done so far, could you point out if this is correct


if so how can I view he files from withing Immich?
Looks ok. Did you run docker compose up -d ?
yes
but don't know how to view the files
please run these commands:
docker inspect immich_server
docker exec immich_server ls /mnt/media/uploads
it works, just needed to scan libraries

but is there a way it can do that automatically
rather thanscanning all the time
it does it every so often
also from my mobile phone I would like it to save to the same location
would this work?
nope
that goes to UPLOAD_LOCATION
therefore can I change the upload location to match this location
no you cannot
they have to be separate folders, not nested in each toher
I just want all dats to be on my TrueNAS
then you can pick a folder like /mnt/media/immich/internal
something like this?

did you read the line directly above the one you edited...?
AHH, your right
Please if you can just point what I can do to change the storage location
The comment right there tells you, mate.
"edit the value of UPLOAD_LOCATION in the .env file"
You need to try to do some reading if you want to get into self hosting, this is not a simple task you can just totally ignore
also, you should move your current UPLOAD_LOCATION to the new folder on your NAS if you change it
you can do
docker compose down
, edit the .env, move the folder, then start back up
in your env you would put UPLOAD_LOCATION=/path/to/folder
Honestly I've tried for 3 days trying to read up, I tried editing the env file and changed location there but still failed.
I will go back and try again, like stay again and come back.
I agree with your comment
well it sounds like you were changing the env and expecting the photos to show up as an external library
which is not how it works. that is for the internal only
If there is paid support I'm willing to take that
there isn't 🙂
It sounds like you just want someone to do all the work for you haha
I told you what to do right here
Ok I'll give it a try and again thanks
remember that when you do this you need to move the UPLOAD_LOCATION files from ./library to the new path as I said above
since there are files there that immich needs
so you can run
docker compose down; mv /path/to/library /path/to/new/nas
; then edit the env, then compose up -dWith the original .env file Immich loads in the browser but when I add my path it does not load


how did you move the files
my bas missed this step. However when looking I do not know where the library is

okay managed to create the library folder

I now het this

basically it needs permission to create in the SMB mount
could you guide on how to give permission
just
mkdir
the folder and chmod 775
it
ls -la

.DS_Store
what kind of media is this?
Are you also mounting it somewhere else?
Also, don't network-mount your database, that's going to end poorlyI have proxmox running TrueNAS as a VM. I would like to store all data on there.
WHat is the best solution for this scenario?
I can access Truenas shares from the container
read only
but cannot write
That sounds like a TrueNAS / ACL issue
Nothing to do with Immich
okay, but is this the best way to achieve my goal or is there a recommended way where to store data?
I would only use a network share for library/
UPLOAD_LOCATION
and not the database, that will do just fine
the DB is only a couple hundred MB per 100GB of imagesI agree to only use upload_location as a network share and nothing else
Therefore the direction I'm heading is ok just need to sort out write permissions
I know its your your field but any tiny pointer on how to achieve this would be appreciated as a newbie I've read countless articles
no clue really! but #truenas might hold some answers
Thanks
MacOS shit that gets written everywhere