# My certificate expired and I can not get acme.sh to renew it

**URL:** <https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658>\
**Category:** Help\
**Created:** [August 12, 2021, 7:21pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658 "2021-08-12T19:21:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![brentlh](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@brentlh](https://community.letsencrypt.org/u/brentlh)\
**Post date:** [August 12, 2021, 7:21pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/1 "2021-08-12T19:21:48Z")

</div>

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. [crt.sh | example.com](https://crt.sh/?q=example.com)), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: [wa.newtonpro.com](http://wa.newtonpro.com)

I ran this command: acme.sh --renew-all  
It produced this output:  
[Thu Aug 12 12:31:52 CDT 2021] Renew: '[wa.newtonpro.com](http://wa.newtonpro.com)'  
[Thu Aug 12 12:31:52 CDT 2021] Sleep 10 and retry.

My web server is (include version): Apache/2.4.10 (Linux/SUSE)

The operating system my web server runs on is (include version):USE Linux Enterprise Server 12 (x86\_64)

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know): yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of `certbot --version` or `certbot-auto --version` if you're using Certbot):acme.sh v3.0.1

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [August 12, 2021, 8:06pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/2 "2021-08-12T20:06:32Z")

</div>

Welcome to the Let's Encrypt Community, Brent 🙂

Please post the entire output of the command.

There appears to be an extensive history of successful autorenewals:

[https://crt.sh/?q=wa.newtonpro.com](https://crt.sh/?q=wa.newtonpro.com)

What changed between May and July?

---

<div class="post-metadata">

**Author:** ![brentlh](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@brentlh](https://community.letsencrypt.org/u/brentlh)\
**Post date:** [August 12, 2021, 8:51pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/3 "2021-08-12T20:51:13Z")

</div>

Here is another attempt:  
marcie:~/.acme.sh # ./acme.sh --renew-all  
[Thu Aug 12 15:48:28 CDT 2021] Renew: '[wa.newtonpro.com](http://wa.newtonpro.com)'  
[Thu Aug 12 15:48:29 CDT 2021] Sleep 10 and retry.  
[Thu Aug 12 15:48:40 CDT 2021] Sleep 10 and retry.  
[Thu Aug 12 15:48:52 CDT 2021] Sleep 10 and retry.  
6^C  
marcie:~/.acme.sh #

---

<div class="post-metadata">

**Author:** ![brentlh](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@brentlh](https://community.letsencrypt.org/u/brentlh)\
**Post date:** [August 12, 2021, 8:53pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/4 "2021-08-12T20:53:02Z")

</div>

The only thing that changed is the auto renewing stopped working. I think it has to do with acme-v1 api not being supported now.

---

<div class="post-metadata">

**Author:** ![brentlh](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@brentlh](https://community.letsencrypt.org/u/brentlh)\
**Post date:** [August 12, 2021, 9:07pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/5 "2021-08-12T21:07:45Z")

</div>

I hope this has so clues:  
marcie:~/.acme.sh # less acme.sh.log  
[Thu Aug 12 15:28:51 CDT 2021] Running cmd: renewAll  
[Thu Aug 12 15:28:51 CDT 2021] Using config home:/root/.acme.sh  
[Thu Aug 12 15:28:52 CDT 2021] default\_acme\_server  
[Thu Aug 12 15:28:52 CDT 2021] ACME\_DIRECTORY='[https://acme.zerossl.com/v2/DV90](https://acme.zerossl.com/v2/DV90)'  
[Thu Aug 12 15:28:52 CDT 2021] \_stopRenewOnError  
[Thu Aug 12 15:28:52 CDT 2021] \_set\_level='2'  
[Thu Aug 12 15:28:52 CDT 2021] di='/root/.acme.sh/wa.newtonpro.com/'  
[Thu Aug 12 15:28:52 CDT 2021] d='[wa.newtonpro.com](http://wa.newtonpro.com)'  
[Thu Aug 12 15:28:52 CDT 2021] Using config home:/root/.acme.sh  
[Thu Aug 12 15:28:52 CDT 2021] ACME\_DIRECTORY='[https://acme.zerossl.com/v2/DV90](https://acme.zerossl.com/v2/DV90)'  
[Thu Aug 12 15:28:52 CDT 2021] DOMAIN\_PATH='/root/.acme.sh/wa.newtonpro.com'  
[Thu Aug 12 15:28:52 CDT 2021] Renew: '[wa.newtonpro.com](http://wa.newtonpro.com)'  
[Thu Aug 12 15:28:52 CDT 2021] Le\_API='[https://acme-v01.api.letsencrypt.org/directory](https://acme-v01.api.letsencrypt.org/directory)'  
[Thu Aug 12 15:28:52 CDT 2021] Using config home:/root/.acme.sh  
[Thu Aug 12 15:28:52 CDT 2021] ACME\_DIRECTORY='[https://acme-v01.api.letsencrypt.org/directory](https://acme-v01.api.letsencrypt.org/directory)'  
[Thu Aug 12 15:28:52 CDT 2021] \_init api for server: [https://acme-v01.api.letsencrypt.org/directory](https://acme-v01.api.letsencrypt.org/directory)  
[Thu Aug 12 15:28:52 CDT 2021] Retrying GET  
[Thu Aug 12 15:28:52 CDT 2021] GET  
[Thu Aug 12 15:28:52 CDT 2021] url='[https://acme-v01.api.letsencrypt.org/directory](https://acme-v01.api.letsencrypt.org/directory)'  
[Thu Aug 12 15:28:52 CDT 2021] timeout=  
[Thu Aug 12 15:28:52 CDT 2021] displayError='1'  
[Thu Aug 12 15:28:52 CDT 2021] \_CURL='curl --silent --dump-header /root/.acme.sh/http.header -L -g '  
[Thu Aug 12 15:28:52 CDT 2021] ret='0'  
[Thu Aug 12 15:28:52 CDT 2021] \_hcode='0'  
[Thu Aug 12 15:28:52 CDT 2021] ACME\_KEY\_CHANGE  
[Thu Aug 12 15:28:52 CDT 2021] ACME\_NEW\_AUTHZ  
[Thu Aug 12 15:28:52 CDT 2021] ACME\_NEW\_ORDER  
[Thu Aug 12 15:28:52 CDT 2021] ACME\_NEW\_ACCOUNT  
[Thu Aug 12 15:28:52 CDT 2021] ACME\_REVOKE\_CERT  
[Thu Aug 12 15:28:52 CDT 2021] ACME\_AGREEMENT  
[Thu Aug 12 15:28:52 CDT 2021] ACME\_NEW\_NONCE  
[Thu Aug 12 15:28:52 CDT 2021] Sleep 10 and retry.

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [August 12, 2021, 9:23pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/6 "2021-08-12T21:23:52Z")

</div>

> [@brentlh](#):
>
> I think it has to do with acme-v1 api not being supported now.

I am inclined to concur:

> [@brentlh](#):
>
> [https://acme-v01.api.letsencrypt.org/directory](https://acme-v01.api.letsencrypt.org/directory)

* * *

Keep in mind that acme.sh is now owned and operated by for-profit CA ZeroSSL and now acquires ZeroSSL certificates by default:

> [@brentlh](#):
>
> [https://acme.zerossl.com/v2/DV90](https://acme.zerossl.com/v2/DV90)

That shouldn't affect renewals of Let's Encrypt certificates though.

---

<div class="post-metadata">

**Author:** ![brentlh](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@brentlh](https://community.letsencrypt.org/u/brentlh)\
**Post date:** [August 12, 2021, 9:52pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/7 "2021-08-12T21:52:35Z")

</div>

Griffin,  
Thanks for your help!

And what if it has? What can I do now?

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [August 12, 2021, 10:14pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/8 "2021-08-12T22:14:14Z")

</div>

If your acme.sh version is recent enough, you could try changing the ACME directory in your renewal configuration file from [https://acme-v01.api.letsencrypt.org/directory](https://acme-v01.api.letsencrypt.org/directory) to [https://acme-v02.api.letsencrypt.org/directory](https://acme-v02.api.letsencrypt.org/directory).

---

<div class="post-metadata">

**Author:** ![brentlh](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@brentlh](https://community.letsencrypt.org/u/brentlh)\
**Post date:** [August 12, 2021, 10:16pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/9 "2021-08-12T22:16:55Z")

</div>

Griffin,  
I do not know the configuration file you are meaning.

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [August 12, 2021, 10:27pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/10 "2021-08-12T22:27:22Z")

</div>

Start here:

> [@brentlh](#):
>
> `/root/.acme.sh/wa.newtonpro.com/`

---

<div class="post-metadata">

**Author:** ![brentlh](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@brentlh](https://community.letsencrypt.org/u/brentlh)\
**Post date:** [August 12, 2021, 10:31pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/11 "2021-08-12T22:31:51Z")

</div>

I am there.

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [August 12, 2021, 10:37pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/12 "2021-08-12T22:37:18Z")

</div>

I believe @Nummer378 to be more experienced with acme.sh than I, so I'll yield.

---

<div class="post-metadata">

**Author:** ![Nummer378](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/nummer378/32/49862_2.png) [@Nummer378](https://community.letsencrypt.org/u/Nummer378)\
**Post date:** [August 12, 2021, 10:37pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/13 "2021-08-12T22:37:26Z")

</div>

Griffin is on the right way, just chiming in:

It might be enough to change the API endpoint, though I'm not sure how acme.sh will handle the acme account. If the following doesn't work, the best option might be to remove the config file and start fresh - Neilpang has recommended this in the past.

To change the ACME endpoint:

Open `/root/.acme.sh/wa.newtonpro.com/wa.newtonpro.com.conf` with a text editor and edit the line were it says:

```nohighlight
Le_API='https://acme-v01.api.letsencrypt.org/directory'

```

to

```nohighlight
Le_API='https://acme-v02.api.letsencrypt.org/directory'

```

(Then try acme.sh --renew-all again)

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [August 12, 2021, 10:39pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/14 "2021-08-12T22:39:30Z")

</div>

I'm hoping the acme.sh version is v2 compatible. I've seen accounts carry-over from v1 to v2 with certbot, so hopefully all will be well here... 🤞

---

<div class="post-metadata">

**Author:** ![Nummer378](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/nummer378/32/49862_2.png) [@Nummer378](https://community.letsencrypt.org/u/Nummer378)\
**Post date:** [August 12, 2021, 10:40pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/15 "2021-08-12T22:40:34Z")

</div>

It prints ZeroSSL as default server, which means this is acme.sh 3.0.0+ which is _definetly_ fully v2 compatible. But these old acme.sh configs have had some trouble in the past, lot's of old cruft in there.

---

<div class="post-metadata">

**Author:** ![brentlh](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@brentlh](https://community.letsencrypt.org/u/brentlh)\
**Post date:** [August 12, 2021, 10:45pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/16 "2021-08-12T22:45:57Z")

</div>

Here is the output now:

marcie:~/.acme.sh # ./acme.sh --renew-all  
[Thu Aug 12 17:43:23 CDT 2021] Renew: '[wa.newtonpro.com](http://wa.newtonpro.com)'  
[Thu Aug 12 17:43:41 CDT 2021] Please refer to [libcurl - Error Codes](https://curl.haxx.se/libcurl/c/libcurl-errors.html) for error code: 6  
[Thu Aug 12 17:43:43 CDT 2021] Can not init api for: [https://acme-v02api.letsencrypt.org/directory](https://acme-v02api.letsencrypt.org/directory).  
[Thu Aug 12 17:43:43 CDT 2021] Sleep 10 and retry.  
[Thu Aug 12 17:44:11 CDT 2021] Please refer to [libcurl - Error Codes](https://curl.haxx.se/libcurl/c/libcurl-errors.html) for error code: 6  
[Thu Aug 12 17:44:13 CDT 2021] Can not init api for: [https://acme-v02api.letsencrypt.org/directory](https://acme-v02api.letsencrypt.org/directory).  
[Thu Aug 12 17:44:13 CDT 2021] Sleep 10 and retry.  
9^C  
marcie:~/.acme.sh #

---

<div class="post-metadata">

**Author:** ![Nummer378](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/nummer378/32/49862_2.png) [@Nummer378](https://community.letsencrypt.org/u/Nummer378)\
**Post date:** [August 12, 2021, 10:46pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/17 "2021-08-12T22:46:38Z")

</div>

I think you're missing a '.' between v02 and api

---

<div class="post-metadata">

**Author:** ![brentlh](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@brentlh](https://community.letsencrypt.org/u/brentlh)\
**Post date:** [August 12, 2021, 10:50pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/18 "2021-08-12T22:50:21Z")

</div>

I saw my mistake and fixed it and reran the acme.sh and it said success!

Thanks to both of you!!! 😄

---

<div class="post-metadata">

**Author:** ![brentlh](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@brentlh](https://community.letsencrypt.org/u/brentlh)\
**Post date:** [August 12, 2021, 10:52pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/19 "2021-08-12T22:52:43Z")

</div>

Do either of you know if I need to do anything else to get it to auto-renew the next time it needs to?

---

<div class="post-metadata">

**Author:** ![Nummer378](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/nummer378/32/49862_2.png) [@Nummer378](https://community.letsencrypt.org/u/Nummer378)\
**Post date:** [August 12, 2021, 10:55pm UTC](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658/20 "2021-08-12T22:55:25Z")

</div>

If your certs used to auto-renew in the past (except for the past months), it should work again as before. Your installation was still using ACMEv1, which is now end of life. You're now using ACMEv2, which is still well.

PS: One last thing:

> [@griffin](#):
>
> Keep in mind that acme.sh is now owned and operated by for-profit CA ZeroSSL and now acquires ZeroSSL certificates by default:

If you want to continue using Let's Encrypt for future new domains, you should run

```nohighlight
acme.sh --set-default-ca --server letsencrypt

```

To continue using Let's Encrypt as the default. This doesn't affect your current certificate though - this will continue to be renewed with Let's Encrypt in any case. This command is just for future certificates for different domains. This is not neccessary though, it entirely depends on your preference.

[Next page](https://community.letsencrypt.org/t/my-certificate-expired-and-i-can-not-get-acme-sh-to-renew-it/157658.md?page=2)
