How HAProxy can renew its own certificates, and what shorter lifetimes change
If you run HAProxy and still renew certificates by hand, HAProxy's built-in ACME support can request and renew them for you, starting with HAProxy 3.2 and HAProxy Enterprise 3.2r1. The feature is currently experimental, and the setup has a hard limit: it works with a single load balancer, not an active-active pair, because the load balancer itself must reach the certificate issuer's servers. Treat it as a candidate for a single node and confirm the feature's status against your version before you depend on it in production.
The reason to act now is the public certificate lifetime. Under the CA/Browser Forum Baseline Requirements, the maximum validity of publicly trusted TLS server certificates drops to 200 days from 15 March 2026, to 100 days from 15 March 2027 and to 47 days from 15 March 2029. Domain and IP address validation reuse shrinks alongside it, to 100 days in 2027 and 10 days in 2029. At 47 days, a manual renewal every few months becomes a recurring task that will eventually be missed. Any team running HAProxy to terminate public TLS needs to plan for this, because every certificate it serves falls under these rules.
Before you choose an approach, confirm which certificates on your HAProxy instances are publicly trusted, how each is issued and where it is loaded. Then check whether the built-in ACME path fits your topology, or whether you need a scripted renewal or an external client. The acme status Runtime API command shows each task's expiration and scheduled renewal date, which is a useful starting check for the inventory.
What the 200, 100 and 47 day limits mean for HAProxy renewals
This table sets the CA/B Forum maximum certificate validity and validation reuse period against what each step means for an HAProxy deployment. Read each row as a deadline: from that date, a certificate issued to HAProxy can last no longer than the stated limit, and the domain and IP validation data behind it can be reused only for the stated period. Each step cuts the time between renewals, so a manual process that works at 200 days will not keep pace at 47 days.
| Date the limit applies | Maximum certificate validity and validation reuse | What it means on an HAProxy deployment |
|---|---|---|
| 15 March 2026 | 200 days maximum validity; domain and IP validation reuse of 200 days; subject identity reuse of 398 days | Each certificate on the HAProxy frontends must be renewed at least once every 200 days. Teams should list every crt-store and certificate file in use, since each one now carries a renewal date to track. |
| 15 March 2027 | 100 days maximum validity; domain and IP validation reuse of 100 days | Renewals roughly double in frequency compared with the 200-day step. A manual renewal run that happened once a year will need to happen about twice a year, and the reuse window also limits how far ahead validation can be completed. |
| 15 March 2029 | 47 days maximum validity; domain and IP validation reuse of 10 days | Renewals become a routine job rather than an occasional task, with a certificate needing replacement roughly every six to seven weeks. Validation must be repeated at least every 10 days, so manual renewal by hand will stop working and the HAProxy ACME feature or an external client must run unattended. |
How HAProxy ACME issuance and renewal work
HAProxy's ACME support is built from three configuration pieces that work together. An acme section in the global configuration names the ACME directory URL, a contact address for the account, the challenge type (HTTP-01 or DNS-01) and a map that tells HAProxy how to answer challenges. The HAProxy ACME tutorial uses the Let's Encrypt staging directory and a map named virt@acme as its example. A crt-store section then sets crt-base and key-base to /etc/haproxy/ssl, which is where generated certificate and key files are kept. A load crt line inside that section ties a certificate name and its domains to a specific acme section, so HAProxy knows which issuer to ask for it. Your first job is to confirm that the directory, contact and challenge you choose match the CA and validation method you have approved for this estate, and that the tutorial's staging URL is replaced with production only once testing is complete.
On the frontend, the certificate is referenced with ssl-f-use crt using the store name, for example @my_files/example, so HAProxy serves whatever is currently loaded under that name. For HTTP-01, the tutorial also adds an http-request return rule that answers requests under /.well-known/acme-challenge/ with a 200 status, which means the frontend that handles port 80 must be reachable from the issuer. Certificate files are written to the crt-base directory as .pem files, and the tutorial notes that the feature works with a single load balancer rather than an active-active pair, because the instance performing issuance must itself reach the issuer's servers. Expiration and scheduled renewal dates are visible through the Runtime API command acme status, which lists each task with its state, certificate expiration date and scheduled renewal date. Check that output after every change and before any renewal window, and confirm with the product documentation which HAProxy version introduced each behavior, since the tutorial's steps differ between HAProxy 3.2 and 3.3 and later.
Which HAProxy automation option fits your setup
HAProxy 3.2 and newer, and HAProxy Enterprise 3.2r1 and newer, include an experimental ACME client in the configuration itself. The tutorial has you add expose-experimental-directives and httpclient.resolvers.prefer ipv4 to the global section, define an acme section with a directory, contact, challenge and map, and tie a certificate to it through a crt-store section and a load crt line. Renewal is triggered from the Runtime API with acme renew, and you save the result with dump ssl cert.
- Version floor: this tab applies to HAProxy 3.2 and newer and HAProxy Enterprise 3.2r1 and newer only.
- Experimental label: the tutorial labels ACME support as currently experimental, so confirm it meets your change control policy.
- Bootstrap step: create a dummy certificate first so HAProxy can start before the first issuance.
- Challenge types: the tutorial's HTTP-01 example answers challenges with an
http-request returnrule on/.well-known/acme-challenge/. - Single load balancer only: the tutorial states the feature works with a single load balancer and not an active-active pair, because the load balancer must reach the issuer's servers.
Check your build version first, then confirm in the HAProxy documentation that the directives match your release.
From HAProxy 3.3, the tutorial describes issuance happening automatically when the load balancer restarts, with HAProxy emitting events whenever it creates or updates a certificate. Saving certificates to the filesystem is handled by the Data Plane API, once master_runtime under the haproxy section of dataplaneapi.yml is set to the master socket path. This path shifts renewal from a manual Runtime API call to a flow that the load balancer and its API layer carry out together.
- Restart trigger: issuance runs on restart, so plan restarts as part of the renewal workflow rather than assuming a timer will fire.
- Event visibility: HAProxy emits events on certificate create and update, which you can route to your monitoring.
- Data Plane API setting: set
master_runtimeunder thehaproxysection ofdataplaneapi.ymlto the master socket path, or the certificate will not be saved to the filesystem. - Status checks: the Runtime API command
acme statuslists each ACME task with its state, expiration date and scheduled renewal date. - Same topology limit: the single load balancer restriction described in the tutorial still applies to this path.
Confirm the dataplaneapi.yml key names and the restart behavior against the HAProxy 3.3 documentation for your exact release before you rely on them.
The tutorial lists DNS-01 support from HAProxy 3.3 through the Go libdns library, with providers such as azure, cloudflare and route53. You configure the provider with provider-name and acme-vars, and the challenge is proven through DNS records rather than an HTTP path on the load balancer. This option suits setups where the load balancer cannot serve challenge responses on port 80, or where you need wildcard-style coverage managed through DNS.
- Version floor: DNS-01 through libdns is listed from HAProxy 3.3.
- Provider keywords: set
provider-nameto the DNS provider you use, such asazure,cloudflareorroute53. - Provider variables: pass the credentials and zone details through
acme-vars, and store secrets in a way your security team has approved. - Credential scope: create DNS credentials limited to the zones and record changes that the renewal needs.
- Same topology limit: the tutorial's single load balancer restriction is stated for the feature, so verify it before deploying an active-active pair.
Verify the provider names and acme-vars format against the tutorial and the libdns provider documentation for your DNS host.
From HAProxy 3.4, the tutorial adds an acme profile keyword with the values classic (the default), tlsserver and shortlived, which the tutorial describes as about 6 days. It also lists External Account Binding keywords eab-key-id, eab-mac-key and eab-mac-alg, with HS256 as the default and HS384 and HS512 accepted, and an ips argument on load for IP address SANs. These options matter when your certificate authority requires EAB or when you issue IP address certificates.
- Profile choice:
classicis the default, andshortlivedis described as about 6 days in the tutorial. - EAB keywords:
eab-key-id,eab-mac-keyandeab-mac-algsupport certificate authorities that require External Account Binding. - MAC algorithm:
eab-mac-algdefaults to HS256, with HS384 and HS512 accepted. - IP address SANs: the
ipsargument onloadcovers IP address subject alternative names. - Version floor: these keywords are listed from HAProxy 3.4, so they do not apply to 3.2 or 3.3.
Confirm which profile and EAB values your certificate authority accepts, and check the 3.4 keyword list against the current HAProxy documentation.
Set up ACME renewal on HAProxy, step by step
This sequence takes an HAProxy 3.2 or newer instance from a static certificate file to one that requests, stores and renews its certificate through ACME. Each step depends on the one before it, so the order below is the order to follow.
Enable experimental ACME directives in global
In the global section of haproxy.cfg, add expose-experimental-directives and httpclient.resolvers.prefer ipv4. The HAProxy ACME tutorial labels ACME support as experimental, and these two lines are what the tutorial requires before the ACME keywords are accepted. Confirm the file loads without errors by running haproxy -c -f against the configuration. A clean check with no unknown-keyword messages means this step is done. The tutorial applies to HAProxy 3.2 and newer and to HAProxy Enterprise 3.2r1 and newer, so confirm your binary version first.
Create a dummy certificate so HAProxy starts
On HAProxy 3.2, the tutorial has you create a placeholder certificate before the real one exists. HAProxy will not start a frontend that references a certificate file that is missing, so the dummy lets the process come up and accept the ACME work. Generate a self-signed certificate and place it in the directory the crt-store section will use, which the tutorial sets to /etc/haproxy/ssl. The step is complete when haproxy starts and stays running with the placeholder in place. The dummy is replaced in a later step and should not be served to clients for long.
Define the acme section
Create an acme section and set its directory, contact, challenge and map keywords. The directory points to the certificate authority's ACME endpoint; the tutorial's example is the Let's Encrypt staging URL, which is suitable for testing before you switch to production. The contact keyword gives the address the authority uses for account notices, and challenge selects HTTP-01 or DNS-01. The map keyword names the file that routes each domain to its ACME section, with the tutorial's example being virt@acme. Check the section with haproxy -c. This step is done when the configuration validates with the acme section present.
Define the crt-store section and load line
Add a crt-store section that sets crt-base and key-base, which the tutorial sets to /etc/haproxy/ssl. Then add a load line that ties a certificate name to the acme section and to the domains it covers, for example load crt "example.pem" acme letsencrypt-staging domains "www.example.com" alias "example". The load line tells HAProxy to request the certificate and save the resulting .pem to the crt-base directory. Confirm the directory is writable by the HAProxy process user. The step is done when the load line validates and the target directory is in place.
Add the HTTP-01 challenge rule or DNS-01 settings
If you use HTTP-01, add a frontend rule that answers challenge requests on the path prefix /.well-known/acme-challenge/. The tutorial uses an http-request return status 200 rule matched with path_beg, so the authority's validation request receives the expected response. This frontend must be reachable on port 80 from the public internet for the authority to validate. If you use DNS-01, configure the provider instead, using provider-name and acme-vars. The tutorial lists Go libdns providers including azure, cloudflare and route53 from HAProxy 3.3. Confirm which method your environment supports before you choose it, because DNS-01 needs credentials for the DNS provider.
Serve the certificate with ssl-f-use crt
In the frontend that terminates TLS, reference the certificate with ssl-f-use crt, using the @my_files alias and the name you gave in the load line, for example @my_files/example. This makes the frontend serve the certificate HAProxy manages instead of the dummy. Reload the configuration and check that the frontend presents the expected certificate name to a client. The step is complete when the served certificate matches the name from the load line.
Issue the certificate on HAProxy 3.2 with acme renew
On HAProxy 3.2, issue the real certificate through the Runtime API with acme renew @my_files/example. The tutorial says to run this command explicitly, then save the result with dump ssl cert @my_files/example so the .pem is written to the crt-base directory. Check the outcome with acme status, which lists each ACME task with its state, expiration date and scheduled renewal date. The step is done when acme status shows a valid state with an expiration date in the future. Because the Runtime API is reached through the master socket, confirm your access controls before you expose it.
Rely on restart issuance from HAProxy 3.3
From HAProxy 3.3, the tutorial says issuance happens automatically when the load balancer restarts, so the explicit acme renew step is no longer required for first issuance. HAProxy emits events when it creates or updates a certificate. To save the certificate to the filesystem, set master_runtime under the haproxy section of dataplaneapi.yml to the master socket path. Verify the result with acme status and confirm the saved .pem appears in crt-base. Note that the tutorial states the feature works with a single load balancer and not an active-active pair, because the load balancer must reach the issuer's servers, so plan your cluster design around that limit.
What must be in place before HAProxy can renew certificates
HAProxy can only automate renewal once the version, the configuration sections, the network path to the issuer and the file permissions are all in order. Each card below names one of these prerequisites and what to check on your own load balancer before you enable automation.
HAProxy version and experimental flag
The ACME tutorial applies to HAProxy 3.2 and newer, and to HAProxy Enterprise 3.2r1 and newer. Run the version check on every load balancer in your fleet, not only the one you test on, because a mixed-version fleet will renew inconsistently. The tutorial labels ACME support as currently experimental, so plan for that label in your change approval and your support conversations. Confirm the exact version string your binary reports before you write any acme configuration.
HAProxy ACME tutorialGlobal section directives
The tutorial's global section needs two lines before any ACME block will load: expose-experimental-directives and httpclient.resolvers.prefer ipv4. Without the first, the experimental ACME keywords are not accepted by the parser. Check that both lines appear in the global section of the configuration file that the running process actually reads, since a reload from a different path can silently drop them. Compare your file against the tutorial example rather than copying values from another environment.
Network reachability to the issuer
The tutorial states that the feature works with a single load balancer and not an active-active pair, because the load balancer itself must reach the certificate issuer's servers. Confirm outbound HTTPS from the load balancer to the directory URL you plan to use, and for HTTP-01, confirm that the issuer can reach the load balancer on port 80. Test from the same network segment and firewall policy the load balancer uses in production, since a test from a workstation proves little. Ask your network team whether any egress proxy or DNS resolver rules apply.
DNS-01 and libdns providers
From HAProxy 3.3 the tutorial lists DNS-01 support through the Go libdns library, with providers such as azure, cloudflare and route53. Each provider is configured with provider-name and acme-vars, and the credentials in those variables must have permission to write the challenge records in your zone. Confirm which provider names your build supports, because the tutorial examples are not an exhaustive list. Store the credentials in a location your team already audits, and check that the file holding them is readable only by the HAProxy service account.
The 3.4 profile and EAB keywords
From HAProxy 3.4 the tutorial lists an acme profile keyword with the values classic (the default), tlsserver and shortlived, and External Account Binding keywords eab-key-id, eab-mac-key and eab-mac-alg. The alg default is HS256, with HS384 and HS512 also accepted. Choose the profile that matches the certificate type your issuer offers, and only set EAB values if your issuer requires them. Verify the profile names against the issuer's current documentation before you commit to one.
Write access to the certificate directory
The crt-store section sets crt-base and key-base to /etc/haproxy/ssl, and the generated .pem files are saved to that directory. The HAProxy process must be able to write there, and your change process must know which owner and mode the directory uses. Check that the directory exists before the first run, and confirm that no backup or configuration management job will overwrite freshly issued files on its next pass. Test writes as the same user the service runs under, not as root.
How to confirm HAProxy renewals keep happening
Once HAProxy is issuing and renewing certificates, the job is not finished until you can see that renewals are actually happening. Start with the Runtime API command acme status, which lists each ACME task with its state, its certificate expiration date and its scheduled renewal date. Run it from the master socket and record the output on a schedule, so you can compare the expiration date with the scheduled renewal date for every certificate. A task that shows a renewal date well ahead of expiry but a state that never changes is the kind of problem worth investigating before it becomes an outage. The sources do not specify a required polling interval, so set one that fits your change control and your certificate lifetimes, and confirm the exact output format against the version you run.
From HAProxy 3.3, the tutorial states that HAProxy emits events when it creates or updates a certificate, and that issuance happens automatically when the load balancer restarts. Route those events into your logging or monitoring pipeline and treat a create or update event as evidence that a renewal completed. Pair this with the Data Plane API setting master_runtime under the haproxy section of dataplaneapi.yml, because the tutorial says the Data Plane API saves the certificate to the filesystem only once that is set. If the files on disk stop changing while acme status still shows a future renewal date, you have a gap between what HAProxy holds in memory and what your services read. Confirm the event names and their fields in the HAProxy documentation for your release.
Keep a record of every issued certificate with its subject names, issuance date and expiry date, drawn from the acme status output and the saved files. Auditors and customer security reviewers will ask for this history, and it is easier to produce from a record kept as renewals happen than to reconstruct later. Decide the alerting thresholds yourself, for example how many days before expiry a warning fires and who receives it. The sources do not give recommended values, so these thresholds are a choice your team makes based on your renewal cadence and your tolerance for risk. Test the alert by making a renewal fail on purpose in a non-production environment, so you know the warning reaches a person before a certificate lapses.
Questions teams ask about HAProxy certificate renewal
Does HAProxy support ACME, and from which version?
Yes. The HAProxy ACME tutorial applies to HAProxy 3.2 and newer and to HAProxy Enterprise 3.2r1 and newer. Support is labeled experimental in the tutorial, so confirm the exact directives and behavior against the release you run. Before you build on it, check the version of every node in your estate, because older releases do not carry these keywords. Teams on earlier branches will need to upgrade first or keep using their current renewal tooling until the upgrade is scheduled. Plan the upgrade as its own change, since it affects the whole load balancer, not only certificates.
Is HAProxy ACME support production ready if it is labeled experimental?
The sources do not state that the feature is production ready, and the tutorial labels ACME support as currently experimental. Treat that label as a real constraint. Before relying on it, test issuance and renewal in a staging environment against the Let's Encrypt staging directory the tutorial uses, run acme status to confirm the scheduled renewal dates, and watch the behavior through several renewal cycles. Keep your current renewal process running in parallel until the new path has a track record in your environment. Ask HAProxy or your support provider for their current position on production use before you cut over.
Which ACME challenge types does HAProxy support?
The tutorial lists two challenge types: HTTP-01 and DNS-01. HTTP-01 is configured in the acme section with the challenge keyword. For HTTP-01, the frontend answers challenges with an http-request return status 200 rule matched on the path prefix /.well-known/acme-challenge/, so that traffic must reach the frontend. From HAProxy 3.3, the tutorial lists DNS-01 support through the Go libdns library, with providers such as azure, cloudflare and route53, configured with provider-name and acme-vars. DNS-01 suits hosts that are not reachable on port 80, but it adds credentials for your DNS provider that must be stored and rotated carefully. Choose the challenge based on where your names resolve and who controls the DNS zone.
Does HAProxy ACME renewal work on an active-active pair?
No. The tutorial states that the feature works with a single load balancer and not an active-active pair, because the load balancer must reach the certificate issuer's servers. This is a design constraint, not a configuration detail. If your estate runs two load balancers in active-active, you cannot assume the built-in renewal will keep both nodes current. Plan for certificate delivery to the second node by another route, and confirm the approach with the vendor documentation for your version. Where the sources are silent on a particular cluster design, check it in a test environment rather than assuming it works.
Do the sources cover wildcard or internal certificate names?
The sources listed on this page do not say whether HAProxy ACME issuance covers wildcard names or internal, non-public names. The tutorial's examples use a specific domain list with the domains keyword on the load line, and the 3.4 release adds an ips argument for IP address SANs. Wildcard issuance generally requires DNS-01 validation, but the sources do not confirm how HAProxy handles a wildcard request, so verify it against the tutorial and your test results. For internal names, note that publicly trusted issuers only issue for names you can validate, so an internal-only name will usually need a private certificate authority instead. Ask your certificate authority which name types it will issue for your account before designing around them.
How does certificate lifetime shorten the renewal job's workload?
The CA/Browser Forum baseline requirements, version 2.3.2 dated 3 December 2026, set the maximum subscriber certificate validity to 200 days from 15 March 2026, to 100 days from 15 March 2027, and to 47 days from 15 March 2029. Domain and IP address validation reuse drops to 100 days from 2027 and to 10 days from 2029. Each step means more renewals per certificate per year, so a job that runs once a quarter will stop being enough. Count the certificates on your load balancers, record their current expiry, and make the renewal job run on a schedule that fits the shortest lifetime you expect to face. Automation that runs daily and checks expiry is the usual pattern for this change.
How do you check renewal status and recover when a renewal fails?
Use the Runtime API command acme status, which lists each ACME task with its state, certificate expiration date and scheduled renewal date. Run it on a schedule and alert when a task is in an error state or when the expiry is inside your alert window. For a manual renewal on HAProxy 3.2, the tutorial uses acme renew followed by dump ssl cert to save the result. From HAProxy 3.3, issuance happens automatically on restart, events are emitted on creation or update, and the Data Plane API saves the certificate to the filesystem once master_runtime is set under the haproxy section of dataplaneapi.yml. Test the failure path by pointing a test instance at the staging directory and confirming that your alerts fire.
Should we bring in outside help for HAProxy certificate renewal?
It depends on how much of the design is new to your team. Help is most useful when the load balancer is part of an active-active pair, when you need DNS-01 with a provider you have not run before, or when the feature is needed for production under the experimental label. DeployOpen plans, implements, integrates, hardens, backs up, upgrades, documents and supports self-hosted open-source platforms inside the client's own infrastructure, and most engagements are fixed-scope with the scope and deliverables agreed in writing before work starts. A quote follows from the written scope. DeployOpen does not publish a price list, and it is not an official partner or certified provider of HAProxy. Ask any provider for the scope, the test evidence they will hand over and the process for returning to your current renewal path if the new one fails.
How the HAProxy ACME flow moves from issuance to renewal
The flow starts when the HAProxy load balancer reads an acme section and requests a certificate from the ACME directory, such as the Let's Encrypt staging URL in the tutorial. The CA then checks control of the domain through HTTP-01, which needs a return rule for /.well-known/acme-challenge/, or DNS-01, which uses a provider configured with provider-name and acme-vars. The issued .pem is saved to crt-base, and the frontend loads it with ssl-f-use. Check acme status for the scheduled renewal date, and remember the tutorial states this works with a single load balancer, not an active-active pair.
The HAProxy ACME issuance, storage and renewal path on a single load balancer.
How DeployOpen helps teams automate certificates on HAProxy
DeployOpen starts with a written scope that names the HAProxy versions, certificate authorities, validation methods and load balancer topology in your environment. We then build and test the ACME setup in your infrastructure, hand over documentation and runbooks, and offer ongoing support as a retainer.
How we scope
- Confirm which HAProxy or HAProxy Enterprise version you run, since the ACME tutorial applies to 3.2 and newer.
- Record whether you use HTTP-01 or DNS-01 validation and which DNS provider holds the zones involved.
- Confirm whether your setup is a single load balancer, because the tutorial says ACME does not support an active-active pair.
How we build
- Configure the global, acme and crt-store sections, including the expose-experimental-directives and httpclient.resolvers.prefer ipv4 lines the tutorial requires.
- Wire the frontend challenge rule and certificate binding, then test issuance and renewal against the staging directory before production.
- Check acme status output and certificate expiration dates so renewal timing is visible before you rely on it.
How we hand over
- Deliver the written configuration, the scope record and the test results for your specific HAProxy version and topology.
- Document the runbook for the Runtime API commands, the dummy certificate step on 3.2 and the restart-driven issuance on 3.3 and newer.
- Walk your operations team through monitoring renewal state and what to do when acme status shows a failed task.
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
- Ongoing support, upgrades and continuous testing are available as retainers, including review when HAProxy versions change.
- Ask for a written quote based on your scope, since DeployOpen does not publish a price list.

