Question

How to renew Let's Encrypt certificate on Ubuntu 20.04

I just got a notice from Let’s Encrypt Expiry Bot:

Your certificate (or certificates) for the names listed below will expire in 20 days (on 02 Jul 21 11:11 +0000). Please make sure to renew your certificate before then, or visitors to your web site will encounter errors.

I used the following command which I found from DO Questions.

sudo certbot certonly --manual --manual-public-ip-logging-ok --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory -d "*.mydomain.net" -d mydomain.net

But I got the following error:

Press Enter to Continue
Waiting for verification...
Challenge failed for domain mydomain.net
Challenge failed for domain mydomain.net
dns-01 challenge for mydomain.net
dns-01 challenge for mydomain.net
Cleaning up challenges
Some challenges have failed.

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: mydomain.net
   Type:   dns
   Detail: DNS problem: NXDOMAIN looking up TXT for
   _acme-challenge.mydomain.net - check that a DNS record exists for
   this domain

   Domain: mydomain.net
   Type:   dns
   Detail: DNS problem: NXDOMAIN looking up TXT for
   _acme-challenge.mydomain.net - check that a DNS record exists for
   this domain

How can I update Let’s Encrypt?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I think I found the solution from this article.

I run the followings to check the status:

sudo systemctl status certbot.timer

To test the renewal process:

sudo certbot renew --dry-run