Please use the command line updater because automatic updating is disabled in the config.php

I have a built the VM (so not in a VM, running on host os, Ubuntu Server 20 LTS) nextcloud and get this error after restarting my machine:

I am able to ssh into my machine, and try to manually run /var/scripts/update.sh and get no apparent errors:

Fetching latest packages with apt...
[/] Setting secure permissions...
Creating possible missing Directories
[-] chmod Files and Directories
[-] chown Directories
[/] chmod/chown .htaccess
[-] Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
System config value log_type set to string file
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
System config value logfile set to string /var/log/nextcloud/nextcloud.log
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
System config value loglevel set to string 2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Trying to upgrade the Redis PECL extension...
Getting current PHP-version...
PHPVER=7.4
Updating channel "pecl.php.net"
Channel "pecl.php.net" is up to date

Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 187
PHP Notice:  Trying to access array offset on value of type bool in /usr/share/php/PEAR/REST.php on line 187

Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 187
PHP Notice:  Trying to access array offset on value of type bool in /usr/share/php/PEAR/REST.php on line 187

Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 187
PHP Notice:  Trying to access array offset on value of type bool in /usr/share/php/PEAR/REST.php on line 187

Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 187
PHP Notice:  Trying to access array offset on value of type bool in /usr/share/php/PEAR/REST.php on line 187

Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 187
PHP Notice:  Trying to access array offset on value of type bool in /usr/share/php/PEAR/REST.php on line 187
Nothing to upgrade
Trying to upgrade igbinary, smbclient, and APCu...
Nothing to upgrade
Nothing to upgrade
Nothing to upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-58-generic
Found initrd image: /boot/initrd.img-5.4.0-58-generic
Found linux image: /boot/vmlinuz-5.4.0-56-generic
Found initrd image: /boot/initrd.img-5.4.0-56-generic
done
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Maintenance mode already disabled
Trying to automatically update all Nextcloud apps...
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Posting notification to users that are admins, this might take a while...
Posting 'You've got app updates!' to: nuke
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade

                                                                  
  There are no commands defined in the "notification" namespace.  
                                                                  

Checking for new Nextcloud version...
You already run the latest version! (20.0.3)

I also have tried the manual CLI upgrate command listed here: https://docs.nextcloud.com/server/20/admin_manual/maintenance/manual_upgrade.html

Now the web UI is back, but…

sudo -u www-data php occ upgrade

...

Disabled incompatible app: appointments
Disabled incompatible app: apporder
Disabled incompatible app: breezedark
Disabled incompatible app: bruteforcesettings
Disabled incompatible app: calendar
Disabled incompatible app: contacts
Disabled incompatible app: documentserver_community
Disabled incompatible app: extract
Disabled incompatible app: files_accesscontrol
Disabled incompatible app: files_markdown
Disabled incompatible app: forms
Disabled incompatible app: groupfolders
Disabled incompatible app: mail
Disabled incompatible app: onlyoffice
Disabled incompatible app: previewgenerator
Disabled incompatible app: socialsharing_email
Disabled incompatible app: tasks
Disabled incompatible app: twofactor_totp
Updating <photos> ...

Now the UI is up, but 2FA is broken! So I can’t get into the admin account. What to do?

Thanks!

1 Like
sudo -u www-data php occ app:install twofactor_totp

# OR

sudo -u www-data php occ app:enable twofactor_totp

This got it back up and enabled.