Use Let’s Encrypt staging certificates to test ACME validation, web-server configuration, automation, and deployment changes without creating trusted production certificates. This reusable checklist explains the staging workflow, the differences between staging and production, and the checks to complete before switching endpoints.
Overview
Let’s Encrypt provides a staging environment for testing ACME clients and certificate deployment. A staging certificate is suitable for checking whether your client can complete a challenge and whether your server can load and serve the resulting certificate. It is not suitable for real visitors: staging certificates are issued by a separate test hierarchy and are not trusted by normal browsers and operating systems.
The basic workflow is:
- Use a domain or subdomain that you control.
- Point the domain to the test server, or prepare the required DNS records.
- Run your ACME client against the Let’s Encrypt staging directory.
- Install the resulting certificate in a temporary or test configuration.
- Test validation, reloads, redirects, renewal automation, and rollback.
- Remove test certificates and switch deliberately to the production directory.
Staging is especially useful before a new application launch, DNS migration, server rebuild, CI/CD change, or large certificate request. It can help you find incorrect document roots, blocked HTTP challenges, missing DNS TXT records, permission problems, and web-server syntax errors without treating production issuance as a debugging loop.
For background on the files your client creates, see Let’s Encrypt Certificate Files Explained. For a complete first deployment, use the Let’s Encrypt Certbot Setup Guide.
Checklist by scenario
Scenario 1: Testing a new Certbot installation
- Confirm that the test hostname resolves to the intended server. Check both the A record and, if present, the AAAA record. An incorrect IPv6 record can direct validation to a different service.
- Confirm that ports 80 and 443 are reachable when your chosen challenge or web-server integration requires them.
- Run Certbot with the staging option. For example, a typical webroot test has the form
sudo certbot certonly --staging --webroot -w /var/www/example -d test.example.com. Adjust the webroot and domain to match your system. - Inspect the command output and locate the generated files. Do not treat a successful staging order as proof that your production configuration is complete; it confirms only that the tested request and challenge path worked.
- Configure the test web server to use the staging certificate, then test its configuration before reloading. With Nginx, this commonly includes
nginx -t; use the equivalent syntax check for your server.
Scenario 2: Testing HTTP-01 validation
HTTP-01 validation requires the ACME client to publish a temporary token under /.well-known/acme-challenge/. Before testing, check that the path is not blocked by authentication, a content security rule, an application router, or an overly broad redirect rule. If a CDN, reverse proxy, or load balancer sits in front of the origin, verify that it passes the challenge request to the correct backend.
- Test the challenge directory over HTTP, not only through the application’s normal homepage.
- Check every frontend that can answer for the hostname.
- Confirm that deployment automation does not delete the token before validation completes.
- Review access logs during the order so you can distinguish a DNS problem from a web-server problem.
Scenario 3: Testing DNS-01 or wildcard issuance
DNS-01 validation places a TXT record under the ACME challenge name. This is the relevant path for wildcard certificates and for environments that cannot expose a validation endpoint over HTTP. Test the complete process, including DNS API credentials, propagation delays, permissions, and cleanup.
Limit DNS API credentials to the zones and actions the automation needs. If you are testing manually, record the exact TXT name and value, then verify that authoritative DNS servers can see it before asking the client to continue. The DNS-01 Challenge Guide covers the broader setup pattern.
Scenario 4: Testing renewal and deployment automation
Issuance is only part of the workflow. Run the client’s renewal simulation or test command according to its documentation, and verify what happens after a certificate changes. The service should reload safely, preserve the private-key permissions, and expose the new certificate to every relevant process. Test failure handling as well: a failed renewal should not replace a working certificate with empty or incomplete files.
Keep monitoring and rollback in the test plan. The certificate renewal automation guide provides useful areas to check, including timers, scheduled jobs, and alerts.
What to double-check
- Directory endpoint: staging and production are different ACME environments. Certbot’s
--stagingoption selects the staging environment; other ACME clients may require an explicit directory URL. Do not copy a staging URL into production automation by accident. - Browser warnings: a warning for a staging certificate is expected. It does not necessarily indicate a broken TLS configuration. Use certificate inspection tools and server logs to check the chain, names, dates, and key usage instead.
- Certificate names: verify every requested hostname, including the apex domain,
wwwhostname, API hostname, or wildcard name. A certificate for one name does not cover a similar-looking name. - Private-key handling: protect the private key, restrict its permissions, and avoid placing it in source control, build artifacts, or shared logs. A staging key should still be handled as sensitive material.
- Redirects and proxies: test HTTP-to-HTTPS redirects, proxy forwarding, WebSocket behavior, and the origin-to-edge TLS mode separately. A successful ACME order does not validate the whole application path.
- Production readiness: confirm that DNS, firewall rules, challenge handling, server configuration, renewal hooks, backups, and monitoring are all ready before the endpoint switch.
Common mistakes
Using a staging certificate for a live site. Staging certificates are for testing and will produce trust warnings. Remove them from live configurations before launch.
Repeating failed production requests while debugging. Use staging during investigation and consult the client output and ACME error details. Rate limits and validation behavior can change, so check the current Let’s Encrypt documentation before designing high-volume tests.
Testing only the certificate request. A successful order does not prove that the web server can load the private key, that all workers have reloaded, or that renewal hooks work. Include an end-to-end request and a controlled reload.
Leaving test DNS records or files behind. Remove temporary TXT records when appropriate, delete unused staging certificates, and clean up test virtual hosts. Do not remove records that another active validation or service still needs.
Assuming the client configuration is portable. Paths, service names, permissions, webroots, and hook locations differ between distributions and hosting environments. Document the values that worked on the test server rather than copying commands blindly.
When to revisit
Return to this checklist before each significant deployment change, not only when a certificate expires. Re-run the relevant staging scenario when you change DNS providers, hosting platforms, load balancers, reverse proxies, web-server versions, container images, firewall rules, certificate automation, or CI/CD credentials. It is also useful before seasonal traffic planning and after a migration; the website migration checklist can help organize the wider move.
Review the workflow whenever Certbot or another ACME client changes its command syntax, whenever Let’s Encrypt updates endpoint guidance, or whenever your infrastructure introduces a new validation path. Before the final switch, write down the production directory, the exact hostnames, the expected certificate file paths, the reload command, and the rollback procedure. Then run one controlled production issuance, verify the served certificate from outside the server, and keep renewal monitoring enabled. Staging is most valuable when it is treated as a repeatable release check rather than a one-time experiment.