nextcloud / nextcloud/server

Improvements to backup and automation with server-side encryption

Open
#38,113 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement feature: encryption (server-side)
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.

At present, server-side encryption on nextcloud has some drawbacks:

  1. There isn't an easy way to restore backed up files. It isn't enough to just copy back files and the private key, you also need to modify the database, which at present isn't documented
  2. Because of this, automated testing of a backup is a fairly large job - and if you don't go through this process you won't be certain that your file will be accessible if something goes wrong.
  3. It isn't clear how to ensure Nextcloud uses a consistent encryption key (e.g one I create once, either using occ or externally with gpg, and put in place in my orchestration), this means a much more convoluted orchestration process to ensure that I copy a key generated remotely to a safe location, and increases the difficulty of the above processes.
  4. Because of this, confidence in server-side encryption is low and the feature, I believe, is under-utilised.

Describe the solution you'd like

  1. Document any DB changes required to restore an individual file and an entire instance.
  2. Document what needs to be done to use a pre-generated master / user key (e.g where do you need to copy it to, what DB do you need to change to use that key, etc)
  3. Add an occ tool to decrypt a single file outside of the nextcloud file structure (where the file isn't in any DB table)
  4. Add an occ command to use a previously generated master / user key

Describe alternatives you've considered

  1. A very expensive process to test a nextcloud backup where I restore the entire system and check
    the files are accessible.
  2. An alternative but less useful encryption process (like a LUKS encrypted volume for a Docker container)
  3. Not using encryption at all

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing server-side encryption behavior and available occ commands. The issue requests documentation for backup restoration and pre-generated keys, plus commands for decrypting files outside the file structure and using existing keys. Done means all four capabilities have defined, tested behavior and documented restore steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.