Q: Which NC folders to keep in sync for failover?

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 27.0.1
Operating system and version (eg, Ubuntu 20.04): Docker

The issue you are facing:

I have a NC server up and running and would like to create a 2nd server for failover. For that I need to copy all config data (users, passwords, installed apps, etc) → which folders do I need to keep in sync?

Steps to replicate it:

  1. NC1 and NC2 should be in sync in case NC1 goes down
  2. Periodically sync all config data (and user data) from NC1 → NC2

The output of your Nextcloud log in Admin > Logging:


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):


The output of your Apache/nginx/system log in /var/log/____:



Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.


In theory it is mainly the data folder with the user data. The config-file is important as well, but it shouldn’t change that often. The apps folder is similar, if you can sync the update of apps on both systems.

However, the database is very important and if you get a difference here, it will become chaotic.

Also think about how you switch back to NC1, that you sync the other way around correctly.

Thanks. Does the config folder hold the NC configuration or the database? It happened to me once that I had a server up and running, then took a back up and restore but when opening NC a new installation procedure was triggered. So somehow the server did not realise that it had apps etc already installed. I want to avoid that experience and hence really need to understand the locations of the NC config data.

the config file is just the config file. The database is elsewhere, but it is specified in the config file.