Nextcloud restore from stand alone to docker instance having encryption issues

I need some clarification/understanding on restoring my Nextcloud 23.0.12 stand alone to docker instance.

The restore process steps I took.

Backup database

Deploy docker with same version (running).

Put the docker instance on maintenance mode

Delete database

Restore the backed-up database.

Copy the data from old server to new

restart docker.

While I was able to successfully restore it to a docker instance. However, I kept getting a message “Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files”. Google find lead me to disable the default encryption. The message went away. However, I ran into an issue which where I was not able to download or upload files. I kept getting an error. I do not remember enabling default encryption originally.

Am I missing a step in the restore process?

Should I decrypt the files then and then copy them over? If so, how?

Any assistance would be greatly appreciated.

Did you copy over and adjust your config/config.php?

See Nextcloud Docker: Migrating an existing installation. (Also somewhat relevant: the bare metal instructions for Migrating to a different server).

Is your old standalone installation still running? Can you check the encryption status of it?

I have resolved the issue. I had to copy the three fields ( instanceid, passwordsalt, and secret) form config.php. This may have been documented somewhere but that is what fixed it in my case. Hopefully, it will help someone in the future that is struggling with same issue.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.