6.) Installing Bitwarden
- create docker-compose.yml
- paste in:
version: '3'
services:
bitwarden:
image: bitwardenrs/server
restart: always
ports:
- 6500:80
volumes:
- ./bw-data:/data
environment:
WEBSOCKET_ENABLED: 'true' # Required to use websockets
SIGNUPS_ALLOWED: 'true' # set to false to disable signups
- paste in
docker-compose up -d
- creat your host for Bitwarden in Nginx if you want access to it over the internet; the port is 6500
- type in your browser your Bitwarden url
- create your account
- if you open your Bitwarden to the internet, everyone can create an account on your system!!
closing your Bitwarden for new users:
- there are two ways, one fast and one which gives you also access to the admin web page (which allows more settings to set up)
1.
- when all users you want to add are created on Bitwarden, go to portainer and duplicate the Bitwarden container
- change at ENV "SIGNUPS_ALLOWED = true" into "SIGNUPS_ALLOWED =false"
2.
- in order to get the Bitwarden admin web page:
- generate a token:
-type in your console:
openssl rand -base64 64
- copy the generated token
- got to your portainer web console
- duplicate the Bitwarden container:
- add a ENV:
ADMIN_TOKEN = "paste_in_the_token_from_above"
- deploy the container
- you can access the admin page via https://your-bitwarden-url/admin
- under general setting type in your Bitwarden-url and save it
- now you can make the changes you want, disallow new signups etc.
- tip: if you set up the smtp email settings you can now invite new users via email