Nextcloud offers three layers of encryption: transport encryption (TLS), Server-Side Encryption (SSE) and End-to-End Encryption (E2EE). Which one fits when, and what we run at Linuxfabrik.
Protects against eavesdropping on the wire. Does not protect against compromised devices or servers. Mandatory for any Nextcloud installation.
Optional. Each file is encrypted with a unique key before storage: either with a master key (default, for performance and feature reasons) or with a per-user key. SSE encrypts file contents only, not filenames or folder structure.
SSE was originally introduced to safely connect external storage like Dropbox: Nextcloud then ensures that data stored off-site lands encrypted.
The master key (technically a password used to decrypt the files) is encrypted with the secret in config.php and stored in the Nextcloud data directory. It can be recovered in a disaster scenario.
Per-user keys live in each user's data directory and are encrypted with the user's password. With per-user keys enabled, online office (Collabora, OnlyOffice) cannot work because the server-side process cannot decrypt the file without the user session.
If the data directory is on the same machine as Nextcloud, the protection is minimal: the key ends up next to the data. To hide content from the server operator, E2EE is the right tool, not SSE.
The strongest protection for user data. The server never has access to keys or unencrypted files. The sync client encrypts the data before upload, but only inside the E2E-marked folder (not its subfolders).
Inside E2EE folders, the following stop working:
The search index doesn't know the content because the server simply doesn't see it. E2E can be enabled for one or many folders: their content is fully hidden from the server, including filenames and directory structure.
To sync folders across multiple devices, users need a mnemonic passphrase, generated by the first device when E2EE is enabled: 12 random English words (BIP39-style wordlist, generated with WordList::getRandomWords(12) in the desktop client).
Files dropped into that folder will only be uploaded encrypted from now on. Any number of folders can be encrypted.
Running SSE with per-user encrypted directories together with E2EE is technically possible but unsupported and leads to problems.
Whatever method is in use, only files are encrypted. Calendars, todo lists and other DAV-based data are not encrypted, because the CalDAV ecosystem lacks clients that support it.
We leave the decision to the on-site server administrator.
Need help with the encryption strategy of your Nextcloud? Have a look at our Service & Support plans and get in touch.