Out of the box, Nextcloud servers do not run with server-side encryption. Follow these steps to enable an extra layer of security for Nextcloud.
If you’re a stickler for data security (and you should be), you know how important it is to lock down the data on your servers. Although you might be content with your firewall and the other, sundry turnkey solutions you have in place, that is no reason to leave data exposed. This includes the data on your Nextcloud server.
Out of the box, Nextcloud servers encrypt remote data (such as from Dropbox and Google), but your local storage is saved sans encryption. To some users, that is unacceptable. Fortunately, the developers of Nextcloud make it possible to enable server-side encryption. Even though the encryption does increase the file size by 35%, this should be a must-have for anyone concerned about security.
Let’s walk through the steps of enabling server-side encryption. For this fairly simple process, you’ll need administrator credentials for your Nextcloud account. Note: Once you enable server-side encryption, you cannot disable it from within the Nextcloud admin dashboard (however, it is possible using the occ command). This means you must ensure that users’ encryption keys are regularly backed up. If an encryption key is lost (for whatever reason), that user’s data cannot be accessed.
For your convenience, encryption keys are stored in these locations:
If you open a terminal window and change to your /var/www/nextcloud/data/ directory, you’ll notice the files_encryption file doesn’t exist. To generate those keys, we must enable encryption.
SEE: Three ways encryption can safeguard your cloud files (Tech Pro Research)
Figure A
Figure B
A warning will appear that you should definitely read. This is gist of the warning:
If you’re okay with those warnings, click the Enable Encryption button.
Log out of Nextcloud and log back in–your keys will be initiated, and server-side encryption will be enabled. If you go back to the command line and check out /var/www/nextcloud/data and /var/www/nextcloud/data/USER (USER is an actual Nextcloud user), you’ll see the files_encrypted key file.
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.
As long as you have solid security on your network, and the server hosting Nextcloud is secure, after enabling server-side encryption, you can rest easy(ish) that your data is safe.
Always remember to do regular backups, and be vigilant about monitoring logs and running updates.