How to manually upgrade Nextcloud
For some reason, my Nextcloud instance doesn't like to be upgraded via integrated updater available in WebUI - I assume it has something to do with running NC behind a reverse proxy, as the error I'm getting is saying that it can't access the site. I may have some variable set in the system that is not pointing to the right (proxied) URL, but I still want to be able to upgrade the system.
CLI to the rescue! It's actually very easy to run the installer - connect to the system via SSH
or console
and position yourself in the appropriate installation folder - in my case that is /var/www/nextcloud
and run the following commad:
/var/www/nextcloud$ sudo -u www-data php8.1 updater/updater.phar --no-interaction
Result should be the output similar to this:
Nextcloud Updater - version: v25.0.3-2-gd49ee0d
Current version is 25.0.7.
Update to Nextcloud 26.0.2 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-26.0.2.zip
Open changelog ↗
Updater run in non-interactive mode.
Start update
Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done
Update of code successful.
Updater run in non-interactive mode - will start "occ upgrade" now.
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
Setting log level to debug
Repair step: Repair MySQL collation
Repair info: Not a mysql database -> nothing to do
Repair step: Repair SQLite autoincrement
Repair step: Copy data from accounts table when migrating from ownCloud
Repair step: Drop account terms table when migrating from ownCloud
Updating database schema
Updated database
Disabled incompatible app: external
Disabled incompatible app: files_fulltextsearch
Disabled incompatible app: groupfolders
Disabled incompatible app: quicknotes
Disabled incompatible app: ransomware_protection
Disabled incompatible app: richdocuments
Updating <lookup_server_connector> ...
Updated <lookup_server_connector> to 1.14.0
Updating <oauth2> ...
Repair step: Update OAuth token expiration times
Updated <oauth2> to 1.14.0
Updating <password_policy> ...
Updated <password_policy> to 1.16.0
Updating <files> ...
Updated <files> to 1.21.1
Updating <activity> ...
Updated <activity> to 2.18.0
Updating <cloud_federation_api> ...
Updated <cloud_federation_api> to 1.9.0
Updating <dav> ...
Repair step: Fix component of birthday calendars
Repair info: 3 birthday calendars updated.
Repair step: Regenerating birthday calendars to use new icons and fix old birthday events without year
Repair info: Repair step already executed
Repair step: Fix broken values of calendar objects
Fix broken values of calendar objects
Starting ...
0/0 [>---------------------------] 0%
Repair step: Registering building of calendar search index as background job
Repair info: Repair step already executed
Repair step: Register building of social profile search index as background job
Repair step: Registering background jobs to update cache for webcal calendars
Repair info: Added 0 background jobs to update webcal calendars
Repair step: Registering building of calendar reminder index as background job
Repair info: Repair step already executed
Repair step: Clean up orphan event and contact data
Repair info: 0 events without a calendar have been cleaned up
Repair info: 0 properties without an events have been cleaned up
Repair info: 0 changes without a calendar have been cleaned up
Repair info: 0 cached events without a calendar subscription have been cleaned up
Repair info: 0 changes without a calendar subscription have been cleaned up
Repair info: 0 contacts without an addressbook have been cleaned up
Repair info: 0 properties without a contact have been cleaned up
Repair info: 0 changes without an addressbook have been cleaned up
Repair step: Remove activity entries of private events
Repair info: Removed 0 activity entries
Repair step: Clean up old calendar subscriptions from deleted users that were not cleaned-up
Clean up old calendar subscriptions from deleted users that were not cleaned-up
Starting ...
0/0 [->--------------------------] 0%
Repair info: 0 calendar subscriptions without an user have been cleaned up
Repair step: Remove invalid object properties
Repair info: 0 invalid object properties removed.
Updated <dav> to 1.25.0
Updating <files_sharing> ...
Repair step: Fix the share type of guest shares when migrating from ownCloud
Repair step: Copy the share password into the dedicated column
Repair step: Set existing shares as accepted
Updated <files_sharing> to 1.18.0
Updating <files_trashbin> ...
Updated <files_trashbin> to 1.16.0
Updating <files_versions> ...
Updated <files_versions> to 1.19.1
Updating <sharebymail> ...
Updated <sharebymail> to 1.16.0
Updating <workflowengine> ...
Repair step: Populating added database structures for workflows
Updated <workflowengine> to 2.8.0
Updating <admin_audit> ...
Updated <admin_audit> to 1.16.0
Updating <comments> ...
Updated <comments> to 1.16.0
Updating <firstrunwizard> ...
Updated <firstrunwizard> to 2.15.0
Updating <notifications> ...
Updated <notifications> to 2.14.0
Updating <theming> ...
Repair step: Failed to clean up the old administration theming images folder
Repair info: Migrating administration images
Repair info: No administration images to migrate
Repair step: Migrate old user accessibility config
Migrate old user accessibility config
Starting ...
0/0 [--->------------------------] 0%
Repair step: Initialize migration of background images from dashboard to theming app
Updated <theming> to 2.1.1
Updating <bruteforcesettings> ...
Updated <bruteforcesettings> to 2.6.0
Updating <contactsinteraction> ...
Updated <contactsinteraction> to 1.7.0
Updating <dashboard> ...
Updated <dashboard> to 7.6.0
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 1.16.0
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 2.7.0
Updating <files_rightclick> ...
Updated <files_rightclick> to 1.5.0
Updating <logreader> ...
Updated <logreader> to 2.11.0
Updating <privacy> ...
Updated <privacy> to 1.10.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 1.16.0
Updating <related_resources> ...
Updated <related_resources> to 1.1.0-alpha1
Updating <serverinfo> ...
Updated <serverinfo> to 1.16.0
Updating <settings> ...
Updated <settings> to 1.8.0
Updating <survey_client> ...
Repair step: Send an admin notification if monthly report is disabled
Updated <survey_client> to 1.14.0
Updating <text> ...
Repair step: Force-reset all Text sessions before Yjs migration
Updated <text> to 3.7.2
Updating <twofactor_backupcodes> ...
Repair step: Add background job to check for backup codes
Updated <twofactor_backupcodes> to 1.15.0
Updating <updatenotification> ...
Updated <updatenotification> to 1.16.0
Updating <viewer> ...
Updated <viewer> to 1.10.0
Update app integration_reddit from App Store
Update app external from App Store
Repair step: Copy default images to the app data directory
Repair info: Icon external.svg already exists
Repair info: Icon external-dark.svg already exists
Repair info: Icon settings.svg already exists
Repair info: Icon settings-dark.svg already exists
Repair step: Copy default images to the app data directory
Repair info: Icon external.svg already exists
Repair info: Icon external-dark.svg already exists
Repair info: Icon settings.svg already exists
Repair info: Icon settings-dark.svg already exists
Repair step: Copy default images to the app data directory
Repair info: Icon external.svg already exists
Repair info: Icon external-dark.svg already exists
Repair info: Icon settings.svg already exists
Repair info: Icon settings-dark.svg already exists
Update app files_fulltextsearch from App Store
Update app groupfolders from App Store
Update app quicknotes from App Store
Update app richdocuments from App Store
Repair step: Repair MySQL collation
Repair info: Not a mysql database -> nothing to do
Repair step: Repair mime types
Repair step: Clean tags and favorites
Repair info: 0 tags of deleted users have been removed.
Repair info: 0 tags for delete files have been removed.
Repair info: 0 tag entries for deleted tags have been removed.
Repair info: 0 tags with no entries have been removed.
Repair step: Repair invalid shares
Repair step: Move .step file of updater to backup location
Repair info: .step file exists
Repair info: .step-previous-update removed
Repair info: .step file moved to .step-previous-update
Repair step: Add move avatar background job
Repair info: Repair step already executed
Repair step: Add preview cleanup background jobs
Repair step: Migrate oauth2_clients table to nextcloud schema
Repair info: Update the oauth2_access_tokens table schema.
Repair info: Update the oauth2_clients table schema.
Repair step: Fix potential broken mount points
Repair info: No mounts updated
Repair step: Repair language codes
Repair step: Add log rotate job
Repair step: Clear frontend caches
Repair info: Image cache cleared
Repair info: JS cache cleared
Repair step: Clear every generated avatar
Repair info: Avatar cache clearing job added
Repair step: Add preview background cleanup job
Repair step: Queue a one-time job to cleanup old backups of the updater
Repair step: Cleanup invalid photocache files for carddav
Repair step: Add background job to cleanup login flow v2 tokens
Repair step: Remove potentially over exposing share links
Repair info: No need to remove link shares.
Repair step: Clear access cache of projects
Repair step: Reset generated avatar flag
Repair step: Keep legacy encryption enabled
Repair step: Check encryption key format
Repair step: Remove old dashboard app config data
Repair step: Add job to cleanup the bruteforce entries
Repair step: Queue a one-time job to check for user uploaded certificates
Repair step: Repair DAV shares
Repair step: Add background job to set the lookup server share state for users
Repair step: Add token cleanup job
Repair step: Clean up abandoned apps
Repair step: Add possibly missing system config
Starting code integrity check...
Finished code integrity check
Update successful
Maintenance mode is kept active
Resetting log level
Updater run in non-interactive mode - will disable maintenance mode now.
Maintenance mode disabled
Maintenance mode is disabled
Member discussion