From d80caac8dee9d495527581db47887004bbd039a8 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Mon, 10 Jul 2023 07:39:44 +0200 Subject: [PATCH] Updated Enabling WebSocket notifications (markdown) --- Enabling-WebSocket-notifications.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Enabling-WebSocket-notifications.md b/Enabling-WebSocket-notifications.md index 022bd9c..2aaee74 100644 --- a/Enabling-WebSocket-notifications.md +++ b/Enabling-WebSocket-notifications.md @@ -1,6 +1,6 @@ WebSocket notifications are used to inform the browser and desktop Bitwarden clients that some event of interest has occurred, such as when an entry in the password database has been modified or deleted. Upon receiving the notification, the client can take an appropriate action, such as refetching the modified entry, or removing the deleted entry from its local copy of the database. In this notification scheme, the Bitwarden client establishes a persistent WebSocket connection with the Bitwarden server (vaultwarden in this case). Whenever the server has an event to report, it sends it to the client via this persistent connection. -Note that WebSocket notifications are not applicable to the mobile (Android/iOS) Bitwarden clients. These clients use the native push notification service instead ([FCM](https://firebase.google.com/docs/cloud-messaging) for Android, [APNs](https://developer.apple.com/go/?id=push-notifications) for iOS). vaultwarden does not currently support push notifications to mobile clients. +Note that WebSocket notifications are not applicable to the mobile (Android/iOS) Bitwarden clients. These clients use the native push notification service instead ([FCM](https://firebase.google.com/docs/cloud-messaging) for Android, [APNs](https://developer.apple.com/go/?id=push-notifications) for iOS). These have to be configured separately using push credentials from Bitwarden's cloud service. To enable WebSockets notifications, an external reverse proxy is necessary, and it must be configured to do the following: - Route the `/notifications/hub` endpoint to the WebSocket server, by default at port `3012`, making sure to pass the `Connection` and `Upgrade` headers. (Note the port can be changed with `WEBSOCKET_PORT` variable) @@ -20,7 +20,7 @@ docker run -d --name vaultwarden \ vaultwarden/server:latest ``` -Note: The reason for this workaround is the lack of support for WebSockets from Rocket (though [it's a planned feature](https://github.com/SergioBenitez/Rocket/issues/90)), which forces us to launch a secondary server on a separate port. +Note: Port 3012 is only required when using an old reverse proxy configuration. From version 1.29.0, vaultwarden support WebSocket notifications through port 80. ## Test the WebSockets connection