mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-11 09:13:02 +03:00
Vaultwarden page takes me back to login after reload #1123
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 @danfmihai on GitHub.
Subject of the issue
Vaultwarden page takes me back to login after reload
Deployment environment
deployed as statefulset in K8s 1.23.7
using a pfsense with HAProxy frontend https -> backend ingress that points to /notifications/hub -> service 3012 and / that points to service 8080
Your environment (Generated via diagnostics page)
Config (Generated via diagnostics page)
Show Running Config
Environment settings which are overridden:
docker image
desktop, Android
HAPROXY 0.61 as above
N/A
Logs:
Steps to reproduce
installed statefulset before and had no issues with timing out
Expected behaviour
After I login and refresh the page I want to still be on the same page
Actual behaviour
it's redirecting to login page after refresh of the page
Troubleshooting data
@BlackDex commented on GitHub:
Then i suggest to double check the volume storage for the persistent files if that works. Because in the logs you sent i see new keys are being generated and even a new database. So then probably persistent storage is broken.
we have a check for this in the
testingtaggged images.@danfmihai commented on GitHub:
@BlackDex Well I have only 1 pod running, so probably that's not the cause:
vaultwarden-0 1/1 Running 0 38m@BlackDex commented on GitHub:
You mentioned kubernetes, does that mean you run more then one pod of Vaultwarden? If so, then that is the issue. Vaultwarden isn't really build for clustering. And the reason it fails is because both instances are using two different rsa keys which are used to generate the JWT, and thus will break if they are different.
Also see: #2530
@BlackDex commented on GitHub:
It's more that you need to check if that is all valid, and pointed to the correct directories. And that those files Vaultwarden uses are visible there. If not, then it looks like the persistent storage is not configured correctly.
@danfmihai commented on GitHub:
here are my pv and pvc. is this what you are asking?
@stefan0xC commented on GitHub:
Your second attached screenshot does not show the login screen but that the vault is locked.
This is expected (upstream) behavior of the web vault. See https://bitwarden.com/help/vault-timeout/#web-and-browser-extension-timeouts
The login screen looks like this:

@danfmihai commented on GitHub:
all files in storage:
attachments db.sqlite3 db.sqlite3-shm db.sqlite3-wal icon_cache rsa_key.pem rsa_key.pub.pem sends tmp vaultwarden.log@BlackDex commented on GitHub:
A 504 is a reverse proxy server error. Not an error from Vaultwarden. Also i thought that you mend that you got logged out if you restart/reload the pod. If you mend reloading the web-vault, then yes that is normal behavior as mentioned by @stefan0xC .
@danfmihai commented on GitHub:
ok. then I get sent to the lock screen not login.sorry...
If I try to import I get this error:
These are the last lines from log:
@BlackDex commented on GitHub:
And the logs you send, was that from a restart? What happens if you restart again? Does that generate the same kind of log?
I mean, the only way you will be logged out is if the rsa key is regenerated.