# Bitwarden not working with certificates

**URL:** <https://vaultwarden.discourse.group/t/bitwarden-not-working-with-certificates/604>\
**Category:** Help\
**Created:** [February 17, 2021, 9:11pm UTC](https://vaultwarden.discourse.group/t/bitwarden-not-working-with-certificates/604 "2021-02-17T21:11:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tjonas331](https://avatars.discourse-cdn.com/v4/letter/t/6de8d8/32.png) [@tjonas331](https://vaultwarden.discourse.group/u/tjonas331)\
**Post date:** [February 17, 2021, 9:11pm UTC](https://vaultwarden.discourse.group/t/bitwarden-not-working-with-certificates/604/1 "2021-02-17T21:11:48Z")

</div>

I am trying to install bitwardenrs on my Raspberry Pi docker installation.  
First I created a container without certificates with this command:  
`sudo docker run -d --name bitwarden -v /bw-data/:/data/ -p 8081:80 bitwardenrs/server:latest`  
I was able to access bitlocker on my iPad, but Firefox want’s a certificate.  
So I stopped and removed the container and created a certificate with this [guide](https://github.com/dani-garcia/bitwarden_rs/wiki/Private-CA-and-self-signed-certs-that-work-with-Chrome)  
For the first key I left everything blank and for the second key I entered the pi’s ip as the common name.  
Next I filled the bitwarden.ext with the default config but removed the both DNS entries and added `IP.1 = pi's ip`  
After that I created the bitwarden certificate.  
Now I connected with a ftp client and was able to find the bitwarden.crt and the bitwarden.key. I moved them with sudo mv bitwarden.crt bitwarden.key /etc/ssl/certs.  
Now I started a new bitwarden container with this command:  
sudo docker run -d --name bitwarden -v /bw-data/:/data/ -e ROCKET\_TLS=’{certs="/ssl/bitwarden.crt",key="/ssl/bitwarden.key"}’ -p 8081:80 bitwardenrs/server:latest

But the container won’t start and in the logs I can find the error:

FO] No .env file found.

Logger failed to initialize: attempted to set a logger after the logging system was already initialized

[2021-02-17 20:57:46.691][rocket::config::error][ERROR] I/O error while setting tls.certs:

Does anyone know how to fix this issue?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![jjlin](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@jjlin](https://vaultwarden.discourse.group/u/jjlin)\
**Post date:** [February 18, 2021, 4:49am UTC](https://vaultwarden.discourse.group/t/bitwarden-not-working-with-certificates/604/2 "2021-02-18T04:49:35Z")

</div>

It looks like bitwarden\_rs can’t read the certs from inside the container, probably because you said they’re in `/etc/ssl/certs` on the Docker host, but you didn’t mount them into the container. Try adding `-v /etc/ssl/certs:/ssl` to your `docker run` command.

---

<div class="post-metadata">

**Author:** ![tjonas331](https://avatars.discourse-cdn.com/v4/letter/t/6de8d8/32.png) [@tjonas331](https://vaultwarden.discourse.group/u/tjonas331)\
**Post date:** [February 18, 2021, 6:30am UTC](https://vaultwarden.discourse.group/t/bitwarden-not-working-with-certificates/604/3 "2021-02-18T06:30:01Z")

</div>

Thanks,  
now my command looks like this:  
sudo docker run -d --name bitwarden -v /bw-data/:/data/ -v /etc/ssl/certs:/ssl -e ‘ROCKET\_TLS={certs="/ssl/bitwarden.crt",key="/ssl/bitwarden.key"}’ -p 8081:80 bitwardenrs/server:latest

and I am not getting this error anymore the console says:  
Rocket has launched from [https://0.0.0.0:80](https://0.0.0.0:80)

But I am still unable to reach it from my pi’s ip on port 8081

---

<div class="post-metadata">

**Author:** ![tjonas331](https://avatars.discourse-cdn.com/v4/letter/t/6de8d8/32.png) [@tjonas331](https://vaultwarden.discourse.group/u/tjonas331)\
**Post date:** [February 18, 2021, 6:38am UTC](https://vaultwarden.discourse.group/t/bitwarden-not-working-with-certificates/604/4 "2021-02-18T06:38:09Z")

</div>

I was able to fix it by entering /#/ after the port.  
Firefox is very picky 😉  
Thanks for your help

---

<div class="post-metadata">

**Author:** ![WpJ](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@WpJ](https://vaultwarden.discourse.group/u/WpJ)\
**Post date:** [February 19, 2021, 8:48am UTC](https://vaultwarden.discourse.group/t/bitwarden-not-working-with-certificates/604/5 "2021-02-19T08:48:28Z")

</div>

> [@tjonas331](#):
>
> I was able to fix it by entering /#/ after the port.  
> Firefox is very picky 😉

This is not normal. You access / which is then (AFAIK, please correct me if I am wrong) changed by the server to `/#/` (probably by something like `history.pushState()`. So you should be able to get to your page without forcing the URL hash.

FYI - I checked with my FF and I do get the page when acessing `/` (and it is turned into `/#/`)

---

<div class="post-metadata">

**Author:** ![tjonas331](https://avatars.discourse-cdn.com/v4/letter/t/6de8d8/32.png) [@tjonas331](https://vaultwarden.discourse.group/u/tjonas331)\
**Post date:** [February 19, 2021, 11:29am UTC](https://vaultwarden.discourse.group/t/bitwarden-not-working-with-certificates/604/6 "2021-02-19T11:29:05Z")

</div>

Now it does work without needing to include the /#/,  
maybe the error before was caused by browser caching. 🤷‍♂️
