Remote error: tls: unknown certificate

Hi All,
I use docker for traefik and for a target continer.
I added certificate (dynamic conf):

[tls]
  [[tls.certificates]]
    certFile = "/path/-.example.it/cert.pem"
    keyFile = "/path/-.example.it/key.pem"
    stores = ["default"]
  [tls.stores]
    [tls.stores.default]
      [tls.stores.default.defaultCertificate]
        certFile = "/path/-.example.it/cert.pem"
        keyFile  = "/path/-.example.it/key.pem"

In the log I can see:
Adding route for home.example.it with TLS options default

When I call the target i received
http: TLS handshake error from 192.168.0.2:62973: remote error: tls: unknown certificate
Serving default certificate for request: "home.example.it"

But the certificate is generate from Traefik.

Then I have 2 problem:

  1. Traefik don't find the true certificate
  2. the default certificate is not use.

Target container creation:

docker create --name home
  -p 8080:80
  -l traefik.enable=true
  -l "traefik.http.routers.home.rule=Host(\"home.example.it\")"
  -l "traefik.http.routers.home.entryPoints=websecure"
  -l "traefik.http.routers.home.tls=true"
  -l "traefik.http.services.home.loadbalancer.server.port=80"
  --network traefik-net
  target:latest

Someone can help me to understand how to solve my problem?

Bye
Saul

Please format code/config using 3 backticks before and after or select it and press </> button.

I can close my own thread.
Solution:
I can't use the same folder for traefik.toml e dynamic.toml.
I set file providers to a folder and not directly to the configuration with filename

Bye

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