One NextCloud instance distributed over multiple servers


I would like to know if it could be possible to create a NextCloud instance over multiple servers.

My idea would be to have a server in three different cities. Is it possible to sync in live servers with each other ? So a user from location A, update a document in its local server and it is propagated immediately to location B ?

I hope to get a better rationalisation of internet use (I’m working for a NGO in Benin). Users inside the enterprise syncing with local server and server syncing with servers. Users outside the enterprise syncing with one of the 3 server.

Could it be easy for a user to go from a location to another and only use the local server ?

Could we have only one user and file storage administration page ?

Internet connection problems can occur in every locations, a master server hosted in cloud can be an option.

I hope I exposed clearly my problem.

Thank you a lot for the time you gave me !


Hi Antoine

What you are suggesting sounds a lot like the Global Scale Architecture solution available from Nextcloud (paying customers only afaik).

With your setup you will need to keep a few things in mind.

  1. Creating multiple servers in a single instance can easily be done, but that means that you have a few shared resources. Primarily storage. A single instance means that all users reside in the “same Nextcloud”. So all your application servers will need to have the same storage mounted to achieve this. This can be done a few ways, most popular I think is NFS. You could also use CEPH which can be exposed via the rados driver. CEPH can handle file locking, so you are safe without having to setup a NFS. It is very fast and easily scalable.
  2. If you want to go to a system where you have three servers in three cities without NFS, a better approach imho would be to setup 3 individual instances and have them federate. A single instance with multiple application servers, means something is shared.
  3. If you do want to go the shared NFS route, you could use HAProxy as a load balancer and configure this setting to get your users to login based on their location.

This points to federation to me. May be a better fit for you.
My 2c.

i guess that’s your best setup.

or federation ->

Thank you both for your response.

I had already seen that. It is only paying customers yes.

If i understand it well, this option is not using Global Scale Architecture. Can you give me more details on how a single Nextcloud instance can be achieved by sharing storage ? User account and Nextcloud configuration is also shared over those three servers ?
While using CEPH, if a server has not access to internet. Will it be easily possible to recover from that ? Does the user inside its local network have still access to its data ?

It seems like an easier solution to set up. If a user go from one location to another, how easy will it be for him to switch to the local server ? If he uses the desktop app, won’t it be a second instance ? So he will sync a second time all his (same) files.
Does federated NextCloud instance keep a local store of federated folder ? In other word if in a location the internet connection is down, does users in this location will be allowed to sync or access to this file ?

Thank you for your time !

What is meant with paying customers only? Nextcloud is a project which promises 100% source code, therefor all functionality should be available to all of us. What are you missing?

have you already took a look into this app ?

1 Like

It is more like that there is little public documentation and very little experience among the forum users here. And if there are users with similar setups they have either support or they don’t want to share their configuration. But if you manage to install it, publish your configuration and others with similar setups do the same and you share your experience, it’s perfectly fine to do so without buying support.

I guess my take is that I would expect 100% open documentation as well. Code which I can’t use is of no value, then rather be honest in the first place.

In ownCloud, they had a few features only for enterprise customers, so some features are just not available because they think it’s for enterprise users. Nextcloud does not have this limits and you can use all features. Now the documentation might be another limit, sure there is no detailed documentation for specific enterprise setups and some features are not that well documented. However, there were and there are probably still some shortcomings for standard features, and the community contributed a lot to improve the documentation but much less for these advanced features.

I know, there are enterprise users, but they have different Nextcloud setups and only use the globalsiteselector for a single entry point for each users, they are then connected to their Nextcloud server. I haven’t heard yet from a setup, where content is also synced directly between the servers.

Since you are working for an NGO, they should also offer cheaper support like for education.