# Renewing Expired Let's Encrypt Certificates

**URL:** <https://forum.mattermost.com/t/renewing-expired-lets-encrypt-certificates/14319>\
**Category:** Troubleshooting\
**Created:** [October 26, 2022, 11:22am UTC](https://forum.mattermost.com/t/renewing-expired-lets-encrypt-certificates/14319 "2022-10-26T11:22:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pranaykotas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/pranaykotas/32/5691_2.png) [@pranaykotas](https://forum.mattermost.com/u/pranaykotas)\
**Post date:** [October 26, 2022, 11:22am UTC](https://forum.mattermost.com/t/renewing-expired-lets-encrypt-certificates/14319/1 "2022-10-26T11:22:01Z")

</div>

I’m using a mattermost docker installation. My certificate expired for the second time - once after 90 days, and today, after 180 days. I did the standard renewal. The output says the certificate has been renewed. But sslchecker says it is not. And I still get an untrusted certificate error. What am I doing wrong? Please help.

My domain is: matter.takshashila.org.in

I ran this command:  
`./scripts/issue-certificate.sh -d matter.takshashila.org.in -o /root/docker/certs`

It produced this output:

```auto
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Renewing an existing certificate for matter.takshashila.org.in

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/matter.takshashila.org.in-0001/fullchain.pem
Key is saved at: /etc/letsencrypt/live/matter.takshashila.org.in-0001/privkey.pem
This certificate expires on 2023-01-24.
These files will be updated when the certificate renews.

NEXT STEPS:

* The certificate will need to be renewed before it expires. Certbot can automatically renew the certificate in the background, but you may need to take steps to enable that functionality. See [User Guide — Certbot 1.31.0 documentation](https://certbot.org/renewal-setup) for instructions.

```

This was the result of “certbot certificates”

```auto
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Renewal configuration file /etc/letsencrypt/renewal/matter.takshashila.org.in.conf produced an unexpected error: renewal config file {} is missing a required file reference. Skipping.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The following renewal configurations were invalid:
  /etc/letsencrypt/renewal/matter.takshashila.org.in.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

```

---

<div class="post-metadata">

**Author:** ![pranaykotas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/pranaykotas/32/5691_2.png) [@pranaykotas](https://forum.mattermost.com/u/pranaykotas)\
**Post date:** [October 27, 2022, 1:30am UTC](https://forum.mattermost.com/t/renewing-expired-lets-encrypt-certificates/14319/2 "2022-10-27T01:30:37Z")

</div>

Can some kind soul please help me?

---

<div class="post-metadata">

**Author:** ![eli-front](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/eli-front/32/8678_2.png) [@eli-front](https://forum.mattermost.com/u/eli-front)\
**Post date:** [February 3, 2025, 6:04pm UTC](https://forum.mattermost.com/t/renewing-expired-lets-encrypt-certificates/14319/3 "2025-02-03T18:04:21Z")

</div>

If you check the letsencrypt output it tells you that the cert & key are saved at new locations (because you had another key in the default location) will need to update your env vars to something like this

```auto
CERT_PATH=./certs/etc/letsencrypt/live/${DOMAIN}-0001/fullchain.pem
KEY_PATH=./certs/etc/letsencrypt/live/${DOMAIN}-0001/privkey.pem"

```

or move the new cert / key to the default location
