# How to force letsencrypt cert renewal

**URL:** https://meta.discourse.org/t/how-to-force-letsencrypt-cert-renewal/143223
**Category:** Self-hosting
**Tags:** letsencrypt
**Created:** [3 במרץ,‏ 2020,‏ 3:52pm UTC](https://meta.discourse.org/t/how-to-force-letsencrypt-cert-renewal/143223 "2020-03-03T15:52:30Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Wingtip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wingtip/32/102039_2.png) [@Wingtip](https://meta.discourse.org/u/Wingtip)
#### Post date: [3 במרץ,‏ 2020,‏ 3:52pm UTC](https://meta.discourse.org/t/how-to-force-letsencrypt-cert-renewal/143223/1 "2020-03-03T15:52:30Z")

</div>

I just got an email from LetsEncrypt saying we need to force renewal on our certs in the next 12 hours due to a bug on their end. How do we do that with Discourse?

> **[2020.02.29 CAA Rechecking Bug](https://community.letsencrypt.org/t/2020-02-29-caa-rechecking-bug/114591)**
>
> On 2020-02-29 UTC, Let’s Encrypt found a bug in our CAA code. Our CA software, Boulder, checks for CAA records at the same time it validates a subscriber’s control of a domain name. Most subscribers issue a certificate immediately after domain...

> **[Revoking certain certificates on March 4](https://community.letsencrypt.org/t/revoking-certain-certificates-on-march-4/114864)**
>
> \[Update 2020-03-05: The most up-to-date summary is at 2020.02.29 CAA Rechecking Bug\] Due to the 2020.02.29 CAA Rechecking Bug, we unfortunately need to revoke many Let’s Encrypt TLS/SSL certificates. We’re e-mailing affected subscribers for whom...

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [3 במרץ,‏ 2020,‏ 4:33pm UTC](https://meta.discourse.org/t/how-to-force-letsencrypt-cert-renewal/143223/2 "2020-03-03T16:33:05Z")

</div>

This should work:

```plaintext
ssh root@your.discourse.server
cd /var/discourse/shared/standalone
cp -r ssl ssl_backup
rm ssl/*
cd /var/discourse
./launcher rebuild app

```

---

<div class="post-metadata">

### Author: ![Wingtip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wingtip/32/102039_2.png) [@Wingtip](https://meta.discourse.org/u/Wingtip)
#### Post date: [3 במרץ,‏ 2020,‏ 4:43pm UTC](https://meta.discourse.org/t/how-to-force-letsencrypt-cert-renewal/143223/3 "2020-03-03T16:43:23Z")

</div>

That worked, thank you!

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [4 במרץ,‏ 2020,‏ 6:42pm UTC](https://meta.discourse.org/t/how-to-force-letsencrypt-cert-renewal/143223/4 "2020-03-04T18:42:09Z")

</div>

Did not work for me. The certificates are the same as the ones in the ssl\_backup directory, after the rebuild.

I tried 2 times ; and the second I deleted the files manually through WinSCP.

How can we force the renew? Likely need `--force` somewhere.

```plaintext
[Wed 04 Mar 2020 06:33:11 PM UTC] Skip, Next renewal time is: e[1;32mMon 06 Apr 2020 06:24:28 PM UTCe[0m
[Wed 04 Mar 2020 06:33:11 PM UTC] Add 'e[1;31m--forcee[0m' to force to renew.

```

---

<div class="post-metadata">

### Author: ![Wingtip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wingtip/32/102039_2.png) [@Wingtip](https://meta.discourse.org/u/Wingtip)
#### Post date: [4 במרץ,‏ 2020,‏ 7:15pm UTC](https://meta.discourse.org/t/how-to-force-letsencrypt-cert-renewal/143223/5 "2020-03-04T19:15:36Z")

</div>

Per the letsencrypt page, try testing your domain here:

[https://checkhost.unboundtest.com/](https://checkhost.unboundtest.com/)

You may be safe now.

If not, then you do need to force it. I actually forced it from the CLI elsewhere myself as I use that same domain on a non-discourse site as well.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [4 במרץ,‏ 2020,‏ 7:45pm UTC](https://meta.discourse.org/t/how-to-force-letsencrypt-cert-renewal/143223/6 "2020-03-04T19:45:00Z")

</div>

You’re right, I did not check all my domains, I assumed all were concerned, but the one with Discourse can be ignored.

That’s said, I’ve also figured out how to force renew:

- `cd /var/discourse`
- `./launcher enter app`
- `"/shared/letsencrypt"/acme.sh --cron --home "/shared/letsencrypt" --force`
- `exit`

I don’t know if there is a more direct way, but it worked after refreshing website cache.

---

<div class="post-metadata">

### Author: ![Wingtip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wingtip/32/102039_2.png) [@Wingtip](https://meta.discourse.org/u/Wingtip)
#### Post date: [4 במרץ,‏ 2020,‏ 8:31pm UTC](https://meta.discourse.org/t/how-to-force-letsencrypt-cert-renewal/143223/7 "2020-03-04T20:31:06Z")

</div>

You also need to disable cloudflare if you’re using it. I know the discourse devs recommend against it, but it works for me.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [3 באפריל,‏ 2020,‏ 8:31pm UTC](https://meta.discourse.org/t/how-to-force-letsencrypt-cert-renewal/143223/8 "2020-04-03T20:31:11Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
