ServerHandbook live check: run log ------------------------------------------------------------------------------ Article https://serverhandbook.com/kb/lets-encrypt-nginx-ubuntu Check scripts/live/checks/lets-encrypt-nginx-ubuntu.mjs (sha256 6c90696c278af43e9f20d321918a836c633a0dc3fb6a0c4b2be5bfa329dbd3ee) Ran at 2026-11-18T22:09:22Z (543 s) Result PASS, all 41 claims held Tested on System Ubuntu 26.04.1 LTS Kernel 7.0.0-30-generic Package nginx 1.28.3-2ubuntu1.12 Package certbot 4.0.0-4 Package python3-certbot-nginx 4.0.0-3 Package python3-acme 4.0.0-2 Package ufw 0.36.2-9build1 Setup A fresh Ubuntu 26.04 cloud server from a hosting provider (its stock image, a public IPv4 address), with a domain and its www name pointed at it, ufw on and Nginx installed as the earlier articles leave it; reached over SSH as a sudo user. The certificate is a real one from Let’s Encrypt, and HTTPS was checked from another network. Every version above was read from the server at run time. Passwords used on the throwaway test server are shown as [password]. How we test: https://serverhandbook.com/how-we-test ------------------------------------------------------------------------------ What the steps changed on the server (recorded before the first step and after the last) Packages added (10) certbot 4.0.0-4 python3-acme 4.0.0-2 python3-certbot 4.0.0-4 python3-certbot-nginx 4.0.0-3 python3-configargparse 1.7-2 python3-icu 2.16.1-1build1 python3-josepy 2.2.0-1 python3-parsedatetime 2.6-3build1 python3-pytz 2025.2-5 python3-rfc3339 2.0.1-2 Packages upgraded (0) Packages removed (0) Services enabled at boot (0) Services disabled (0) Listening sockets opened (2) tcp 0.0.0.0:443 nginx tcp [::]:443 nginx Listening sockets closed (0) Files added in /etc (27) /etc/cron.d/certbot /etc/letsencrypt/.updated-options-ssl-nginx-conf-digest.txt /etc/letsencrypt/.updated-ssl-dhparams-pem-digest.txt /etc/letsencrypt/accounts/acme-staging-v02.api.letsencrypt.org/directory/c3cb2f36e776c4bcceaa7e2defa172fc/meta.json /etc/letsencrypt/accounts/acme-staging-v02.api.letsencrypt.org/directory/c3cb2f36e776c4bcceaa7e2defa172fc/private_key.json /etc/letsencrypt/accounts/acme-staging-v02.api.letsencrypt.org/directory/c3cb2f36e776c4bcceaa7e2defa172fc/regr.json /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/715a36e8c39556d7afa927f147867877/meta.json /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/715a36e8c39556d7afa927f147867877/private_key.json /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/715a36e8c39556d7afa927f147867877/regr.json /etc/letsencrypt/archive/example.com/cert1.pem /etc/letsencrypt/archive/example.com/chain1.pem /etc/letsencrypt/archive/example.com/fullchain1.pem /etc/letsencrypt/archive/example.com/privkey1.pem /etc/letsencrypt/cli.ini /etc/letsencrypt/live/README /etc/letsencrypt/live/example.com/README /etc/letsencrypt/live/example.com/cert.pem /etc/letsencrypt/live/example.com/chain.pem /etc/letsencrypt/live/example.com/fullchain.pem /etc/letsencrypt/live/example.com/privkey.pem /etc/letsencrypt/options-ssl-nginx.conf /etc/letsencrypt/renewal/example.com.conf /etc/letsencrypt/ssl-dhparams.pem /etc/logrotate.d/certbot /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com /etc/systemd/system/timers.target.wants/certbot.timer Files changed in /etc (0) Files removed from /etc (0) Disk used on / (includes logs written during the run): +11.5 MB ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Audit: nmap ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Audit: testssl ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Check-your-server script (2 items): https://cdn.serverhandbook.com/check/lets-encrypt-nginx-ubuntu/ubuntu-26.04.1-20261118t220922z.sh SHA-256 e86c13b72db0c047afc7f07c6642ae746f59af429cecf8763a2a17fcbcbe76bf ------------------------------------------------------------------------------ On the stock server, before the first step: FAIL a Let's Encrypt certificate is installed and valid FAIL the renewal timer is running After the last step: PASS a Let's Encrypt certificate is installed and valid PASS the renewal timer is running ------------------------------------------------------------------------------ Claims (41), each with what the run saw ------------------------------------------------------------------------------ 1. ok a bare Ubuntu 26.04 server box (web-server) starts 2. ok (setup) ufw on with OpenSSH and Nginx Full allowed, Nginx running, as after the earlier articles | Status: active | | To Action From | -- ------ ---- | OpenSSH ALLOW Anywhere | Nginx Full ALLOW Anywhere | OpenSSH (v6) ALLOW Anywhere (v6) | Nginx Full (v6) ALLOW Anywhere (v6) 3. ok dig prints the server’s address for both names | 203.0.113.10 | 203.0.113.10 4. ok tee prints the page it wrote |

example.com works

5. ok the server block is written (tee prints nothing with > /dev/null) 6. ok nginx -t is successful with the new server block | nginx: the configuration file /etc/nginx/nginx.conf syntax is ok | nginx: configuration file /etc/nginx/nginx.conf test is successful 7. ok the domain serves the new page over HTTP |

example.com works

8. ok (from another network) http://example.com and www answer 200 9. ok apt installs certbot 4.0.0 and its Nginx plugin from Ubuntu’s repository | ld1_all.deb… | Unpacking python3-parsedatetime (2.6-3build1)… | Selecting previously unselected package python3-certbot. | Preparing to unpack …/6-python3-certbot_4.0.0-4_all.deb… | Unpacking python3-certbot (4.0.0-4)… | Selecting previously unselected package certbot. | Preparing to unpack …/7-certbot_4.0.0-4_all.deb… | Unpacking certbot (4.0.0-4)… | Selecting previously unselected package python3-certbot-nginx. | Preparing to unpack …/8-python3-certbot-nginx_4.0.0-3_all.deb… | Unpacking python3-certbot-nginx (4.0.0-3)… | Selecting previously unselected package python3-icu. | Preparing to unpack …/9-python3-icu_2.16.1-1build1_amd64.deb… | Unpacking python3-icu (2.16.1-1build1)… | Setting up python3-configargparse (1.7-2)… | Setting up python3-parsedatetime (2.6-3build1)… | Setting up python3-icu (2.16.1-1build1)… | Setting up python3-pytz (2025.2-5)… | Setting up python3-josepy (2.2.0-1)… | Setting up python3-rfc3339 (2.0.1-2)… | Setting up python3-acme (4.0.0-2)… | Setting up python3-certbot (4.0.0-4)… | Setting up certbot (4.0.0-4)… | Created symlink '/etc/systemd/system/timers.target.wants/certbot.timer' → '/usr/lib/systemd/system/certbot.timer'. | Setting up python3-certbot-nginx (4.0.0-3)… | Processing triggers for man-db (2.13.1-1build1)… | | Scanning processes... | Scanning linux images... | | Running kernel seems to be up-to-date. | | No services need to be restarted. | | No containers need to be restarted. | | No user sessions are running outdated binaries. | | No VM guests are running outdated hypervisor (qemu) binaries on this host. 10. ok certbot --version: "certbot 4.0.0" | certbot 4.0.0 11. ok (the package already turned on certbot.timer, before any certificate exists) | enabled | active 12. ok certbot asks for an email, the Terms of Service (Y) and the EFF mailing list (N) | Saving debug log to /var/log/letsencrypt/letsencrypt.log | Enter email address or hit Enter to skip. | (Enter 'c' to cancel): admin@example.com | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Please read the Terms of Service at: | https://letsencrypt.org/documents/LE-SA-v1.8-July-06-2026.pdf | You must agree in order to register with the ACME server. Do you agree? | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (Y)es/(N)o: Y | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Would you be willing, once your first certificate is successfully issued, to | share your email address with the Electronic Frontier Foundation, a founding | partner of the Let's Encrypt project and the non-profit organization that | develops Certbot? We'd like to send you email about our work encrypting the web, | EFF news, campaigns, and ways to support digital freedom. | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (Y)es/(N)o: N | Account registered. | Requesting a certificate for example.com and www.example.com | | Successfully received certificate. | Certificate is saved at: /etc/letsencrypt/live/example.com/fullchain.pem | Key is saved at: /etc/letsencrypt/live/example.com/privkey.pem | This certificate expires on 2027-02-16. | These files will be updated when the certificate renews. | Certbot has set up a scheduled task to automatically renew this certificate in the background. | | Deploying certificate | Successfully deployed certificate for example.com to /etc/nginx/sites-enabled/example.com | Successfully deployed certificate for www.example.com to /etc/nginx/sites-enabled/example.com | Congratulations! You have successfully enabled HTTPS on https://example.com and https://www.example.com | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | If you like Certbot, please consider supporting our work by: | * Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate | * Donating to EFF: https://eff.org/donate-le | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 13. ok "Successfully received certificate" and the paths under /etc/letsencrypt/live/example.com/ | Saving debug log to /var/log/letsencrypt/letsencrypt.log | Enter email address or hit Enter to skip. | (Enter 'c' to cancel): admin@example.com | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Please read the Terms of Service at: | https://letsencrypt.org/documents/LE-SA-v1.8-July-06-2026.pdf | You must agree in order to register with the ACME server. Do you agree? | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (Y)es/(N)o: Y | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Would you be willing, once your first certificate is successfully issued, to | share your email address with the Electronic Frontier Foundation, a founding | partner of the Let's Encrypt project and the non-profit organization that | develops Certbot? We'd like to send you email about our work encrypting the web, | EFF news, campaigns, and ways to support digital freedom. | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (Y)es/(N)o: N | Account registered. | Requesting a certificate for example.com and www.example.com | | Successfully received certificate. | Certificate is saved at: /etc/letsencrypt/live/example.com/fullchain.pem | Key is saved at: /etc/letsencrypt/live/example.com/privkey.pem | This certificate expires on 2027-02-16. | These files will be updated when the certificate renews. | Certbot has set up a scheduled task to automatically renew this certificate in the background. | | Deploying certificate | Successfully deployed certificate for example.com to /etc/nginx/sites-enabled/example.com | Successfully deployed certificate for www.example.com to /etc/nginx/sites-enabled/example.com | Congratulations! You have successfully enabled HTTPS on https://example.com and https://www.example.com | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | If you like Certbot, please consider supporting our work by: | * Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate | * Donating to EFF: https://eff.org/donate-le | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 14. ok certbot deploys it into the server block for both names and says "Congratulations!" | Saving debug log to /var/log/letsencrypt/letsencrypt.log | Enter email address or hit Enter to skip. | (Enter 'c' to cancel): admin@example.com | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Please read the Terms of Service at: | https://letsencrypt.org/documents/LE-SA-v1.8-July-06-2026.pdf | You must agree in order to register with the ACME server. Do you agree? | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (Y)es/(N)o: Y | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Would you be willing, once your first certificate is successfully issued, to | share your email address with the Electronic Frontier Foundation, a founding | partner of the Let's Encrypt project and the non-profit organization that | develops Certbot? We'd like to send you email about our work encrypting the web, | EFF news, campaigns, and ways to support digital freedom. | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (Y)es/(N)o: N | Account registered. | Requesting a certificate for example.com and www.example.com | | Successfully received certificate. | Certificate is saved at: /etc/letsencrypt/live/example.com/fullchain.pem | Key is saved at: /etc/letsencrypt/live/example.com/privkey.pem | This certificate expires on 2027-02-16. | These files will be updated when the certificate renews. | Certbot has set up a scheduled task to automatically renew this certificate in the background. | | Deploying certificate | Successfully deployed certificate for example.com to /etc/nginx/sites-enabled/example.com | Successfully deployed certificate for www.example.com to /etc/nginx/sites-enabled/example.com | Congratulations! You have successfully enabled HTTPS on https://example.com and https://www.example.com | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | If you like Certbot, please consider supporting our work by: | * Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate | * Donating to EFF: https://eff.org/donate-le | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 15. ok certbot did NOT ask about a redirect (2.x adds it by default) | Saving debug log to /var/log/letsencrypt/letsencrypt.log | Enter email address or hit Enter to skip. | (Enter 'c' to cancel): admin@example.com | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Please read the Terms of Service at: | https://letsencrypt.org/documents/LE-SA-v1.8-July-06-2026.pdf | You must agree in order to register with the ACME server. Do you agree? | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (Y)es/(N)o: Y | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Would you be willing, once your first certificate is successfully issued, to | share your email address with the Electronic Frontier Foundation, a founding | partner of the Let's Encrypt project and the non-profit organization that | develops Certbot? We'd like to send you email about our work encrypting the web, | EFF news, campaigns, and ways to support digital freedom. | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (Y)es/(N)o: N | Account registered. | Requesting a certificate for example.com and www.example.com | | Successfully received certificate. | Certificate is saved at: /etc/letsencrypt/live/example.com/fullchain.pem | Key is saved at: /etc/letsencrypt/live/example.com/privkey.pem | This certificate expires on 2027-02-16. | These files will be updated when the certificate renews. | Certbot has set up a scheduled task to automatically renew this certificate in the background. | | Deploying certificate | Successfully deployed certificate for example.com to /etc/nginx/sites-enabled/example.com | Successfully deployed certificate for www.example.com to /etc/nginx/sites-enabled/example.com | Congratulations! You have successfully enabled HTTPS on https://example.com and https://www.example.com | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | If you like Certbot, please consider supporting our work by: | * Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate | * Donating to EFF: https://eff.org/donate-le | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 16. ok (the certificate's lifetime is read from the run: 89 days) | 2027-02-16 17. ok curl -I https://example.com: "HTTP/1.1 200 OK" (curl trusts the certificate) | HTTP/1.1 200 OK | Server: nginx/1.28.3 (Ubuntu) | Date: Wed, 18 Nov 2026 22:13:15 GMT | Content-Type: text/html | Content-Length: 34 | Last-Modified: Wed, 18 Nov 2026 22:11:44 GMT | Connection: keep-alive | ETag: "6afe22a0-22" | Accept-Ranges: bytes 18. ok http:// now answers "301 Moved Permanently" with "Location: https://example.com/" | HTTP/1.1 301 Moved Permanently | Server: nginx/1.28.3 (Ubuntu) | Date: Wed, 18 Nov 2026 22:13:20 GMT | Content-Type: text/html | Content-Length: 178 | Connection: keep-alive | Location: https://example.com/ 19. ok openssl shows subject CN = example.com and a Let’s Encrypt issuer | subject=CN=example.com | issuer=C=US, O=Let's Encrypt, CN=YE1 | notBefore=Nov 18 21:14:34 2026 GMT | notAfter=Feb 16 21:14:33 2027 GMT 20. ok (from another network) https://example.com and https://www.example.com answer 200 with a trusted certificate 21. ok (from another network) http:// answers 301 22. ok certbot certificates lists both names, key type ECDSA, and "VALID: N days" | Saving debug log to /var/log/letsencrypt/letsencrypt.log | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Found the following certs: | Certificate Name: example.com | Serial Number: | Key Type: ECDSA | Domains: example.com www.example.com | Expiry Date: 2027-02-16 21:14:33+00:00 (VALID: 89 days) | Certificate Path: /etc/letsencrypt/live/example.com/fullchain.pem | Private Key Path: /etc/letsencrypt/live/example.com/privkey.pem | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 23. ok the original block now listens on 443 ssl with the certificate lines "# managed by Certbot" | server { | server_name example.com www.example.com; | root /var/www/example.com; | index index.html; | | listen 443 ssl; # managed by Certbot | listen [::]:443 ssl ipv6only=on; # managed by Certbot | ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot | ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot | include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | | | } | server { | if ($host = www.example.com) { | return 301 https://$host$request_uri; | } # managed by Certbot | | | if ($host = example.com) { | return 301 https://$host$request_uri; | } # managed by Certbot | | | listen 80; | listen [::]:80; | server_name example.com www.example.com; | return 404; # managed by Certbot | | | | | } 24. ok a NEW port-80 block redirects each name with if ($host = …) return 301, and returns 404 for anything else | server { | server_name example.com www.example.com; | root /var/www/example.com; | index index.html; | | listen 443 ssl; # managed by Certbot | listen [::]:443 ssl ipv6only=on; # managed by Certbot | ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot | ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot | include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | | | } | server { | if ($host = www.example.com) { | return 301 https://$host$request_uri; | } # managed by Certbot | | | if ($host = example.com) { | return 301 https://$host$request_uri; | } # managed by Certbot | | | listen 80; | listen [::]:80; | server_name example.com www.example.com; | return 404; # managed by Certbot | | | | | } 25. ok the [::]:443 listen line has ipv6only=on | server { | server_name example.com www.example.com; | root /var/www/example.com; | index index.html; | | listen 443 ssl; # managed by Certbot | listen [::]:443 ssl ipv6only=on; # managed by Certbot | ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot | ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot | include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | | | } | server { | if ($host = www.example.com) { | return 301 https://$host$request_uri; | } # managed by Certbot | | | if ($host = example.com) { | return 301 https://$host$request_uri; | } # managed by Certbot | | | listen 80; | listen [::]:80; | server_name example.com www.example.com; | return 404; # managed by Certbot | | | | | } 26. ok (the file in sites-enabled is still the symlink, so the change is in sites-available) | lrwxrwxrwx 1 root root 45 Nov 18 22:11 /etc/nginx/sites-enabled/example.com -> /etc/nginx/sites-available/example.com 27. ok certbot.timer is listed with its next run | NEXT LEFT LAST PASSED UNIT ACTIVATES | Thu 2026-11-19 10:23:15 UTC 12h - - certbot.timer certbot.service | | 1 timers listed. | Pass --all to see loaded but inactive timers, too. 28. ok the renewal file says "# renew_before_expiry = 30 days" | # renew_before_expiry = 30 days 29. ok certbot renew --dry-run: "Congratulations, all simulated renewals succeeded" | Saving debug log to /var/log/letsencrypt/letsencrypt.log | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Processing /etc/letsencrypt/renewal/example.com.conf | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Account registered. | Simulating renewal of an existing certificate for example.com and www.example.com | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Congratulations, all simulated renewals succeeded: | /etc/letsencrypt/live/example.com/fullchain.pem (success) | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 30. ok (from another network) with only 443 open, https still works and http gets no answer 31. ok the dry run fails: "Timeout during connect (likely firewall problem)" | Saving debug log to /var/log/letsencrypt/letsencrypt.log | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Processing /etc/letsencrypt/renewal/example.com.conf | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Simulating renewal of an existing certificate for example.com and www.example.com | | Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems: | Domain: example.com | Type: connection | Detail: 203.0.113.10: Fetching http://example.com/.well-known/acme-challenge/RR1g0DPport6IdOV1xSmoEZv-ppXypwtX8luzQMoDbI: Timeout during connect (likely firewall problem) | | Domain: www.example.com | Type: connection | Detail: 203.0.113.10: Fetching http://www.example.com/.well-known/acme-challenge/9L3PbdE8pPg5VwQ4zSDTTwB7YTmHh8oUJ6_vdjfXEOY: Timeout during connect (likely firewall problem) | | Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet. | | Failed to renew certificate example.com with error: Some challenges have failed. | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | All simulated renewals failed. The following certificates could not be renewed: | /etc/letsencrypt/live/example.com/fullchain.pem (failure) | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 1 renew failure(s), 0 parse failure(s) | Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details. 32. ok with port 80 open again, the dry run succeeds | Saving debug log to /var/log/letsencrypt/letsencrypt.log | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Processing /etc/letsencrypt/renewal/example.com.conf | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Simulating renewal of an existing certificate for example.com and www.example.com | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Congratulations, all simulated renewals succeeded: | /etc/letsencrypt/live/example.com/fullchain.pem (success) | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 33. ok (the certificate is valid at the end of the steps) | Saving debug log to /var/log/letsencrypt/letsencrypt.log | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Found the following certs: | Certificate Name: example.com | Serial Number: | Key Type: ECDSA | Domains: example.com www.example.com | Expiry Date: 2027-02-16 21:14:33+00:00 (VALID: 89 days) | Certificate Path: /etc/letsencrypt/live/example.com/fullchain.pem | Private Key Path: /etc/letsencrypt/live/example.com/privkey.pem | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 34. ok (the renewal timer is running) | active 35. ok (tested on) the box reports its OS, kernel and the version of 5 package(s) | PRETTY_NAME="Ubuntu 26.04.1 LTS" | VIRT=none | KERNEL=7.0.0-30-generic | PKG certbot 4.0.0-4 | PKG nginx 1.28.3-2ubuntu1.12 | PKG python3-acme 4.0.0-2 | PKG python3-certbot-nginx 4.0.0-3 | PKG ufw 0.36.2-9build1 36. ok revoke asks whether to delete the files too (Y), warns that a certificate still in use stops the server software, asks again (Y) | Saving debug log to /var/log/letsencrypt/letsencrypt.log | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Would you like to delete the certificate(s) you just revoked, along with all | earlier and later versions of the certificate? | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (Y)es (recommended)/(N)o: Y | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | The following certificate(s) are selected for deletion: | | * example.com | | WARNING: Before continuing, ensure that the listed certificates are not being | used by any installed server software (e.g. Apache, nginx, mail servers). | Deleting a certificate that is still being used will cause the server software | to stop working. See https://certbot.org/deleting-certs for information on | deleting certificates safely. | | Are you sure you want to delete the above certificate(s)? | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (Y)es/(N)o: Y | Deleted all files relating to certificate example.com. | Congratulations! You have successfully revoked the certificate that was located at /etc/letsencrypt/live/example.com/cert.pem. 37. ok …and both happen: "Deleted all files relating to certificate example.com" and the revoke is confirmed | Saving debug log to /var/log/letsencrypt/letsencrypt.log | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Would you like to delete the certificate(s) you just revoked, along with all | earlier and later versions of the certificate? | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (Y)es (recommended)/(N)o: Y | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | The following certificate(s) are selected for deletion: | | * example.com | | WARNING: Before continuing, ensure that the listed certificates are not being | used by any installed server software (e.g. Apache, nginx, mail servers). | Deleting a certificate that is still being used will cause the server software | to stop working. See https://certbot.org/deleting-certs for information on | deleting certificates safely. | | Are you sure you want to delete the above certificate(s)? | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (Y)es/(N)o: Y | Deleted all files relating to certificate example.com. | Congratulations! You have successfully revoked the certificate that was located at /etc/letsencrypt/live/example.com/cert.pem. 38. ok nginx -t now FAILS: the server block still names the deleted certificate files | 2026/11/18 22:18:01 [emerg] 6650#6650: cannot load certificate "/etc/letsencrypt/live/example.com/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/example.com/fullchain.pem, r) error:10000080:BIO routines::no such file) | nginx: configuration file /etc/nginx/nginx.conf test failed 39. ok (the running Nginx keeps serving until a reload or restart) 40. ok with the plain port-80 block back, nginx -t is successful | nginx: the configuration file /etc/nginx/nginx.conf syntax is ok | nginx: configuration file /etc/nginx/nginx.conf test is successful 41. ok (from another network) the site answers 200 on http again ------------------------------------------------------------------------------ Commands and what they printed (30) ------------------------------------------------------------------------------ $ dig +short example.com www.example.com 203.0.113.10 203.0.113.10 $ sudo mkdir -p /var/www/example.com $ echo '

example.com works

' | sudo tee /var/www/example.com/index.html

example.com works

$ sudo tee /etc/nginx/sites-available/example.com > /dev/null <<'EOF' $ server { $ listen 80; $ listen [::]:80; $ server_name example.com www.example.com; $ root /var/www/example.com; $ index index.html; $ } $ EOF $ sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/ $ sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful $ sudo systemctl reload nginx $ curl http://example.com

example.com works

$ sudo apt install -y certbot python3-certbot-nginx Installing: certbot python3-certbot-nginx Installing dependencies: python3-acme python3-configargparse python3-josepy python3-pytz python3-certbot python3-icu python3-parsedatetime python3-rfc3339 Suggested packages: python-certbot-doc python3-certbot-apache python-acme-doc python-certbot-nginx-doc Summary: Upgrading: 0, Installing: 10, Removing: 0, Not Upgrading: 158 Download size: 1,248 kB Space needed: 6,391 kB / 36.5 GB available Get:1 https://mirror.hetzner.com/ubuntu/packages resolute/universe amd64 python3-josepy all 2.2.0-1 [22.3 kB] Get:2 https://mirror.hetzner.com/ubuntu/packages resolute/universe amd64 python3-pytz all 2025.2-5 [32.4 kB] Get:3 https://mirror.hetzner.com/ubuntu/packages resolute/universe amd64 python3-rfc3339 all 2.0.1-2 [6,530 B] Get:4 https://mirror.hetzner.com/ubuntu/packages resolute/universe amd64 python3-acme all 4.0.0-2 [49.3 kB] Get:5 https://mirror.hetzner.com/ubuntu/packages resolute/main amd64 python3-configargparse all 1.7-2 [31.7 kB] Get:6 https://mirror.hetzner.com/ubuntu/packages resolute/universe amd64 python3-parsedatetime all 2.6-3build1 [32.1 kB] Get:7 https://mirror.hetzner.com/ubuntu/packages resolute/universe amd64 python3-certbot all 4.0.0-4 [267 kB] Get:8 https://mirror.hetzner.com/ubuntu/packages resolute/universe amd64 certbot all 4.0.0-4 [91.5 kB] Get:9 https://mirror.hetzner.com/ubuntu/packages resolute/universe amd64 python3-certbot-nginx all 4.0.0-3 [67.7 kB] Get:10 https://mirror.hetzner.com/ubuntu/packages resolute/main amd64 python3-icu amd64 2.16.1-1build1 [647 kB] Fetched 1,248 kB in 0s (2,883 kB/s) Preconfiguring packages ... Selecting previously unselected package python3-josepy. (Reading database… 52167 files and directories currently installed.) Preparing to unpack …/0-python3-josepy_2.2.0-1_all.deb… Unpacking python3-josepy (2.2.0-1)… Selecting previously unselected package python3-pytz. Preparing to unpack …/1-python3-pytz_2025.2-5_all.deb… Unpacking python3-pytz (2025.2-5)… Selecting previously unselected package python3-rfc3339. Preparing to unpack …/2-python3-rfc3339_2.0.1-2_all.deb… Unpacking python3-rfc3339 (2.0.1-2)… Selecting previously unselected package python3-acme. Preparing to unpack …/3-python3-acme_4.0.0-2_all.deb… Unpacking python3-acme (4.0.0-2)… Selecting previously unselected package python3-configargparse. Preparing to unpack …/4-python3-configargparse_1.7-2_all.deb… Unpacking python3-configargparse (1.7-2)… Selecting previously unselected package python3-parsedatetime. Preparing to unpack …/5-python3-parsedatetime_2.6-3build1_all.deb… Unpacking python3-parsedatetime (2.6-3build1)… Selecting previously unselected package python3-certbot. Preparing to unpack …/6-python3-certbot_4.0.0-4_all.deb… Unpacking python3-certbot (4.0.0-4)… Selecting previously unselected package certbot. Preparing to unpack …/7-certbot_4.0.0-4_all.deb… Unpacking certbot (4.0.0-4)… Selecting previously unselected package python3-certbot-nginx. Preparing to unpack …/8-python3-certbot-nginx_4.0.0-3_all.deb… Unpacking python3-certbot-nginx (4.0.0-3)… Selecting previously unselected package python3-icu. Preparing to unpack …/9-python3-icu_2.16.1-1build1_amd64.deb… Unpacking python3-icu (2.16.1-1build1)… Setting up python3-configargparse (1.7-2)… Setting up python3-parsedatetime (2.6-3build1)… Setting up python3-icu (2.16.1-1build1)… Setting up python3-pytz (2025.2-5)… Setting up python3-josepy (2.2.0-1)… Setting up python3-rfc3339 (2.0.1-2)… Setting up python3-acme (4.0.0-2)… Setting up python3-certbot (4.0.0-4)… Setting up certbot (4.0.0-4)… Created symlink '/etc/systemd/system/timers.target.wants/certbot.timer' → '/usr/lib/systemd/system/certbot.timer'. Setting up python3-certbot-nginx (4.0.0-3)… Processing triggers for man-db (2.13.1-1build1)… Scanning processes... Scanning linux images... Running kernel seems to be up-to-date. No services need to be restarted. No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host. $ certbot --version certbot 4.0.0 $ sudo certbot --nginx -d example.com -d www.example.com Saving debug log to /var/log/letsencrypt/letsencrypt.log Enter email address or hit Enter to skip. (Enter 'c' to cancel): admin@example.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Please read the Terms of Service at: https://letsencrypt.org/documents/LE-SA-v1.8-July-06-2026.pdf You must agree in order to register with the ACME server. Do you agree? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (Y)es/(N)o: Y - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Would you be willing, once your first certificate is successfully issued, to share your email address with the Electronic Frontier Foundation, a founding partner of the Let's Encrypt project and the non-profit organization that develops Certbot? We'd like to send you email about our work encrypting the web, EFF news, campaigns, and ways to support digital freedom. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (Y)es/(N)o: N Account registered. Requesting a certificate for example.com and www.example.com Successfully received certificate. Certificate is saved at: /etc/letsencrypt/live/example.com/fullchain.pem Key is saved at: /etc/letsencrypt/live/example.com/privkey.pem This certificate expires on 2027-02-16. These files will be updated when the certificate renews. Certbot has set up a scheduled task to automatically renew this certificate in the background. Deploying certificate Successfully deployed certificate for example.com to /etc/nginx/sites-enabled/example.com Successfully deployed certificate for www.example.com to /etc/nginx/sites-enabled/example.com Congratulations! You have successfully enabled HTTPS on https://example.com and https://www.example.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If you like Certbot, please consider supporting our work by: * Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate * Donating to EFF: https://eff.org/donate-le - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $ curl -I https://example.com HTTP/1.1 200 OK Server: nginx/1.28.3 (Ubuntu) Date: Wed, 18 Nov 2026 22:13:15 GMT Content-Type: text/html Content-Length: 34 Last-Modified: Wed, 18 Nov 2026 22:11:44 GMT Connection: keep-alive ETag: "6afe22a0-22" Accept-Ranges: bytes $ curl -I http://example.com HTTP/1.1 301 Moved Permanently Server: nginx/1.28.3 (Ubuntu) Date: Wed, 18 Nov 2026 22:13:20 GMT Content-Type: text/html Content-Length: 178 Connection: keep-alive Location: https://example.com/ $ echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null | openssl x509 -noout -subject -issuer -dates subject=CN=example.com issuer=C=US, O=Let's Encrypt, CN=YE1 notBefore=Nov 18 21:14:34 2026 GMT notAfter=Feb 16 21:14:33 2027 GMT $ sudo certbot certificates Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Found the following certs: Certificate Name: example.com Serial Number: Key Type: ECDSA Domains: example.com www.example.com Expiry Date: 2027-02-16 21:14:33+00:00 (VALID: 89 days) Certificate Path: /etc/letsencrypt/live/example.com/fullchain.pem Private Key Path: /etc/letsencrypt/live/example.com/privkey.pem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $ cat /etc/nginx/sites-available/example.com server { server_name example.com www.example.com; root /var/www/example.com; index index.html; listen 443 ssl; # managed by Certbot listen [::]:443 ssl ipv6only=on; # managed by Certbot ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } server { if ($host = www.example.com) { return 301 https://$host$request_uri; } # managed by Certbot if ($host = example.com) { return 301 https://$host$request_uri; } # managed by Certbot listen 80; listen [::]:80; server_name example.com www.example.com; return 404; # managed by Certbot } $ systemctl list-timers certbot.timer --no-pager NEXT LEFT LAST PASSED UNIT ACTIVATES Thu 2026-11-19 10:23:15 UTC 12h - - certbot.timer certbot.service 1 timers listed. Pass --all to see loaded but inactive timers, too. $ sudo grep renew_before_expiry /etc/letsencrypt/renewal/example.com.conf # renew_before_expiry = 30 days $ sudo certbot renew --dry-run Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Processing /etc/letsencrypt/renewal/example.com.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Account registered. Simulating renewal of an existing certificate for example.com and www.example.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Congratulations, all simulated renewals succeeded: /etc/letsencrypt/live/example.com/fullchain.pem (success) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $ sudo ufw delete allow 'Nginx Full' Rule deleted Rule deleted (v6) $ sudo ufw allow 'Nginx HTTPS' Rule added Rule added (v6) $ sudo certbot renew --dry-run Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Processing /etc/letsencrypt/renewal/example.com.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Simulating renewal of an existing certificate for example.com and www.example.com Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems: Domain: example.com Type: connection Detail: 203.0.113.10: Fetching http://example.com/.well-known/acme-challenge/RR1g0DPport6IdOV1xSmoEZv-ppXypwtX8luzQMoDbI: Timeout during connect (likely firewall problem) Domain: www.example.com Type: connection Detail: 203.0.113.10: Fetching http://www.example.com/.well-known/acme-challenge/9L3PbdE8pPg5VwQ4zSDTTwB7YTmHh8oUJ6_vdjfXEOY: Timeout during connect (likely firewall problem) Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet. Failed to renew certificate example.com with error: Some challenges have failed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - All simulated renewals failed. The following certificates could not be renewed: /etc/letsencrypt/live/example.com/fullchain.pem (failure) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 renew failure(s), 0 parse failure(s) Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details. $ sudo ufw allow 'Nginx Full' Rule added Rule added (v6) $ sudo ufw delete allow 'Nginx HTTPS' Rule deleted Rule deleted (v6) $ sudo certbot renew --dry-run Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Processing /etc/letsencrypt/renewal/example.com.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Simulating renewal of an existing certificate for example.com and www.example.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Congratulations, all simulated renewals succeeded: /etc/letsencrypt/live/example.com/fullchain.pem (success) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $ sudo certbot revoke --cert-name example.com Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Would you like to delete the certificate(s) you just revoked, along with all earlier and later versions of the certificate? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (Y)es (recommended)/(N)o: Y - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The following certificate(s) are selected for deletion: * example.com WARNING: Before continuing, ensure that the listed certificates are not being used by any installed server software (e.g. Apache, nginx, mail servers). Deleting a certificate that is still being used will cause the server software to stop working. See https://certbot.org/deleting-certs for information on deleting certificates safely. Are you sure you want to delete the above certificate(s)? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (Y)es/(N)o: Y Deleted all files relating to certificate example.com. Congratulations! You have successfully revoked the certificate that was located at /etc/letsencrypt/live/example.com/cert.pem. $ sudo nginx -t 2026/11/18 22:18:01 [emerg] 6650#6650: cannot load certificate "/etc/letsencrypt/live/example.com/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/example.com/fullchain.pem, r) error:10000080:BIO routines::no such file) nginx: configuration file /etc/nginx/nginx.conf test failed $ sudo tee /etc/nginx/sites-available/example.com > /dev/null <<'EOF' $ server { $ listen 80; $ listen [::]:80; $ server_name example.com www.example.com; $ root /var/www/example.com; $ index index.html; $ } $ EOF $ sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful $ sudo systemctl reload nginx ------------------------------------------------------------------------------ The check-your-server script, its full screen before the steps ------------------------------------------------------------------------------ ServerHandbook check, lets-encrypt-nginx-ubuntu (proved 2026-11-18) FAIL a Let's Encrypt certificate is installed and valid fix: https://serverhandbook.com/kb/lets-encrypt-nginx-ubuntu#step-4-certificate FAIL the renewal timer is running fix: https://serverhandbook.com/kb/lets-encrypt-nginx-ubuntu#renewal 0 passed, 2 failed To fix a FAIL, follow the steps in https://serverhandbook.com/kb/lets-encrypt-nginx-ubuntu ------------------------------------------------------------------------------ The check-your-server script, its full screen after the steps ------------------------------------------------------------------------------ ServerHandbook check, lets-encrypt-nginx-ubuntu (proved 2026-11-18) PASS a Let's Encrypt certificate is installed and valid PASS the renewal timer is running 2 passed, 0 failed ------------------------------------------------------------------------------ nmap: its full screen before the first step ------------------------------------------------------------------------------ Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-11-18 22:10 UTC Nmap scan report for 203.0.113.10 Host is up, received user-set (0.035s latency). Not shown: 997 filtered tcp ports (no-response) PORT STATE SERVICE REASON 22/tcp open ssh syn-ack 80/tcp open http syn-ack 443/tcp closed https conn-refused Nmap done: 1 IP address (1 host up) scanned in 4.55 seconds ------------------------------------------------------------------------------ nmap: its full screen after the last step ------------------------------------------------------------------------------ Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-11-18 22:15 UTC Nmap scan report for 203.0.113.10 Host is up, received user-set (0.037s latency). Not shown: 997 filtered tcp ports (no-response) PORT STATE SERVICE REASON 22/tcp open ssh syn-ack 80/tcp open http syn-ack 443/tcp open https syn-ack Nmap done: 1 IP address (1 host up) scanned in 4.58 seconds ------------------------------------------------------------------------------ testssl: its full screen before the first step ------------------------------------------------------------------------------ (not run before the steps: no HTTPS yet) ------------------------------------------------------------------------------ testssl: its full screen after the last step ------------------------------------------------------------------------------ Start 2026-11-18 22:16:01 -->> 203.0.113.10:443 (example.com) <<-- rDNS (203.0.113.10): . Service detected: HTTP Testing protocols via sockets except NPN+ALPN SSLv2 not offered (OK) SSLv3 not offered (OK) TLS 1 not offered TLS 1.1 not offered TLS 1.2 offered (OK) TLS 1.3 offered (OK): final NPN/SPDY not offered ALPN/HTTP2 http/1.1 (offered) Testing cipher categories NULL ciphers (no encryption) not offered (OK) Anonymous NULL Ciphers (no authentication) not offered (OK) Export ciphers (w/o ADH+NULL) not offered (OK) LOW: 64 Bit + DES, RC[2,4], MD5 (w/o export) not offered (OK) Triple DES Ciphers / IDEA not offered Obsoleted CBC ciphers (AES, ARIA etc.) not offered Strong encryption (AEAD ciphers) with no FS not offered Forward Secrecy strong encryption (AEAD ciphers) offered (OK) Testing server's cipher preferences Hexcode Cipher Suite Name (OpenSSL) KeyExch. Encryption Bits Cipher Suite Name (IANA/RFC) ----------------------------------------------------------------------------------------------------------------------------- SSLv2 - SSLv3 - TLSv1 - TLSv1.1 - TLSv1.2 (no server order, thus listed by strength) xc02c ECDHE-ECDSA-AES256-GCM-SHA384 ECDH 521 AESGCM 256 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 xcca9 ECDHE-ECDSA-CHACHA20-POLY1305 ECDH 521 ChaCha20 256 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 xc02b ECDHE-ECDSA-AES128-GCM-SHA256 ECDH 521 AESGCM 128 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 TLSv1.3 (no server order, thus listed by strength) x1302 TLS_AES_256_GCM_SHA384 ECDH/MLKEM AESGCM 256 TLS_AES_256_GCM_SHA384 x1303 TLS_CHACHA20_POLY1305_SHA256 ECDH/MLKEM ChaCha20 256 TLS_CHACHA20_POLY1305_SHA256 x1301 TLS_AES_128_GCM_SHA256 ECDH/MLKEM AESGCM 128 TLS_AES_128_GCM_SHA256 Has server cipher order? no (limited sense as client will pick) Testing robust forward secrecy (FS) -- omitting Null Authentication/Encryption, 3DES, RC4 FS is offered (OK) TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-ECDSA-CHACHA20-POLY1305 TLS_AES_128_GCM_SHA256 ECDHE-ECDSA-AES128-GCM-SHA256 KEMs offered X25519MLKEM768 Elliptic curves offered: prime256v1 secp384r1 secp521r1 X25519 X448 Finite field group: ffdhe2048 ffdhe3072 TLS 1.2 sig_algs offered: ECDSA+SHA512 ECDSA+SHA384 ECDSA+SHA256 ECDSA+SHA224 TLS 1.3 sig_algs offered: ECDSA+SHA256 Testing server defaults (Server Hello) TLS extensions (standard) "server name/#0" "max fragment length/#1" "supported_groups/#10" "EC point formats/#11" "application layer protocol negotiation/#16" "extended master secret/#23" "supported versions/#43" "key share/#51" "renegotiation info/#65281" Session Ticket RFC 5077 hint no -- no lifetime advertised SSL Session ID support yes Session Resumption Tickets no, ID: yes TLS clock skew Random values, no fingerprinting possible Certificate Compression none Client Authentication none Signature Algorithm ECDSA with SHA384 Server key size EC 256 bits (curve P-256) Server key usage Digital Signature Server extended key usage TLS Web Server Authentication Serial 05A5E7D81E5E268DD86DE473AAA9740C88B4 (OK: length 18) Fingerprints SHA1 1F42687B11A2B1093629FAB263E02716769C434F SHA256 904B648AC0CCFB65B31832B3ED4D87E0691C346B3B5C18EA5FBEC0CF066A1A04 Common Name (CN) example.com subjectAltName (SAN) example.com www.example.com Trust (hostname) Ok via SAN and CN (same w/o SNI) Chain of trust Ok EV cert (experimental) no Certificate Validity (UTC) 89 >= 30 days (2026-11-18 21:14 --> 2027-02-16 21:14) ETS/"eTLS", visibility info not present Certificate Revocation List http://ye1.c.lencr.org/53.crl OCSP URI -- OCSP stapling not offered OCSP must staple extension -- DNS CAA RR (experimental) not offered Certificate Transparency yes (certificate extension) Certificates provided 4 Issuer YE1 (Let's Encrypt from US) Intermediate cert validity #1: ok > 40 days (2028-09-02 23:59). YE1 <-- Root YE #2: ok > 40 days (2032-09-02 23:59). Root YE <-- ISRG Root X2 #3: ok > 40 days (2032-09-02 23:59). ISRG Root X2 <-- ISRG Root X1 Intermediate Bad OCSP (exp.) Ok Testing HTTP header response @ "/" HTTP Status Code 200 OK HTTP clock skew 0 sec from localtime Strict Transport Security not offered Public Key Pinning -- Server banner nginx/1.28.3 (Ubuntu) Application banner -- Cookie(s) (none issued at "/") Security headers -- Reverse Proxy banner -- Testing vulnerabilities Heartbleed (CVE-2014-0160) not vulnerable (OK), no heartbeat extension CCS (CVE-2014-0224) not vulnerable (OK) Ticketbleed (CVE-2016-9244), experiment. not vulnerable (OK), no session ticket extension ROBOT Server does not support any cipher suites that use RSA key transport Secure Renegotiation (RFC 5746) supported (OK) Secure Client-Initiated Renegotiation not vulnerable (OK) CRIME, TLS (CVE-2012-4929) not vulnerable (OK) BREACH (CVE-2013-3587) potentially NOT ok, "gzip" HTTP compression detected. - only supplied "/" tested Can be ignored for static pages or if no secrets in the page POODLE, SSL (CVE-2014-3566) not vulnerable (OK), no SSLv3 support TLS_FALLBACK_SCSV (RFC 7507) No fallback possible (OK), no protocol below TLS 1.2 offered SWEET32 (CVE-2016-2183, CVE-2016-6329) not vulnerable (OK) FREAK (CVE-2015-0204) not vulnerable (OK) DROWN (CVE-2016-0800, CVE-2016-0703) not vulnerable on this host and port (OK) no RSA certificate, thus certificate can't be used with SSLv2 elsewhere LOGJAM (CVE-2015-4000), experimental not vulnerable (OK): no DH EXPORT ciphers, no DH key detected with <= TLS 1.2 BEAST (CVE-2011-3389) not vulnerable (OK), no SSL3 or TLS1 LUCKY13 (CVE-2013-0169), experimental not vulnerable (OK) Winshock (CVE-2014-6321), experimental not vulnerable (OK) RC4 (CVE-2013-2566, CVE-2015-2808) no RC4 ciphers detected (OK) Running client simulations (HTTP) via sockets Browser Protocol Cipher Suite Name (OpenSSL) Forward Secrecy ------------------------------------------------------------------------------------------------ Android 7.0 (native) TLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Android 8.1 (native) TLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256 253 bit ECDH (X25519) Android 9.0 (native) TLSv1.3 TLS_AES_128_GCM_SHA256 253 bit ECDH (X25519) Android 10.0 (native) TLSv1.3 TLS_AES_128_GCM_SHA256 253 bit ECDH (X25519) Android 11/12 (native) TLSv1.3 TLS_AES_128_GCM_SHA256 253 bit ECDH (X25519) Android 13/14 (native) TLSv1.3 TLS_AES_128_GCM_SHA256 253 bit ECDH (X25519) Android 15 (native) TLSv1.3 TLS_AES_128_GCM_SHA256 X25519MLKEM768 Chrome 101 (Win 10) TLSv1.3 TLS_AES_128_GCM_SHA256 253 bit ECDH (X25519) Chromium 137 (Win 11) TLSv1.3 TLS_AES_128_GCM_SHA256 X25519MLKEM768 Firefox 100 (Win 10) TLSv1.3 TLS_AES_128_GCM_SHA256 253 bit ECDH (X25519) Firefox 137 (Win 11) TLSv1.3 TLS_AES_128_GCM_SHA256 X25519MLKEM768 IE 8 Win 7 No connection IE 11 Win 7 TLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 256 bit ECDH (P-256) IE 11 Win 8.1 TLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 256 bit ECDH (P-256) IE 11 Win Phone 8.1 TLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256 256 bit ECDH (P-256) IE 11 Win 10 TLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 256 bit ECDH (P-256) Edge 15 Win 10 TLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 253 bit ECDH (X25519) Edge 101 Win 10 21H2 TLSv1.3 TLS_AES_128_GCM_SHA256 253 bit ECDH (X25519) Edge 133 Win 11 23H2 TLSv1.3 TLS_AES_128_GCM_SHA256 X25519MLKEM768 Safari 18.4 (iOS 18.4) TLSv1.3 TLS_AES_128_GCM_SHA256 253 bit ECDH (X25519) Safari 15.4 (macOS 12.3.1) TLSv1.3 TLS_AES_128_GCM_SHA256 253 bit ECDH (X25519) Safari 18.4 (macOS 15.4) TLSv1.3 TLS_AES_128_GCM_SHA256 253 bit ECDH (X25519) Java 7u25 No connection Java 8u442 (OpenJDK) TLSv1.3 TLS_AES_256_GCM_SHA384 253 bit ECDH (X25519) Java 11.0.2 (OpenJDK) TLSv1.3 TLS_AES_128_GCM_SHA256 256 bit ECDH (P-256) Java 17.0.3 (OpenJDK) TLSv1.3 TLS_AES_256_GCM_SHA384 253 bit ECDH (X25519) Java 21.0.6 (OpenJDK) TLSv1.3 TLS_AES_256_GCM_SHA384 253 bit ECDH (X25519) go 1.17.8 TLSv1.3 TLS_AES_128_GCM_SHA256 253 bit ECDH (X25519) LibreSSL 3.3.6 (macOS) TLSv1.3 TLS_CHACHA20_POLY1305_SHA256 253 bit ECDH (X25519) OpenSSL 1.0.2e TLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 256 bit ECDH (P-256) OpenSSL 1.1.1d (Debian) TLSv1.3 TLS_AES_256_GCM_SHA384 253 bit ECDH (X25519) OpenSSL 3.0.15 (Debian) TLSv1.3 TLS_AES_256_GCM_SHA384 253 bit ECDH (X25519) OpenSSL 3.5.0 (git) TLSv1.3 TLS_AES_256_GCM_SHA384 X25519MLKEM768 Apple Mail (16.0) TLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384 256 bit ECDH (P-256) Thunderbird (91.9) TLSv1.3 TLS_AES_128_GCM_SHA256 253 bit ECDH (X25519) Rating (experimental) Rating specs (not complete) SSL Labs's 'SSL Server Rating Guide' (version 2009r from 2025-05-16) Specification documentation https://github.com/ssllabs/research/wiki/SSL-Server-Rating-Guide Protocol Support (weighted) 100 (30) Key Exchange (weighted) 100 (30) Cipher Strength (weighted) 90 (36) Final Score 96 Overall Grade A+ Done 2026-11-18 22:17:01 [ 62s] -->> 203.0.113.10:443 (example.com) <<-- ------------------------------------------------------------------------------ The check's source (scripts/live/checks/lets-encrypt-nginx-ubuntu.mjs) As it ran. ------------------------------------------------------------------------------ /** * KB: Let's Encrypt for Nginx on Ubuntu 26.04 and 24.04 with certbot (run per release; proof standard v2 2026-11-18: * nmap from a second server before and after, testssl.sh from it after the steps): check DNS, a server block for the domain, install certbot, * get the certificate (the real prompts), check HTTPS and the redirect from the server and from another network, what * certbot changed in the server block, renewal (timer + dry run), the renewal that fails when port 80 is closed, and * removing the certificate (revoke + delete, then the config that no longer loads, and the fix). * * Runs ONLY on a real rented server (LIVE_VPS=root@
LIVE_VPS_DOMAIN=, box.mjs `vps`): Let's Encrypt * must reach the server's port 80 from the internet, which no local box can offer. The server is the provider's stock * Ubuntu image of the release with a public IPv4 and IPv6; the domain and its www name have A records pointing at it (no AAAA). * Commands use example.com; box.mjs swaps the real name in on the way out and back on the way in. * * Hidden setup, as the earlier articles leave the server: the sudo user `deploy`, ufw on with SSH allowed, Nginx * installed and 'Nginx Full' allowed. "From another network" is the machine running this check (the laptop), which * reaches the server over the internet exactly as a visitor does. * * LIVE_LE_STAGING=1 sends every certbot request to Let's Encrypt's STAGING server (adds --test-cert to the command * sent, never to the command shown) so a check being written does not use up the real rate limits. Such a run is * never saved (meta.saveRun false): its certificate is not trusted, so the HTTPS claims fail on purpose. */ import { spawnSync } from 'node:child_process' import { VPS, VPS_DOMAIN } from '../box.mjs' import { bareBox, reportBox } from '../lib.mjs' const STAGING = process.env.LIVE_LE_STAGING === '1' export const meta = { saveRun: !STAGING, audits: ['nmap', 'testssl'], // The reader's check-your-server script (plan05 phase 3): proved by the runner on the stock server and after the steps. reader: [ { item: "a Let's Encrypt certificate is installed and valid", cmd: "sudo certbot certificates", expect: "VALID: \\d+ days", step: "step-4-certificate" }, { item: "the renewal timer is running", cmd: "systemctl is-active certbot.timer", expect: "^active$", step: "renewal" }, ], } const RELEASE = process.env.LIVE_BOX_RELEASE || '24.04' /** The page's command → what is sent: with LIVE_LE_STAGING, certbot asks the staging server. */ const le = (cmd) => (STAGING ? cmd.replace(/^sudo certbot (\S+)/, 'sudo certbot $1 --test-cert') : cmd) /** From another network (this machine), over the internet: the HTTP status, '000' = no answer. */ const fromOutside = (url) => spawnSync('curl', ['-s', '-o', '/dev/null', '-m', '10', '-w', '%{http_code}', url.replace('example.com', VPS_DOMAIN)], { encoding: 'utf8', }).stdout const SERVER_BLOCK = `server { listen 80; listen [::]:80; server_name example.com www.example.com; root /var/www/example.com; index index.html; }` const check = (ctx) => { if (!VPS) { ctx.check('this check runs on a real rented server (LIVE_VPS and LIVE_VPS_DOMAIN set)', false, 'LIVE_VPS is not set') return } return bareBox(ctx, async ({ sudoUser }) => { const { run, ask, L } = sudoUser() L('sudo true') // ── hidden: as the UFW and Nginx articles leave the server ────────────────────────────── L('sudo ufw allow OpenSSH && sudo ufw --force enable') L('sudo apt-get update -qq && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq nginx', 900000) L("sudo ufw allow 'Nginx Full'") ctx.check( '(setup) ufw on with OpenSSH and Nginx Full allowed, Nginx running, as after the earlier articles', /Nginx Full\s+ALLOW/.test(L('sudo ufw status')) && L('systemctl is-active nginx') === 'active', L('sudo ufw status'), ) // ── step 1: the domain points at the server ───────────────────────────────────────────── const dig = run('dig +short example.com www.example.com', { id: 'dig' }) ctx.check('dig prints the server’s address for both names', dig.out === '203.0.113.10\n203.0.113.10', dig.out) // ── step 2: a server block for the domain ─────────────────────────────────────────────── run('sudo mkdir -p /var/www/example.com', { id: 'mkdir' }) const page = run("echo '

example.com works

' | sudo tee /var/www/example.com/index.html", { id: 'page' }) ctx.check('tee prints the page it wrote', page.out === '

example.com works

', page.out) const tee = run(`sudo tee /etc/nginx/sites-available/example.com > /dev/null <<'EOF'\n${SERVER_BLOCK}\nEOF`, { id: 'block' }) ctx.check('the server block is written (tee prints nothing with > /dev/null)', tee.exit === 0 && tee.out === '', tee.out) run('sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/', { id: 'enable' }) const t1 = run('sudo nginx -t', { id: 'test-block' }) ctx.check('nginx -t is successful with the new server block', t1.exit === 0 && /test is successful/.test(t1.out), t1.out) run('sudo systemctl reload nginx', { id: 'reload-block' }) const http1 = run('curl http://example.com', { id: 'curl-http' }) ctx.check('the domain serves the new page over HTTP', http1.out === '

example.com works

', http1.out) ctx.check('(from another network) http://example.com and www answer 200', fromOutside('http://example.com/') === '200' && fromOutside('http://www.example.com/') === '200', '') // ── step 3: install certbot ───────────────────────────────────────────────────────────── const inst = run('sudo apt install -y certbot python3-certbot-nginx', { id: 'apt-install', timeout: 900000 }) // the version is read from the box (2.9.0 on 24.04), never assumed const CV = (L("dpkg-query -W -f='${Version}' certbot").match(/^(\d+\.\d+\.\d+)/) ?? [])[1] ?? '?' ctx.check(`apt installs certbot ${CV} and its Nginx plugin from Ubuntu’s repository`, inst.exit === 0 && inst.out.includes(`Setting up certbot (${CV}`) && inst.out.includes(`Setting up python3-certbot-nginx (${CV}`), inst.out.slice(-1500)) const ver = run('certbot --version', { id: 'version' }) ctx.check(`certbot --version: "certbot ${CV}"`, ver.out === `certbot ${CV}`, ver.out) const timer0 = L('systemctl is-enabled certbot.timer; systemctl is-active certbot.timer') ctx.check('(the package already turned on certbot.timer, before any certificate exists)', timer0 === 'enabled\nactive', timer0) // ── step 4: get the certificate ───────────────────────────────────────────────────────── const show = 'sudo certbot --nginx -d example.com -d www.example.com' const cb = ask( le(show), [ ['Enter email address', 'admin@example.com'], ['\\(Y\\)es/\\(N\\)o', 'Y'], ['\\(Y\\)es/\\(N\\)o', 'N'], ], { show, id: 'certbot', timeout: 300, publicReplies: true }, ) ctx.check('certbot asks for an email, the Terms of Service (Y) and the EFF mailing list (N)', /Enter email address/.test(cb.out) && /Terms of Service/.test(cb.out) && /Electronic Frontier Foundation/.test(cb.out), cb.out) ctx.check('"Successfully received certificate" and the paths under /etc/letsencrypt/live/example.com/', cb.exit === 0 && /Successfully received certificate/.test(cb.out) && /\/etc\/letsencrypt\/live\/example\.com\/fullchain\.pem/.test(cb.out), cb.out) ctx.check('certbot deploys it into the server block for both names and says "Congratulations!"', /Successfully deployed certificate for example\.com to \/etc\/nginx\/sites-enabled\/example\.com/.test(cb.out) && /Successfully deployed certificate for www\.example\.com/.test(cb.out) && /Congratulations!/.test(cb.out), cb.out) ctx.check('certbot did NOT ask about a redirect (2.x adds it by default)', !/redirect/i.test(cb.out.split('Deploying certificate')[0] ?? ''), cb.out) const exp = (cb.out.match(/This certificate expires on (\d{4}-\d{2}-\d{2})/) ?? [])[1] const days = exp ? Math.round((Date.parse(exp) - Date.now()) / 86400000) : NaN ctx.check(`(the certificate's lifetime is read from the run: ${days} days)`, Number.isFinite(days) && days > 30 && days <= 100, String(exp)) // ── step 5: check it works ────────────────────────────────────────────────────────────── const https = run('curl -I https://example.com', { id: 'curl-https' }) ctx.check('curl -I https://example.com: "HTTP/1.1 200 OK" (curl trusts the certificate)', /^HTTP\/1\.1 200 OK/.test(https.out), https.out) const redir = run('curl -I http://example.com', { id: 'curl-redirect' }) ctx.check('http:// now answers "301 Moved Permanently" with "Location: https://example.com/"', /^HTTP\/1\.1 301 Moved Permanently/.test(redir.out) && /Location: https:\/\/example\.com\//.test(redir.out), redir.out) const ssl = run('echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null | openssl x509 -noout -subject -issuer -dates', { id: 'openssl' }) // OpenSSL 3.0 (24.04) prints "CN = x", newer OpenSSL "CN=x": the claim is the name and the issuer, not the spacing ctx.check('openssl shows subject CN = example.com and a Let’s Encrypt issuer', /subject=CN ?= ?example\.com/.test(ssl.out) && /issuer=C ?= ?US, O ?= ?Let's Encrypt/.test(ssl.out), ssl.out) ctx.check('(from another network) https://example.com and https://www.example.com answer 200 with a trusted certificate', fromOutside('https://example.com/') === '200' && fromOutside('https://www.example.com/') === '200', '') ctx.check('(from another network) http:// answers 301', fromOutside('http://example.com/') === '301', '') const certs = run('sudo certbot certificates', { id: 'certificates' }) ctx.check('certbot certificates lists both names, key type ECDSA, and "VALID: N days"', /Domains: example\.com www\.example\.com/.test(certs.out) && /Key Type: ECDSA/.test(certs.out) && /VALID: \d+ days/.test(certs.out), certs.out) // ── what certbot changed ──────────────────────────────────────────────────────────────── const cfg = run('cat /etc/nginx/sites-available/example.com', { id: 'cat-block' }) ctx.check('the original block now listens on 443 ssl with the certificate lines "# managed by Certbot"', /listen 443 ssl; # managed by Certbot/.test(cfg.out) && /ssl_certificate \/etc\/letsencrypt\/live\/example\.com\/fullchain\.pem; # managed by Certbot/.test(cfg.out), cfg.out) ctx.check('a NEW port-80 block redirects each name with if ($host = …) return 301, and returns 404 for anything else', /if \(\$host = www\.example\.com\) \{\s*return 301 https:\/\/\$host\$request_uri;/.test(cfg.out) && /return 404; # managed by Certbot/.test(cfg.out), cfg.out) ctx.check('the [::]:443 listen line has ipv6only=on', /listen \[::\]:443 ssl ipv6only=on; # managed by Certbot/.test(cfg.out), cfg.out) ctx.check('(the file in sites-enabled is still the symlink, so the change is in sites-available)', /->/.test(L('ls -l /etc/nginx/sites-enabled/example.com')), L('ls -l /etc/nginx/sites-enabled/example.com')) // ── renewal ───────────────────────────────────────────────────────────────────────────── const timer = run('systemctl list-timers certbot.timer --no-pager', { id: 'timer' }) ctx.check('certbot.timer is listed with its next run', /certbot\.timer\s+certbot\.service/.test(timer.out), timer.out) const conf = run('sudo grep renew_before_expiry /etc/letsencrypt/renewal/example.com.conf', { id: 'renew-before' }) ctx.check('the renewal file says "# renew_before_expiry = 30 days"', /# renew_before_expiry = 30 days/.test(conf.out), conf.out) const dry = run('sudo certbot renew --dry-run', { id: 'dry-run', timeout: 300000 }) ctx.check('certbot renew --dry-run: "Congratulations, all simulated renewals succeeded"', dry.exit === 0 && /Congratulations, all simulated renewals succeeded/.test(dry.out), dry.out) // ── port 80 closed: renewal fails ─────────────────────────────────────────────────────── run("sudo ufw delete allow 'Nginx Full'", { id: 'close-80-a' }) run("sudo ufw allow 'Nginx HTTPS'", { id: 'close-80-b' }) ctx.check('(from another network) with only 443 open, https still works and http gets no answer', fromOutside('https://example.com/') === '200' && fromOutside('http://example.com/') === '000', '') const fail = run('sudo certbot renew --dry-run', { id: 'dry-run-fail', timeout: 300000 }) ctx.check('the dry run fails: "Timeout during connect (likely firewall problem)"', fail.exit !== 0 && /Timeout during connect \(likely firewall problem\)/.test(fail.out), fail.out) run("sudo ufw allow 'Nginx Full'", { id: 'open-80-a' }) run("sudo ufw delete allow 'Nginx HTTPS'", { id: 'open-80-b' }) const dry2 = run('sudo certbot renew --dry-run', { id: 'dry-run-ok', timeout: 300000 }) ctx.check('with port 80 open again, the dry run succeeds', dry2.exit === 0 && /all simulated renewals succeeded/.test(dry2.out), dry2.out) const valid = L('sudo certbot certificates') ctx.check('(the certificate is valid at the end of the steps)', /VALID: \d+ days/.test(valid), valid, { reader: { cmd: 'sudo certbot certificates', expect: 'VALID: \\d+ days' }, }) const tmr = L('systemctl is-active certbot.timer') ctx.check('(the renewal timer is running)', tmr === 'active', tmr, { reader: { cmd: 'systemctl is-active certbot.timer', expect: '^active$' } }) ctx.stepsDone() // the article's steps end here (certificate in place, renewal proved); removing it follows reportBox( ctx, L, `A fresh Ubuntu ${RELEASE} cloud server from a hosting provider (its stock image, a public IPv4 address), with a domain and its www name pointed at it, ufw on and Nginx installed as the earlier articles leave it; reached over SSH as a sudo user. The certificate is a real one from Let’s Encrypt, and HTTPS was checked from another network.`, ['nginx', 'certbot', 'python3-certbot-nginx', 'python3-acme', 'ufw'], ) // ── remove the certificate ────────────────────────────────────────────────────────────── const rev = ask( le('sudo certbot revoke --cert-name example.com'), [ ['\\(Y\\)es \\(recommended\\)/\\(N\\)o', 'Y'], ['Are you sure you want to delete[\\s\\S]*\\(Y\\)es/\\(N\\)o', 'Y'], ], { show: 'sudo certbot revoke --cert-name example.com', id: 'revoke', timeout: 300, publicReplies: true }, ) ctx.check('revoke asks whether to delete the files too (Y), warns that a certificate still in use stops the server software, asks again (Y)', /delete the certificate/.test(rev.out) && /Deleting a certificate that is still being used will cause the server software\s+to stop working/.test(rev.out) && /Are you sure you want to delete/.test(rev.out), rev.out) ctx.check('…and both happen: "Deleted all files relating to certificate example.com" and the revoke is confirmed', /Deleted all files relating to certificate example\.com/.test(rev.out) && /revoked/i.test(rev.out.split('Are you sure')[1] ?? ''), rev.out) const t2 = run('sudo nginx -t', { id: 'test-after-delete' }) ctx.check('nginx -t now FAILS: the server block still names the deleted certificate files', t2.exit !== 0 && /\/etc\/letsencrypt\/live\/example\.com\/fullchain\.pem/.test(t2.out) && /test failed/.test(t2.out), t2.out) ctx.check('(the running Nginx keeps serving until a reload or restart)', fromOutside('https://example.com/') === '200', '') run(`sudo tee /etc/nginx/sites-available/example.com > /dev/null <<'EOF'\n${SERVER_BLOCK}\nEOF`, { id: 'block-again' }) const t3 = run('sudo nginx -t', { id: 'test-restored' }) ctx.check('with the plain port-80 block back, nginx -t is successful', t3.exit === 0 && /test is successful/.test(t3.out), t3.out) run('sudo systemctl reload nginx', { id: 'reload-restored' }) ctx.check('(from another network) the site answers 200 on http again', fromOutside('http://example.com/') === '200', '') }) } export default check