What's new
PGBlitz.com

Register Now! Find useful tips, Interact /w Community Members and join the part the Best Community on the Internet!

Guides [GUIDE] Bitwarden config (smtp/disable signup etc.)

crustyakorn

Full Member
PGBlitz/CommunityApps/Bitwarden

So after tons of fiddling with Bitwarden today, here are some tips to you all from my hours upon hours scouring for the proper setup for Bitwarden (a few more configuration steps) to make it work by disabling Account Creation (after my own is made - but still allow invites from me) - and to make SMTP work by using MailJet (free up to 200 emails per month) transactional.

Transactional email (SMTP) service used:
https://mailjet.com
Rest of configuration done in Portainer after setup in Plexguide/PGBlitz (SSH) (deploy apps complete)

Log in to Portainer and find the container, click on the Bitwarden container and edit/duplicate the container so you can start editing it. Find Env in the tabs. Then make sure to add the following / assure the settings are similar:

3172

  • DOMAIN (default: https://bitwarden.DOMAIN.com)
  • SMTP_HOST (default: in-v3.mailjet.com)
  • SMTP_FROM (default: no-reply@DOMAIN.com)
  • SMTP_PORT (default: 587)
  • SMTP_SSL (default: true)
  • SMTP_USERNAME (default: GET FROM MAILJET)
  • SMTP_PASSWORD (default: GET FROM MAILJET)
  • SMTP_FROM_NAME (default: Bitwarden)
DOMAIN.com is an example and should be replaced by your own domain / setup. Note: You can use whatever SMTP host settings you like. I simply chose Mailjet because it worked out of the box and signup is free for low usage.


Also not in the above image but make sure to add another Environment Variable with name: SIGNUPS_ALLOWED and value false (this prevents further signups - but still lets you invite other users to organizations etc.)

Redeploy the image and it should work great

Last notes: If you have trouble with the API not working for you in BROWSER EXTENSIONS / IOS/ANDROID APPS etc. please remove the "traefik.frontend.auth.forward.address" line mentioned in LABELS if you have G Security enabled (meaning you login with Google Account to access the (sub)domains). Redeploy and all is well again. The error is due to the API expecting bitwarden to respond and not a login form from Google - thanks to https://pgblitz.com/threads/bitwarden-pg-shield.3987/ losjax

I hope this can be of help to some of you who didn't figure out the SMTP / other settings in Bitwarden due to mixing up this edition with the official version. ?‍? for more info on commands and env. variables check out the official docs (from the unofficial image)
 
Last edited:

brutesqd

Junior Member
Donor
Nice one, thanks. Bitwarden is one of the last services I need to switch to self hosted, leaving only a decent note taking app left!
 

crustyakorn

Full Member
Yeah Bitwarden is great! I've used Lastpass myself the last 2 years but seeing how similar they are in design and function I prefer Bitwarden now. :) Super-plus for self hosted and Chrome Extension, iOS app etc. Love it.
 
Assists Greatly with Development Costs

Caddy

Respected Member
Can you enable the admin login token from the env variable as well. would like to get that setup for configuring family member accounts
 

crustyakorn

Full Member
Can you enable the admin login token from the env variable as well. would like to get that setup for configuring family member accounts
Certainly! It's recommended to use a strong random token but I believe you can use anything as a password. You can f.ex run this in Shell/SSH to generate a strong password:

openssl rand -base64 48

Apply this in ENV in Portainer:
ADMIN_TOKEN and set value to some_random_token_as_per_above_explanation

Once the docker is redeployed access the admin panel by going to bitwarden.{yourdomain}.com/admin
and login with your generated token.

Note: I found most of the settings to be of little use as it relies heavily on the ENV variables- but you can certainly do a lot of things from here as well. Some things are locked down and only changeable in the ENV settings of Portainer. Good luck!
 

Caddy

Respected Member
Certainly! It's recommended to use a strong random token but I believe you can use anything as a password. You can f.ex run this in Shell/SSH to generate a strong password:

openssl rand -base64 48

Apply this in ENV in Portainer:
ADMIN_TOKEN and set value to some_random_token_as_per_above_explanation

Once the docker is redeployed access the admin panel by going to bitwarden.{yourdomain}.com/admin
and login with your generated token.

Note: I found most of the settings to be of little use as it relies heavily on the ENV variables- but you can certainly do a lot of things from here as well. Some things are locked down and only changeable in the ENV settings of Portainer. Good luck!
yes that worked perfect!
 

pb1051

Respected Member
Thank you so much for your contribution. I am trying to make myself an admin, but I can't find the directory that the file is stored in:
Code:
./bwdata/env/global.override.env
 
Last edited:

pb1051

Respected Member
Certainly! It's recommended to use a strong random token but I believe you can use anything as a password. You can f.ex run this in Shell/SSH to generate a strong password:

openssl rand -base64 48

Apply this in ENV in Portainer:
ADMIN_TOKEN and set value to some_random_token_as_per_above_explanation

Once the docker is redeployed access the admin panel by going to bitwarden.{yourdomain}.com/admin
and login with your generated token.

Note: I found most of the settings to be of little use as it relies heavily on the ENV variables- but you can certainly do a lot of things from here as well. Some things are locked down and only changeable in the ENV settings of Portainer. Good luck!
Ignore my last comment. I didn't realize you had told us exactly how to fix this!
 

Admin9705

Administrator
Project Manager
Hey, this post helped me and saved lots of time!
This is what I love about the the community here, when people take the time to help the others out after solving a problem.

Thanks! :D
Agreed :D
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.


Development Donations

 

Top NZB NewsGroups!

Members - Up To a 58% Discount!

Trending

Online statistics

Members online
12
Guests online
129
Total visitors
141
Top