A small and short update on the BW docker image and configuration of SMTP settings.

The reason for this is to have your BW setup open to the Internet by having an invite-only (for example) setup while still having an option that will allow you and your user's invitations, registrations, and approval steps via email.

If you are already running a BW container, simply stop it and edit it. Add these environment variables and configure them depending on the SMTP provider you will be using.

  -e SMTP_HOST=<smtp.domain.tld> \
  -e SMTP_FROM=<bitwarden@domain.tld> \
  -e SMTP_PORT=587 \
  -e SMTP_SSL=true \
  -e SMTP_USERNAME=<username> \
  -e SMTP_PASSWORD=<password> \

Note that if SMTP and invitations are enabled, invitations will be sent to new users via email. You must set the DOMAIN configuration option with the base URL of your BW instance for the invite link to be generated correctly.

-e DOMAIN=https://vault.example.com

That's it. After that, all users will have to verify their email account as well. Keep in mind that those verification emails might come with a bit of a delay (in minutes) but be sure to check BW logs for detailed operations on the matter.

As always, you are welcome to comment and ask questions on this or any other topic.