Multiple data directories

Nextcloud version (eg, 10.0.2): 11.0.0
Operating system and version (eg, Ubuntu 16.04):Ubuntu 16.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.18
PHP version (eg, 5.6): php 5.6.29

The issue you are facing:
So I got a problem which I haven’t found any guides or documentation on how to do yet.

What I want is rather simple, I have nextcloud running on 1 server, I got 2 storage servers and I want for example 25 users on 1 server and 25 users on the secondary server. So how can this be done? or is it even possible?

I have the same requirement, does anyone can help, many thanks.

You’ll likely want to:

  • mount each server as external storage
  • create 2 groups for each server
  • add the users to the correct groups
  • limit access to the external storage based on group membership

Hi Jason,

Is there possible:

  1. one nextcloud server, two nfs file servers, 50 ldap users.
  2. nfs server #1 mount on nextcloud mount point "/data1"
    nfs server #2 mount on nextcloud mount point "/data2"
    change folder own permission to www-data
  3. may I setup user #1~#10 store on “/var/www/nextcloud/data”, user #11~#30 store on “/data1”, user #31~#50 store on “/data2”

Hi Jason,

I found some old info from owncloud forum, If there possible to do it like that?

https://forum.owncloud.org/viewtopic.php?f=8&t=20706

All fine so far. You could also forego NFS and mount directly from Nextcloud over SFTP:

You can also then mount it as a user on the remote system with write access, and not worry about NFS style permission mananagement:

So again, create the groups you need, assign the users to the groups, then limit the shares by group:

/data is typically user root, so all users will get access to the normal /data/ directory by default. Differentiate how you mount shares if going the NFS route so it doesn’t look confusing in 6 months when you come to troubleshoot:

/data = default NC storage
/media/nfs_share1 = first share
/media/nfs_share2 = second share
/media/nfs_share3 = third share

/media is just an example. Mount it wherever you feel comfortable but do so out of the webroot (/var/www... ) for security.