Automate certificate renewal on Traefik

Traefik can request and renew publicly trusted certificates itself through its built-in ACME support, so the work is mostly choosing a challenge type, persisting the storage file and confirming renewals happen. Shorter certificate lifetimes make that automation required rather than optional, and running more than one Traefik instance needs a different design.

On this page

How Traefik renews certificates automatically and what shorter lifetimes change

If you run Traefik as an ingress or proxy, you do not have to renew certificates by hand. Traefik's built-in ACME support requests and renews certificates on its own, and the shorter lifetimes coming to public certificates mean this automation must work on every renewal, not just the first. Traefik by default manages 90-day certificates and starts renewing them 30 days before expiry. Teams that need to act first are those whose Traefik storage, challenge reachability or instance count is not yet set up for unattended renewal. Each of these three areas can stop a renewal from completing, and a failed renewal will not be noticed until the certificate expires or the 30-day window runs out.

Start with storage. The storage option in the ACME resolver defaults to acme.json and is required, because it holds the certificate store that Traefik uses to track what it has issued and when it must renew. When Traefik runs in a container, the storage file should be persisted across restarts. If it is lost or not persisted, Traefik has to request certificates again, which adds load and can fail under rate limits. Confirm in your deployment that the file survives container replacement and that its permissions allow Traefik to write to it. Next, check challenge reachability. The httpChallenge option requires an entryPoint that Let's Encrypt can reach on port 80, and tlsChallenge needs Traefik reachable on port 443. The dnsChallenge option, which uses the Lego library, is required for wildcard certificates. Verify that the challenge path works from outside your network before you rely on it.

Finally, check the instance count. The Traefik documentation states that it is not possible to run multiple instances of Traefik 2.0 with Let's Encrypt enabled, because its stateless design means no instance can reliably receive the challenge responses. The documentation for later versions also says the storage file cannot be shared across multiple instances of Traefik for concurrency reasons. If you plan to run more than one instance, read the high-availability guidance in the Kubernetes provider pages and the Traefik Enterprise and cert-manager options that the reference describes. Keep in mind that a single instance can be a single point of failure. If Let's Encrypt is unreachable, Traefik falls back to previously generated certificates, then expired ones, then provided certificates, and new domains get the default Traefik certificate until Traefik restarts. Confirm your fallback path before you need it. The full setup is covered in the Traefik ACME reference.

What the lifetime schedule changes for Traefik

This table compares the three CA/Browser Forum maximum lifetimes against Traefik's default 90-day renewal behavior, with the validation reuse window that applies at each step. Read each row as the number of times per year Traefik must renew and pass the challenge if the certificate is renewed at its full lifetime. The main takeaway is that the renewal count rises sharply at each step, so a manual renewal process will fail well before the 2029 date.

StepMaximum validityDomain validation reuseWhat it means for Traefik
Today (Traefik default)90 days, renewed 30 days before expiryNot stated in the topic factsTraefik renews roughly every 60 days, so renewal runs about six times a year per certificate
From 15 March 2026200 days200 daysRenewal interval lengthens, but validation may be reused for the full 200 days, so the challenge does not have to succeed as often
From 15 March 2027100 days100 daysRenewal happens about every 70 days with a 30-day lead, about four to five times a year per certificate
From 15 March 202947 days10 daysValidation must be refreshed at least every 10 days, so the HTTP-01 or TLS-ALPN-01 challenge must succeed on a much shorter cycle
Challenge success neededOnce per renewalOnce per reuse windowAt the 2029 step, a failed challenge can leave a 10-day window with no valid validation before the certificate expires
If renewal is manualEach renewal needs a personEach reuse window needs a personA manual process fails at the 100-day step at the latest, and at 47 days an unattended outage follows any missed cycle
Traefik storageacme.json holds the storeNot affected by the schedulePersist acme.json across restarts; multiple Traefik instances cannot share it, so plan HA separately

How Traefik requests, stores and reloads its certificates

Traefik obtains certificates through an ACME certificate resolver. You define a resolver with a caServer (which defaults to the Let's Encrypt v2 directory at ), an email address that is required with no default, and a challenge type. Traefik registers with the CA, proves control of each domain through the challenge you chose, and receives the signed certificate. The keyType option defaults to RSA4096, so if you want a different key type, set it explicitly and confirm the CA you use accepts it. Before go-live, confirm that the email address is monitored, because the CA uses it for account contact.

Traefik keeps everything it receives in the storage file, which defaults to acme.json. That file is the certificate store, so it must persist across restarts, especially when Traefik runs in a container. Protect it as you would any private key store, since it holds certificate private keys. The certificatesDuration option, which defaults to 2160 hours, only controls when renewal happens. It does not set how long the certificate lasts; the CA issues the lifetime. Renewal timing is also the reason to confirm your CA's current maximum lifetime before relying on the default, because short-lived certificates will be renewed on the CA's schedule and not on Traefik's default assumption.

Traefik renews certificates on its own schedule and does not check whether a certificate is in use before renewing it. Plan for that in any environment where certificates are issued for hosts that are retired or are not routed. If Let's Encrypt is unreachable, the fallback order is previously generated ACME certificates, then expired ACME certificates, then provided certificates. Domains that need a new ACME certificate receive Traefik's default certificate until Traefik restarts. Test that fallback in staging, and confirm the reload and monitoring steps your team uses to detect a failed renewal. The sources listed on this page do not say how long an expired ACME certificate may be served, so check the Traefik ACME reference for the current behavior.

Which challenge type Traefik can use for ACME validation

The httpChallenge option validates domain ownership by having Let's Encrypt request a token over plain HTTP. Traefik serves that response on the entryPoint you name, so the validation depends on the challenge reaching Traefik on port 80. This is the simplest option when the public internet can reach the proxy on port 80, and it does not require DNS API access.

  • Reachability: The entryPoint configured for httpChallenge must be reachable by Let's Encrypt through port 80.
  • Delay option: The delay option defaults to 0. Set it only if you need Traefik to wait before notifying the CA that the challenge is ready.
  • Wildcards: HTTP validation cannot issue wildcard certificates, so wildcard names need the DNS challenge.
  • Multiple instances: Traefik's ACME reference says multiple instances cannot reliably receive challenge responses, so review the high availability guidance before running more than one.
  • Hidden or internal hosts: If the proxy is not reachable on port 80 from the internet, use another challenge type.

Before you rely on this option, confirm that port 80 on the chosen entryPoint is open from Let's Encrypt and that nothing else on the path intercepts the request.

Set up ACME renewal in Traefik step by step

This sequence sets Traefik up to request and renew its own certificates from an ACME certificate authority, with the certificate store kept across restarts. Each step ends with a check you can run, so you can confirm issuance and the renewal window before relying on it.

  1. Confirm the storage file persists in the container

    Set the storage option to the path of acme.json and mount that path to a volume or host location so the file survives container restarts. The Traefik v3.8 ACME reference gives acme.json as the default and says the option is required. The v3.0 ACME page says the file should be persisted across restarts when Traefik runs in a container. Check that the file still exists after you restart the container, and that its contents are unchanged. Do not point two Traefik instances at the same file, because the v3.0 ACME page says it cannot be shared across multiple instances.

  2. Set the email and caServer options

    Set email to a contact address for the ACME account. The v3.8 ACME reference says it is required and has no default. Set caServer to the ACME directory URL of the certificate authority you use. If you leave it unset, the reference says it defaults to the Let's Encrypt production directory. Ask your CA or your platform team which directory URL is approved for your environment, and confirm it in that CA's documentation. Once Traefik starts with these values, the log should show that an ACME account is registered with the chosen CA.

  3. Choose the challenge type and its entry point

    Pick one challenge type for the certificate resolver: httpChallenge, tlsChallenge or dnsChallenge. For httpChallenge, set the entryPoint and confirm the CA can reach it on port 80. For tlsChallenge, confirm Traefik is reachable on port 443. For dnsChallenge, set the provider option, which has no default, and note that the reference says it is required for wildcard certificates. The delay option on the HTTP and TLS challenges defaults to 0. Read the Traefik reference for the exact configuration keys for your challenge type, since the sources here name the options but not their full syntax.

  4. Pick the keyType for issued certificates

    Set keyType to the algorithm you want for issued certificates. The v3.8 ACME reference says it defaults to RSA4096. Decide this with your security team, because it sets the key type for every certificate the resolver issues. Record the value in your configuration and note the Traefik version you run, since defaults can change between releases. Check the key type on an issued certificate after the first issuance to confirm it matches what you set.

  5. Confirm port reachability for validation

    Before the first request, confirm that the certificate authority can reach the validation port your challenge needs. Port 80 is needed for httpChallenge and port 443 for tlsChallenge. For dnsChallenge, the check is that the DNS provider's API is reachable from Traefik, and that CNAME handling behaves as you expect. The reference says CNAMEs are supported unless LEGO_DISABLE_CNAME_SUPPORT=true is set. Test reachability from outside your network, through the same firewall and load balancer path the CA will use. A reachable port does not show that issuance will succeed, so keep the logs open for the first attempt.

  6. Set certificatesDuration and review the renewal window

    The v3.8 ACME reference says certificatesDuration defaults to 2160 hours and is used only to decide renewal dates. It also says Traefik manages 90-day certificates by default and starts renewing them 30 days before expiry. Check the value you set against the lifetime your CA issues, because the reference says a certificate's lifetime and this setting are separate. Note that Traefik renews without checking whether a certificate is in use. Write down the renewal date for your first certificate so you can compare it with the actual renewal later.

  7. Verify the first issuance and the renewal window

    After the first request, open acme.json and confirm that it contains a certificate for each domain you expected. Check the certificate's validity dates and subject with a TLS client against the public endpoint. Compare the expiry date with the renewal date you wrote down in the previous step. Read the Traefik log for errors from the challenge or the CA. If the CA is unreachable, the v3.8 reference lists the fallback order: previously generated ACME certificates, then expired ACME certificates, then provided certificates. New domains that need ACME get the default Traefik certificate until Traefik restarts. Record the result, and schedule a check before the renewal date.

What must be in place before Traefik can renew unattended

Traefik can renew its own certificates only when several conditions hold at once: the certificate store survives restarts, Let's Encrypt can reach the challenge endpoint, DNS is available for wildcard names, and the instance can reach the configured CA. Check each item below before you rely on unattended renewal, and confirm the details against the documentation for your exact Traefik version.

Persisted acme.json storage

The ACME storage file must survive restarts when Traefik runs in a container. The ACME reference names acme.json as the default storage option and treats it as required, since it holds the certificate store. If the container starts with an empty file each time, Traefik must request certificates again and can hit issuance limits. Mount the file from persistent storage and confirm it still exists after a container restart. The storage file also cannot be shared between Traefik instances, so each instance needs its own copy.

Traefik v3.0 ACME docs

Inbound reachability for the challenge

The challenge type you choose sets which port Let's Encrypt must reach. The HTTP challenge requires an entryPoint reachable through port 80, and the TLS challenge requires Traefik reachable on port 443. Both options accept a delay setting that defaults to 0. Firewalls, security groups and load balancers in front of Traefik must pass the challenge traffic to the right entrypoint. A challenge that fails because the port is blocked will leave renewal stuck, so test reachability from outside your network before you depend on it.

Traefik ACME reference

DNS provider access for wildcards

Wildcard names can only be issued through the DNS challenge, so Traefik needs credentials for your DNS provider. The dnsChallenge option uses the Lego library and requires a provider value with no default. Choose the provider Traefik supports for your zone and supply the API access it expects, handling those credentials as secrets. The reference also notes that CNAMEs are supported unless LEGO_DISABLE_CNAME_SUPPORT=true is set, so check that setting if your DNS layout uses CNAMEs. Confirm the exact credential variables for your provider in the Traefik documentation.

Traefik ACME reference

Contact email for the CA account

The ACME email option is required and has no default. The CA uses this address to register the account and can contact you about certificate problems, such as revocations or expiry notices. Use a shared mailbox that someone monitors, not a personal address that may leave the organization. If the email is missing or wrong, Traefik cannot register its account with the CA, and renewal will not begin. Set the address once in the resolver configuration and check that it reaches a monitored inbox.

Traefik ACME reference

Outbound access to the configured CA

Traefik must reach the CA's directory endpoint, which is set by caServer. In the v3.8 reference this defaults to Let's Encrypt's production directory, so the instance needs outbound HTTPS access to that host. Networks that restrict egress must allow the CA's domain, or renewal fails silently until the existing certificate expires. If you point caServer at a different CA or a staging endpoint, allow that address instead. Test the connection from the same network and container that run Traefik.

Traefik ACME reference

Confirm your version's requirements

The sources supplied do not list minimum Traefik versions beyond the v3.0 and v3.8 references, so check your running version against the matching documentation before you plan the rollout. Behavior described in one version's reference may differ in another, including default values and supported options. Note also that the v3.8 reference states multiple Traefik 2.0 instances cannot run with Let's Encrypt enabled. Read the page for your exact version, then match your configuration to it.

Traefik v3.0 ACME docs

Why running more than one Traefik instance needs a different design

If you run more than one Traefik instance and want Let's Encrypt to issue or renew certificates, the single-instance setup you may have started with will not carry over. The Traefik v3.8 ACME reference says it is not possible to run multiple instances of Traefik 2.0 with Let's Encrypt enabled, because its stateless design means no instance can reliably receive the challenge responses that Let's Encrypt sends back during validation. The reference does not describe the same limit for v3.x in these words, so confirm how your running version behaves before you depend on it. Plan the design before you add a second instance, not after the first renewal fails.

The same reference describes a single instance as a possible single point of failure. If that one instance goes down, certificate renewal stops with it, and the fallback order the reference lists applies: previously generated ACME certificates are used first, then expired ACME certificates, then provided certificates. New domains that need ACME receive the default Traefik certificate until Traefik restarts. Check which certificates on your platform would be affected if the instance were unavailable during a renewal window, and decide whether that risk is acceptable. The acme.json storage file also cannot be shared between instances, since the Traefik v3.0 ACME page says the file cannot be shared across multiple instances for concurrency reasons. Each instance therefore cannot simply mount the same copy of the store.

For the multi-instance setup itself, the v3.0 ACME page points readers to the Kubernetes provider pages, and the v3.8 reference names two options for high availability: Traefik Enterprise, which supports distributed Let's Encrypt, or cert-manager. Treat these as the paths the sources name, and confirm with each vendor's documentation which one fits your platform, licensing and team skills. This page does not describe how to build either option. Before choosing, ask whether your environment is Kubernetes, and confirm the current Traefik version you run, because the reference you follow may differ from the one your instances use. Traefik ACME reference and Traefik v3.0 ACME docs are the sources to read next.

Common questions about automating Traefik certificates

Does Traefik support ACME natively for certificate issuance and renewal?

Yes. Traefik has a built-in ACME client that requests certificates from a certificate authority, stores them and renews them without a separate tool. You enable it by configuring a certificate resolver in Traefik's static configuration, with an email address, a caServer and a storage file. The caServer defaults to so a Let's Encrypt account is used unless you point it elsewhere. The storage option defaults to acme.json` and is required, and it holds the certificate store. For the current configuration keys, check the Traefik ACME reference for your exact version, since option names and defaults change between releases. The practical effect is that the work you plan is mostly about the storage file, the challenge type and the network paths that let the certificate authority reach Traefik, not about running a second renewal job.

Which ACME challenge should I choose for Traefik?

The choice depends on what Let's Encrypt can reach. Traefik supports three challenge types. The httpChallenge option needs an entryPoint that Let's Encrypt can reach on port 80. The tlsChallenge option needs Traefik reachable on port 443. The dnsChallenge option works without inbound access, because Traefik creates a DNS record to prove control of the domain, and it uses the Lego library with a provider option that has no default. Each of the first two accepts a delay option that defaults to 0. Choose HTTP or TLS when the proxy is publicly reachable on the required port and you want the simplest setup. Choose DNS when the proxy sits behind a firewall, when it is not directly exposed, or when you need wildcard certificates. Confirm which ports your load balancer or firewall forwards before you commit, because a challenge that cannot reach Traefik fails only at renewal time.

Do wildcard certificates from Traefik require DNS validation?

Yes. The Traefik ACME reference states that the dnsChallenge option is required for wildcard certificates. HTTP and TLS challenges cannot prove control of every name under a wildcard, so a wildcard request needs a DNS provider configured for the zone. Setting up DNS validation means giving Traefik credentials for your DNS provider, which the provider option selects, and those credentials become a sensitive asset to protect and rotate. The reference also notes that CNAME records are supported unless you set LEGO_DISABLE_CNAME_SUPPORT=true, so check your DNS layout if you rely on CNAME-based delegation. Ask your DNS team who holds the credentials, whether the DNS zone can be updated by automation, and whether the provider that hosts your zone is one that Lego supports for your version of Traefik.

How often does Traefik renew certificates, and how long are they valid?

Traefik by default manages 90-day certificates and starts renewing them 30 days before they expire. That 30-day renewal window means a certificate is typically replaced around day 60 of its 90-day life, which leaves a month of margin for a failed attempt to be retried. The Traefik v3.8 reference also says that Traefik does not check whether a certificate is in use before renewing it, so renewal happens on schedule whether or not a service is actively using that certificate. The certificatesDuration option defaults to 2160 hours and is used only to determine renewal dates, not to request a lifetime from the authority. Plan for these values now, and plan again when public lifetimes shorten, because the CA/Browser Forum schedule reduces the maximum validity to 200 days from 15 March 2026, to 100 days from 15 March 2027 and to 47 days from 15 March 2029.

What happens when Let's Encrypt is unreachable during renewal?

Traefik falls back to certificates it already holds. The v3.8 reference lists the order: previously generated ACME certificates are used first, then expired ACME certificates, then provided certificates. If a domain needs a new ACME certificate and none is available in that chain, Traefik serves the default Traefik certificate for that domain until Traefik restarts. This means an outage of the certificate authority does not usually take down existing HTTPS services immediately, but a new domain added during the outage can receive a default certificate that clients will reject. Because the 30-day renewal window gives time to recover, monitor renewal failures and the expiry date of each certificate, and alert before the margin runs out. Do not assume the fallback covers a long outage, and test how your monitoring behaves when the certificate authority cannot be reached.

Can I run multiple Traefik instances with Let's Encrypt enabled?

Not as a single shared store. The Traefik v3.0 ACME page says that the storage file cannot be shared across multiple instances of Traefik for concurrency reasons. The v3.8 reference is more specific for the older generation, stating that it is not possible to run multiple instances of Traefik 2.0 with Let's Encrypt enabled because its stateless design means no instance can reliably receive the challenge responses. It also describes a single instance as a possible single point of failure. For high availability, the reference points to Traefik Enterprise, which supports distributed Let's Encrypt, or to cert-manager. If you plan multiple instances, read the sections on the Kubernetes provider pages, as the v3.0 page directs, and confirm the approach for your exact version before you design the cluster. Ask whether a supported distributed mode is available to you, because this decision shapes the architecture more than any single setting.

How Traefik obtains and renews a certificate through ACME

The flow starts when Traefik's ACME certificate resolver sends an order to the configured CA, which by default is Let's Encrypt. The CA issues a challenge, and Traefik answers it either on port 80 through an httpChallenge entryPoint, on port 443 through a tlsChallenge, or by writing a DNS record through the provider set in dnsChallenge. The issued certificate is then stored in acme.json and served by Traefik. Renewal runs in a loop that starts 30 days before expiry, and Traefik does not check whether a certificate is in use before renewing it. Confirm that the challenge port or DNS provider is reachable from the CA and that acme.json is persisted.

Traefik requests, validates, stores and renews a certificate through its ACME resolver.

How to confirm Traefik renewals keep happening

Setting up automatic renewal is not the same as knowing it works, so the first thing to confirm is that Traefik is still obtaining and renewing certificates after deployment. Traefik keeps its certificate store in the file set by the storage option of the ACME resolver, which defaults to acme.json. Check that file on a schedule: each stored certificate has dates you can read, and you should see them move forward when a renewal succeeds. Traefik by default manages 90-day certificates and starts renewing them 30 days before expiry, so a healthy setup should show renewals well ahead of the end of each lifetime. Confirm the store is persisted across container restarts, since the ACME documentation for Traefik v3.0 says the file should survive restarts when Traefik runs in a container. Also confirm that the store is never shared between instances, because the same documentation says the file cannot be shared across multiple Traefik instances.

Traefik logs are the second source of evidence. Review them for ACME errors, and treat any failed challenge or failed issuance as a finding to investigate, not background noise. A renewal can fail quietly while the existing certificate is still valid, so the failure only shows up later as a near-expiry certificate. The Traefik v3.8 reference also says that if Let's Encrypt is unreachable, Traefik falls back to previously generated and then expired ACME certificates, and that new domains receive the default Traefik certificate until Traefik restarts. A log review alone will not catch that pattern, which is why the next check matters.

Do not rely only on Traefik to tell you about its own failures. Run an external check that reads the certificate actually presented on each public hostname and alerts when its expiry falls within a threshold you set. Pair that with a written record of each issuance and renewal event, with dates, domains and the resolver used, so you can show when renewals happened and spot gaps. Confirm the threshold and alert routing against your own risk tolerance, and check the product documentation for the exact log wording and metrics your Traefik version exposes before writing alert rules against them.

How DeployOpen helps teams automate Traefik certificates

DeployOpen approaches Traefik certificate renewal as a platform change with a written scope. We confirm which resolver each route uses, how storage is persisted, and whether more than one Traefik instance is involved, then build and test the setup in your own environment. Engagements are fixed-scope, and ongoing support is available as a retainer.

How we scope

  • We inventory every Traefik instance, entry point and route that needs a publicly trusted certificate.
  • We identify which challenge type each domain can use, HTTP-01, TLS-ALPN-01 or DNS-01, and whether wildcards are needed.
  • We record the agreed scope, deliverables and timeline in writing before any configuration work starts.

How we build

  • We configure the ACME certificate resolver, email, CA server and key type to match your agreed policy.
  • We set up persistent storage for the ACME file so certificates survive container restarts.
  • We test issuance and renewal in a non-production environment, including the fallback behavior when the CA is unreachable.

How we hand over

  • We document the resolver configuration, storage location, challenge settings and renewal behavior for your team.
  • We walk your platform and security engineers through monitoring of expiry dates and renewal events.
  • We deliver the runbook and configuration files in your own repository so your team can maintain them.

How we support

  • Ongoing support is available as a retainer for upgrades, configuration changes and renewal failures.
  • We can run continuous testing of the renewal path as your Traefik version and certificate lifetimes change.
  • Confirm the Traefik version and high-availability approach your team needs with the vendor documentation before scoping.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.