Using SMB share to save photos and DB
Hi guys, I'm trying to have my Immich instance to upload the photos and DB to SMB share. I'm using Proxmox and then running Immich on Debian VM. I'm also running TrueNAS Scale in another VM.
So I made a dataset and made a SMB share out of it. You can see the ACL in the uploaded screenshot.
Then I went and mounted the share using this command:
After that I edited the .env file
When I run I can see many errors one of them being:


30 Replies
:wave: Hey @Maraxen,
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.DB on an SMB share is a very bad idea
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
Run the database locally Please
Images and videos can be on SMB
Why is that? I thought that it would be better because my server is sadly short on resources so I have all VMs on a small 128GB SSD and I thought that it would be better to have all my important stuff on RAID Z1 pool
Databases really don’t like network shares
If you want the security then store the database backups on SMB
Yeah, I tried having the DB locally and the images and videos on the SMB and it worked fine
It that works fine then keep that configuration
Database shouldn’t be more than a gigabyte or so
Unless you have an extreme amount of assets
FWIW having your DB on a RAID/Z1 pool doesn't make it more resilient anyways given a copy of a postgres folder is pretty much useless
Oh, alright, I'm not trying to be picky on you but is there a more specific reason on why DBs don't like being on network shares? I totally trust you but as a tech enthusiast I want to learn as much as I can 😄
Data integrity for databases is significantly different to data integrity for just random files
Oh alright, will rsync do the job then?
Latency, permissions, reliability
They rely on fancy things like locks and permissions and seeking and also need high performance access
Most network shares don’t support that
FWIW you could probably make it work with SMB. But you really shouldn't
ohhh alirght, thank you for the info!
You can also get to work by moonwalking there while juggling chicken eggs but why would you
Oh come on that comparison isn't fair. That would be super cool!
I do that at least once a year
I made it work with NFS but I had to configure mapall setting to root and it seemed like a very bad idea to me. Also the other thing that I didn't like about the SMB apporach is that, if I understand it right, there's no built in form of authentiaction
Yeah it's always just a really bad idea tbh
And also even if you get it working, performance will be horrendous
If you have block storage and a share over that (e.g. Ceph) you can (more reasonably) make it work
But it's almost never a good idea
But I will totally follow ur advice and keep the DB locally. Also what would happen if the disk with DB dies? Would it be easy to restore Immich and upload all the photos back?
No, that's why you need to make backups of your DB
Block storage? Minecraft chests? Or do you mean like iSCSI
The latter lmao
Although that joke is actually quite good haha
ohhhh alright I thought about that but it seemed like a lot of trouble so I'm glad that I shouldn't do that xd
alirght I will make sure to do that
also I noticed that even if I changed DB to local it still has some kind of the problem with the SMB share for the images

It’s complaining it can’t find a special marker file
If you haven’t uploaded anything yet you can delete the database directory and start again
alrighty I will try that
everything seems to work fine now
thank you for the help guys!