diff --git a/tljh/configurer.py b/tljh/configurer.py index c5ddf18..8e49d75 100644 --- a/tljh/configurer.py +++ b/tljh/configurer.py @@ -40,6 +40,7 @@ default = { "letsencrypt": { "email": "", "domains": [], + "staging": False, }, }, "traefik_api": { diff --git a/tljh/traefik.toml.tpl b/tljh/traefik.toml.tpl index 0c4ac8c..e1f82a1 100644 --- a/tljh/traefik.toml.tpl +++ b/tljh/traefik.toml.tpl @@ -47,6 +47,9 @@ X-Xsrftoken = "redact" [certificatesResolvers.letsencrypt.acme] email = "{{ https['letsencrypt']['email'] }}" storage = "acme.json" +{% if https['letsencrypt']['staging'] -%} +caServer = "https://acme-staging-v02.api.letsencrypt.org/directory" +{%- endif %} [certificatesResolvers.letsencrypt.acme.tlsChallenge] {% endif %}