Skip to main content

Error message : Update needed

Error message;  (when loading nextcloud frontend)

Update needed
Please use the command line updater because updating via browser is disabled in your config.php.


After updating Nextcloud to new version, it gave me that error message. 

Basically, you need to update the database to work with the new version. Here is how to do that. 

. Access the Nextcloud Container

  • Find your Nextcloud container name or ID:
    • Find your container name "docker ps"

Look for the container running nextcloud:30 (or whichever version).

  • Access the container’s shell:
    docker exec -it <nextcloud_container_name> bash

Run the Updater

  • Inside the container, switch to the www-data user (Nextcloud’s default user): (this may not work. you may not need it anyway).
    su - www-data

  • Navigate to the Nextcloud directory (usually /var/www/html): (you might be there already)
    cd /var/www/html

     

  • Run the occ command to perform the update:
    php occ upgrade

If that worked, great! your dont with the update.

The first time I did this, it did not work. 
     You may need to take it off of maintenance mode in order to try it again.

Removing maintenance mode:

Inside the docker container, in the /var/www/html directory 

php occ maintenance:mode --off
now try the update again.