I am trying to design a migration path from my current Synology DSM setup with the standard file station (running user home service) and the cloud station app to NextCloud.
A feature that I really like about the Synology solution is that is manages all user files with the user home service. It makes sure that each user has their home folder under the share /home which is a symlink to /homes/username. I am pretty sure that this will not be an issue when I set up a custom NAS, e.g. based on OpenMediaVault.
But at the same time, Synology adds a subfolder in this home directory for its cloud station server. All clients of the user are syncing with this subfolder even when I add files via SMB. Which is very nice, since they can use their SMB storage to dump a lot of large files while having a dedicated subfolder that is always synced with their devices (without all the large files, e.g. old backups etc).
I tried to find a way to enable the same behavior in a OMV/Nextcloud setup but stubled upon recommendations NOT to do this since every change needs to go via the NextCloud service.
Did someone here already implement such a setup and can help me draw a path for setting up NC in the right way?
I plan to continue with more or less the same structure of folders / shares that I have right now:
- homes ← Storage location shared between SMB and NC services
- workspace (folder which any user can access to temporarily store uncritical files for sharing or later handling)
- photos (including all personal photos for 2 distinct user groups)
- videos (movies, tv series, …)
Hi @lollipop, there is one solution out there that covers a comparable setup. You can read more about it here. If you have any questions regarding this, please feel free to ask!
Hi @szaimen ,
Mans thanks for the swift reply!
What the guide basically does is to use the Samba Shares via the External Storages App and assign each user manually its respective samba home directory as the NC Root directory , right?
So next cloud users would still not be in sync with linux or smb users but at least everyone can use their home directory equally from SMB and NC. Correct?
What is the performance impact of NC using a SMB share as external storage backend? Particularly for those many small files that you usually have in your documents storage.
Can‘t I somehow use NC as the Controller with a hook being triggered when a new NC is created that creates a new linux user incl. Home dir and sets the SMB share accordingly?
@lollipop, thanks for your respond!
This is not completely correct since local external storage is used to mount the home directories to Nextcloud as root directory. Mounting smb-shares to Nextcloud would just mean another unecessary layer that costs performance since all files are locally available for the server and thus directly mounted to NC without going through SMB.
Yes but it is as good as it gets because it checks for new changes when accessing a directory through Nextcloud (and especially good if you enable Inotify for each mount in step 12 here) (but not recommended)
It is nearly as good as the performance of normal Nextcloud storage I would say (but not tested) since all files are available locally and if you configure your network perfectly (e.g. by using a local dns server that has a custom dns entry for your Nextcloud domain inside your home network) and use the recommended hardware (e.g. all data on a SSD and using the recommended NUC), I’ve been able to sync a 28GB NC directory with 3000 files with the NC desktop client (from the server down to the client) in around 7 minutes. It nearly maxed out the available wifi connection while doing that. (600-800Mbit for big files) and it rushed through small files as if it would be nothing.
I kind of prefer to do all of this manually since I have the control over it then (and retain flexibility) and this is completely managable for up to 10 users I would say but you might be able to script something that automate some things a bit more. It is doable for up to 10 users imo, because I’ve made it as easy as possible to do so. Here is e.g. a FAQ article that covers how to create new users after the initial setup: click here
BTW: the script that does most of the magic with mounting directories as local storage to Nextcloud, creating smb-shares, creating smb- and Nextcloud users is this one: vm/smbserver.sh at master · nextcloud/vm · GitHub