How to Configure Environment Variables after doing Manual Self-hosting Install

I did a manual self-hosting install, which means bitwarden.sh and related scripts don’t exist for me.

(I did a manual self-hosting install because I already have an nginx proxy with other things behind it, and wanted to add Bitwarden behind that existing proxy, which would take care of SSL. I ended up keeping Bitwarden’s nginx proxy as well but edited it to only keep the http portion, so the existing external nginx handles SSL and then locally on the machine talks to Bitwarden’s nginx proxy over http. I wasn’t able to find much documentation / guidance around how to best set this up, but this seemed okay / good enough.)

In my initial install, I didn’t configure an admin account, and after creating a regular user account I was trying to disable additional users from being registered. The documentation indicates to use the bitwarden.sh script which I mentioned I don’t have due to manual self-hosting install, so it is unclear how I can “rebuild” / update my server to pick up the updated configuration.

I’ll also note that I didn’t set up an email server, so that functionality is not working. It is unclear if that’s a hard blocker for being able to self-host Bitwarden, or if it is a nice to have. I found this thread on setting up an email server, but if setting up an email server is required and folks have other thoughts, I’m all ears.

Any help on how to best / most simply configure this would be great. I would love to avoid painful upgrades in the future as much as possible.

You should be able to do docker-compose up --force-recreate -d in the same directory as your docker-compose.yml file to force the container to recreate itself with the updated variables.

Regarding SMTP: you can think of it as a soft-requirement, as you’d need it to do things like log in to the admin console, create file Sends, use email TOTP, etc. However, you don’t need to host your own SMTP server. Here’s an example configuration to make it work with Gmail.

1 Like