diff --git a/nixos/modules/services/web-apps/nextcloud.xml b/nixos/modules/services/web-apps/nextcloud.xml
index 3af37b15dd56..0d5634e93bfe 100644
--- a/nixos/modules/services/web-apps/nextcloud.xml
+++ b/nixos/modules/services/web-apps/nextcloud.xml
@@ -84,47 +84,93 @@
+
- Pitfalls
+ Common problems
+
+
+
+ General notes
+
+ Unfortunately Nextcloud appears to be very stateful when it comes to
+ managing its own configuration. The config file lives in the home directory
+ of the nextcloud user (by default
+ /var/lib/nextcloud/config/config.php) and is also used to
+ track several states of the application (e.g. whether installed or not).
+
+
+
+ All configuration parameters are also stored in
+ /var/lib/nextcloud/config/override.config.php which is generated by
+ the module and linked from the store to ensure that all values from
+ config.phpcan be modified by the module.
+ However config.php manages the application's state and shouldn't be
+ touched manually because of that.
+
+
+ Don't delete config.php! This file
+ tracks the application's state and a deletion can cause unwanted
+ side-effects!
+
-
- Unfortunately Nextcloud appears to be very stateful when it comes to
- managing its own configuration. The config file lives in the home directory
- of the nextcloud user (by default
- /var/lib/nextcloud/config/config.php) and is also used to
- track several states of the application (e.g. whether installed or not).
-
-
-
- All configuration parameters are also stored in
- /var/lib/nextcloud/config/override.config.php which is generated by
- the module and linked from the store to ensure that all values from config.php
- can be modified by the module.
- However config.php manages the application's state and shouldn't be touched
- manually because of that.
-
-
-
- Don't delete config.php! This file
- tracks the application's state and a deletion can cause unwanted
- side-effects!
-
-
-
- Don't rerun nextcloud-occ
- maintenance:install! This command tries to install the application
- and can cause unwanted side-effects!
-
-
-
- Nextcloud doesn't allow to move more than one major-version forward. If you're e.g. on
- v16, you cannot upgrade to v18, you need to upgrade to
- v17 first. This is ensured automatically as long as the
- stateVersion is declared properly. In that case
- the oldest version available (one major behind the one from the previous NixOS
- release) will be selected by default and the module will generate a warning that reminds
- the user to upgrade to latest Nextcloud after that deploy.
-
+
+ Don't rerun nextcloud-occ
+ maintenance:install! This command tries to install the application
+ and can cause unwanted side-effects!
+
+
+
+
+ Multiple version upgrades
+
+ Nextcloud doesn't allow to move more than one major-version forward. If you're e.g. on
+ v16, you cannot upgrade to v18, you need to upgrade to
+ v17 first. This is ensured automatically as long as the
+ stateVersion is declared properly. In that case
+ the oldest version available (one major behind the one from the previous NixOS
+ release) will be selected by default and the module will generate a warning that reminds
+ the user to upgrade to latest Nextcloud after that deploy.
+
+
+
+
+
+ Error: Command "upgrade" is not defined.
+
+ This error usually occurs if the initial installation
+ (nextcloud-occ maintenance:install) has failed. After that, the application
+ is not installed, but the upgrade is attempted to be executed. Further context can
+ be found in NixOS/nixpkgs#111175.
+
+
+
+ First of all, it makes sense to find out what went wrong by looking at the logs
+ of the installation via journalctl -u nextcloud-setup and try to fix
+ the underlying issue.
+
+
+
+
+ If this occurs on an existing setup, this is most likely because
+ the maintenance-mode is active. It can be deactivated by running
+ nextcloud-occ maintenance:mode --off. It's advisable though to
+ check the logs first on why the maintenance mode was activated.
+
+
+
+ Only perform the following measures on
+ freshly installed instances!
+
+ A re-run of the installer can be forced by deleting
+ /var/lib/nextcloud/config/config.php. This is the only time
+ where this is advisable because the fresh install doesn't have any state that can be lost.
+ In case that doesn't help, an entire re-creation can be forced via
+ rm -rf ~nextcloud/.
+
+
+
+
+