Create certs with "dummy-hostname" on traefik container itself

I need to be able to create certificates without using an desired container with labels for that certificate hostname.

Can I add the hostname for a seperate certificate to the traefik container itself, if so, how ?

Hello @Yamakasi,

You can add tls.domain labels to your container to request additional certificate names from Lets Encrypt: (Let's Encrypt - Traefik).

OK thanks but can we do:

  - traefik.http.routers.blog.tls.domains[0].main=example1.org
  - traefik.http.routers.blog.tls.domains[0].sans=*.example1.org
  - traefik.http.routers.blog.tls.domains[1].main=example2.org
  - traefik.http.routers.blog.tls.domains[1].sans=*.example2.org

I also saw that it's possible to do:

  - traefik.http.routers.blog.tls.domains[0].main=example1.org
  - traefik.http.routers.blog.tls.domains[0].sans[0]=foo.example1.org
  - traefik.http.routers.blog.tls.domains[0].sans[1]=bar.example1.org

But with one SAN you should not use an array otherwise it's not picked up by Traefik, is this right ?

  - traefik.http.routers.blog.tls.domains[0].main=example1.org
  - traefik.http.routers.blog.tls.domains[0].sans[0]=foo.example1.org

Hello @Yamakasi,

I am not too familiar with the particulars of the nested SAN arrays. You may want to use the LE staging server to verify your configuration, and ensure that you have a working setup before using the production endpoint.

From my understanding you shouldn't use an array if you don't have more than one SAN, but I don't have any code/documentation to point you to for that.

Yes that is exactly what I discovered myself as well. Thanks!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.