[SOLVED] Unable to verify e-mail on self hosted BW server

(server addresses are deliberately without dots because the forum limits the use of links :frowning: )

I’ve had a premium BW account on bitwarden com for some time but would like to self-host a server. I followed these instructions. After successful setup tried to verify e-mail after editing global.override.env. I tried several options:

globalSettings__mail__smtp__host=smtp gmail com
globalSettings__mail__smtp__port=456
globalSettings__mail__smtp__ssl=true
[email protected] com
globalSettings__mail__smtp__password=xxxxxxxxx

lobalSettings__mail__smtp__host=smtp gmail com
globalSettings__mail__smtp__port=587
globalSettings__mail__smtp__ssl=false
[email protected] com
globalSettings__mail__smtp__password=xxxxxxxxx

lobalSettings__mail__smtp__host=server 41hosting2go nl
globalSettings__mail__smtp__port=587
globalSettings__mail__smtp__ssl=false
(commented out) globalSettings__mail__smtp__username=REPLACE
(commented out) globalSettings__mail__smtp__password=REPLACE

The last one is a mail server I use which does not require login details for SMTP.

None worked. I don’t receive an email on my accounts email address. I’m new to this, so chances are I’m doing something wrong. Is there anything I’m overlooking, or any log file that would show me what is going wrong?

Thanks,

BJ

I’m not using Gmail for my self-hosted server anymore, but I know it used to work.

First of all, the correct settings for Google’s SMTP server can be found here:

With SSL enabled, it’s port 465 – make sure to change your port 456 to the correct one in the first example. I think you should also enable SSL when using port 587.

The second thing you have to take care of is the password. Google usually doesn’t allow so-called “less secure apps” to login with the account password. It was possible to enable access for this kind of apps, but this won’t be possible anymore after May 30, 2022:

Therefore, you should create an app password you can use with Bitwarden:

I’m not sure if Bitwarden supports mail servers without login credentials.

1 Like

Thanks for the quick reply.

The 456 versus 465 was a typo :frowning: , but just in the post, not in the file :slight_smile:
I didn’t know I had to create an app password in my Google account for this BW server, but I created one now.

So I tried two options:

globalSettings__mail__smtp__host=smtp gmail com
globalSettings__mail__smtp__port=465
globalSettings__mail__smtp__ssl=true
[email protected] com
globalSettings__mail__smtp__password=xxxxxxxxx (new Google app password)

lobalSettings__mail__smtp__host=smtp gmail com
globalSettings__mail__smtp__port=587
globalSettings__mail__smtp__ssl=true
[email protected] com
globalSettings__mail__smtp__password=xxxxxxxxx (new Google App password)

Unfortunately, no dice. No e-mails are coming in.
Is there a log file that would show any reasons for the e-mail not being sent

Just to verify, you may need to also perform a rebuild after making edits to your global.override.env to commit the changes.
See below for further details.

Whenever you make changes to global.override.env, perform a ./bitwarden.sh rebuild to apply your changes.

I can’t believe I missed that! I’ts even in bold! :frowning_with_open_mouth:
That did the trick, email works just fine after a rebuild.

Thanks for the help!

1 Like

No issues!
Glad that solved this for you, sometimes it’s the smallest things that cause us the greatest headache and hair pulling.
I know I’ve had my fair share of “Duh” moments :rofl: