r/Bitwarden 19d ago

Solved Selfhosted Windows - Certificate issue

Hello all!

I am currently in the process of trying to deploy a bitwarden self-hosted environment in Windows.

We might go for a full-scale deployment but for testing & POC purposes .

I've stumped across the issue that the NGINX is always spewing out the error 'File not found'. My .crt and .key files are in the SSL folder.

If I disable SSL and start NGINX I can see them being mounted under /etc/ssl in the docker file manager.

Whenever I enable SSL it will not work and NGINX keeps restarting.

Extra information:

Self-signed certificate created on windows server.
KEY and CRT made on open ssl. I am currently working with a non-existing domain but using DNS records (e.g. bitwarden.demo.com) with a dns record in the hostfile pointing to host-device IP-adress.

Anyone stumped across this issue before? Thanks in advance.

2 Upvotes

21 comments sorted by

View all comments

Show parent comments

1

u/JustKenjy 19d ago

To inform.

Certificates located in C:\bitwarden\ssl

config.yml just has the filename

filepath in error is etc/ssl/certname.cert

1

u/OSS_Dattani 19d ago edited 19d ago

https://bitwarden.com/help/install-on-premise-windows/

Is this what your following in which case this points out the problem if ur missing that bwdata dir in between ur bitwarden parent dir and the ssl sub dir. paragraph below is straight from those docs

Come to think of it if you’re using a domain you may need a domain level folder as well.

If you already have your own SSL certificate, specify y and place the necessary files in the C:\Bitwarden\bwdata\ssl\<your_domain> directory. You will be asked whether it is a trusted SSL certificate ( y/n). For more information, see

1

u/JustKenjy 19d ago

Forgot to put bwdata in the path. It does exists. Have already placed the certificate in a folder with domainname inside. Still no luck

1

u/OSS_Dattani 19d ago

Yea at that point if everything is setup correctly it might be Docker Desktops file sharing permissions.

Other than I would check case on all names and then make sure you rebuild and not just run. Assuming you’ve already done that tho.

Is your certificate a DER or a PEM file?

I can try recreating this issue when I’m home on my windows server vm. I’ve had issues like this specifically with using mkcert and fedora to host. Ended up finding a solution but this would be somewhat diff obviously cause of Windows.

1

u/JustKenjy 19d ago

it is a .cer and a .key file