Cluster two servers

Hello everyone,

I am new to NextCloud.

In my environment we have 500 users so I want to deploy two servers; one server (such as the main server) will host the web server and database, and another server as a backup, in case the main server goes down.

I’ve been searching, but can’t find any information regarding implementing a backup server.

Thanks in advance.

Regards,

Kaneki638

Hello and welcome to the NC-community-forum where everyone tries to help everybody else…

a bit of searching the forum for similar problems/tasks ahead of opening just another thread would have been nice and helpful. Like you might have found this existing thread (linked to several other threads) for the same question: Mirroring of two nextcloud server

That’s regarded being a professional demand and no more homeuser-setup. So first and foremost you should apply for a quote from NC GmbH for professional support.

But you’re free to ask your questions here on the forum as well, of course. But most probably you won’t find much ppl with a setup like yours.

Good luck!

3 Likes

Hello @JimmyKater

Thanks for reply.

1 Like

You could probably synchronize the web server config, the application folder, and configuration files (config.php) via rsync from one server to the other, but that’s where it stops beeing simple. For true high availability, which is the only thing that makes sense in this context imho, you also need to scale out the database (Keyword Galera Cluster) and use a distributed file system like CEPH, GlusterFS or maybe S3 for data storage.

The following links describe broadly how such a cluster could be structured:

https://www.root101.net/nextcloud-highly-available-cluster-notes

https://severalnines.com/blog/deploying-highly-available-nextcloud-mysql-galera-cluster-and-glusterfs/

1 Like

Sorry, dind’t noticed the same link in @bb77 post

@kaneki638
Maybe you like to read this PDF for scaling Nextcloud. Maybe you find answers to your questions. But it is more for >500k users.

1 Like

@kaneki638
what is the maximum downtime your user would accept? and how much data could be lost? how many data do you have?

and what is your level of linux knowhow?