Skip to content

Integrated the renewal_window_ratio parameter into the Caddyfile syntax #7467

@nicocau

Description

@nicocau

Issue Details

I need to adjust the TLS certificate renewal window (e.g., to renew 15 days before expiry instead of the default 30 days).

While this is possible in the JSON configuration via apps/tls/automation/policies/renewal_window_ratio, it is not currently exposed in the Caddyfile.

To achieve this today, I am forced to abandon the Caddyfile workflow entirely or use complex scripts to caddy adapt, inject the JSON field via jq, and then run the JSON. This adds significant friction for a parameter that is relatively simple.

I would like to be able to configure the renewal ratio directly within the Global Options block of the Caddyfile.

Proposed syntax:

{
    # Example: Renew when 15% of lifetime remains (approx 13-14 days for Let's Encrypt)
    renewal_window_ratio 0.1666 
}

Thank you in advance for considering my request.

Assistance Disclosure

AI used

If AI was used, describe the extent to which it was used.

Gemini to help writing the issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions