How get multiple sub domain as Sans

Hello,
I'm trying to add mailu to my traefik server. In order to get a SSL, I need to generate a certificate for my main domain and all my subdomain as Sans. The mailu tutorial isn't up to date, their example is for 1.7 version :

[acme]
  [[acme.domains]]
    main = "your.doma.in" # this is the same as $TRAEFIK_DOMAIN!
    sans = ["mail.your.doma.in", "webmail.your.doma.in", "smtp.your.doma.in"]

I tried to add labels on my docker compose file like this :

      - "traefik.http.routers.website.tls.domains[0].main=domain.com"
      - "traefik.http.routers.website.tls.domains[0].sans=sub1.domain.com"
      - "traefik.http.routers.website.tls.domains[1].sans=sub2.domain.com"

But Traefik didn't generate properly my certificate. It put only sub2 domain with the main one.
Does someone have an idea to solve this? Thank's in advance.

Almost there:

      - "traefik.http.routers.website.tls.domains[0].main=domain.com"
      - "traefik.http.routers.website.tls.domains[0].sans=sub1.domain.com,sub2.domain.com"
1 Like

Huge thanks to you !