Mail Verification Not Being Sent On Self Hosted Bitwarden

Hello,

I created an account on bitwarden’s offical website, and after entering my mail address it sent me a mail verification code as expected.

A few days later, I decided to self host Bitwarden and installed Bitwarden Lite in docker. Everything works fine, however when creating an account it gave me the following error:

“An unhandled server error has occurred.”

When checking my browsers console logs (the F12 menu) i saw this error:

XHRPOST
https://bitwarden.*****.com/identity/accounts/register/send-verification-email
[HTTP/2 400 3097ms]

After refreshing the page a few times the error disappeared, however it didn’t send a verification code to my mail address like in the offical bitwarden’s website, and created the account instantly.

This error only occurs on a fresh setup. If I delete Bitwarden’s docker volume and recreate it, the same issue happens again.

Refreshing the page a few times makes the error disappear forever, but email verification is skipped.

Is this intentional or a bug? I couldn’t find any environment values for it.

I use nginx proxy manager for reverse proxy. I put bitwarden’s network in the same network as nginx. My setup isnt exposed to the internet and i have a self signed certificate.

@user13 Welcome to the forum!

As I’m not familiar with self-hosting myself, I’m just guessing now: if it is also relevant for Bitwarden Lite, this might help: Self-host FAQs | Bitwarden

If it doesn’t, I would recommend to contact BW support.

I run Bitwarden Lite in docker as well (on a NAS), and I had to open mail ports on the NAS to get it to work. Prior to that I was having the same issue you were.

Had this same issue in my setup as well (BW Lite in Docker on Syno NAS). Final solution was to grant root ownership to the data folder within the BW folder that was created and linked by volume. In the container, there was serious permissions issue found in /var/log/bitwarden/identity.log - System.UnauthorizedAccessException: Access to the path ‘/etc/bitwarden/data-protection’ is denied. By default, it seems that the container has root privileges, and so it was trying to create the necessary file on the NAS and did not have the same privileges.

I hope this helps someone going forward.