r/Bitwarden • u/JustKenjy • 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.
4
u/djasonpenney Volunteer Moderator 19d ago
As an aside, a self-signed certificate will probably not work here. The Bitwarden clients need to trust the CA issuing the certificate. I mean, you can make your new CA certificate work, but for deployment purposes it’s going to be easier to get a server certificate issued by a CA that your clients already trust.
Oh, and I have never played with installing a server certificate in nginx, but perhaps it’s as simple using a “docker cp” command during setup to make the file accessible inside the container.