# Certificates ssl static

**URL:** <https://community.traefik.io/t/certificates-ssl-static/25224>\
**Category:** Traefik v2\
**Tags:** letsencrypt-acme, docker-swarm, docker\
**Created:** [November 19, 2024, 4:24am UTC](https://community.traefik.io/t/certificates-ssl-static/25224 "2024-11-19T04:24:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rainer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/rainer/32/8945_2.png) [@rainer](https://community.traefik.io/u/rainer)\
**Post date:** [November 19, 2024, 4:24am UTC](https://community.traefik.io/t/certificates-ssl-static/25224/1 "2024-11-19T04:24:51Z")

</div>

I am trying to place static SSL from my domain registrar to Traefik, but Traefik gives me an error that it cannot find "domain" resolver and in the end it uses the default SSL

What should I modify in my configuration?

####################### traefik.yaml ############################  
log:  
level: "DEBUG"  
entryPoints:  
web:  
address: ":80"  
websecure:  
address: ":443"  
providers:  
docker:  
exposedByDefault: false  
watch: true  
api:  
insecure: true  
dashboard: true  
tls:  
stores:  
domain:  
defaultCertificate:  
certFile: "/certs/domain.cert"  
keyFile: "/certs/private.key"

################## traefil.yml ##################################

version: '3.3'

services:  
traefik:  
image: "traefik:v2.7"  
command:  
- "--configFile=/etc/traefik/traefik.yaml"  
ports:  
- "80:80"  
- "443:443"  
- "8080:8080"  
networks:  
- net  
volumes:  
- "/var/run/docker.sock:/var/run/docker.sock:ro"  
- "./traefik.yaml:/etc/traefik/traefik.yaml"  
- "./certs:/certs"  
labels:  
- "traefik.enable=true"  
- "traefik.http.routers.api.rule=Host(`traefik.domain.com`)" # domain example  
- "traefik.http.routers.api.entrypoints=websecure"  
- "traefik.http.routers.api.tls=true"  
- "traefik.http.routers.api.tls.certresolver=domain"  
networks:  
net:  
external: true

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [November 19, 2024, 9:58am UTC](https://community.traefik.io/t/certificates-ssl-static/25224/2 "2024-11-19T09:58:30Z")

</div>

Use 3 backticks in front and after code/config (or selet and use `</>` button) to make it more readable and preserve spacing, which is important in YAML.

Note that a `certResolver` is used to generate LetsEncrypt TLS certs, it's not needed if you have TLS files, then you only need to set `tls=true` on `entrypoint` or `router`.

Loading TLS files needs to be handled in a Traefik dynamic config file, which is loaded via `providers.file` in static config.

---

<div class="post-metadata">

**Author:** ![rainer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/rainer/32/8945_2.png) [@rainer](https://community.traefik.io/u/rainer)\
**Post date:** [November 19, 2024, 5:03pm UTC](https://community.traefik.io/t/certificates-ssl-static/25224/3 "2024-11-19T17:03:47Z")

</div>

What would the yaml configuration look like? Do you have any examples?

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [November 19, 2024, 7:31pm UTC](https://community.traefik.io/t/certificates-ssl-static/25224/4 "2024-11-19T19:31:31Z")

</div>

It’s all in the [doc](https://doc.traefik.io/traefik/https/tls/#user-defined):

```auto
# Dynamic configuration

tls:
  certificates:
    - certFile: /path/to/domain.cert
      keyFile: /path/to/domain.key
    - certFile: /path/to/other-domain.cert
      keyFile: /path/to/other-domain.key

```

And the [doc](https://doc.traefik.io/traefik/getting-started/configuration-overview/) about Traefic static and dynamic config.

---

<div class="post-metadata">

**Author:** ![rainer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/rainer/32/8945_2.png) [@rainer](https://community.traefik.io/u/rainer)\
**Post date:** [November 20, 2024, 3:01am UTC](https://community.traefik.io/t/certificates-ssl-static/25224/5 "2024-11-20T03:01:13Z")

</div>

And what changes would there be in the labels and command? I think in the command only configuration the provider file is added and the labels would be different.

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [November 20, 2024, 5:43am UTC](https://community.traefik.io/t/certificates-ssl-static/25224/6 "2024-11-20T05:43:09Z")

</div>

Let’s start with

> Use 3 backticks in front and after code/config (or selet and use `</>` button) to make it more readable and preserve spacing, which is important in YAML.
