Hero Image

Install Let's Encrypt SSL with Certbot (Apache) on NetBSD 10

Install Let's Encrypt SSL with Certbot (Apache) on NetBSD 10

Step 1 – Install Certbot with Apache plugin

pkgin install py310-certbot py310-certbot-apache 2>/dev/null || pkg_add certbot

Step 2 – Obtain and install the certificate

certbot --apache -d example.com -d www.example.com

Certbot will enable mod_ssl, add SSL virtual host, and optionally configure HTTP→HTTPS redirect.

Step 3 – Verify

apachectl -t && systemctl reload apache2
curl -I https://example.com

Step 4 – Auto-renewal

0 3 * * * certbot renew --quiet --deploy-hook "systemctl reload apache2"

Step 5 – Wildcard certificate (DNS challenge)

certbot certonly --manual --preferred-challenges dns \
    -d "*.example.com" -d example.com

Add the TXT record to DNS as instructed, then complete the challenge.