Clustered Nextcloud

Hi everyone,
I found several old topics on the subject and was wondering if there is any up to date documentation on the subject?

My goal is to setup a nextcloud/mail system for my (extended) family self hosting machines by the different family members (freeing us from google etc) thus automatically having our data backed up at different locations.

My assumption is that for auth some source truth would be needed, clustered LDAP seems the obvious choice there.

Backend data lives in MariaDB/MySQL/PostgreSQL all of which have support for clustering as far as I know which would only leave file data which is a harder thing if writing can happen from any node (if only one is primary and the others are just failover it’s less of a big deal).

isn’t that covered by nextcloud itself? i understood file locks are handled either in the db or redis.

nevertheless are you sure you need the big solution?

my playbook would setup nextcloud in 30 min. backup is already included. (restore has to be manually done.) so if you have a cold standby server you could setup and restore a nextcloud server in about an hour.

I’m not sure, part of me says just get stuff going and expand as needed.

But I also suspect that if I am to convince my family to stop letting their privacy be violated by the various companies the solution I need to provide needs to be robust.

//Also as my day job is doing this stuff at scale or thinking about doing it in a way that will scale when needed my tendency is to look that way.

1 Like

Also when I was thinking about it I though I wanted user data to somehow be stored in NFS shares so that www-data doesn’t have access to it as long as a user doesn’t log in. But that would mean creating shell accounts for all family members which may also not be a great idea.

Choices choices, I think I’m over engineering :grimacing:

at work we use to say: if you want trouble, install a cluster.

i’m running two nextclouds based on my docker playbook with auto update. so far nor problems.

about nfs shares: nextcloud (www-data) needs access to these files. all the time. so what is plan with shell access?

When the user data is not in the nextcloud/data folder but in “external storage” folders then nextcloud only has access to that data while the user is logged in through their session so the idea would be that on nextcloud the user has a quota that is low and a bunch of external storage folders.

I can even imagine doing en “External Storage” mount of localhost just so files get written and stored with the real uid/gid instead of www-data.

well. i don’t see any advantage in this complexity, but may i missed the point.

for the brave: ha & scaleout