Disable server-side-encryption


I activated the server-side encryption a long time ago. I would like to deactivate the encryption now and am afraid that the data will no longer be readable afterwards.

Does anyone have experience with this? Is it possible to deactivate the encryption without any problems?

I tried that before (i dont know the NC Version anymore), and it went wrong. Some files were not decrypted. Then I used a script (from Github, dont know the URL anymore) from a user to decrypt the individual files. But the decryption did not always work with the script either.

In Nextcloud I get the Warning to disable the encryption too.

  • Das alte serverseitige Verschlüsselungsformat ist aktiviert. Wir empfehlen, es zu deaktivieren. Für weitere Einzelheiten sehen Sie bitte in die Dokumentation.

I am running NC 21.0.5 and have ~40 User and ~1.200GB of data.

Can someone tell me how to do to disable the server-side encryption and whether it works without any problems?


Disabling encryption

If you need to disable encryption, there’s only one way to do so. Before you do, make certain you have backups of all the files_encrypted files for all users and the system.

Here are the steps to disable encryption.

  1. Open a terminal.
  2. Change to the Nextcloud directory with the command cd /var/www/html/nextcloud
  3. Switch the Nextcloud maintenance mode to on with the command sudo -u www-data php occ maintenance:mode --on
  4. Disable encryption with the command sudo -u www-data php occ encryption:disable
  5. Turn off maintenance mode with the command sudo -u www-data php occ maintenance:mode --off

Source (outdated): https://www.techrepublic.com/article/how-to-enable-server-side-encryption-in-nextcloud/