Setting ACME resolvers from environment variables

Hello there!

I'm trying to set the variable TRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_STG_ACME_EMAIL or even TRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_STG_ACME_CASERVER but Traefik never picks up the value I've set.

This is what it looks like if I set it statically:

certificatesResolvers:
  LETSENCRYPT_STG:
    acme:
      caServer: https://acme-staging-v02.api.letsencrypt.org/directory

However env vars doesn't seem to work. All provider-specif variables work just fine, but caServer and email (the ones I tested) aren't working.

Does anyone know why?

Hi @kriansa

Try renaming your resolver to one without _

When parsed the _ in the environment variables are converted to . then treated like a label. There are likely message in the debug log to the effect that these variables cannot be decoded.

@cakiwi Thanks for helping!

Unfortunately I tried that and it didn't work. I tried using a 'LE' as the name and yet, nothing, and it doesn't show up in the logs (even with debug level). Do you have any other suggestions I could try?

@kriansa pretty sure that would have been it.

Would need more of the configuration and arguments to help further.