1

I'm trying to get a traefik docker instance running on my raspberry pi 4 8gb. I have everything setup, but I can't get the let's encrypt certification working. (My name registrar is Porkbun)

Here's my docker-compose :

Version: '3.4'
services:
  traefik:
    image: 'traefik:2.3'
    restart: 'unless-stopped'
    ports:
      - '80:80'
      - '443:443'
    volumes:
      - '/var/run/docker/sock:/var/run/docker.sock'
      - './config_files/traefik.toml:/traefik.toml'
      - './config_files/traefik_dynamic.toml:/traefik_dynamic.toml'
      - './config_files/acme.json:/acme.json'
    networks:
      - pi
  whoami:
    image: 'traefik/whoami'
    restart: 'unless-stopped'
    labels:
      - 'traefik.enable=true'
      - 'traefik.http.routers.whoami.rule=PathPrefix(`/whoami{regex:$$|/.*}`)'
      - 'traefik.http.services.whoami.loadbalancer.server.port=80'

networks:
  pi:
    external: true

And here's my traefik.toml :

[entryPoints]
  [entryPoints.web]
     address = ":80"
     [entryPoints.web.http.redirections.entryPoint]  
       to = "websecure"
       scheme = "https"

   [entryPoints.websecure]
     address = ":443"

     [entryPoints.websecure.http.tls]
       certResolver = "lets-encrypt"

 [api]
   dashboard = true

 [certificatesResolvers.lets-encrypt.acme]
   email = "lucien.astie@gmail.com"
   storage = "acme.json"
   [certificatesResolvers.lets-encrypt.acme.tlsChallenge]


 [providers.docker]
   watch = true
   network = "web"
   exposedByDefault = false

 [providers.file]
   filename = "traefik_dynamic.toml"

Lastly my traefik_dynamic.toml :

 [http.middlewares.simpleAuth.basicAuth]
   users = [
     "uberfluff:$apr1$qAWpnRq5$W94tcAy9JCKE6TN.Zy/Kp1"
   ]

 [http.routers.api]
   rule = "Host(`lulusworld.art`)"
   entrypoints = ["web"]
   middlewares = ["simpleAuth"]
   service = "api@internal"
   [http.routers.api.tls]
     certResolver = "lets-encrypt"

But with all of this I get this error :

Unable to obtain ACME certificate for domains "lulusworld.art": unable to generate a certificate for the domains [lulusworld.art]: error: one or more domains had a problem:\n[lulusworld.art] acme: error: 400 :: urn:ietf:params:acme:error:dns :: no valid A records found for lulusworld.art; no valid AAAA records found for lulusworld.art, url: \n" routerName=api@file rule="Host(lulusworld.art)" providerName=lets-encrypt.acme

Here's what I did to try to fix this :

  • I made a A record (the record is working but not the SSL)
  • According to docs for wildcard certificate you need DNS challenge but I can't get porkbun working with DNS Challenge

If you have any idea how I could solve my problem it would be greatly appreciated.

UberFluff
  • 31
  • 4

0 Answers0