openssl x509 -enddate -noout -in /etc/letsencrypt/live/example.com/cert.pem

Category: Self-Hosting

openssl x509 -enddate -noout -in /etc/letsencrypt/live/example.com/cert.pem

Check the exact expiry date of a TLS certificate file directly with OpenSSL

Directly reads the certificate file and prints its expiry date. Useful in monitoring scripts that alert you before a cert expires.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.