Nextcloud 20 error: incorrect encryption password

Just upgraded my production (subscription) server to 7.9, and ran into some trouble with Nextcloud. First, after the upgrade, when I browsed to the Nextcloud web UI, I was prompted to complete the upgrade:

I clicked the button, it completed without apparent error, and I was then able to log in. But now, I get a message at the top of every page (I can close it, but it comes back on the next page load) saying, “Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files.”:

So I go to my settings, under Security, and see this:

Well, that’s a bit of a problem–my login password hasn’t changed. So I entered my password in both fields and clicked “Update”. Nothing happened.

So, off to Google, and I find this:

Following that guide (and adapting the occ command to Neth), I find this:

[root@neth ~]# sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ encryption:status
  - enabled: false
  - defaultModule: OC_DEFAULT_MODULE
[root@neth ~]# 

The next step in that guide is to enable encryption (occ encryption:enable), but when I did that, I borked Nextcloud (sadly, I didn’t save the error output). Disabling encryption (occ encryption:disable) produced the same error, as did any other occ command.

So I rolled back to the pre-upgrade snapshot I wisely took, and have repeated the steps above, prior to the occ encryption:enable. The message still appears in Nextcloud. Where to from here?

You manually pushed the upgrade? Why not let the subscription scripts do the hard work (and wait a few more days)?

Check this old issue:

1 Like

No, it notified me of the upgrade when I logged into the web GUI.

I think that had come up in my searching, but I didn’t pay much attention to an almost-three-year-old issue–surely the NC folks would have fixed it by now, right? Apparently not. :angry:

Edit: I only followed the first step there: occ encryption:disable-master-key. I didn’t enable the encryption module; that’s what borked the system the first time. But I’m now able to log on and not see that warning, so I’m calling this solved.

But this was a Nextcloud notification, not a Neth notification?

No, it was a Neth notification.

That’s weird, since I am still on NC19 with my subscription server…

Hi all.
Well the Nethserver update for NextCloud last week caused the same problem again. I haven’t enabled encryption so I’m going to try @danb35 's suggestion of occ encryption:disable-master-key and see if that fixes the annoying error message.

I encountered the same issue. Performed the occ command (I trust Danb35 :wink: ) and issue is gone. Thanks all.

Hi @LayLow .
Thank you for your comment. Yes, it looks like the issue is gone now.