Where can i find the letsencrypt logrotate script?

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.

You can find the code in 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 :slight_smile: The support forum probably isn’t the best place for this issue, unless you’d like to discuss it.

1 Like

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.

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

Maybe you can help me: 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. :wink: As far as I know, the functionality is statically coded right now.

1 Like

that is the beauty of open source code :smiley:

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