From 467fcda6fc79b13d073ec4200b9fc84a0ead90fc Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Fri, 15 May 2020 12:15:28 +0530 Subject: [PATCH] Chore: Add docs for push notifications env (#865) --- .../project-setup/environment-variables.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/development/project-setup/environment-variables.md b/docs/development/project-setup/environment-variables.md index 7582c1f4d..899abebaf 100644 --- a/docs/development/project-setup/environment-variables.md +++ b/docs/development/project-setup/environment-variables.md @@ -114,3 +114,24 @@ LOG_LEVEL= # value in megabytes LOG_SIZE= 1024 ``` + +### Push Notification + +Chatwoot uses web push for push notification on the dashboard. Inorder to get the push notifications working you have to setup the following [VAPID](https://tools.ietf.org/html/draft-thomson-webpush-vapid-02) keys. + +```bash +VAPID_PUBLIC_KEY= +VAPID_PRIVATE_KEY= +``` + +If you are comfortable with the Rails console, you could run `rails console` and run the following commands + +```rb +vapid_key = Webpush.generate_key + +# Copy the following to environment variables +vapid_key.public_key +vapid_key.private_key +``` + +Or you can generate a VAPID key from https://d3v.one/vapid-key-generator/