User Tools

Site Tools


servers:windows:nginx:lets_encrypt

Information

TODOs

  • :!: Certbot needs admin for symlinks and needs scripting 3)

Prerequisites

Install

Python

  • Install pip

Certbot

"%LocalAppData%\Programs\Python\Python313\Scripts\pip.exe" install "certbot"

Update

"%LocalAppData%\Programs\Python\Python313\Scripts\pip.exe" install --upgrade "certbot"

Settings

MKDIR "%SystemDrive%\www\certbot"
notepad "%SystemDrive%\www\certbot\cli-custom.ini"
verbose = true
text = true
non-interactive = true
standalone = true
force-renewal = true
agree-tos = true

##########
#CHANGEME#
##########

email = espionage724@x

##########
#CHANGEME#
##########

no-eff-email = true

rsa-key-size = 4096
redirect = true
hsts = true
uir = true
staple-ocsp = true

domains = realmofespionage.xyz, blog.realmofespionage.xyz, files.realmofespionage.xyz, media.realmofespionage.xyz, wiki.realmofespionage.xyz

# End

Obtain Certs Test

"%LocalAppData%\Programs\Python\Python313\Scripts\certbot.exe" "certonly" --config "%SystemDrive%\www\certbot\cli-custom.ini" --dry-run

Scripts

MKDIR "%SystemDrive%\www\scripts\certbot"
explorer "%SystemDrive%\www\scripts\certbot"

Renewal

notepad "%SystemDrive%\www\scripts\certbot\Renewal.bat"
:: Stop nginx
CALL "%SystemDrive%\www\scripts\nginx\Stop.bat"

:: Renew Certs
"%LocalAppData%\Programs\Python\Python313\Scripts\certbot.exe" "certonly" --config "%SystemDrive%\www\certbot\cli-custom.ini" --quiet

:: Start nginx
CALL "%SystemDrive%\www\scripts\nginx\Start.bat"

:: End
"%SystemDrive%\www\scripts\certbot\Renewal.bat"

Update

notepad "%SystemDrive%\www\scripts\certbot\Update.bat"
:: Update pip
"%LocalAppData%\Programs\Python\Python313\python.exe" -m "pip" install --upgrade "pip" --quiet

:: Update Certbot
"%LocalAppData%\Programs\Python\Python313\Scripts\pip.exe" install --upgrade "certbot" --quiet

:: End
"%SystemDrive%\www\scripts\certbot\Update.bat"

Shortcuts

Desktop

  • Right-click Desktop → New → Shortcut

Renewal

"%SystemDrive%\www\scripts\certbot\Renewal.bat"
Certbot Renewal
3)
new certs filenames add #; tar archives, remove it, pull-in new certs; test with --test-certs
4)
Certbot doesn't necessarily require nginx; if not using nginx then port 443/tcp likely needs to be opened
C:/www/wiki/data/pages/servers/windows/nginx/lets_encrypt.txt · Last modified: by Sean Rhone