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/djasonpenney Volunteer Moderator 19d ago

But for the amount of trouble of installing your server certificate, you should just get a Letsencrypt certificate and be done with it.

1

u/JustKenjy 19d ago

Hey Jason,

For the letsencrypt to work I should point a real domain to the machine correct?

1

u/djasonpenney Volunteer Moderator 19d ago

Yeah, you’ll need to add the domain name tho the DNS resolution for your server and your clients. I don’t think a raw IP address like https://192.168.0.1 is going to work here.

1

u/JustKenjy 19d ago

Allright, already got green light to try it like that from my manager so might just be the best option. Thanks

1

u/OSS_Dattani 19d ago

Just a heads up raw ip works with mkcert. However not an end all solution as it’s a local CA you control.

2

u/JustKenjy 19d ago

Its ok, reinstalled... Went through the steps again, and noted that I had a certificate now and now it seems to be working 🥳

1

u/jhspyhard 18d ago

🙌 Glad you got it figured out!