# Where can i find the letsencrypt logrotate script?

**URL:** <https://community.letsencrypt.org/t/where-can-i-find-the-letsencrypt-logrotate-script/32589>\
**Category:** Help\
**Created:** [April 22, 2017, 3:24pm UTC](https://community.letsencrypt.org/t/where-can-i-find-the-letsencrypt-logrotate-script/32589 "2017-04-22T15:24:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![allo](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@allo](https://community.letsencrypt.org/u/allo)\
**Post date:** [April 22, 2017, 3:24pm UTC](https://community.letsencrypt.org/t/where-can-i-find-the-letsencrypt-logrotate-script/32589/1 "2017-04-22T15:24:09Z")

</div>

Certbot seems to have logrotation set to rotate them daily and keep 100 logfiles. I would like to configure them to keep less files and rotate less often, but i cannot find a config in /etc/logrotate.d and /etc/letsencrypt does not have config files for logrotate either.

I guess its somewhere hidden inside a python logging module, but probably it should use the native logrotate. But for a start it would be nice to be able to configure it at all.

---

<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 22, 2017, 3:31pm UTC](https://community.letsencrypt.org/t/where-can-i-find-the-letsencrypt-logrotate-script/32589/2 "2017-04-22T15:31:36Z")

</div>

You can find the code in [log.py](https://github.com/certbot/certbot/blob/master/certbot/log.py). As far as I know, there’s no logrotate configuration.

If you’d like, you can file an issue on the same github repository (if there isn’t one already) or suggest improvements through a pull request 🙂 The support forum probably isn’t the best place for this issue, unless you’d like to discuss it.

---

<div class="post-metadata">

**Author:** ![allo](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@allo](https://community.letsencrypt.org/u/allo)\
**Post date:** [April 22, 2017, 4:35pm UTC](https://community.letsencrypt.org/t/where-can-i-find-the-letsencrypt-logrotate-script/32589/3 "2017-04-22T16:35:15Z")

</div>

At least the debian packaged version rotates once a day and i do not see a logrotate(8) script for it. So something else seems to do it.

---

<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 22, 2017, 4:53pm UTC](https://community.letsencrypt.org/t/where-can-i-find-the-letsencrypt-logrotate-script/32589/4 "2017-04-22T16:53:59Z")

</div>

> [@allo](#):
>
> So something else seems to do it.

Yes, the code from `certbot` I linked to above...

---

<div class="post-metadata">

**Author:** ![allo](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@allo](https://community.letsencrypt.org/u/allo)\
**Post date:** [April 22, 2017, 5:38pm UTC](https://community.letsencrypt.org/t/where-can-i-find-the-letsencrypt-logrotate-script/32589/5 "2017-04-22T17:38:14Z")

</div>

Maybe you can help me: How do it configure this to rotate once a week and keep 5 weeks of logs?

---

<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 22, 2017, 5:51pm UTC](https://community.letsencrypt.org/t/where-can-i-find-the-letsencrypt-logrotate-script/32589/6 "2017-04-22T17:51:13Z")

</div>

> [@allo](#):
>
> How do it configure this to rotate once a week and keep 5 weeks of logs?

Patch the code yourself or make a suggesting to the development team to implement those features. 😉 As far as I know, the functionality is statically coded right now.

---

<div class="post-metadata">

**Author:** ![ahaw021](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/ahaw021/32/14882_2.png) [@ahaw021](https://community.letsencrypt.org/u/ahaw021)\
**Post date:** [April 22, 2017, 10:55pm UTC](https://community.letsencrypt.org/t/where-can-i-find-the-letsencrypt-logrotate-script/32589/7 "2017-04-22T22:55:48Z")

</div>

that is the beauty of open source code 😃

---

<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:** [May 22, 2017, 10:59pm UTC](https://community.letsencrypt.org/t/where-can-i-find-the-letsencrypt-logrotate-script/32589/8 "2017-05-22T22:59:38Z")

</div>

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