First check if encryption is enabled.
sudo -u www-data php occ encryption:status
Cannot load Zend OPcache - it was already loaded
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
Nextcloud is in maintenance mode - no app have been loaded
- enabled: true
- defaultModule: OC_DEFAULT_MODULE
Then double check if the default encryption module is set.
# sudo -u www-data php occ encryption:set-default-module OC_DEFAULT_MODULE
Cannot load Zend OPcache - it was already loaded
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
"OC_DEFAULT_MODULE"" is already the default module
Then start the encryption.
sudo -u www-data php occ encryption:encrypt-all
Cannot load Zend OPcache - it was already loaded
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
Nextcloud is in maintenance mode - no app have been loaded
You are about to encrypt all files stored in your Nextcloud installation.
Depending on the number of available files, and their size, this may take quite some time.
Please ensure that no user accesses their files during this time!
Note: The encryption module you use determines which files get encrypted.
Do you really want to continue? (y/n) y
[OC\Encryption\Exceptions\ModuleDoesNotExistsException]
Default encryption module not loaded
encryption:encrypt-all
Due to maintenance mode, which is recommended, the encryption module is not loaded. So encryption is not possible.
Nothing happens.
OS: Raspbian GNU/Linux 9 (stretch)
Apache 2.4
MySQL 5.8
PHP 7
Nextcloud 12.0.6
cc @nextcloud/encryption
I'm also having an issue with this. Has there been any update
+1
I'm having the same issue
Maintenance mode gets enabled automatically when starting the encryption via occ encryption:encrypt-all.
It just doesn't work if it is enabled manually beforehand, so actually just the documentation needs to be adapted.
Thank you @haeringer you're right.
Just disable maintenance mode before run occ encryption:encrypt-all .
Most helpful comment
Maintenance mode gets enabled automatically when starting the encryption via
occ encryption:encrypt-all.It just doesn't work if it is enabled manually beforehand, so actually just the documentation needs to be adapted.