Protect Collabora CODE Documents at Rest with Storage Encryption
Secure files edited in Collabora CODE by encrypting the storage layer, protecting temporary data, and verifying encryption and recovery.
To encrypt documents at rest when using Collabora Online Development Edition (CODE), enable encryption in the file-storage platform or on the underlying disk—not in the CODE editor. Collabora opens documents supplied by a WOPI storage host, while the host is responsible for keeping the saved copies protected. The result should be encrypted storage, working edits, and recoverable files.
A typical deployment uses Nextcloud or another WOPI-compatible service for file storage and CODE for browser-based editing. A document moves between those components during an authorized editing session; turning on HTTPS protects that connection but does not encrypt the stored copy. Collabora's security overview describes storage as integration-controlled, while its server configuration template documents WOPI, TLS, and optional cache and quarantine settings.
Before changing anything, record where the WOPI host writes document files, whether it uses local disks or external object storage, and where CODE itself runs. Include backups, snapshots, previews, swap, and container volumes: copies outside the main directory may remain unprotected.
For documents on a Linux server's local disk, disk or volume encryption such as LUKS is usually the straightforward option. It protects the underlying storage when the volume is locked, including against theft of a powered-off drive. Ubuntu's full-disk encryption documentation describes LUKS as block-level encryption, not an application setting. Use a new encrypted volume or a tested migration: initializing LUKS can destroy existing data.
If Nextcloud stores files on third-party storage and the storage provider must not read their contents, Nextcloud server-side encryption (SSE) may be a better fit. It encrypts supported file contents before saving them to backend storage. Its keys remain in Nextcloud, so a compromised server or administrator can access decrypted files. Nextcloud recommends considering disk encryption for local storage.
If even the application administrator must be unable to read a document, neither unlocked-disk encryption nor ordinary SSE meets that requirement. Evaluate a supported client-side or end-to-end encryption workflow and confirm that browser editing remains available; do not presume every encrypted document can be opened collaboratively in CODE.
For a new Linux deployment, provision the file data and relevant service volumes on encrypted storage before importing documents. Keep the unlock secret and recovery information outside the server, restrict administrative access, and test the reboot or unlock procedure. For existing systems, verify backups and migrate during downtime. Configure encryption for cloud volumes or object storage with the provider.
Use lsblk -f to identify block-device types and findmnt -T /path/to/document/data to identify the filesystem backing your actual data directory. Check the path from the data directory to the encrypted device: installing cryptsetup alone does not encrypt a filesystem.
When Nextcloud SSE is appropriate, follow its server-side encryption guide. Back up the Nextcloud configuration, database, files, and encryption keys before making changes. Decide on the key mode before encrypting content; the current guide describes a server-controlled master key as the default for most deployments.
occ commands.sudo -E -u www-data php occ app:enable encryption, then sudo -E -u www-data php occ encryption:enable. Adapt the user and execution method to your packaging; Docker deployments use commands inside the appropriate container.sudo -E -u www-data php occ encryption:status to confirm the feature and selected module. Do not interpret an enabled flag as proof that every preexisting file is encrypted.sudo -E -u www-data php occ encryption:encrypt-all to address preexisting files. This operation can take time, and the official encryption command reference notes that it manages maintenance mode and requires an interactive terminal.SSE excludes filenames, folders, existing trash files, some old versions, thumbnails, previews, search indexes, and certain application data. Protect excluded items separately if required. Protect backups of encryption keys; losing essential keys or instance secrets can permanently prevent recovery.
Even when the WOPI host encrypts stored documents, assess the CODE machine independently. Collabora describes active document handling as memory-oriented and does not position CODE as the permanent document repository. However, the published coolwsd.xml template includes settings for optional quarantine and cached files, so inspect the actual deployment rather than assuming every temporary artifact is absent. Cover container runtime storage, mounted volumes, system swap, crash dumps, and backups with appropriate encryption or retention controls.
Keep HTTPS between browsers, CODE, and the WOPI service, and restrict which WOPI hosts can connect. Nextcloud's Office configuration documentation recommends limiting WOPI requests to expected Collabora server IP addresses. These access controls do not replace at-rest encryption, but they help prevent the encrypted storage system from handing plaintext to an unauthorized editor.
Do not enable Collabora's local filesystem storage mode for production as a shortcut; its official SDK describes filesystem storage as a testing-only option and recommends WOPI. Keep the normal storage integration in place so authorization and save-back behavior remain consistent.
Use a non-sensitive sample file for the acceptance test. Upload it through the storage service, open it in CODE, edit a line, save, close the editor, and reopen it. A successful round-trip confirms editing still works; it does not prove at-rest encryption.
encryption:encrypt-all completed successfully; do not test only a newly uploaded file.Switch approaches if the storage provider or application must be unable to decrypt contents, if a protected data category remains outside the encryption boundary, or if key recovery cannot be demonstrated. Encryption at rest mainly limits exposure from storage loss and unauthorized backend reads; it cannot by itself stop a compromised live server, an authorized user downloading a file, or a stolen account from reading an opened document.
Secure files edited in Collabora CODE by encrypting the storage layer, protecting temporary data, and verifying encryption and recovery.
Check your host architecture, confirm the CODE tag publishes ARM64, remove forced AMD64 settings, and separate image errors from permissions or memory issues.
Set up the WOPI connection between Collabora Online and ownCloud Infinite Scale, configure the right service URLs, and verify document edits save.
Prevent document exports in Collabora Online CODE by setting the WOPI DisableExport permission, then verify the host and editor enforce it.
Configure Nginx TLS termination, Collabora routes, and WebSocket headers, then test the public endpoints before opening real documents.
Trace a 10-minute CODE disconnect to its proxy, load balancer, or WebSocket path, then correct the timeout and verify the session stays connected.
Install the official Collabora Helm chart, configure WOPI access and ingress affinity, and verify the deployment without common setup mistakes.
Use browser requests, WOPI logs, and targeted proxy checks to find why Collabora opens a blank document—and choose a fix that fits the evidence.
Configure CODE Docker dictionaries and tag document passages correctly so English, French, and other supported languages receive the right spell-checking.
Adjust the per-view inactivity threshold in coolwsd and distinguish it from background-tab dimming, document unloading, autosave, and login expiration.