Originally created by @Gamoth on GitHub (Nov 21, 2023).
Hello,
I'm trying to run vaultwarden from Docker behind a Nginx proxy however that after each user registration, I get the following message: session expires.
Whatever the browser (Firefox, Edge), in private mode or not.
I'm in the latest version of the container, and I've set the time to Europe/Paris.
I've also deleted the rsa_key* many times.
Below my command docker : docker run --name vaultwarden -e TZ=Europe/Paris -e ADMIN_TOKEN=pouette -v /path/vw/:/data/ -p 8001:80 vaultwarden/server:latest
Below the last log :
[2023-11-21 18:09:27.512][request][INFO] POST /identity/accounts/prelogin
[2023-11-21 18:09:27.512][response][INFO] (prelogin) POST /identity/accounts/prelogin => 200 OK
[2023-11-21 18:09:27.779][request][INFO] POST /identity/connect/token
[2023-11-21 18:09:28.052][vaultwarden::api::identity][INFO] User user@domain.org logged in successfully. IP: x.x.x.x
[2023-11-21 18:09:28.052][response][INFO] (login) POST /identity/connect/token => 200 OK
[2023-11-21 18:09:28.084][request][INFO] GET /api/config
[2023-11-21 18:09:28.084][response][INFO] (config) GET /api/config => 200 OK
[2023-11-21 18:09:28.162][request][INFO] POST /identity/connect/token
[2023-11-21 18:09:28.163][response][INFO] (login) POST /identity/connect/token => 200 OK
[2023-11-21 18:09:28.206][request][INFO] GET /notifications/hub?access_token=eyJ0eXAiOiJKV1QiL
[2023-11-21 18:09:28.206][vaultwarden::api::notifications][INFO] Accepting Rocket WS connection from ipv6_adress
[2023-11-21 18:09:28.206][response][INFO] (websockets_hub) GET /notifications/hub?<data..> => 200 OK
[2023-11-21 18:09:28.215][request][INFO] GET /api/config
[2023-11-21 18:09:28.215][response][INFO] (config) GET /api/config => 200 OK
[2023-11-21 18:09:28.220][request][INFO] GET /api/sync?excludeDomains=true
[2023-11-21 18:09:28.220][vaultwarden::auth][ERROR] Token is invalid
[2023-11-21 18:09:28.220][auth][ERROR] Unauthorized Error: Invalid claim
[2023-11-21 18:09:28.220][vaultwarden::api::core::ciphers::_][WARN] Request guard Headers failed: "Invalid claim".
[2023-11-21 18:09:28.220][response][INFO] (sync) GET /api/sync?<data..> => 401 Unauthorized
[2023-11-21 18:09:28.287][request][INFO] GET /api/config
[2023-11-21 18:09:28.287][response][INFO] (config) GET /api/config => 200 OK
[2023-11-21 18:09:28.312][vaultwarden::api::notifications][INFO] Closing WS connection from ipv6_adress
[2023-11-21 18:09:28.312][rocket::server][ERROR] Upgraded websocket I/O handler failed: WebSocket protocol error: Sending after closing is not allowed
[2023-11-21 18:09:28.353][request][INFO] GET /api/config
[2023-11-21 18:09:28.353][response][INFO] (config) GET /api/config => 200 OK
Below is the diagnosis:
Your environment (Generated via diagnostics page)
Vaultwarden version: v1.30.1
Web-vault version: v2023.10.0
OS/Arch: linux/x86_64
Running within Docker: true (Base: Debian)
Environment settings overridden: true
Uses a reverse proxy: true
IP Header check: true (X-Real-IP)
Internet access: true
Internet access via a proxy: false
DNS Check: true
Browser/Server Time Check: true
Server/NTP Time Check: true
Domain Configuration Check: true
HTTPS Check: true
Database type: SQLite
Database version: 3.44.0
Clients used:
Reverse proxy and version:
Other relevant information:
Config (Generated via diagnostics page)
Show Running Config
Environment settings which are overridden: ADMIN_TOKEN
Deleting the rsa key files or using private browser doesn't help since those do not keep the token in memory/cache, and deleting cause all tokens to be invalid ever generated.
Make sure the rsa files stays the same
Do not use a private browser
Do not use extensions which block or clear cookies or local storage
Check your reverse proxy, make sure no WAF or Security extension/config breaks the communication. Some might limit the header size, or rewrite them.
@BlackDex commented on GitHub (Nov 21, 2023):
Deleting the rsa key files or using private browser doesn't help since those do not keep the token in memory/cache, and deleting cause all tokens to be invalid ever generated.
1. Make sure the rsa files stays the same
2. Do not use a private browser
3. Do not use extensions which block or clear cookies or local storage
4. Check your reverse proxy, make sure no WAF or Security extension/config breaks the communication. Some might limit the header size, or rewrite them.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @Gamoth on GitHub (Nov 21, 2023).
Hello,
I'm trying to run vaultwarden from Docker behind a Nginx proxy however that after each user registration, I get the following message: session expires.
Whatever the browser (Firefox, Edge), in private mode or not.
I'm in the latest version of the container, and I've set the time to Europe/Paris.
I've also deleted the rsa_key* many times.
Below my command docker :
docker run --name vaultwarden -e TZ=Europe/Paris -e ADMIN_TOKEN=pouette -v /path/vw/:/data/ -p 8001:80 vaultwarden/server:latestBelow the last log :
Below is the diagnosis:
Your environment (Generated via diagnostics page)
Config (Generated via diagnostics page)
Show Running Config
Environment settings which are overridden: ADMIN_TOKEN
Can you help me?
@BlackDex commented on GitHub (Nov 21, 2023):
Deleting the rsa key files or using private browser doesn't help since those do not keep the token in memory/cache, and deleting cause all tokens to be invalid ever generated.