Upgrade to nextcloud30 fails

Nextcloud v29 is running fine. Now, I’m trying to update to v30, but it fails. Here’s my config:

{
  lib,
  config,
  pkgs,
  infrastructure,
  ...
}: {
  options.parts.nextcloud = lib.mkEnableOption "Nextcloud";
  # Beware that most of this config is only used initially and not
  # necessarily in sync with the actual system. This includes stuff
  # like passwords, but even the location of where the data is stored!
  config = lib.mkIf config.parts.nextcloud {
    services.nextcloud = {
      enable = true;
      package = pkgs.nextcloud30;
      hostName = "cloud.${infrastructure.homelab.publicDomain}";
      database.createLocally = true;
      config = {
        adminpassFile = config.age.secrets.nextcloudAdminPass.path;
      };
      settings = {
        trusted_domains = ["cloud.m-testserver" "cloud.localhost" config.services.nextcloud.hostName];
      };
      https = true;
      home = "/mnt/data/nextcloud";
    };

    services.nginx.virtualHosts.${config.services.nextcloud.hostName} = {
      forceSSL = true;
      enableACME = true;
      acmeRoot = null;
    };

    networking.firewall.allowedTCPPorts = [80 443];
  };
}

as nextcloud requires, unfortunately, this is not a true source of truth and I had to manually move things around. In particular, the home has been moved manually. It’s actually symlinked from the old location. I’m not sure if this could be causing the issue

journalctl -xeu nextcloud-setup | cat
Dez 09 18:27:03 m-testserver systemd[1]: Starting nextcloud-setup.service...
░░ Subject: A start job for unit nextcloud-setup.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit nextcloud-setup.service has begun execution.
░░ 
░░ The job identifier is 153.
Dez 09 18:27:05 m-testserver nextcloud-setup-start[1253]: Nextcloud is already latest version
Dez 09 18:27:05 m-testserver nextcloud-setup-start[1426]: System config value trusted_domains deleted
Dez 09 18:27:06 m-testserver nextcloud-setup-start[1552]: System config value trusted_domains => 0 set to string cloud.mhomelab.de
Dez 09 18:27:06 m-testserver nextcloud-setup-start[1565]: System config value trusted_domains => 1 set to string cloud.mhomelab.de
Dez 09 18:27:07 m-testserver nextcloud-setup-start[1572]: System config value trusted_domains => 2 set to string cloud.m-testserver
Dez 09 18:27:07 m-testserver nextcloud-setup-start[1579]: System config value trusted_domains => 3 set to string cloud.localhost
Dez 09 18:27:08 m-testserver nextcloud-setup-start[1586]: System config value trusted_domains => 4 set to string cloud.homelserver.lan
Dez 09 18:27:08 m-testserver systemd[1]: nextcloud-setup.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit nextcloud-setup.service has successfully entered the 'dead' state.
Dez 09 18:27:08 m-testserver systemd[1]: Finished nextcloud-setup.service.
░░ Subject: A start job for unit nextcloud-setup.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit nextcloud-setup.service has finished successfully.
░░ 
░░ The job identifier is 153.
Dez 09 18:27:08 m-testserver systemd[1]: nextcloud-setup.service: Consumed 3.602s CPU time, 133.4M memory peak, 79.9M read from disk.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit nextcloud-setup.service completed and consumed the indicated resources.
Dez 10 19:43:10 m-testserver systemd[1]: Starting nextcloud-setup.service...
░░ Subject: A start job for unit nextcloud-setup.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit nextcloud-setup.service has begun execution.
░░ 
░░ The job identifier is 27679.
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: An unhandled exception has been thrown:
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: TypeError: OCA\Theming\Service\BackgroundService::__construct(): Argument #3 ($config) must be of type OCP\IConfig, OC\AppConfig given, called in /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/Server.php on line 1154 and defined in /nix/store/ikxpaq7kjdhpr4w7cgl1n28kc2gvlhg6-nextcloud-29.0.7/apps/theming/lib/Service/BackgroundService.php:186
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: Stack trace:
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #0 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/Server.php(1154): OCA\Theming\Service\BackgroundService->__construct(Object(OC\Files\Node\LazyRoot), Object(OC\Files\AppData\AppData), Object(OC\AppConfig), Object(OC\AllConfig), NULL)
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #1 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(153): OC\Server->OC\{closure}(Object(OC\Server))
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #2 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #3 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(120): Pimple\Container->offsetGet('ThemingDefaults')
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #4 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/ServerContainer.php(155): OC\AppFramework\Utility\SimpleContainer->query('ThemingDefaults', true)
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #5 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(42): OC\ServerContainer->query('ThemingDefaults')
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #6 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/Console/Application.php(37): OC\AppFramework\Utility\SimpleContainer->get('ThemingDefaults')
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #7 [internal function]: OC\Console\Application->__construct(Object(OC\AllConfig), Object(OC\EventDispatcher\EventDispatcher), Object(OC\AppFramework\Http\Request), Object(OC\Log\PsrLoggerAdapter), Object(OC\MemoryInfo), Object(OC\App\AppManager))
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #8 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(61): ReflectionClass->newInstanceArgs(Array)
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #9 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(106): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #10 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(124): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Console\\Appl...')
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #11 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/ServerContainer.php(155): OC\AppFramework\Utility\SimpleContainer->query('OC\\Console\\Appl...', true)
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #12 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(42): OC\ServerContainer->query('OC\\Console\\Appl...')
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #13 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/public/Server.php(39): OC\AppFramework\Utility\SimpleContainer->get('OC\\Console\\Appl...')
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #14 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/console.php(77): OCP\Server::get('OC\\Console\\Appl...')
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #15 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/occ(11): require_once('/nix/store/nlpj...')
Dez 10 19:43:10 m-testserver nextcloud-setup-start[114049]: #16 {main}
Dez 10 19:43:10 m-testserver systemd[1]: nextcloud-setup.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ An ExecStart= process belonging to unit nextcloud-setup.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
Dez 10 19:43:10 m-testserver systemd[1]: nextcloud-setup.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit nextcloud-setup.service has entered the 'failed' state with result 'exit-code'.
Dez 10 19:43:10 m-testserver systemd[1]: Failed to start nextcloud-setup.service.
░░ Subject: A start job for unit nextcloud-setup.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit nextcloud-setup.service has finished with a failure.
░░ 
░░ The job identifier is 27679 and the job result is failed.
Dez 10 19:43:10 m-testserver systemd[1]: nextcloud-setup.service: Consumed 335ms CPU time, 32M memory peak, 6.8M read from disk.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit nextcloud-setup.service completed and consumed the indicated resources.
Dez 10 19:49:12 m-testserver systemd[1]: Starting nextcloud-setup.service...
░░ Subject: A start job for unit nextcloud-setup.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit nextcloud-setup.service has begun execution.
░░ 
░░ The job identifier is 30606.
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: An unhandled exception has been thrown:
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: TypeError: OCA\Theming\Service\BackgroundService::__construct(): Argument #3 ($config) must be of type OCP\IConfig, OC\AppConfig given, called in /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/Server.php on line 1154 and defined in /nix/store/ikxpaq7kjdhpr4w7cgl1n28kc2gvlhg6-nextcloud-29.0.7/apps/theming/lib/Service/BackgroundService.php:186
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: Stack trace:
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #0 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/Server.php(1154): OCA\Theming\Service\BackgroundService->__construct(Object(OC\Files\Node\LazyRoot), Object(OC\Files\AppData\AppData), Object(OC\AppConfig), Object(OC\AllConfig), NULL)
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #1 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(153): OC\Server->OC\{closure}(Object(OC\Server))
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #2 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #3 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(120): Pimple\Container->offsetGet('ThemingDefaults')
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #4 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/ServerContainer.php(155): OC\AppFramework\Utility\SimpleContainer->query('ThemingDefaults', true)
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #5 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(42): OC\ServerContainer->query('ThemingDefaults')
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #6 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/Console/Application.php(37): OC\AppFramework\Utility\SimpleContainer->get('ThemingDefaults')
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #7 [internal function]: OC\Console\Application->__construct(Object(OC\AllConfig), Object(OC\EventDispatcher\EventDispatcher), Object(OC\AppFramework\Http\Request), Object(OC\Log\PsrLoggerAdapter), Object(OC\MemoryInfo), Object(OC\App\AppManager))
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #8 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(61): ReflectionClass->newInstanceArgs(Array)
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #9 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(106): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #10 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(124): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Console\\Appl...')
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #11 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/ServerContainer.php(155): OC\AppFramework\Utility\SimpleContainer->query('OC\\Console\\Appl...', true)
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #12 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/private/AppFramework/Utility/SimpleContainer.php(42): OC\ServerContainer->query('OC\\Console\\Appl...')
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #13 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/lib/public/Server.php(39): OC\AppFramework\Utility\SimpleContainer->get('OC\\Console\\Appl...')
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #14 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/console.php(77): OCP\Server::get('OC\\Console\\Appl...')
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #15 /nix/store/nlpjws6nax23cbwjfaxa4c6jbkncwa79-nextcloud-30.0.2/occ(11): require_once('/nix/store/nlpj...')
Dez 10 19:49:13 m-testserver nextcloud-setup-start[143096]: #16 {main}
Dez 10 19:49:13 m-testserver systemd[1]: nextcloud-setup.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ An ExecStart= process belonging to unit nextcloud-setup.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
Dez 10 19:49:13 m-testserver systemd[1]: nextcloud-setup.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit nextcloud-setup.service has entered the 'failed' state with result 'exit-code'.
Dez 10 19:49:13 m-testserver systemd[1]: Failed to start nextcloud-setup.service.
░░ Subject: A start job for unit nextcloud-setup.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit nextcloud-setup.service has finished with a failure.
░░ 
░░ The job identifier is 30606 and the job result is failed.

Ideas are appreciated

It looks like this happens due to the shipped theming app not being updated

Not really sure how to solve this properly in the case of NixOS though unfortunately — had to stay on Nextcloud 29

@mvb were you able to eventually resolve the issue somehow?

This is because you have apps installed. Look in your config directory, within services.nextcloud.datadir. There, in config.php, I had the following lines:

<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/nix/store/4pp86vcznglczy3a12x931ykyx4sqliw-nextcloud-30.0.11-with-apps/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/nix/store/4pp86vcznglczy3a12x931ykyx4sqliw-nextcloud-30.0.11-with-apps/nix-apps',
      'url' => '/nix-apps',
      'writable' => false,
    ),
    2 =>
    array (
      'path' => '/nix/store/4pp86vcznglczy3a12x931ykyx4sqliw-nextcloud-30.0.11-with-apps/store-apps',
      'url' => '/store-apps',
      'writable' => true,
    ),
  ),

These lines inject the path to the previous installation into the occ script, causing it to fail. There is also an override.config.php which is a symlink:

$ readlink override.config.php
/nix/store/346p44yd8m5hl92sll1n0qxifhvrmypr-nextcloud-config.php

The linked file contains the same outdated paths.

What you need to do is

  • replace the symlink with the one to the new nextcloud-config.php file that has been generated for the new version. There is supposedly a clever way to figure out its path, but I simply did ls /nix/store/*-nextcloud-config.php and looked into the resulting files until I found the one with the correct version.
  • replace the paths in config.php with the new ones. just take the path from the nextcloud-config.php file you just found.
  • Re-run the migration to the new version (e.g. via nixos-rebuild switch or whatever you use).

This worked for me. Here’s a diff to demonstrate the changes:

--- config.php.old	2025-08-09 12:45:12.936995162 +0200
+++ config.php	2025-08-09 12:49:04.177605584 +0200
@@ -4,19 +4,19 @@
   array (
     0 =>
     array (
-      'path' => '/nix/store/4pp86vcznglczy3a12x931ykyx4sqliw-nextcloud-30.0.11-with-apps/apps',
+      'path' => '/nix/store/87q148gn0q98b7myjy3cr0x2dixib98w-nextcloud-31.0.7-with-apps/apps',
       'url' => '/apps',
       'writable' => false,
     ),
     1 =>
     array (
-      'path' => '/nix/store/4pp86vcznglczy3a12x931ykyx4sqliw-nextcloud-30.0.11-with-apps/nix-apps',
+      'path' => '/nix/store/87q148gn0q98b7myjy3cr0x2dixib98w-nextcloud-31.0.7-with-apps/nix-apps',
       'url' => '/nix-apps',
       'writable' => false,
     ),
     2 =>
     array (
-      'path' => '/nix/store/4pp86vcznglczy3a12x931ykyx4sqliw-nextcloud-30.0.11-with-apps/store-apps',
+      'path' => '/nix/store/87q148gn0q98b7myjy3cr0x2dixib98w-nextcloud-31.0.7-with-apps/store-apps',
       'url' => '/store-apps',
       'writable' => true,
     ),

As always, be sure to do a backup before fiddling with stuff.

1 Like

wow, that actually worked, thank you!
I already tried fixing these paths in config.php, but didn’t think to check override.config.php, and that finally did the trick

that said, what should I do to prevent such problems in the future? are links to the /nix/store for apps in the config.php even supposed to be there?

it’s just that I’m now trying to upgrade further to nextcloud31 and I’m getting a similar error. I’m guessing it can be resolved the same way, but it would be nice to upgrade nextcloud with just a rebuild as usual without further manual intervention

would removing the apps from the nextcloud store and switching to declarative apps help?

1 Like

As a datapoint, I’ve been running nextcloud that way for years now and never had any issues updating.

I ran into this problem with declarative apps, so… not necessarily.

I think this is a problem that should be fixed in the migration script. It might be enough to switch the override config (what we did manually) before running the update. I am not entirely sure whether you actually need to modify config.php because I don’t know how the override mechanism works – it might be that the paths are never followed because they are overridden.

I think I’ve finally figured it out — the problem is indeed with the override.config.php symlink not being updated (according to the nextcloud docs, this file would take precedence over the usual config.php)

The reason it wasn’t being updated actually turned out to be documented in the NixOS manual. In my case I have all my nextcloud data on a separate drive in /mnt/hdd/nextcloud, and while this directory itself (and all of its contents) was properly owned by nextcloud:nextcloud, /mnt/hdd was owned by my user and systemd-tmpfiles didn’t like that:
systemd-tmpfiles[76767]: Detected unsafe path transition /mnt/hdd (owned by elk) → /mnt/hdd/nextcloud (owned by nextcloud) during canonicalization of mnt/hdd/nextcloud.

After fixing the owner of /mnt/hdd to be root:root I rolled back to nextcloud30 (in the config), rebuilt, and then changed it to nextcloud31 and rebuilt again. Now I have successfully updated to Nextcloud 31 without manually changing config.php or override.config.php

3 Likes

Great detective work! My setup is similar so this was also my problem:

NextCloud was on /srv/nextcloud with proper ownership, but /srv had nginx:nginx.

1 Like