Page MenuHomeVyOS Platform

certbot: streamline implementation to avoid bugs due to duplicated code
Closed, ResolvedPublicFEATURE REQUEST

Description

Summary

The current certbot / ACME certificate management implementation in VyOS is fragmented across multiple files and definitions, making maintenance difficult and renewal behavior unreliable for services consuming ACME certificates.

Affected Versions

All active development and LTS branches of VyOS.

Details

The Certbot / ACME handling logic is spread across several modules and scripts, including both configuration and operational mode files, helper scripts, and systemd overrides:

This fragmented design makes it difficult to maintain or extend the ACME/Certbot functionality. Additionally, certificate renewals can fail to propagate correctly to dependent services (e.g., HAProxy), resulting in outdated or invalid certificates being used.

Proposed Improvement

Refactor the Certbot/ACME handling logic into a single, centralized module or helper that manages:

  • Service stop/restart before and after renewal.
  • Dependency tracking between certificates and consuming services.
  • Stop dependent services in advance of renewal to free bound ports (since they need to restart anyway).
  • Ensure all ACME certificate consumers automatically reload/restart after a successful renewal.

Additional Notes

This issue was observed by me specifically with HAProxy consuming an ACME-managed certificate. After renewal, the proxy continued serving an outdated certificate until manually restarted.

Details

Version
-
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)

Event Timeline

c-po changed the task status from Open to In progress.
c-po claimed this task.
c-po triaged this task as High priority.