# Automatic renewal of Lets Encrypt UI certificate

**URL:** <https://forum.pritunl.com/t/automatic-renewal-of-lets-encrypt-ui-certificate/3164>\
**Category:** Pritunl\
**Created:** [March 31, 2025, 9:40am UTC](https://forum.pritunl.com/t/automatic-renewal-of-lets-encrypt-ui-certificate/3164 "2025-03-31T09:40:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkalugeroff](https://forum.pritunl.com/user_avatar/forum.pritunl.com/kkalugeroff/32/1298_2.png) [@kkalugeroff](https://forum.pritunl.com/u/kkalugeroff)\
**Post date:** [March 31, 2025, 9:40am UTC](https://forum.pritunl.com/t/automatic-renewal-of-lets-encrypt-ui-certificate/3164/1 "2025-03-31T09:40:53Z")

</div>

Hello,

We are currently using Let’s Encrypt certificates for our UI and have a couple of questions regarding the automatic renewal process.

First, does the renewal occur on the day of expiration, or does it happen a few days prior? For instance, our newly set up certificate shows 62 days until expiration, even though the official documentation states that certificates should be valid for 90 days. This clarification is important as we plan to build automation around the process.

Secondly, is it necessary to keep port 80 open for the renewal, or can we close it and simply run the renewal command (e.g., `renew-ssl-cert`) without having the port open?

Thank you for your assistance!

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [March 31, 2025, 2:20pm UTC](https://forum.pritunl.com/t/automatic-renewal-of-lets-encrypt-ui-certificate/3164/2 "2025-03-31T14:20:50Z")

</div>

It renews after 80 days as set by `sudo pritunl set app.acme_renew 6912000`.

---

<div class="post-metadata">

**Author:** ![kkalugeroff](https://forum.pritunl.com/user_avatar/forum.pritunl.com/kkalugeroff/32/1298_2.png) [@kkalugeroff](https://forum.pritunl.com/u/kkalugeroff)\
**Post date:** [April 1, 2025, 7:43am UTC](https://forum.pritunl.com/t/automatic-renewal-of-lets-encrypt-ui-certificate/3164/3 "2025-04-01T07:43:37Z")

</div>

> [@zach](#):
>
> pritunl set app.acme\_renew 6912000

Hi @zach ,

I didn’t quite understand a few things:

- what the proposed command is supposed to do exactly and isn’t this configured in advance or I need to execute it once the certificate is in place ?
- should we left port 80 open if we renew lets encrypt certificate using pritunl cli command ?

Thanks!

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [April 1, 2025, 11:15pm UTC](https://forum.pritunl.com/t/automatic-renewal-of-lets-encrypt-ui-certificate/3164/4 "2025-04-01T23:15:44Z")

</div>

It’s done automatically 80 days after a new certificate is acquired. The command `sudo pritunl renew-ssl-cert` triggers a manual renewal. Port 80 must be open for the certificate to renew.

---

<div class="post-metadata">

**Author:** ![kkalugeroff](https://forum.pritunl.com/user_avatar/forum.pritunl.com/kkalugeroff/32/1298_2.png) [@kkalugeroff](https://forum.pritunl.com/u/kkalugeroff)\
**Post date:** [April 6, 2025, 10:48am UTC](https://forum.pritunl.com/t/automatic-renewal-of-lets-encrypt-ui-certificate/3164/5 "2025-04-06T10:48:27Z")

</div>

Could you please elaborate on how this process works? My understanding is that the internal application logic automatically renews the certificate when it is 81 days old. Additionally, should I expect to see any log entries in the Pritunl logs indicating a successful certificate renewal?

I ask because I am using Let’s Encrypt for my public domain, which was registered on 1743155791.7633524 (Friday, March 28, 2025 9:56:31.763 AM GMT). I set up the command `pritunl set app.acme_renew 777600`, which corresponds to 9 days, and I expected the certificate to renew on the 9th or 10th day. However, this did not occur, and I am not sure what log messages I should be looking for to determine why. Could you please confirm if my understanding of the command outcome is correct?

---

<div class="post-metadata">

**Author:** ![kkalugeroff](https://forum.pritunl.com/user_avatar/forum.pritunl.com/kkalugeroff/32/1298_2.png) [@kkalugeroff](https://forum.pritunl.com/u/kkalugeroff)\
**Post date:** [April 7, 2025, 8:21am UTC](https://forum.pritunl.com/t/automatic-renewal-of-lets-encrypt-ui-certificate/3164/6 "2025-04-07T08:21:32Z")

</div>

Based on my recent validation, it appears that the certificate renewal did indeed occur.  
I also came across this line in your code base: [https://github.com/pritunl/pritunl/blob/master/pritunl/tasks/acme\_update.py#L31](https://github.com/pritunl/pritunl/blob/master/pritunl/tasks/acme_update.py#L31), which suggests that restarting the Pritunl service is necessary for the renewal process to take effect. Am I understanding this correctly?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [April 8, 2025, 1:39am UTC](https://forum.pritunl.com/t/automatic-renewal-of-lets-encrypt-ui-certificate/3164/7 "2025-04-08T01:39:23Z")

</div>

The task runs everyday at 4:35, the `run_on_start` option will cause the task to also run every time the service is started.

---

<div class="post-metadata">

**Author:** ![kkalugeroff](https://forum.pritunl.com/user_avatar/forum.pritunl.com/kkalugeroff/32/1298_2.png) [@kkalugeroff](https://forum.pritunl.com/u/kkalugeroff)\
**Post date:** [April 8, 2025, 7:30am UTC](https://forum.pritunl.com/t/automatic-renewal-of-lets-encrypt-ui-certificate/3164/8 "2025-04-08T07:30:25Z")

</div>

I guess this 4:35 time is AM but is it UTC or GMT ?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [April 8, 2025, 2:08pm UTC](https://forum.pritunl.com/t/automatic-renewal-of-lets-encrypt-ui-certificate/3164/9 "2025-04-08T14:08:21Z")

</div>

It’s UTC time.
