Skip to content

[BUG] Let's Encrypt recreating old deleted certificates #3733

Description

@zynexiz

What happened?

I had an old service I moved to another instance of BunkerWeb we have deployed. The service itself is removed from BunkerWeb, but it seems that Let's encrypt tries to reissue the cert every time. I have looked in the configs and database to any reference to that old service, but can't find any. The only thing that recreates every time is /var/cache/bunkerweb/letsencrypt/etc/renewal/domain.se.conf, even when deleting every file related to it, it gets recreated.

I say in a different bug report that LETS_ENCRYPT_CLEAR_OLD_CERTS should fix this, but it seems that this is not the case here when turning it on. I think this interferes with other services to, because I can't get new certs for services I add now.

I think this came after I updated BunkerWeb some version ago. There was en notice/error related to Let's encrypt certs (don't remember exactly what it said now), and that I should go to Let's encrypt to resolve the issue.

Configuration file(s) (yaml or .env)

MULTISITE=yes
DNS_RESOLVERS=<REVOKED>
API_HTTP_PORT=5050
API_LISTEN_IP=127.0.0.1
API_WHITELIST_IP=127.0.0.0/8 <REVOKED>
HTTP_PORT=80
HTTPS_PORT=443
GZIP_PROXIED=expired no-cache no-store private auth
LETS_ENCRYPT_CLEAR_OLD_CERTS=yes
UI_HOST=http://127.0.0.1:7000

Relevant log output

2026-07-17 09:23:48,238:DEBUG:certbot._internal.display.obj:Notifying user:   /var/cache/bunkerweb/letsencrypt/etc/renewal/domain.se.conf (parsefail)
2026-07-17 09:23:48,238:DEBUG:certbot._internal.display.obj:Notifying user: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2026-07-17 09:23:48,238:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
  File "/usr/share/bunkerweb/deps/python/bin/certbot", line 6, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/share/bunkerweb/deps/python/certbot/main.py", line 18, in main
    return internal_main.main(cli_args)
           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/share/bunkerweb/deps/python/certbot/_internal/main.py", line 1886, in main
    return config.func(config, plugins)
           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/share/bunkerweb/deps/python/certbot/_internal/main.py", line 1636, in renew
    renewal.handle_renewal_request(config)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/usr/share/bunkerweb/deps/python/certbot/_internal/renewal.py", line 745, in handle_renewal_request
    raise errors.Error(
        f"{len(renew_failures)} renew failure(s), {len(parse_failures)} parse failure(s)")
certbot.errors.Error: 0 renew failure(s), 1 parse failure(s)

The referenced file

version = 5.6.0
archive_dir = /var/cache/bunkerweb/letsencrypt/etc/archive/domain.se.conf
cert = /var/cache/bunkerweb/letsencrypt/etc/live/domain.se.conf/cert.pem
privkey = /var/cache/bunkerweb/letsencrypt/etc/live/domain.se.conf/privkey.pem
chain = /var/cache/bunkerweb/letsencrypt/etc/live/domain.se.conf/chain.pem
fullchain = /var/cache/bunkerweb/letsencrypt/etc/live/domain.se.conf/fullchain.pem
[renewalparams]
account = <REVOKED>
preferred_profile = classic
pref_challs = http-01,
config_dir = /var/cache/bunkerweb/letsencrypt/etc
work_dir = /var/lib/bunkerweb/letsencrypt
logs_dir = /var/log/bunkerweb/letsencrypt
authenticator = manual
manual_auth_hook = /usr/share/bunkerweb/core/letsencrypt/jobs/certbot-auth.py
manual_cleanup_hook = /usr/share/bunkerweb/core/letsencrypt/jobs/certbot-cleanup.py
server = https://acme-v02.api.letsencrypt.org/directory
key_type = ecdsa
[acme_renewal_info]
ari_retry_after = 2026-06-10T16:17:13

BunkerWeb version

1.6.13

What integration are you using?

Linux

Linux distribution (if applicable)

Debian 13

Removed private data

  • I have removed all private data from the configuration file and the logs

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions