# Windows nginx help

**URL:** <https://community.letsencrypt.org/t/windows-nginx-help/40882>\
**Category:** Help\
**Created:** [August 24, 2017, 10:35pm UTC](https://community.letsencrypt.org/t/windows-nginx-help/40882 "2017-08-24T22:35:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![phairplay](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/phairplay/32/15830_2.png) [@phairplay](https://community.letsencrypt.org/u/phairplay)\
**Post date:** [August 24, 2017, 10:35pm UTC](https://community.letsencrypt.org/t/windows-nginx-help/40882/1 "2017-08-24T22:35:25Z")

</div>

Hi I’m trying to create a cert for home assitant on a Rpi3  
And I already have nginx on my windows Which proxies all my usenet programs to my own domain with a paid ssl.

I’ve created a server block to link from mydomain directly to my RPI3 via a host domain through nginx which works, I would now like to add an SSL

I came across letsencrypt but Im really having issues setting it up.

I’ve installed letsencrypt-win-simple and ran the .exe

Here is what I’ve done

1. Added my email address
2. Agreed to the terms
3. Picked M install manually (as it didn’t find IIS)
4. Typed in my domain (host domain via no ip: [home.mydomain.com](http://home.mydomain.com))
5. Provided a folder link to my html  
now I don’t quite get this so I linked my main page to the server block, ran it and got this:

[INFO] Authorizing identifier [home.mydomain.com](http://home.mydomain.com) using http-01 challenge  
[INFO] Answer should now be browsable at [http://home.mydomain.com/.well-known/acme-challenge/hV5ns2fuXGczUzAvGw0DmixhtcohmiItxZ4NXtSCV08](http://home.mydomain.com/.well-known/acme-challenge/hV5ns2fuXGczUzAvGw0DmixhtcohmiItxZ4NXtSCV08)  
[INFO] Authorization result: valid  
[INFO] Requesting certificate: [home.mydomain.com](http://home.mydomain.com)  
[INFO] Saving certificate to C:\ProgramData\letsencrypt-win-simple\[httpsacme-v01.api.letsencrypt.org](http://httpsacme-v01.api.letsencrypt.org)\home.mydomain.com-crt.der  
[INFO] Saving issuer certificate to C:\ProgramData\letsencrypt-win-simple\[httpsacme-v01.api.letsencrypt.org](http://httpsacme-v01.api.letsencrypt.org)\ca-0A0141420000015385736A0B85ECA708-crt.pem  
[INFO] Saving certificate to C:\ProgramData\letsencrypt-win-simple\[httpsacme-v01.api.letsencrypt.org](http://httpsacme-v01.api.letsencrypt.org)\home.mydomain.com-all.pfx  
[INFO] Installing Non-Central SSL Certificate in the certificate store  
[INFO] Installing Non-Central SSL Certificate in server software  
[WARN] Unable to configure server software.  
[INFO] Removing certificate [home.mydomain.com](http://home.mydomain.com) 2017/8/24 10:38:49 PM  
[INFO] Closing certificate store  
[INFO] Adding renewal for [Manual] [1 binding - [home.mydomain.com](http://home.mydomain.com) @ C:\nginx-1.8.0\html]  
[INFO] Creating task letsencrypt-win-simple [httpsacme-v01.api.letsencrypt.org](http://httpsacme-v01.api.letsencrypt.org) with Windows Task scheduler at 9am every day.

1. I give it a username and password yet it fail and asks if I want to start again (don’t know If that matter)

Now when I check the following folder C:\ProgramData\letsencrypt-win-simple\[httpsacme-v01.api.letsencrypt.org](http://httpsacme-v01.api.letsencrypt.org)

I see the following files.  
ca-0A0141420000015385736A0B85ECA708-crt.der  
ca-0A0141420000015385736A0B85ECA708-crt.pem  
home.mydomain.com-all.pfx  
home.mydomain.com-chain.pem  
home.mydomain.com-crt.der  
home.mydomain.com-crt.pem  
home.mydomain.com-csr.pem  
home.mydomain.com-gen-csr.json  
home.mydomain.com-gen-key.json  
home.mydomain.com-key.pem  
Registration  
Signer

Have I created them correctly and which ones are needed for nginx?

Many thanks

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [August 24, 2017, 10:40pm UTC](https://community.letsencrypt.org/t/windows-nginx-help/40882/2 "2017-08-24T22:40:57Z")

</div>

Hi @phairplay,

I haven’t used letsencrypt-win-simple but it’s sure being thorough about what different applications might potentially want. 🙂 The relevant files for nginx are

home.mydomain.com-chain.pem ← certificate chain (intermediate certificate)  
home.mydomain.com-crt.pem ← your certificate (end-entity certificate)  
home.mydomain.com-key.pem ← your private key

However, apparently nginx wants you to combine the certificate and chain into one file (in Certbot we call that “full chain”, but letsencrypt-win-simple possibly did not create it). At that point, you can tell nginx where to find the full chain and the private key:

[https://nginx.org/en/docs/http/configuring\_https\_servers.html](https://nginx.org/en/docs/http/configuring_https_servers.html)

It’s possible that home.mydomain.com-crt.pem might already contain the chain certificate. If you look at the contents of that file, there will either be one block that starts `-----BEGIN CERTIFICATE-----` or two such blocks. If there are two, then it’s pre-combined and you could just point nginx to that file as the `ssl_certificate`.

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [August 24, 2017, 10:41pm UTC](https://community.letsencrypt.org/t/windows-nginx-help/40882/3 "2017-08-24T22:41:49Z")

</div>

When you get it set up correctly, you may also want to think about what will happen with certificate expiry and renewal. Remember that Let’s Encrypt certificates expire after 90 days.

---

<div class="post-metadata">

**Author:** ![phairplay](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/phairplay/32/15830_2.png) [@phairplay](https://community.letsencrypt.org/u/phairplay)\
**Post date:** [August 25, 2017, 7:04am UTC](https://community.letsencrypt.org/t/windows-nginx-help/40882/4 "2017-08-25T07:04:44Z")

</div>

Thank you for the quick response.  
I’ll Now the chain file did have everything I need (along with the key). I’ll start looking into how to auto create a renewal

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [September 24, 2017, 7:04am UTC](https://community.letsencrypt.org/t/windows-nginx-help/40882/5 "2017-09-24T07:04:54Z")

</div>

Closed on September 24, 2017, 7:04am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
