# 6.) Installing Bitwarden

\- create docker-compose.yml

\- paste in:

```YAML
version: '3'<br></br><br></br>services:<br></br>  bitwarden:<br></br>    image: bitwardenrs/server<br></br>    restart: always<br></br>    ports:<br></br>      - 6500:80<br></br>    volumes:<br></br>      - ./bw-data:/data<br></br>    environment:<br></br>      WEBSOCKET_ENABLED: 'true' # Required to use websockets<br></br>      SIGNUPS_ALLOWED: 'true'   # set to false to disable signups
```

\- paste in

```shell
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!!

##### **<span style="text-decoration: underline;">closing your Bitwarden for new users:</span>**

\- 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"

 # the button will still be there on the bitwarden-website, but an arror accours when trying to create a new user

 2.

\- in order to get the Bitwarden admin web page:

\- generate a token:

-type in your console:

```shell
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](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