mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
Can't login after recovering docker #2206
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Gerben321 on GitHub (Feb 27, 2025).
Vaultwarden Support String
So my disk failed on my Unraid server and I had to rebuild all my docker images, including Vaultwarden. I spun up my MySQL database (Mariadb) and imported my backups. I made daily Vaultwarden backups from the database and files. All my apps on my phone and PC were logged in and they could sync just fine.
However I tried to login with my browser and my password is wrong. I am 100% sure it is correct. Suddenly all my users have this issue. What's the matter? How do I fix this? I can login on my device via my phone, but I can't change my password, I can't do an export, nothing... Help is needed.
Vaultwarden Build Version
1.33.2
Deployment method
Official Container Image
Custom deployment method
No response
Reverse Proxy
NPM
Host/Server Operating System
Linux
Operating System Version
Unraid 6.10
Clients
Web Vault
Client Version
No response
Steps To Reproduce
Expected Result
Actual Result
Logs
Screenshots or Videos
No response
Additional Context
No response
@stefan0xC commented on GitHub (Feb 27, 2025):
Seems like turning the issue into a discussion does not work at the moment.
Regarding your issue, can you maybe provide more infos about your setup? If the login works via a different client, the issue is probably not related to vaultwarden at all. Does the login via the web-vault work or do you have it disabled? The web vault would also be easier to debug I think which is why if it doesn't work it would be helpful to get the console logs from your browser.
Does it say "Username or password is incorrect. Try again" or something else? Also can you enable the
/adminpage (post the support string) and check if the users are listed? (If not your backup might not contain any data or you might not yet be using the database you expect?)@Gerben321 commented on GitHub (Feb 27, 2025):
I was logged in on my phone and on my desktop before the crash, and after restoring everything the clients were still logged in and able to sync.
I was not able to login via the web vault. But because I was able to do that before, I could press the button to login with my device, so I could authorize the web vault login via my phone.
The web vault indeed says the username or password is incorrect. The admin page contains all users and the correct amount of passwords etc.
The only way I found to 'fix' it for me is to add an emergency contact which could take over my account. That way I could set up a new password for my own account, and I can login via the web vault again, and the clients also were able to login again.
However this seems to be difficult for the other users because I can't get in the web vault via the 'login via app' button because I haven't logged in with those before.
It's like my passwords were messed up somehow in the backups? How can I debug this? In case of another failure I don't want to go through all this stress again.
@stefan0xC commented on GitHub (Feb 27, 2025):
Not sure why they would be messed up. I mean if you have backed up everything that is persisted this should still work. I mean from a technical standpoint the state of the server should be no different if you have completely restored everything from a backup or if you just restarted the server. The clients cached local state could mess it up, for example if your server created new RSA keys to generate tokens the existing session state, local storage and cookies might be invalid and you might have to clear everything before being able to login? I mean, I'd probably recommend testing login in a new private window before deauthorizing the sessions of all clients for all users.
@Gerben321 commented on GitHub (Feb 28, 2025):
I only have a
rsa_key.pemand arsa_key.pub.pemin my install of Vaultwarden. Those are copied from my backup. My running instance has the same files with the same hash, so there doesn't seem to be a change. Only with the backup guide I see there should be a lot more of these files? Can that be a problem somehow?So you're saying I should/could try to deauthorize all sessions?
I only have a small install and I managed to recover my user because I could login via my phone. My wife her account was still logged in on her phone, and I could do an export with her master password in the app. But I couldn't login with the exact same password through the web vault. Does that make sense? So I removed her account and recreated it with the exported json, so that's up and running.
One other user is still not able to login because I don't have the device for that near me, I will try to fix that this weekend, hoping that it's still logged in somewhere on a device and that I can export and recreate it the same way.
Can it be that my backup method isn't right? What I do is:
docker exec MariaDB-Official mariadb-dump -u db_user --password=db_password --routines --triggers --events db_name > /destination/for/backup-"$(date '+%d-%m-%Y')".sqlThis creates the .sql file that I later imported. I keep a few versions around.
Should I use some options from this command maybe? https://github.com/dani-garcia/vaultwarden/wiki/Migrating-from-MariaDB-%28MySQL%29-to-SQLite#how-to-migrate-from-mariadb-to-sqlite
@BlackDex commented on GitHub (Mar 1, 2025):
If you are migrating from MariaDB to MariaDB it should be enough i think.
You should check the logs of Vaultwarden to see what is happening.
Also, check the
/admininterface and see if all user's, org's and diagnostics are ok.@BlackDex commented on GitHub (Mar 1, 2025):
Going to close this as this is not a bug in Vaultwarden which can be fixed.
If you still need more information, please open a Discussion in the QA section as I'm currently not able to convert this to a discussion due to a bug/issue with GitHub.