Idiot guide on creating a .env file required

I want to use the Bitwarden push servers for live updates and notifications but I can’t find clear/specific instructions on how to set up or add these environment variables to create/add to a .env file.

Currently, the Admin panel is enabled so all settings from there are stored in config.json . I have Vaultwarden running in a Docker container on Ubuntu Server 22.04 behind a reverse proxy using Nginx.

Can someone please tell me exactly what I need to do to use the push token from Bitwarden and enable the push service on my installation? Will doing this interfere with the settings from within my Admin panel and stored within config.json ?

Hopefully this will help someone else out.

I gave up on the .env file and got the push service working by adding the following to the bottom of my config.json file:

"push_identity_uri": "",
"push_installation_id": "<PUSH_INSTALLATION_ID>",
"push_installation_key": "<PUSH_INSTALLATION_KEY>",
"push_relay_uri": ""

Initially, when obtaining the ID and key from Bitwarden, I selected the EU as the data region, because that’s where I’m from. I then changed the Bitwarden URIs from .com to .eu, but this didn’t work.

I eventually found a post online, saying that I had to choose the US as a data region when generating my Bitwarden ID and key. I did this, updated everything (including changing the URIs back) and hey presto: I have push service on my Vaultwarden installation.

This now pushes updates across all clients within a second or two and provides notifications on my mobile app when I try to login elsewhere using a device for logging in.

It’s a shame that there’s so much information missing regarding this feature…