# Certbot renewal clearing renewalparams?

**URL:** <https://community.letsencrypt.org/t/certbot-renewal-clearing-renewalparams/40645>\
**Category:** Help\
**Created:** [August 21, 2017, 7:57pm UTC](https://community.letsencrypt.org/t/certbot-renewal-clearing-renewalparams/40645 "2017-08-21T19:57:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paapaa](https://avatars.discourse-cdn.com/v4/letter/p/71c47a/32.png) [@Paapaa](https://community.letsencrypt.org/u/Paapaa)\
**Post date:** [August 21, 2017, 7:57pm UTC](https://community.letsencrypt.org/t/certbot-renewal-clearing-renewalparams/40645/1 "2017-08-21T19:57:54Z")

</div>

I’m trying to renew my certificate automatically using cron.d. The **goal is to reload nginx after the certificate has been renewed**. Renewal works just fine both with dry-run and without it. I also had `post_hook = systemctl reload nginx` in /etc/letsencrypt/renewal/example.com.conf under [renewalparams] section (site name changed).

The problem: nginx does not reload at all after renewal. In addition to that: after either the dry-run or the actual renewal, the **post\_hook row has been removed**.

Have I misunderstood the purpose of [renewalparams]? Should I be able to define the post\_hook there? Why does it get erased by certbot?

I’m running this on Ubuntu Server 16.10. Certbot version 0.8.1-2.

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [August 21, 2017, 8:01pm UTC](https://community.letsencrypt.org/t/certbot-renewal-clearing-renewalparams/40645/2 "2017-08-21T20:01:31Z")

</div>

Hi @Paapaa,

Is your renewal command `certbot renew`, or did you try to renew with some form of `certbot certonly`?

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [August 21, 2017, 8:05pm UTC](https://community.letsencrypt.org/t/certbot-renewal-clearing-renewalparams/40645/3 "2017-08-21T20:05:02Z")

</div>

> [@Paapaa](#):
>
> Certbot version 0.8.1-2.

can/should this be updated?

---

<div class="post-metadata">

**Author:** ![Paapaa](https://avatars.discourse-cdn.com/v4/letter/p/71c47a/32.png) [@Paapaa](https://community.letsencrypt.org/u/Paapaa)\
**Post date:** [August 21, 2017, 8:05pm UTC](https://community.letsencrypt.org/t/certbot-renewal-clearing-renewalparams/40645/4 "2017-08-21T20:05:17Z")

</div>

The actual command in cron.d was `test -x /usr/bin/certbot && certbot -q renew`.

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [August 21, 2017, 8:12pm UTC](https://community.letsencrypt.org/t/certbot-renewal-clearing-renewalparams/40645/5 "2017-08-21T20:12:53Z")

</div>

I think @rg305’s point might be the key to the mystery: part of the renewal process involves removing “irrelevant” renewal parameters, which includes unrecognized ones, which in turn makes renewal configuration files not backwards-compatible in some cases (because using newer options than Certbot recognizes means that those options will be discarded).

At the time of that release, `post_hook` was not on the whitelist:

> <https://github.com/certbot/certbot/blob/4158656058cb14e8afa9048b9a3612da73abf1b5/certbot/renewal.py#L32>

By contrast, it is now:

> <https://github.com/certbot/certbot/blob/master/certbot/renewal.py#L30>

So, probably this version of Certbot doesn’t know to save this configuration option, while a newer version would know to do so. (Good catch, @rg305!)

---

<div class="post-metadata">

**Author:** ![Paapaa](https://avatars.discourse-cdn.com/v4/letter/p/71c47a/32.png) [@Paapaa](https://community.letsencrypt.org/u/Paapaa)\
**Post date:** [August 21, 2017, 8:18pm UTC](https://community.letsencrypt.org/t/certbot-renewal-clearing-renewalparams/40645/6 "2017-08-21T20:18:44Z")

</div>

Thanks!

Is there a reason Ubuntu (Server) 16.10 ships with so old version? Or have I done something that prevents apt from updating to a newer one? Can I check this somehow?

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [August 21, 2017, 8:20pm UTC](https://community.letsencrypt.org/t/certbot-renewal-clearing-renewalparams/40645/7 "2017-08-21T20:20:24Z")

</div>

I’m not sure! We do also have an autoupdating version that works outside of an OS package manager, called `certbot-auto`.

> **[Certbot](https://certbot.eff.org/#pip-other)**
>
> Automatically enable HTTPS on your website with EFF's Certbot, deploying Let's Encrypt certificates.

The bit down below there about using `--webroot` and so on is not applicable; it’s just because I linked to the part of the documentation that refers to minimally supported OS environments.

---

<div class="post-metadata">

**Author:** ![Paapaa](https://avatars.discourse-cdn.com/v4/letter/p/71c47a/32.png) [@Paapaa](https://community.letsencrypt.org/u/Paapaa)\
**Post date:** [August 21, 2017, 8:47pm UTC](https://community.letsencrypt.org/t/certbot-renewal-clearing-renewalparams/40645/8 "2017-08-21T20:47:46Z")

</div>

Fixed this by adding the certbot PPA. Now it provides a recent (0.14.2-1…) version of certbot and I guess things will go smooth next time the certificate needs to be renewed.

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [August 21, 2017, 8:56pm UTC](https://community.letsencrypt.org/t/certbot-renewal-clearing-renewalparams/40645/9 "2017-08-21T20:56:53Z")

</div>

Great! Sorry about the trouble.

I haven’t been involved in downstream packaging conversations but I think a challenge overall is that Certbot has changed rather rapidly, sometimes in slightly backwards-incompatible ways, and fixed pretty large bugs in the course of just a year or so. The rate of change and instability has probably been faster than some of the distributions want for a long-term stable OS release, but at the same time there’s a lot of demand for an official Certbot package, because having an official way to get Let’s Encrypt certificates is quite useful.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [September 20, 2017, 8:56pm UTC](https://community.letsencrypt.org/t/certbot-renewal-clearing-renewalparams/40645/10 "2017-09-20T20:56:57Z")

</div>

Closed on September 20, 2017, 8:56pm UTC

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