Updating NextcloudPi to current 20.0.11 and then to 21.0.3

Process I followed was due to my passwords on all accounts simultaneously expiring + not having automatic renewal of letsencrypt for some reason. Seems cron is not running. Strange, so I decided to fix credentials and update to a more current stable:

  1. Confirm nc-update is current for ncp interface.
  2. letsencrypt manual renewal.
  3. Change nc-admin password from the panel.
    • “invalid parameters” error as space characters are not supported, so adjusted password.
  4. Prune older backups to recover disk space.
  5. Update to 20.0.11 automatically began upon login to webui as admin.
  6. nc-update-nc-apps to manually update all apps.
    • No output displayed, but I see the apps have not actually updated when manually directed via 4443 or ncpconfig.
    • auto updates are enabled, but not working.
  7. Update to 21.0.3 manually from /settings/admin/overview
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>504 Gateway Timeout</title>
</head><body>
<h1>Gateway Timeout</h1>
<p>The gateway did not receive a timely response
from the upstream server or application.</p>
</body></html>

Now an error crops up under /settings/admin/overview
Error occurred while checking server setup

Take a break to drink some water… and repeating the update magically now works a few minutes later.
21-update

Update fails…

Update app "polls" from appstore
Repair step: Polls - Remove indices and foreign key constraints
Repair step: Polls - Delete duplicates and orphaned records
Repair step: Polls - Create indices and foreign key constraints
An error occurred.
  1. Disable Maintenance Mode, then update process continues…
Polls (polls)
Please make sure that the database, the config folder and the data folder have been backed up before proceeding. 
Preparing update
Set log level to debug
Turned on maintenance mode
Repair step: Repair MySQL collation
Repair info: All tables already have the correct collation -> 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
Repair step: Polls - Remove indices and foreign key constraints
Repair step: Polls - Delete duplicates and orphaned records
Repair step: Polls - Create indices and foreign key constraints
An error occurred.
Please reload the page.
  1. Disable Maintenance Mode again and reload. Attempt update to 21.0.3 again… lol, it says it has already succeeded.
    image
The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.

    Missing index "fs_size" in table "oc_filecache".
  1. $ sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices

Your version is up to date.

  1. 17 apps have an update available
    …admin Update all

  2. 5 apps have an update available
    …admin Update all

An error occured during the request. Unable to proceed.:heavy_multiplication_x:

  1. Now I see a ton of these under /settings/apps/disabled:
    image

Reloaded the browser and now all of those are gone… everything is enabled again.

Does the high performance backend work on nextcloudpi? Support for optional Files HPB in v21 · Issue #1266 · nextcloud/nextcloudpi · GitHub

so you suggest doing the upgrade to nc21 manually rather than waiting on ncp to cover the update process?

No, just manually testing it. Wouldn’t recommend it since I still need to setup notify_push and make changes to php.

Best to wait for the official release from ncp.

1 Like

I agree.
But what about Release v1.37.1: ncp-app: bump to NC21 · nextcloud/nextcloudpi · GitHub ? It says “Bump to NC21”…

Once the update is released you’ll be able to auto-update to it or install from webui on :4443 or from ncp-config.

i know. But I was just wondering what that meant. though it didn’t end up in a new ncp-release-number