Nextcloud HA Setup

Hi all.
I am trying to setup Nextcloud with HA. I am going to have two separate servers each having a RAID 0 with two drives behind keepalived. Managed to get Galera running to sync DB but I don’t know how I should sync the config and app data. I am using Unison to sync my nextcloud files but am looking for a better solution. Have heard of Gluster but can’t find any guides on how to setup. Already tried Ceph, but the docs were way too confusing.
Any ideas?

hi setting up HA system is not easy and requires a lot of engineering. If there no absolute need for it I always recommend keeping the system simple and avoid HA setups whenever possible (because such installations are really complex to maintain and troubleshoot often without additional value). very frequent backup often provides more value with still acceptable RTO.

I you still want to go this path you must ensure all 3 important components - webserver, database and storage are HA. I would recommend you look at each of the components separate and try to implement them. you could look at object storage like minio for files, you mentioned DB cluster already and kind of container setup like Docker Swarm or Kubernetes for redundant webserver setup.

We had discussions on this topic in the past - maybe some of them help you

Thank you so much for your ideas, I think that I won’t go the HA route and just backup the files. Although, if I only configured the sync between the database and files and not the config and app and web server directory would that still be a plausible solution?

I have created a Unison profile:
root = /var/www/nextcloud
root = ssh://root@192.168.101.193//var/www/nextcloud
ignore = Path config/

auto=true
batch=true
times=true
watch=true

that syncs the nextcloud directory, this seems to work fine, do you think I will encounter any problems in the future?

I don’t know what you are trying to achieve. If your goal is to secure your data - you should setup the full backup as described in the backup docs in a frequence you can afford data loss - e.g. if you can affford loosing 1 day of work setup daily backup… if your goal is one hour the hourly backup. each of 3 important components could have different options e.g. full backup takes long and is resource intensive but you can run differential backups of the storage really fast… DB dump is quite expensive on resource but depending on your goals and knowledge you could e.g. backup transaction logs which allow point-in-time restore of the DB… config doesn’t change frequently so you could backup less frequent… but there is no one size fits all depending on you setup you must find the best way allign the requirements, resource usage, administration efforts to your capabilities.

and just to complete the circle - you should peiodicaly test if your backup is valid and try out the restore procedure.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.