Disable serverside encryption

Is there a better way to disable serverside encryption besides the following?

occ encryption:decrypt-all

I read some horror stories about files only partially being decrypted and I was hoping to find a process less risky. I have several users in my Nextcloud instance.

The exact procedure is described here: Encryption configuration — Nextcloud latest Administration Manual latest documentation Make sure you execute the commands in the exact order as described in the documentation.

I’m not aware of any other / better way, but make sure you have a backup of all your important files before you start!

I believe the documentation is not up to date anymore.

When I execute

occ encryption:decrypt-all

having activated maintenance mode beforehand, it says that I cannot run that command with maintenance mode activated.

And when I disable encryption before running it, it says “nothing to do” because encryption is already disabled.

I am currently doing a test run on a copied instance running only decrypt-all, let’s see how that goes.

I just tried to run the command in my copied test instance and it ran through without a mistake, encryption is disabled but Nextcloud now shows an internal server error whenever I want to access a file, either by downloading it or using Calibre.

Sorry not sure what causes this… Maybe others here have some ideas or maybe you can search through older posts in the forums or through the issues on GitHub, if you haven’t done so already.

I have, many users face these problems when trying to disable encryption, that was the original reason for starting this thread. I could not find a solution.

There are ways to manually undo the encryption on disk and in the database, but these are cumbersome at best. Another way could be to decrypt the files outside of Nextcloud and create a new installation to which you re-upload the decrypted files.

Yes, I did that, just within the same installation in the end!

I need to disable serverside encryption because it produces an unresolved error on two of my installations.

Unfortunately, I cannot use

occ encryption:decrypt-all

like suggested in the docs, because it produces errors as well.

So, I was wondering if I could do this:

  1. Put everything on Nextcloud into one folder
  2. Use
occ encryption:disable

to disable the encryption module
3. Duplicate the folder on my local installation (laptop) after the encryption is disabled, so that the duplicated folder gets re-uploaded like a new folder.
4. Delete the original folder from Nextcloud and the local installation, as it would create errors in the Nextcloud web interface after finishing to re-upload.

My assumptions are:

  • everything that gets re-uploaded after disabling the encryption is automatically not encrypted, therefore not producing any error
  • even if I disable serverside encryption, files on my local laptop can be accessed
  • the sharing information (e.g. outside links) stay the same

Would this work? Or am I missing something?

What errors?

In case you still have your complete data folder as well as your config file you could try out to decrypt your files outside of Nextcloud: nextcloud-tools/decrypt-all-files.php at master · syseleven/nextcloud-tools · GitHub

Thank you, but I solved the problem by disabling the encryption and then copying all files and folders on my local device, so that all files get uploaded again. Then I deleted the original encrypted versions. It was a bit of a hazzle, but it worked. On the other server, the decrypt-all command worked.

@ekevu

pls don’t open several threads for the same thing. it makes the forum even more chaotic than it already is.
So I integrated thread no. 2 into this one.