[GH-ISSUE #737] Thousands of xxxx_csr-certbot.pem file in csr folder #625

Closed
opened 2026-02-26 06:33:43 +03:00 by kerem · 6 comments
Owner

Originally created by @lettore on GitHub (Nov 21, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/737

Hello
I'm using NPM from long time and I'm really happy with it.
Today I found that in the csr folder of letsencrypt I have more than 33k files named xxxx_csr-certbot.pem and the same in keys directory named xxxx_key-certbot.pem.
There is a way to delete the unused files, I have only 126 certificates at the moment so I don't really understand why it keep creating so many *.pem files.
Thank you in advance.

Originally created by @lettore on GitHub (Nov 21, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/737 Hello I'm using NPM from long time and I'm really happy with it. Today I found that in the csr folder of letsencrypt I have more than 33k files named xxxx_csr-certbot.pem and the same in keys directory named xxxx_key-certbot.pem. There is a way to delete the unused files, I have only 126 certificates at the moment so I don't really understand why it keep creating so many *.pem files. Thank you in advance.
kerem 2026-02-26 06:33:43 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jc21 commented on GitHub (Nov 22, 2020):

I think this would be a certbot issue. 33k does seem like an excessive amount!

<!-- gh-comment-id:731867998 --> @jc21 commented on GitHub (Nov 22, 2020): I think this would be a [certbot](https://github.com/certbot/certbot) issue. 33k does seem like an excessive amount!
Author
Owner

@lettore commented on GitHub (Nov 23, 2020):

Maybe it is, but at the moment how I can know which files are currently
used as active certificates from NPM?
There should be a way to delete the unused files.

Il Lun 23 Nov 2020, 00:48 jc21 notifications@github.com ha scritto:

I think this would be a certbot https://github.com/certbot/certbot
issue. 33k does seem like an excessive amount!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jc21/nginx-proxy-manager/issues/737#issuecomment-731867998,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIJLFE4Z47VZP6H5YGNVMDLSRGPMDANCNFSM4T55ASMA
.

<!-- gh-comment-id:731941883 --> @lettore commented on GitHub (Nov 23, 2020): Maybe it is, but at the moment how I can know which files are currently used as active certificates from NPM? There should be a way to delete the unused files. Il Lun 23 Nov 2020, 00:48 jc21 <notifications@github.com> ha scritto: > I think this would be a certbot <https://github.com/certbot/certbot> > issue. 33k does seem like an excessive amount! > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/jc21/nginx-proxy-manager/issues/737#issuecomment-731867998>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AIJLFE4Z47VZP6H5YGNVMDLSRGPMDANCNFSM4T55ASMA> > . >
Author
Owner

@jc21 commented on GitHub (Nov 23, 2020):

I've just had a google and this answer suggests that these csr files can be removed without impact. I've got 14k of them myself and I just deleted them without any problems.

<!-- gh-comment-id:731947935 --> @jc21 commented on GitHub (Nov 23, 2020): I've just had a google and [this answer suggests](https://community.letsencrypt.org/t/remove-all-generated-csr-to-free-disk-space/78237) that these csr files can be removed without impact. I've got 14k of them myself and I just deleted them without any problems.
Author
Owner

@thomasesr commented on GitHub (Jun 7, 2021):

I got 17,544 keys and csr files. Does anyone knows why this happens?

<!-- gh-comment-id:855871896 --> @thomasesr commented on GitHub (Jun 7, 2021): I got 17,544 keys and csr files. Does anyone knows why this happens?
Author
Owner
<!-- gh-comment-id:856101414 --> @chaptergy commented on GitHub (Jun 7, 2021): Linking some info: - [LetsEncrypt Community Thread](https://community.letsencrypt.org/t/remove-all-generated-csr-to-free-disk-space/78237/9) - https://github.com/certbot/certbot/issues/8525 - https://github.com/certbot/certbot/issues/4635 - https://github.com/certbot/certbot/issues/4634
Author
Owner

@LiamKarlMitchell commented on GitHub (Aug 8, 2023):

To remove these files from nginx proxy manager I read through the link suggested by jc21

I had to cd to each keys or csr directory.
And run the following.

Can probably delete them all but rm -rf * said there were too many args, this was taking up a decent chunk of disk space on my dev wsl2 after a few years.

find ./ -type f -name '*.pem' -mtime +91 -exec rm -rf {} \;

If the change to not save them to disk was made in letsencrypt, maybe nginx-proxy-manager is still using an older version of letsencrypt?
I haven't updated my nginx proxy manager in a fair while so if it's already fixed no worries.

<!-- gh-comment-id:1669094402 --> @LiamKarlMitchell commented on GitHub (Aug 8, 2023): To remove these files from nginx proxy manager I read through the link suggested by jc21 I had to cd to each keys or csr directory. And run the following. Can probably delete them all but rm -rf * said there were too many args, this was taking up a decent chunk of disk space on my dev wsl2 after a few years. ``` find ./ -type f -name '*.pem' -mtime +91 -exec rm -rf {} \; ``` If the change to not save them to disk was made in letsencrypt, maybe nginx-proxy-manager is still using an older version of letsencrypt? I haven't updated my nginx proxy manager in a fair while so if it's already fixed no worries.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#625
No description provided.