Encrypted Data Restore in Nextcloud on Synology. Problem

Dear community,

First post, so bare with me.

I have a major problem with my Nextcloud and I don’t know how to solve it. So I will try to be as detailed as possible on describing the problem in order so see if there is a solution to it and how.

Last winter I installed Nextcloud on my Synology DS918+. As both me and my girlfriend are working on our PhDs, we needed a solution for our material that was not Google. Since we already have the Synology for local backups of our Laptops, Nextcloud seemed like a great solution. So we each set up an account in Nextcloud and saved much of our Academic material there, in order to have secure access to it when we are doing research abroad and we are not at home.

The Problem starts with an update going wrong. I tried to update from Nextcloud 17 to Nextcloud 18 but the update never finished. Suddenly we both had no access to our accounts and of course our research material which is what matters the most here. Not knowing what to do, I went into the Synology and manually copied the folders containing our material, or to be more precise our account Folders. I did not extract them, or deleted afterwards, I just copied them in a classic copy-paste way.

Then I went on to do a fresh installation of Nextcloud through the Terminal of my MacBook Pro. As advised by the tutorial I found, I tried to do a backup of my old Nextcloud installation. Which I suppose it did as there are many „Nextcloud“ folders in my Synology right now and also the „nextcloud-dirbkp“ backup folder.

I already tried to see whether we could have access to the material over the Synology Folder structure, but that was not possible. I suppose that is due to encryption. I also tried to copy-paste the folders back to the new Nextcloud installation as well as to upload them from within Nextcloud itself. No luck either. So encryption works pretty well. As you might have realized by my troubleshooting approach, I’m as new and unexperienced to this as it gets.

Is there a way to get our old accounts / Folders into the new Nextcloud installation and have access to our material?
We have our passwords and in the Nextcloud Folders there is one called files_encryption and within it are the keys I suppose. Does it work like this?

Is there any other way to decrypt our material?
This is very important for our research. Foolishly we don’t have a backup of all of the material that was on the Nextcloud and we don’t have access to the source anymore, which makes it all complicated. Nonetheless lesson learned.

Should there be a way, could you please direct me to the steps necessary as simple as possible? My knowledge on the subject is very elementary and I’m trying to learn as I go.

Some facts: Right now I’m running a fresh Nextcloud 18.0.6 installation on my Synology DS918+. We both work with MacBook Pros with latest Catalina, should that be of importance.

Perhaps you can restore your old encrypted system (dirs and db) on another system and then try to decrypt it.

Sorry german:


hey and welcome to the forum.
Thank you very much for your first participation here.

Though it really hurt me reading your story. That doesn’t sound too good for me. But maybe there’s someone able to help you.

I have just one additional question which isn’t really getting clear here… How have you installed NC to your DS? Native (directly) or within a VM, maybe?

But either way, again, I think it could get really difficult to get your stuff de-encrypted again.

Good luck! I’m gonna keep my fingers crossed for you guys.

@JimmyKater that doesn’t sound very optimistic, but thank you anyway.
It is a native installation.

Hi @devnull thank you for your links. I speak German so its ok.
Do you know maybe of a good tutorial how to restore my old encrypted system?
Would that be possible inside docker on the same Synology? As I don’t have any other hardware to try it on.


I think i would use an old pc e.g. 10 years old and install Ubuntu or Debian newest version without docker, no lets encrypt, no tls/ssl

Then look the links “backup” and “restore”. Please install on the testsystem the same nextcloud version (number) than your nas.

occ encryption:decrypt-all

Hope it worked if all keys are included.



As funny as it may sound, I don’t have any old pc laying around. We only have my MacBook Pro, my girlfriends MacBook Air and the Synology.

Should the process be similar on a docker, I could try it that way.
I have an ssd laying around though. Maybe install ubuntu externally and dual boot my MacBook Pro? Would that be an option, or does the installation have to be native?

Also a clarification. The Nextcloud version the data was originally, was Nextcloud 17. Now I have Nextcloud 18 installed. Which one should I install?

Perhaps use docker.
Use Nextcloud 17 from nextcloud download page.
Version can be found in config/config.php