Setting up self-hosted - error when trying to register

I am trying to setup self-hosted and it all seems to be ok except when I try to register a new account.

It takes ages and then briefly shows an error saying “an unhandled server error has occured”

I did some research and did find a post suggesting it was my mail settings in the global.override.env file but from what I can tell these are all correct.

I’m trying to relay via Office365, I’ve created a connector, created an app password, checked the firewall port is open and i still can’t get it to work. I even wiped the installation and started again.

Does anyone have any ideas/clues what I can do?

Thank you
Phil

Hi @littlephil - welcome to the forums!

Does your Office365 account require 2FA? If so, you are going to need to generate an app password:

https://support.microsoft.com/en-us/account-billing/manage-app-passwords-for-two-step-verification-d6dc8c6d-4bf7-4851-ad95-6d07799387e9

Hi thanks for the welcome.

Yes it does use 2FA and I did create an app password. Am I right in that this just goes into the password field?

Yes, correct. So it sounds like it must be something else.

You might try adding this line to see if it helps:

globalSettings__mail__smtp__startTls=true

Same sadly, is there a way to test if the server is the probelm or if its bitwarden/my config?

You can check the logs to see if there are any clues.

Otherwise, can you try a different SMTP server? Gmail (no 2FA) is always a good test option.

I’ve now tried with gmail and the same thing occurs.

Am i right in that i am editting the file called global.override.env and then restarting each time I make a change by typing command ./bitwarden.sh restart?

No, I think you need to do a ./bitwarden.sh rebuild

I’ll try now :slight_smile:

1 Like

Also, I am not sure that Gmail SMTP uses StartTLS for authentication, so you might have to remove that line if trying with Gmail or set the value to false.

I think I’ve tried every combination of the configuration now :frowning:

I somehow need to see if I can send mail via gmail or O365 outside of the bitlocker environment so I can rule out where the issue might be.

Sorry to hear that it still isn’t working. Good luck!

1 Like

I now know these settings work!

Do you know if the mail “sends from” my server, or if it somehow goes via Bitwarden?

I ask becuase I have to tell O365 the orignating ip and I’ve set that as the server’s WAN address.

Thanks for your help and patience so far.

No, it should send the message directly from your server.

I am not sure what to suggest now, other than make sure you are using the rebuild parameter for the bitwarden.sh script and check the log for any clues to why it is failing.

Perhaps some others here may have encountered this problem and can suggest a solution?

I’m abou to give up. I’ve tried multiple combinations of setting and different servers. I’ve even installed it fresh on an AWS server.

I don’t know how to look at any of the logs!

I’ve apreciated all your time trying to help me, thank you :slight_smile:

Phil

Hi Phil - sorry to hear this. Before you pack it in, you might want to reach out to the Bitwarden CS team to see if they can help at all:

Thanks, messaging them now. I hadnt realise that was an option. I thought the forum was it!!

P

1 Like