Need help setting up nextcloud on SMB share
Hello Community!
So i have an ubuntu VM on my truenas server. The VM itself has very limited capacity and is used for small applications only (Adguard, nginx, kuma, etc.)
Now i want to host a nextcloud instance on that aswell. However i don't want nextcloud to store the files on the VM itself. I want it to be on a SMB share from my truenas instance.
I am not getting that to work...i tried the docker-compose from nextcloud themselves and defined the volumes to be on the SMB share. But when i do that i get the error that nextcloud could not write into the config directory bcs of lacking permissions. Odd because i mounted the share as 1000:1000 and every other directory and file that was created by nextcloud was made as uid=1000 but the config can't be written.
I then tried to define only the config directory to be on a docker volume (like the docker-compose wants for everything) and only the data on that SMB share. Then i get the error it cannot write into the apps folder. But it could create the apps folder but then it can't write into that.
I don't really know what to do anymore.
If someone could help me out here? Maybe give me a small step-by-step guide on how i could achieve what i want here? I don't care about anything to be on the VM itself, that's fine but i want all the personal files to be on that SMB share.
I do NOT want to do this inside of nextcloud and mount that SMB share there...i want it natively on the share.
https://pastebin.com/fxiJdLqB - Docker-Compose file
This was my last try. The SMB share is mounted under /home/pluto/docker/nextcloud and is mounted in /etc/fstab as:
//XXX.XXX.XXX.XX/nextcloud /home/pluto/docker/nextcloud cifs vers=3.0,soft,rsize=8192,wsize=8192,mfsymlinks,user=noneofyourbusiness,pass=wonttellyou,uid=1000,gid=1000
Hopefully someone has the time to help me out :-)
Posted Mar 27, 2023, 1:27 PM UTC · edited
The normal way of doing this is mount the SMB share on your docker host, and point your config directory to that path. Don't mess with SMB inside your compose.
But thats what i did, didn't i?
I mount the SMB share under a certain path, and then point docker-compose to that path.
Or is there a difference to what i did?
I don't know. Your post didn't really specify that's what you did. It really sounded like you were trying to map the SMB directly in the compose, not on the host.
No no, i didn't.
I posted a comment where i linked some pastebin and the exact format of my fstab to show how i do it.
And that comment wasn't there when I commented.
I was going off the OP...