Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows » Install Lets Encrypt Certificate on Windows with Certbot
  • PXE Boot Stuck or No Boot Image was found   Te bootloader did not find any operating system
    Fix PXE Boot Stuck or No Boot Image was found for HyperV VM Virtualization
  • Unable to ping an EC2 Instance
    Unable to Ping an EC2 Instance AWS/Azure/OpenShift
  • How To Backup Your WordPress Database banner
    How to Backup and Restore your WordPress Files and Database Backup
  • Hub Transport 1
    Hub Transport Server: Resolving ‘Failed to Reach Running Status’ Network | Monitoring
  • What Happens if You Turn Off Your Computer During windows update
    What Happens if You Turn Off Your Computer During an Update Windows
  • react 1
    How to deploy a React Application to AWS S3 AWS/Azure/OpenShift
  • how to bypass windows admin log in password 2
    Disable or Enable Auto log on in Windows Windows
  • Ubuntu on Windows
    Install Ubuntu 20.04 LTS on Windows via WSL Linux

Install Lets Encrypt Certificate on Windows with Certbot

Posted on 17/07/202417/07/2024 Matthew By Matthew No Comments on Install Lets Encrypt Certificate on Windows with Certbot
Install Lets Encrypt Certificate on Windows with Certbot
Install Lets Encrypt Certificate on Windows with Certbot

Let’s Encrypt provides free, trusted SSL certificates, widely accepted by many authorities and browsers. The certificates are signed by the Internet Security Research Group (ISRG) Root X1, ensuring a high level of trust. Certbot, a command-line tool developed in Python, makes it easy to request and renew these certificates from Let’s Encrypt. Although direct support for Windows was discontinued in February 2024, you can still use Certbot on Windows through the Windows Subsystem for Linux (WSL) 2. Kindly see How to install WSL2 on Windows Server.

This guide will walk you through the process of installing Certbot on WSL, validating your domain, issuing a certificate, and setting up automatic renewal. Please see other related guides: How to install Let’s Encrypt on Apache Web Server, Install Let’s Encrypt Wildcard SSL Certificate in cPanel using Certify The Web, How to install Let’s Encrypt Certificates with IIS on a Windows Server, How to create a self-signed cert via IIS.

Step 1: Install Certbot in the Windows Subsystem for Linux

First, enable WSL on your Windows machine and install a Linux distribution like Ubuntu from the Microsoft Store. Please see Various methods to install Windows Subsystem for Linux.

Launch the Ubuntu shell from the Windows Terminal.

Install Lets Encrypt Certificate on Windows with Certbot: Open Ubuntu from Windows terminal
Open Ubuntu from Windows terminal

Run the following commands to ensure your system is up to date:

sudo apt update
Update Ubuntu
Update Ubuntu
sudo apt upgrade
Upgrade Ubuntu
Upgrade Ubuntu

Install Certbot with the following command:

sudo apt install -y certbot
Install Certbot
Install Certbot

Step 2: Validate Your Domain

To validate your domain and request a certificate using Certbot, follow these steps:

Execute the following command to start the certificate request process. Replace <YOUR_DOMAIN> with your actual domain name:

sudo certbot -d <YOUR_DOMAIN> --manual --preferred-challenges dns certonly
Validate domain to request certificate
Validate domain to request certificate

Certbot will prompt you to enter an email address for urgent renewal and security notices. Provide your email address and press Enter.

Read the Terms of Service provided by Let’s Encrypt. You must agree to proceed. Type A and press Enter.

Certbot will ask if you are willing to share your email address with the Electronic Frontier Foundation (EFF). Type Y for Yes or N for No and press Enter.

Certbot will prompt you to create a DNS TXT record to prove ownership of the domain. Follow the instructions provided by Certbot.

Add DNS TXT record
Add DNS TXT record

After adding the TXT record to your DNS zone, verify it by running:

nslookup -q=txt <YOUR_DOMAIN>

Once the DNS record is verified, Certbot will issue the certificate. The issued certificates will be saved in /etc/letsencrypt/live/<YOUR_DOMAIN>/.

Step 3: Automate Certificate Renewal

Set Up Cron Job for Automatic Renewal. Open the crontab editor:

crontab -e

Add the following line to schedule Certbot to check for renewals twice a day:

0 */12 * * * /usr/bin/certbot renew -q

This command will quietly check for certificates that need renewal every 12 hours.

Run a dry-run to ensure that the renewal process works correctly:

sudo certbot renew --dry-run

Step 4: Export Certificates for Use with IIS

For use with IIS or other Windows applications, export the certificate as a PFX file.

Open a root shell:

sudo -i

Navigate to the certificate directory:

cd /etc/letsencrypt/live/yourdomain.com

Export the certificate:

openssl pkcs12 -export -out yourdomain.pfx -inkey privkey.pem -in cert.pem -certfile chain.pem -password pass:yourpassword

Transfer the certificate to the Windows file system:

mkdir /mnt/c/Users/yourusername/letsencrypt
cp -R /etc/letsencrypt/* /mnt/c/Users/yourusername/letsencrypt

Conclusion

By following these steps, you can easily install and manage Let’s Encrypt certificates on a Windows system using Certbot through WSL. This setup ensures your web services are secure and your certificates are always up-to-date, all while leveraging the power and convenience of Let’s Encrypt and Certbot.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Web Server, Windows, Windows Server Tags:Certificates, Microsoft Windows, ssl certificate, Windows 10, Windows 11, Windows Server 2016

Post navigation

Previous Post: AD Recovery: Fix device ran into an issue with error 0xc00002e2
Next Post: Raise or Downgrade AD Domain and Forest Functional Level

Related Posts

  • How to Fix Scanning and Repairing Drive on Every Boot
    How to Fix Scanning and Repairing Drive on Every Boot Windows
  • Windows OS type and version and build
    How to determine Windows Version or Edition and Build Windows
  • WindowsTerminalServerRDS
    Remove a Remote Desktop Service collection Windows Server
  • mountedimagenotaccessible
    Unable to access the image: Make sure that the image path and the Windows directory for the image exist and you have Read permissions on the folder Windows
  • featured image
    How to Add or Remove Sites from Favorites list in Microsoft Edge Windows
  • newsroom hero image password security
    Unable to update the password value provided for the new password and Password Policy Windows Server

More Related Articles

How to Fix Scanning and Repairing Drive on Every Boot How to Fix Scanning and Repairing Drive on Every Boot Windows
Windows OS type and version and build How to determine Windows Version or Edition and Build Windows
WindowsTerminalServerRDS Remove a Remote Desktop Service collection Windows Server
mountedimagenotaccessible Unable to access the image: Make sure that the image path and the Windows directory for the image exist and you have Read permissions on the folder Windows
featured image How to Add or Remove Sites from Favorites list in Microsoft Edge Windows
newsroom hero image password security Unable to update the password value provided for the new password and Password Policy Windows Server

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

Top 30 System Admin Blog

sysadmin top30a
 
  • PXE Boot Stuck or No Boot Image was found   Te bootloader did not find any operating system
    Fix PXE Boot Stuck or No Boot Image was found for HyperV VM Virtualization
  • Unable to ping an EC2 Instance
    Unable to Ping an EC2 Instance AWS/Azure/OpenShift
  • How To Backup Your WordPress Database banner
    How to Backup and Restore your WordPress Files and Database Backup
  • Hub Transport 1
    Hub Transport Server: Resolving ‘Failed to Reach Running Status’ Network | Monitoring
  • What Happens if You Turn Off Your Computer During windows update
    What Happens if You Turn Off Your Computer During an Update Windows
  • react 1
    How to deploy a React Application to AWS S3 AWS/Azure/OpenShift
  • how to bypass windows admin log in password 2
    Disable or Enable Auto log on in Windows Windows
  • Ubuntu on Windows
    Install Ubuntu 20.04 LTS on Windows via WSL Linux

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,841 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.