ServerHandbook live check: run log
------------------------------------------------------------------------------
Check scripts/live/checks/lets-encrypt-nginx-ubuntu.mjs (sha256 44c231d3f7d3dd64d5fb1a9305d6afa8c8168ac179c98188f6cbd70ef38ecd4f)
Ran at 2026-11-18T08:48:33Z (507 s)
Result PASS, all 41 claims held
Tested on
System Ubuntu 24.04.4 LTS
Kernel 6.8.0-138-generic
Package nginx 1.24.0-2ubuntu7.19
Package certbot 2.9.0-1
Package python3-certbot-nginx 2.9.0-1
Package python3-acme 2.9.0-1
Package ufw 0.36.2-6
Setup A fresh Ubuntu 24.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 (9)
certbot 2.9.0-1
python3-acme 2.9.0-1
python3-certbot 2.9.0-1
python3-certbot-nginx 2.9.0-1
python3-configargparse 1.7-1
python3-icu 2.12-1build2
python3-josepy 1.14.0-1
python3-parsedatetime 2.6-3
python3-rfc3339 1.1-4
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/495c664ab1b25588a47cc96ff4448d0f/meta.json
/etc/letsencrypt/accounts/acme-staging-v02.api.letsencrypt.org/directory/495c664ab1b25588a47cc96ff4448d0f/private_key.json
/etc/letsencrypt/accounts/acme-staging-v02.api.letsencrypt.org/directory/495c664ab1b25588a47cc96ff4448d0f/regr.json
/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/fadccbed8fa6c89f3f7f07ae3491583f/meta.json
/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/fadccbed8fa6c89f3f7f07ae3491583f/private_key.json
/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/fadccbed8fa6c89f3f7f07ae3491583f/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): +10.5 MB
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Audit: nmap
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Audit: testssl
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Claims (41), each with what the run saw
------------------------------------------------------------------------------
1. ok a bare Ubuntu 24.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 2.9.0 and its Nginx plugin from Ubuntu’s repository
| eb ...
| Unpacking python3-parsedatetime (2.6-3) ...
| Selecting previously unselected package python3-certbot.
| Preparing to unpack .../5-python3-certbot_2.9.0-1_all.deb ...
| Unpacking python3-certbot (2.9.0-1) ...
| Selecting previously unselected package certbot.
| Preparing to unpack .../6-certbot_2.9.0-1_all.deb ...
| Unpacking certbot (2.9.0-1) ...
| Selecting previously unselected package python3-certbot-nginx.
| Preparing to unpack .../7-python3-certbot-nginx_2.9.0-1_all.deb ...
| Unpacking python3-certbot-nginx (2.9.0-1) ...
| Selecting previously unselected package python3-icu.
| Preparing to unpack .../8-python3-icu_2.12-1build2_amd64.deb ...
| Unpacking python3-icu (2.12-1build2) ...
| Setting up python3-configargparse (1.7-1) ...
| Setting up python3-parsedatetime (2.6-3) ...
| Setting up python3-icu (2.12-1build2) ...
| Setting up python3-josepy (1.14.0-1) ...
| Setting up python3-rfc3339 (1.1-4) ...
| Setting up python3-acme (2.9.0-1) ...
| Setting up python3-certbot (2.9.0-1) ...
| Setting up certbot (2.9.0-1) ...
| Created symlink /etc/systemd/system/timers.target.wants/certbot.timer → /usr/lib/systemd/system/certbot.timer.
| Setting up python3-certbot-nginx (2.9.0-1) ...
| Processing triggers for man-db (2.12.0-4build2) ...
|
| 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 2.9.0"
| certbot 2.9.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 (used for urgent renewal and security notices)
| (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 (used for urgent renewal and security notices)
| (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 (used for urgent renewal and security notices)
| (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 (used for urgent renewal and security notices)
| (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: 90 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.24.0 (Ubuntu)
| Date: Wed, 18 Nov 2026 08:51:34 GMT
| Content-Type: text/html
| Content-Length: 35
| Last-Modified: Wed, 18 Nov 2026 08:50:17 GMT
| Connection: keep-alive
| ETag: "6afd66c9-23"
| 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.24.0 (Ubuntu)
| Date: Wed, 18 Nov 2026 08:51:39 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 = YE2
| notBefore=Nov 18 07:52:54 2026 GMT
| notAfter=Feb 16 07:52:53 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 07:52:53+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 ipv6only=on; # managed by Certbot
| listen 443 ssl; # 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 ipv6only=on; # managed by Certbot
| listen 443 ssl; # 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 ipv6only=on; # managed by Certbot
| listen 443 ssl; # 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 46 Nov 18 08:50 /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
| Wed 2026-11-18 13:19:05 UTC 4h 26min - - 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/oc_oU90hgtKgRc1zBgDO3UrsCyUv_Y-pHSVhoRtNM8g: 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/XOqWW9C0PcpQijja8EwA7Up9D8UhBzF4vjGujCaB_38: 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 07:52:53+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 24.04.4 LTS"
| VIRT=none
| KERNEL=6.8.0-138-generic
| PKG certbot 2.9.0-1
| PKG nginx 1.24.0-2ubuntu7.19
| PKG python3-acme 2.9.0-1
| PKG python3-certbot-nginx 2.9.0-1
| PKG ufw 0.36.2-6
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 08:56:42 [emerg] 5549#5549: 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
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
python3-acme python3-certbot python3-configargparse python3-icu python3-josepy python3-parsedatetime python3-rfc3339
Suggested packages:
python-certbot-doc python3-certbot-apache python-acme-doc python-certbot-nginx-doc
The following NEW packages will be installed:
certbot python3-acme python3-certbot python3-certbot-nginx python3-configargparse python3-icu python3-josepy
python3-parsedatetime python3-rfc3339
0 upgraded, 9 newly installed, 0 to remove and 143 not upgraded.
Need to get 1,097 kB of archives.
After this operation, 5,699 kB of additional disk space will be used.
Get:1 https://mirror.hetzner.com/ubuntu/packages noble/universe amd64 python3-josepy all 1.14.0-1 [22.1 kB]
Get:2 https://mirror.hetzner.com/ubuntu/packages noble/universe amd64 python3-rfc3339 all 1.1-4 [6,744 B]
Get:3 https://mirror.hetzner.com/ubuntu/packages noble/universe amd64 python3-acme all 2.9.0-1 [48.5 kB]
Get:4 https://mirror.hetzner.com/ubuntu/packages noble/universe amd64 python3-configargparse all 1.7-1 [31.7 kB]
Get:5 https://mirror.hetzner.com/ubuntu/packages noble/universe amd64 python3-parsedatetime all 2.6-3 [32.8 kB]
Get:6 https://mirror.hetzner.com/ubuntu/packages noble/universe amd64 python3-certbot all 2.9.0-1 [267 kB]
Get:7 https://mirror.hetzner.com/ubuntu/packages noble/universe amd64 certbot all 2.9.0-1 [89.2 kB]
Get:8 https://mirror.hetzner.com/ubuntu/packages noble/universe amd64 python3-certbot-nginx all 2.9.0-1 [66.0 kB]
Get:9 https://mirror.hetzner.com/ubuntu/packages noble/main amd64 python3-icu amd64 2.12-1build2 [534 kB]
Fetched 1,097 kB in 0s (2,456 kB/s)
Preconfiguring packages ...
Selecting previously unselected package python3-josepy.
(Reading database ... 38779 files and directories currently installed.)
Preparing to unpack .../0-python3-josepy_1.14.0-1_all.deb ...
Unpacking python3-josepy (1.14.0-1) ...
Selecting previously unselected package python3-rfc3339.
Preparing to unpack .../1-python3-rfc3339_1.1-4_all.deb ...
Unpacking python3-rfc3339 (1.1-4) ...
Selecting previously unselected package python3-acme.
Preparing to unpack .../2-python3-acme_2.9.0-1_all.deb ...
Unpacking python3-acme (2.9.0-1) ...
Selecting previously unselected package python3-configargparse.
Preparing to unpack .../3-python3-configargparse_1.7-1_all.deb ...
Unpacking python3-configargparse (1.7-1) ...
Selecting previously unselected package python3-parsedatetime.
Preparing to unpack .../4-python3-parsedatetime_2.6-3_all.deb ...
Unpacking python3-parsedatetime (2.6-3) ...
Selecting previously unselected package python3-certbot.
Preparing to unpack .../5-python3-certbot_2.9.0-1_all.deb ...
Unpacking python3-certbot (2.9.0-1) ...
Selecting previously unselected package certbot.
Preparing to unpack .../6-certbot_2.9.0-1_all.deb ...
Unpacking certbot (2.9.0-1) ...
Selecting previously unselected package python3-certbot-nginx.
Preparing to unpack .../7-python3-certbot-nginx_2.9.0-1_all.deb ...
Unpacking python3-certbot-nginx (2.9.0-1) ...
Selecting previously unselected package python3-icu.
Preparing to unpack .../8-python3-icu_2.12-1build2_amd64.deb ...
Unpacking python3-icu (2.12-1build2) ...
Setting up python3-configargparse (1.7-1) ...
Setting up python3-parsedatetime (2.6-3) ...
Setting up python3-icu (2.12-1build2) ...
Setting up python3-josepy (1.14.0-1) ...
Setting up python3-rfc3339 (1.1-4) ...
Setting up python3-acme (2.9.0-1) ...
Setting up python3-certbot (2.9.0-1) ...
Setting up certbot (2.9.0-1) ...
Created symlink /etc/systemd/system/timers.target.wants/certbot.timer → /usr/lib/systemd/system/certbot.timer.
Setting up python3-certbot-nginx (2.9.0-1) ...
Processing triggers for man-db (2.12.0-4build2) ...
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 2.9.0
$ sudo certbot --nginx -d example.com -d www.example.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
(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.24.0 (Ubuntu)
Date: Wed, 18 Nov 2026 08:51:34 GMT
Content-Type: text/html
Content-Length: 35
Last-Modified: Wed, 18 Nov 2026 08:50:17 GMT
Connection: keep-alive
ETag: "6afd66c9-23"
Accept-Ranges: bytes
$ curl -I http://example.com
HTTP/1.1 301 Moved Permanently
Server: nginx/1.24.0 (Ubuntu)
Date: Wed, 18 Nov 2026 08:51:39 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 = YE2
notBefore=Nov 18 07:52:54 2026 GMT
notAfter=Feb 16 07:52:53 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 07:52:53+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 ipv6only=on; # managed by Certbot
listen 443 ssl; # 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
Wed 2026-11-18 13:19:05 UTC 4h 26min - - 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/oc_oU90hgtKgRc1zBgDO3UrsCyUv_Y-pHSVhoRtNM8g: 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/XOqWW9C0PcpQijja8EwA7Up9D8UhBzF4vjGujCaB_38: 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 08:56:42 [emerg] 5549#5549: 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
------------------------------------------------------------------------------
nmap: its full screen before the first step
------------------------------------------------------------------------------
Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-11-18 08:49 UTC
Nmap scan report for 203.0.113.10
Host is up, received user-set (0.036s 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 5.34 seconds
------------------------------------------------------------------------------
nmap: its full screen after the last step
------------------------------------------------------------------------------
Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-11-18 08:54 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 open https syn-ack
Nmap done: 1 IP address (1 host up) scanned in 5.33 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 08:54:35 -->> 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 253 AESGCM 256 TLS_AES_256_GCM_SHA384
x1303 TLS_CHACHA20_POLY1305_SHA256 ECDH 253 ChaCha20 256 TLS_CHACHA20_POLY1305_SHA256
x1301 TLS_AES_128_GCM_SHA256 ECDH 253 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 None
Elliptic curves offered: prime256v1 secp384r1 secp521r1 X25519 X448
Finite field group: ffdhe2048 ffdhe3072 ffdhe4096 ffdhe6144 ffdhe8192
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 062C0534A6C20FEDF6F96EFE684A5D2A9555 (OK: length 18)
Fingerprints SHA1 DA1F89C7A4D56B4B5461BE4F3F950E4E9D33CCE9
SHA256 67121D1F67E4319BFC94DFFAF342257716F23A7CA0B281647F28E61E0B7F8A94
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 07:52 --> 2027-02-16 07:52)
ETS/"eTLS", visibility info not present
Certificate Revocation List http://ye2.c.lencr.org/86.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 YE2 (Let's Encrypt from US)
Intermediate cert validity #1: ok > 40 days (2028-09-02 23:59). YE2 <-- 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.24.0 (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 253 bit ECDH (X25519)
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 253 bit ECDH (X25519)
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 253 bit ECDH (X25519)
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 253 bit ECDH (X25519)
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 253 bit ECDH (X25519)
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 08:56:23 [ 113s] -->> 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'] }
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