How to deactivate Server side encryption

Hey, I am a new home server user and built a NAS out of an old pc. I am running the newest version of Ubuntu and running the newest version of Nextcloud using Docker. I would like to turn off the server-side encryption but I haven’t found a guide on how to do that with Docker. Is there a guide or commands I can use to turn it off within docker? Thank you for any help

Hi @FleximusRex ,

how familiar are you with docker, do you know how to get a bash /CLI session inside the container? If so, just use the occ commands to switch off encryption described here, relevant for you are

sudo -u www-data php occ encryption:disable
sudo -u www-data php occ encryption:decrypt-all 
sudo -u www-data php occ app:disable encryption
sudo -u www-data php occ encryption:status

where the name of the user www-data may differ, not sure how implemented for the docker images.

If the sudo -u www-data php occ encryption:decrypt-all is not succesful - which had been the case for my installation, but this was not docker and migrated in a row for years - you might take a look into my post here and esp. the mentioned recovery script in Github

1 Like

Hey, thank you so much I should be able to get into the bash. But which container should I bash /CLI into? Master container or another? When I use the command “occ” the terminal says “bash: occ: command not found” but that is using the bash /CLI from the master container. And how do I find my name for “www-data”?

As said, I’m using a “fully installed” nextcloud, but I think your source of info is Nextcloud’s docker container readme., section Using the Nextcloud command-line interface.

Summarized:

  • Nextcloud container (not mysql etc. nested containers)
  • user www-data as above, = Apache owner

On my machine occ is not located in $PATH, so I have to start fully qualified, it’s located directly in Nextcloud’s main folder.

Thank you so much I figured it out using your steps! For a future solution to people who want to disable server-side encryption on nextcloud using docker, this might work for you. Here is what I did:

Install Portainer and follow online guides on how to access it using localhost because it will give you consoles for all docker containers

Navigate to the “nextcloud-aio-nextcloud” container in the containers menu in Portainer and click the console button it should put you to the /var/www/html# path (IT HAS TO BE THIS ONE!! Because it has access to html)

Then type in all the following commands one by one that @michaelof typed above:

sudo -u www-data php occ encryption:disable
sudo -u www-data php occ encryption:decrypt-all
sudo -u www-data php occ app:disable encryption
sudo -u www-data php occ encryption:status

It should give you an output like this:

Warning: Failed to set memory limit to 0 bytes (Current memory usage is 2097152 bytes) in Unknown on line 0
The current PHP memory limit is below the recommended value of 512MB.
Encryption disabled
81240913b295:/var/www/html# sudo -u www-data php occ encryption:decrypt-all

Warning: Failed to set memory limit to 0 bytes (Current memory usage is 2097152 bytes) in Unknown on line 0
The current PHP memory limit is below the recommended value of 512MB.
Server side encryption not enabled. Nothing to do.
81240913b295:/var/www/html# sudo -u www-data php occ app:disable encryption

Warning: Failed to set memory limit to 0 bytes (Current memory usage is 2097152 bytes) in Unknown on line 0
The current PHP memory limit is below the recommended value of 512MB.
encryption 2.14.0 disabled
81240913b295:/var/www/html# sudo -u www-data php occ encryption:status

Warning: Failed to set memory limit to 0 bytes (Current memory usage is 2097152 bytes) in Unknown on line 0
The current PHP memory limit is below the recommended value of 512MB.

  • enabled: false
  • defaultModule: OC_DEFAULT_MODULE

Then using Portainer, select all the containers and hit restart

That’s all! It should disable server-side encryption but that’s what worked for me. You can see if it did by looking in the security section in the admin settings in nextcloud. Thanks to @michaelof for all of his help and contributions! I will revisit this form from time to time to see if anybody is having any trouble but I probably won’t be much help lol.