Nextcloud server-side and end-to-end encryption

Choosing the right Nextcloud encryption model depends on who must be unable to read stored files, and on which features you need to keep working.

On this page

Which Nextcloud encryption model fits who must be unable to read the data

Nextcloud offers server-side encryption with a master key or with per-user keys, plus end-to-end encrypted folders, and the right choice depends on the trust boundary you must enforce. Start by naming who must be unable to read the data: the server operator who runs the hosts, Nextcloud administrators who manage accounts and apps, or only end users. Each answer points to a different layer. The security team should record that decision in the threat model before anyone changes encryption settings, because switching models later can require migrating existing data.

Server-side encryption protects files at rest inside the Nextcloud data layer, so the server can still read them whenever it needs to. With a master key, one key managed by the server encrypts data for all users. This simplifies administration and recovery, but administrators with server access remain in a position to read content. With per-user keys, each user's key is protected by that user's credentials, which narrows exposure to what a logged-in session or a recovery mechanism can reach. Confirm in the admin manual for your release exactly what administrators can do, how recovery keys work and where key material is stored, because those details determine who the model actually keeps out.

End-to-end encrypted folders move the keys to the user's client devices, so the server stores ciphertext and the operator and administrators cannot read those files through the web interface or the server itself. This is the strongest answer to the question of who must be unable to read the data, but it carries costs the security team must test. Features that need the server to inspect content, such as server-side search, previews and some server-side processing, may be unavailable or limited for encrypted folders. A user who loses every device and every recovery method also loses the data. Check the current end-to-end encryption documentation for the features your users depend on before promising this model to a business owner.

Disk encryption is a separate control and does not replace any of these models. It protects data on drives, backups and decommissioned hardware against theft or improper disposal. A running server with decrypted volumes still exposes files to anyone with administrative access to Nextcloud or the host operating system. Use disk encryption on every deployment, then choose the Nextcloud layer that matches your trust boundary. To verify the decision, sign in as a test administrator, attempt to open a sample file from each protected folder, and document what the operator, administrators and end users can each see.

What each encryption layer protects in Nextcloud

Nextcloud offers several encryption controls, and each one protects data from a different party. Server-side encryption, end-to-end encrypted folders and volume encryption can be combined, but they answer different questions about who can read stored files. Design them together before users upload anything.

Server-side encryption with a master key

Nextcloud encrypts files as they are written to the storage backend, using keys the server manages. Administrators can recover files without the user, which supports organizational access needs, but the server and its operators can still read the data. Confirm in the Nextcloud admin manual for your version which encryption module is available, how the master key is stored and how key recovery is enabled.

Server-side encryption with user keys

In this mode each user's files are encrypted with a key derived from that user's password, so the server cannot read them without a logged-in session or recovery arrangement. Losing a password can make data unrecoverable unless recovery options are set. Check how sharing, background jobs and password resets behave for your version before choosing it.

End-to-end encrypted folders

End-to-end encrypted folders protect content so that the Nextcloud server stores only ciphertext and the client holds the keys. Server-side features that need to read file content, such as previews, full text search and some antivirus scanning, may not work on those folders. Confirm the supported clients, the key distribution model and the limitations in the admin manual for your version.

Volume and disk encryption

Full-disk or volume encryption protects the data at rest on the servers, backups and storage devices against theft or decommissioning, but it does not hide files from Nextcloud or anyone with a running system. It sits below the application and is usually managed by the infrastructure team. Confirm how keys are unlocked at boot and how encrypted volumes are handled during restores.

Which party each layer excludes

Map each control to the party it must keep out: the storage provider, server administrators, Nextcloud operators, other users or external parties. A layer that excludes one party may leave another able to read content, so record the answer per data class. Write this matrix down before rollout, because retrofitting encryption to existing data is a separate project.

Interaction and recovery risks

The layers interact in ways that affect recovery and operations. Backups contain whatever form the data is stored in, so key material must be backed up separately and tested with restores. Apps such as search, antivirus and the AI Assistant depend on reading content, so their coverage must be checked against each encrypted scope. Plan a documented key recovery procedure and test it.

Encryption options and when each fits

This table compares three Nextcloud encryption approaches across who can read data, admin recovery, sharing, search, previews and server-side apps. Read each row as a question to settle before rollout, because stronger confidentiality usually reduces what the server can do with the data. Feature behavior varies by version and app, so confirm each cell against the release you plan to deploy. Disk encryption protects stolen media and sits beneath all three options, so it is not shown as a separate column.

Decision pointServer-side, master keyServer-side, user keysEnd-to-end encrypted folders
Who can read the dataThe server and anyone with administrative access to it can read stored files.The server can decrypt a user's files while that user's session is active, confirm the exact key handling for your version.Only clients holding the folder keys can read content. The server stores ciphertext.
Admin recovery after password lossAdministrators can typically recover files because the server holds the key, confirm the recovery procedure.Recovery depends on whether a recovery key was enabled before the loss, confirm the setting and its effect.The server cannot recover content. Plan key backup and user recovery steps before any data is stored.
Sharing with othersStandard server-side sharing applies, confirm how link and external shares behave for your version.Sharing depends on the sharer's access to the recipient's keys, confirm which share types are supported.Sharing is limited to what the client-side key model supports, confirm internal, external and link sharing.
Full text searchServer-side indexing can read plaintext, so search depends on which search app and backend you deploy.Indexing depends on whether the server can decrypt content for the indexing user, confirm before promising search.The server cannot index encrypted content. Expect search to be limited to names or metadata, confirm for your version.
Previews and content scanningThumbnails and server-side antivirus work if the server can read the file, confirm the scanner's access.Background previews and scans may fail or be skipped for encrypted files, test with sample content.Server-side previews and antivirus cannot read content. Scanning must happen on clients or before upload, confirm the approach.
Server-side apps and document editingApps that process files can read plaintext through normal server interfaces, confirm each app's requirements.Apps running outside the user's session may not open encrypted files, test each app used by the team.Most server-side apps, including document editing through external hosts, cannot open encrypted folders. Confirm app by app.

What each option breaks in day-to-day use

The main operational cost of end-to-end encryption in Nextcloud is that the server can no longer read file contents, and several features depend on that. Server-side search over document text, server-generated previews, antivirus scanning of stored files, and Office editing that relies on the server opening a file all need plaintext access. On end-to-end encrypted folders, these features may be unavailable, partial or dependent on client-side behavior. Server-side apps and AI features that process documents on the server face the same limit. Server-side encryption with a master key or user keys keeps these features working, because the server still holds the means to read the data, which is also why it does not meet a requirement that the operator be unable to read it.

Key handling is the second cost, and it falls on operations more than on features. With end-to-end encryption, the keys belong to users or to the client, so a lost device, a forgotten recovery method or a corrupted key store can leave encrypted files unreadable with no way for administrators to recover them. Administrators should confirm exactly how Nextcloud's end-to-end encryption generates, stores and recovers keys in the version they plan to run, and what the recovery path looks like for a departed employee. Backups do not solve this on their own: a backup of encrypted data without the matching keys restores ciphertext that nobody can open. Keys and backups must be planned together.

Server-side encryption with a master key carries a different operational cost. The master key is a single point of failure that the operator must protect, rotate and back up separately from the data. Losing it has the same effect as losing user keys in the end-to-end model, but across the whole instance. Teams should confirm the key storage location, the rotation procedure and the restore test for the master key before the first production user is onboarded. Moving between models after data exists is not a simple switch, so the choice made at rollout tends to persist.

Because these effects differ by app, the team should test each dependent app against the chosen model before rollout. Build a list from what is actually enabled: full text search, antivirus, previews, Office editing through a document server, Talk, Deck, Tables, the AI Assistant and any custom server-side app. For each one, create encrypted and unencrypted test folders, run the core action as a normal user and as an administrator, and record what fails and what degrades silently. Results should go into the rollout decision, including whether affected data must be kept out of encrypted folders or whether a compensating control, such as scanning on upload before encryption, is required.

Plan the operational runbook around these results. Decide who is authorized to perform key recovery, how that action is logged, and how user communication works when a user loses access. Include the encrypted and unencrypted data classes in restore tests so that a restore proves both the data and its keys can be used. Ask any implementation partner to deliver the per-app test matrix, the key recovery procedure and the restore test results as written outputs, and confirm which of these support work is included in a fixed-scope engagement and which would be an ongoing retainer.

How to roll out encryption without locking out your users

This sequence moves encryption from a design decision to a tested production change. Each step ends with a check, so the team confirms that users can still read, share and recover their files before the next step begins. The output is a documented encryption mode, a recovery process that has been exercised, and a controlled cutover.

  1. Define the trust requirement first

    Decide in writing who must be unable to read the data: server administrators, the hosting provider, backup operators, or only people outside the organization. This choice determines whether you need server-side encryption with a master key, server-side encryption with user keys, or end-to-end encrypted folders. The data owner, security lead and compliance contact should all sign off. Done when the requirement names the actors who must be excluded and the features users need.

  2. Inventory the apps and clients that must work

    List every app, sync client, mobile app, browser editor and integration that touches the files in scope, including search, antivirus scanning, previews and external sharing. Each encryption mode limits what these components can read, so some features may be unavailable under end-to-end encryption. Confirm each item against the admin documentation for your Nextcloud version and test the clients your staff actually use. Done when every dependency is marked as working, limited or unsupported for the chosen mode.

  3. Enable and test the mode on a non-production instance

    Build a non-production instance from a copy of your configuration, with the same identity provider, storage backend and app set. Enable the chosen encryption mode there and run scripted test cases: a test user uploads, reads and edits a file in the browser, shares it with an internal user and a guest, and syncs it from a desktop client. Check that search, previews and background jobs behave as expected. Done when every test case passes or each failure has a documented workaround or a decision to drop the feature.

  4. Document key handling and recovery

    Write down where keys are stored, who can generate or reset them, how users regain access after losing a password or device, and what happens to a departing user's encrypted files. State which keys sit with the server and which sit with users, and how the master key is protected and backed up. Name two people who are authorized to perform key operations. Done when a tabletop exercise walks through a lost-password case and a departing-employee case without gaps, and the runbook is approved.

  5. Prove a restore works before cutover

    Restore a recent backup of the non-production instance into a separate environment, including the database, the data directory and the key material needed to decrypt files. Sign in as a test user and confirm that files open, shares resolve and the recovery steps in the runbook work as written. Nextcloud requires a backup before every upgrade, and the same discipline applies to encryption changes. Done when the restored copy reads the test files and the team has recorded how long the restore took.

  6. Migrate in a controlled window and verify

    Agree a change window with users, take a fresh backup, enable the mode on production and run the migration of existing files as a separate step if your version requires it. Keep the pre-change backup until the checks pass. Repeat the test user checks: read, share and restore a file from a versioned or deleted state, then sign in from a desktop and a mobile client. Done when every check passes and a sample of live user files opens without help desk escalation.

What drives the effort of an encryption rollout

The biggest factor in an encryption rollout is how many users, devices and clients touch encrypted data, and how much data already sits on the server. Each desktop client, mobile client, web session and sync account must be tested against the chosen encryption mode, because key handling can differ between clients and versions. Existing data is a separate cost. Enabling server-side encryption on a populated instance means stored files are read and rewritten, so the migration window, storage headroom and the impact on running services need to be measured on a copy of production before a date is set. Ask the team to report the user count, the client mix, the total file count and the total stored size, and to state which of these will be encrypted in place.

Dependent apps change scope more than most teams expect. Features that index, preview, scan or process file content may stop working on encrypted data, or need separate testing before they are enabled. Review Talk, full text search, antivirus scanning, Collabora Online and any workflow or external storage integrations against the chosen mode. Record which of them read content on the server and which handle only metadata. Key recovery policy is the other major driver. A master key design centralizes recovery but places the key under administrator control. User keys give each person more control, but a lost password can leave data unreadable unless a recovery method is in place. Decide who may recover data, how each recovery is approved and logged, and how departing employees' keys are handled before the first user is migrated.

Backup and disaster recovery design decides whether encryption protects the data or puts it at risk during a restore. Backups must capture the encrypted files together with the key material needed to open them, and the key material must be stored separately and protected with its own access controls. A restore test should be run with only the recovery team's access, so gaps in key custody appear before an incident. Plan for key rotation and for restoring to a second site. Identity integration adds more work. When users sign in through LDAP, OpenID Connect or SAML, the key unlock step has to fit the login flow, and a change to the identity provider can break key access. If your design keeps keys in a hardware security module or an external key management service, the integration, failover and vendor support terms are separate workstreams that the scope must name.

A written scope should show each driver with the figures you confirmed, the decisions you made and the tests that will prove each one. Ask any partner to explain how each factor changes the work plan and the testing effort. Separate the one-time work, such as design, migration, testing and documentation, from the recurring work, such as key rotation reviews, client upgrade testing, backup restore tests and checks of the encryption state after each Nextcloud upgrade. Confirm the target Nextcloud version and its release notes for encryption behavior before the scope is signed, since those notes decide which apps and clients need retesting. No duration is given here, because the drivers vary widely from one deployment to another and a duration only means something once they are measured.

Security and operational considerations

Server-side encryption moves some trust from users' devices to the people and systems that run the server, so the operating model matters as much as the setting. The cards below list the decisions to record before go-live and the checks to repeat after each change. They describe what to design and document, not guarantees that any control will hold in your environment.

Key custody and escrow

Decide where the master key or recovery material lives, who can read it, and whether an escrow copy exists outside the server. In master key mode, anyone with access to both the key store and the data directory can read encrypted files, so the key store needs its own access controls and separate storage. Document the custody chain and the conditions under which escrow may be opened. Confirm which key storage options your Nextcloud version supports before you choose.

Separating administrator and key roles

Instance administrators who run the server should not automatically hold the ability to read keys or approve key recovery. Assign key custody, recovery approval and server operation to different named people or groups, and record who holds each role. In a small team where one person must hold two roles, document a compensating control such as a second approver for recovery actions. Confirm which permissions your chosen encryption mode grants to the administrator account.

Backup encryption and key backup

Backups of the data directory and database are only as protected as the keys that open them. Encrypt backup archives with a key stored apart from the backup target, and back up the encryption keys so that data and keys can be restored together. Test a restore that includes the key material, because a backup that returns files without the keys that unlock them does not meet its purpose. Confirm how your backup tool handles key material with its vendor.

Logging of recovery actions

Any action that recovers access to encrypted data, enables or disables encryption, or changes a key should produce a record that names the person, the time, the reason and the approval. Send these records to a log store that instance administrators cannot edit. Review them on a fixed schedule and compare them against change tickets. Confirm which encryption events Nextcloud writes to its own logs and which your external logging pipeline must capture.

Lost passwords in user-key modes

In user-key mode, a user who forgets their login password can lose access to encrypted files unless a recovery mechanism was enabled in advance. Decide before rollout whether an administrator recovery key exists, who holds it, and what users must do after a password reset. Tell users plainly that a lost password without recovery means their encrypted data cannot be read. Test the reset path with a pilot account before any production user depends on it.

Consistent encryption settings across upgrades

Upgrades and app updates can change encryption behavior, and the one-major-version-at-a-time rule applies to every step. Record the encryption mode, module state and key locations before each upgrade, then compare them afterward. Keep an upgrade runbook that includes a restore test of encrypted data on a staging copy. Confirm encryption-related changes in the release notes for each version on your upgrade path, and check third-party apps that touch encrypted files.

Questions buyers ask before hiring help with encryption

What drives the cost of a Nextcloud encryption implementation?

The biggest drivers are the number of decisions the design must settle and how many systems the encryption mode touches. Key choices include whether data is encrypted with a server master key or per-user keys, and whether end-to-end encrypted folders are needed for specific groups. Integration scope matters too: identity, storage, backups, antivirus, search and Office editing each need checking against the chosen mode. Testing effort grows with the number of user groups and client types. Who is paid for what should be explicit in the quote: design and build work, testing, documentation and handover, and any ongoing support. Ask for each line item to be separated, and ask which parts are one-time and which recur, such as key management reviews and upgrade testing after each Nextcloud release.

How long does a Nextcloud encryption rollout take?

The duration depends mainly on scope, not on the encryption feature alone. A rollout limited to one encryption mode on a single instance is shorter than one that adds end-to-end encrypted folders for several departments, a separate key recovery process and a validated restore path. Timing is also set by your change windows, the availability of test users and how quickly your identity and backup teams can respond. Because DeployOpen works under fixed scope with timelines agreed in writing before work starts, the schedule should come from a written scope, not a general estimate. Ask for milestones, the dependencies you must meet, and which steps wait on your approvals.

What must our organization provide before encryption work starts?

Your organization should provide four things before the build begins. Identity: a clear account source, such as LDAP, Active Directory, OpenID Connect or SAML, with group membership that the encryption policy can rely on. Backups: a working backup system for the server, database and data directory, plus access to test a restore. Key custodians: named people with the authority and procedures to hold, recover and rotate keys, with a second person for each role. Test users: representative accounts in each group that will use encrypted folders or server-side encryption, with a test plan they can follow. Confirm these owners early, because missing key custodians or restore access is one of the most common reasons a rollout stalls.

Who should be the key custodians for Nextcloud encryption?

Key custodians should be people from outside the team that administers the Nextcloud server, so no single administrator controls both the data and the means to read it. Typical choices come from security, compliance or a data owner group, with at least two people per recovery role so that one absence does not block access. The custodians need documented procedures for key recovery, rotation and offboarding, and they must agree on when a key can be used and who approves it. Your policy determines these roles, so decide them before the build. A partner can help draft the procedures and test them, but the custodian decisions and accountability stay with your organization.

Can our own team implement Nextcloud encryption without a partner?

Yes, a team with Nextcloud administration experience, Linux operations and a clear encryption policy can implement it, especially for a single server-side mode on a small instance. The harder parts are usually the ones outside the server: deciding which data must be unreadable to administrators, designing key recovery that does not defeat that goal, and checking how each installed app behaves with encrypted data. Teams that have not run a documented restore test or upgraded Nextcloud one major version at a time often find those steps take longer than expected. Compare your team's capacity against the written scope, and consider a partner for design review, testing or the parts your staff have not run before.

Does server-side encryption protect files from Nextcloud administrators?

Usually not in the way buyers expect. Server-side encryption protects stored data from people who can read the disks or storage alone, but administrators who run the server often have the access needed to read content. Whether an administrator can decrypt files depends on the mode, the key location and the recovery settings your team configures. If the requirement is that administrators must not read specific data, end-to-end encrypted folders are the mode to evaluate, with the trade-offs covered in the next question. Confirm exactly what your chosen mode protects against in the documentation for your Nextcloud release, and test it with an administrator account.

What breaks when we turn on end-to-end encrypted folders?

End-to-end encrypted folders work because the server cannot read their contents, and that same property limits server-side features. Expect to check search and previews, sharing with external or guest users, antivirus scanning, full text search and Office editing against your app list before rollout. Some features may not apply to encrypted content, and others may need a different approach for those folders. Client support also matters, so confirm which desktop, mobile and web clients your users rely on. Build a test matrix from your real workflows, run it with test users, and record which behaviors your users must accept before you set the policy.

How DeployOpen scopes and supports Nextcloud encryption

DeployOpen treats Nextcloud encryption as a design decision made before rollout, starting with who must be unable to read the data and which features each method affects. The work runs inside your own infrastructure, with the choice between server-side encryption, end-to-end encrypted folders and disk encryption written down and tested. Engagements are fixed-scope, and ongoing support is available as a retainer.

How we scope

  • Confirm which users, groups and data classes must be unreadable to administrators before choosing a method.
  • Record which Nextcloud features each method limits, and confirm those limits against the version you run.
  • The written scope covers encryption decisions, configuration, testing, documentation and handover, agreed before work starts.

How we build

  • Build the chosen method in a non-production instance that matches your production database, storage and identity setup.
  • Test key recovery paths, including what happens when a user loses a password or an encryption key.
  • Verify that backups restore to a working instance and that encrypted content behaves as the design describes.

How we hand over

  • Deliver a decision record stating who can read which data and under which key arrangement.
  • Document the runbook for enabling encryption, rotating keys and recovering users, with named owners for each step.
  • Hand over tested disk encryption steps for the host, volume and storage layers that your team operates.

How we support

  • Ongoing support is available as a retainer for upgrades, key-related incidents and changes to the encryption scope.
  • Plan each Nextcloud major upgrade against the encryption design, moving one major version at a time with backups first.
  • Re-test encryption behavior after app changes, since third-party apps must be confirmed compatible before they are enabled.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.