Hi,
I’m really new to Nextcloud and I just finished my first installation inside a Debian 10 VM on my Synology NAS.
This means that also the files that I upload to my Nextcloud will be stored inside this VM.
But I want all files to be stored on a separate shared folder on my NAS.
I see big advantages by doing so:
Backups are a lot easier since I can include them in my already existant automatic backups of the NAS.
I also want to access the files locally via SMB/cifs. Nextcloud should just be used for accessing files over the Internet, Sharing, Calender etc.
VM doesn’t grow to hundet of gigabytes
VM snapshots include only the OS, webserver configuration and Nextcloud itself.
My first idea was to just mount that shared folder with fstab to the current location of my Nextcloud data folder (/var/nextcloud_data) but I see problems here:
Probably unnecessary bad performance(?)
File operations (add,change,delete) via SMB (without Nextcloud software) won’t be recognized by Nextcloud as far as I know.
What about file permissions? If I create a file over SMB it probably doesn’t have www-data:www-data ownership?
Currently I have no idea how I could realize that.
I’m running Nextcloud for the first time, so I want to evaluate it before I build a dedicated server with it.
But my plan is anyway to move away from Synology to a self built little homeserver and then run Nextcloud, webserver and other services there.
Using the “External Storage” app to add the SMB share works great.
However this is not exactly what I wanted.
When I add the share this way, on the main page of nextcloud I see this share as a folder next to my already existing files.
What I wanted to do:
When I go to the main page of the nextcloud web interface and upload a file in the root directory, in the background this file should be stored on the smb shared folder instead of currently “/var/nextcloud_data”. So the user shouldn’t even realize there is a external storage involved.
Mounting the share on OS level and tell nextcloud to use this share as data location would work if the only goal is to store the files on the share. But I also want to access the files on the local network trough SMB without nextcloud involved. And if I do so, Nextcloud won’t realize changed/added/deleted files. Yes I could do it with a cronjob like Norry said, but if this was real-time it would be better. With the external storage app it is real time, but sadly the share then is accessibly only in a sub solder.
Yes we do, but that’s not possible/feasible. NC is not a traditional file server, as Samba is. The kludge of running the file:scan command is the only possible way and it’s not a good one either.
If you want a file server, use one. If you want to access your file server from the internet, use a VPN. Don’t mix systems which are inherently agnostic to each other.
The current data location is /var/nextcloud_data
What if I move the contents of this folder to the share, then delete the folder and create a symbolic link from the share to /var/nextcloud_data?
Don’t know exactly, but I suppose this won’t work. The data folder does not only contain the user data, but other special folders as well. Putting these out of the control of NC is bound to be troublesome.
Maybe NC isn’t the solution you wanted it to be, there’s no fault in admitting that. On the other hand is also not advertised as a file server replacement, is it?
I’m currently test the function and have the same question.
The side effects i found:
If the Storage doesn’t work nobody can log in. That’s clear, so you need a user with only local Storage. I solved that with an additional group and and do not include the admin in the group
You need the standards created by nextcloud on first login. I solved this by logging in once with the user, without the user being a member of the additional group.
If you don’t have the Standardfiles “occ files:scan --all” doesn’t work. Besides if you remove the user from the additional group without logging in localy once before, the user can’t log in anymore.
sharing with links and folders seems to work if you use the setting Log-in credentials, save in database mechanism for external storage.
comments and tags seems to work…
But i like the funtion, i want to publish a user home directory over nextcloud. What are the problems when using the function, apart from whether / home directories should be made available online?
How did you mount the NAS Storage to NextCloud?
If i try to mountit with the External Storage App i am not able to do this. Do I have to Connect via FTP? WHat Method did you use?