How to configure a second Nextcloud Web Server for HA - initial setup fails because user already exists

Hello,

We are running Nextcloud 14.03 on MariaDB 10.3 with a Galera Master/Slave configuration.

We have the first Webserver built and connected to the database without issue.

However, when attempting to create the second webserver it takes us to the initial configuraton page and that wont complete because the users already exist etc.

Any suggestions?

just copy the config.php from the first one?

1 Like

I notice you ended that with a ? How much of that was a guess? :slight_smile:

I’m guessing 100 percent qualified guess based on your very sparse description of your situation. Did you try Reiner_Nippes suggestion?

  • i’m not sure if there exists any parameter to tell nextcloud that it’s running as a HA cluster.
  • i’m not sure if it’s not better to share the config file. so both cluster member have always the same config. and then i wouldn’t know how to update. because the nextcloud version is a parameter in the config.

First of all you need a shared storage for your /data. Anything else is quite easy as @Reiner_Nippes mentioned. Just copy your nextcloud folder around all nodes and put a Load Balancer in front of it. The Load Balancer should be also redundant.

I’m running a setup with 7 Webservers, 3 DB servers, Redis for cluster-wide locking and PHP sessions and a NFS as shared storage for ~7.000 users.

I use a git repo (self-hosted Gitlab) to deploy nextcloud to webservers.

This setup works since OC 6.

Regards
Timm

1 Like

Don’t server names etc have to be changed in these files? What about the hashed passwords?

I did try copying the config.php over and added the new lines, but I’m getting an internal server error when accessing the page.

And we are connecting to shared NFS storage.

How do you keep all of your servers identical as far as apps and everything go?

Is there anything specific to the server in the Nextcloud folder that needs to be adjusted prior to bringing up another server or is it just a straight copy?

With this setup, do you need to worry about the Instance ID in the config.php file?

timm2k, Thank you.

We are using Redis with the file locking option, is that the same as “Cluster-wide locking”.

How do you handle adding new apps to the webservers? Are you adding them to your git repo and then just rebooting?

Are there any resources you might be able to point us to for the gitlab setup and how you are copying that folder over on boot?