# Run script after each automatic renewal

**URL:** https://community.letsencrypt.org/t/run-script-after-each-automatic-renewal/118054
**Category:** Help
**Created:** [April 1, 2020, 6:45am UTC](https://community.letsencrypt.org/t/run-script-after-each-automatic-renewal/118054 "2020-04-01T06:45:42Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)
#### Post date: [April 1, 2020, 7:36am UTC](https://community.letsencrypt.org/t/run-script-after-each-automatic-renewal/118054/2 "2020-04-01T07:36:21Z")

</div>

> [@chronotech](#):
>
> Is it a good practice ?

Yes, it is. You're going to use the `dns-01` challenge? Would be a good choice if you're running your own DNS server indeed. No need for HTTP challenge redirects et cetera.

> [@chronotech](#):
>
> If yes, how can i tell certbot to launch a script after each automatic renewal ?

See the [Renewing certificates](https://certbot.eff.org/docs/using.html#renewing-certificates) part of the certbot documentation, especially the part of `--deploy-hook` or its equivalent directory `/etc/letsencrypt/renewal-hooks/deploy`.

Also see the help text of the `--deploy-hook` variable in the [command line options overview](https://certbot.eff.org/docs/using.html#certbot-command-line-options), it has more information about environment variables which can be used in the script(s).

---

_[View the full topic](https://community.letsencrypt.org/t/run-script-after-each-automatic-renewal/118054)._
