Recover Passwords App passwords in clear text

I have a backup of my cPanel but lost access to the server.

I need to get back my passwords from the passwords app, having all the nextcloud files and database information in a local copy.

How are passwords stored and how can I see them in plain text?

If I understand the documentation of the app correctly, the password are stored in encrypted. Due to the fact that the the app creates regular backups, you should be able to restore one of these backups.

Thanks, but I lost access to the server and only have the files. I want to do it manually.

@tupadre Which “files” do you have? If you have all the Nextcloud files including the AppData files you can just import the latest backup on a new server and that’s it.

Otherwise you can restore the database backup on a new server and get your passwords that way.

@mdw Thanks, I installed Nextcloud on a new server but when I import the SQL there are no passwords listed.

If the database import was not successfully, there could be a lot of reasons.

  • Is Nextcloud actually using the database (or another or maybe sqlite?)
  • Are the settings (including table prefix) correct?
  • Is there actually data in the passwords_* tables?
  • Were user preferences and app config tables restored as well?
  • Are the user ids unchanged (might happen if you use user backends like ldap etc.)
  • Are there any errors in the Nextcloud log regarding the app?

I ONLY updated the passwords tables, because when I tried to update everything in the new installation, I lost access. Also the supposed user that worked before did not work anymore.

only importing the passwords tables won’t work because the server side encryption keys are stored in other tables. You need to restore at least the user preferences table and the appdata table.
The user id has to match or the app won’t be able to find the data.

You can use a docker setup or the like to restore the data there and then make a backup and import that.

1 Like

Thanks for your time, really appreciate it. Have a good rest of the day.