Custom certificate not been picked up

Issue: self signed certificate is not getting picked up as i need to use a default certificate for all the incoming traffic for any domain.
log says msg="No default certificate, generating one"

Below is the traefik version,

Version:      2.1.4
Codename:     cantal
Go version:   go1.13.7
Built:        2020-02-06T17:10:06Z
OS/Arch:      linux/amd64

In the traefik.toml dynamic configuration below is the configuration,

      certFile = "/etc/traefik/conf/cert.crt"
      keyFile  = "/etc/traefik/conf/cert.key"


traefik.toml contains the static configuration.

The dynamic configuration and the static configuration must be defined in separated files:

Thanks for the reply,
I have the both the config file,

  1. In my docker compose
       - $PWD/traefik.toml:/etc/traefik/traefik.toml
       - $PWD/config.yaml:/etc/traefik/config.yaml
       - $PWD:/etc/traefik/conf
  1. In my traefik.toml
    filename = "/etc/traefik/config.yaml"
    watch = true
  1. In the config.yam i have the below,
    - certFile: /etc/traefik/conf/cert.crt
      keyFile: /etc/traefik/conf/cert.key
        - default
        certFile: /etc/traefik/conf/cert.crt
        keyFile: /etc/traefik/conf/cert.key

earlier i had the tls specified in the static file(traefik.toml) now moved it to the dynamic file(config.yaml)

In this correct

Hey @sekar-fa, u can refer to below gist. proxy-config.toml contains dynamic configuration only. it uses both letsencrypt and custom tls certs for two different domains.

When i moved the tls entry from static file to dynamic file, it worked.
Thanks @ldez @metadata

1 Like