servers:windows:nginx:lets_encrypt_simple-acme
Table of Contents
Information
Prerequisites
Install
simple-acme
- Last tested:
simple-acme.v2.4.1.2444.win-arm64.trimmed.zip
MOVE /Y "%UserProfile%\Downloads\simple-acme."*".win-arm64.trimmed.zip" "%UserProfile%\Downloads\simple-acme.win-arm64.trimmed.zip" & MKDIR "%SystemDrive%\www\simple-acme" & "%SystemRoot%\System32\tar.exe" -xf "%UserProfile%\Downloads\simple-acme.win-arm64.trimmed.zip" -C "%SystemDrive%\www\simple-acme" && DIR /B "%SystemDrive%\www\simple-acme\wacs.exe"
Obtain Certs
Manual
M2: Manually enter host names4: Single certificate1: [http] Let simple-acme answer HTTP validation request1: Generate an EC public/private key pair4: Create PEM encoded filesFile path:6: No (additional) store steps3: No (additional) installation steps3: shortlived
"%SystemRoot%\System32\netsh.exe" advfirewall firewall add rule name="simple-acme (HTTP)" dir="in" action="allow" program="%SystemDrive%\www\simple-acme\wacs.exe" protocol="tcp" localport="80"
"%SystemDrive%\www\simple-acme\wacs.exe"
realmofespionage.xyz,wiki.realmofespionage.xyz
C:\simple-acme\certs
"%SystemRoot%\System32\netsh.exe" advfirewall firewall delete rule name="simple-acme (HTTP)"
Scripts
MKDIR "%SystemDrive%\www\scripts\certbot"
"%SystemRoot%\explorer.exe" "%SystemDrive%\www\scripts\certbot"
Renewal
"%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\certbot\Renewal.bat"
@echo off CD "%Temp%" CALL "%SystemDrive%\www\scripts\certbot\Update.bat" CALL "%SystemDrive%\www\scripts\nginx\Stop.bat" TITLE Certbot Renewal "%SystemRoot%\System32\netsh.exe" advfirewall firewall add rule name="Certbot (Standalone)" dir="in" action="allow" program="%LocalAppData%\Programs\Python\Python314-arm64\python.exe" protocol="tcp" localport="80" "%LocalAppData%\Programs\Python\Python314-arm64\Scripts\certbot.exe" "certonly" --config "%SystemDrive%\www\certbot\cli-custom.ini" --quiet "%SystemRoot%\System32\netsh.exe" advfirewall firewall delete rule name="Certbot (Standalone)" CALL "%SystemDrive%\www\scripts\nginx\Start.bat" :: End
"%SystemDrive%\www\scripts\certbot\Renewal.bat"
Update
"%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\certbot\Update.bat"
@echo off TITLE Certbot Update CD "%Temp%" "%LocalAppData%\Programs\Python\Python314-arm64\python.exe" -m "pip" install --upgrade "pip" --quiet "%LocalAppData%\Programs\Python\Python314-arm64\Scripts\pip.exe" install --upgrade "certbot" --quiet :: End
"%SystemDrive%\www\scripts\certbot\Update.bat"
Task Scheduler
Renewal
- Weekly (Sunday)
07:00:00 AM
"%SystemRoot%\System32\schtasks.exe" /Create /SC "WEEKLY" /D "SUN" /TN "Certbot Renewal" /TR "%SystemDrive%\www\scripts\certbot\Renewal.bat" /ST "07:00" /F
/srv/www/wiki/data/pages/servers/windows/nginx/lets_encrypt_simple-acme.txt · Last modified: by Sean Rhone