Wild card certs wit...
 
Notifications
Clear all

Wild card certs with traefik - to many guides out there and none help

15 Posts
3 Users
5 Reactions
748 Views
Posts: 8
 dan
Topic starter
(@dirtyharrywk)
Active Member
Joined: 10 months ago

I've been struggling with creating a reverse proxy with wild card certificates for my local home lab.ย  I tried Wolfgang's solution using duckdns.org with Nginx but it never works.ย  I tried TechnoTim's solution but got confused.ย  I have a sysadmin and developer background and need help (step-by-step) using traefik in docker.ย  Thank you!

14 Replies
Brandon Lee
Posts: 398
Admin
(@brandon-lee)
Member
Joined: 14 years ago

@dirtyharrywk welcome to the forums! Traefik and Docker with LetsEncrypt can definitely make you pull your hair out when getting started. Here are a couple of posts that I have written. I am not sure if you have looked at these as of yet. Let me know where you are running into issues. Normally it is always something small that trips many up with this.

If you want to go the Traefik route:

If you want to try Nginx Proxy Manager (it is the easiest since it has a GUI):

Hopefully we can work through the issues 👍ย 

Reply
Brandon Lee
Posts: 398
Admin
(@brandon-lee)
Member
Joined: 14 years ago

@dirtyharrywk Also keep in mind, you will need to have a real registered domain out there that is reachable with DNS. What DNS provider are you using?

Reply
2 Replies
 dan
(@dirtyharrywk)
Joined: 10 months ago

Active Member
Posts: 8

Thanks @brandon-lee.ย  I do have a domain with Namecheap and Cloudflare as my DNS.

Reply
Brandon Lee
Admin
(@brandon-lee)
Joined: 14 years ago

Member
Posts: 398

@dirtyharrywk Great! I think Cloudflare is one of the easiest to make work without issues. Let me know if you can follow one of the processes in the blog posts and let me know if you run into any issues along the way and if you have any questions 👍

Reply
Posts: 8
 dan
Topic starter
(@dirtyharrywk)
Active Member
Joined: 10 months ago

I'm confused on the step "Redirect to HTTPS".ย  Where does that go?ย  The traefik.yml file already has "middlewares" for HTTP.

traefik.yml:

providers:
  docker:
    exposedByDefault: false
  file:
    filename: /etc/traefik/dynamic.yml
  http:
    routers:
      dashboard:
        rule: Host(`traefik.MY_DOMAIN.com`)
        service: api@internal
        middlewares:
          - traefik-auth
        tls:
          certResolver: dns-cloudflare
    middlewares:
      traefik-auth:
        basicAuth:
          users:
            - "admin:admin"
certificatesResolvers:
  dns-cloudflare:
    acme:
      email: MY_EMAIL_ADDRESS
      storage: /letsencrypt/acme.json
      dnsChallenge:
        provider: cloudflare
        delayBeforeCheck: 0
      caServer:  https://acme-v02.api.letsencrypt.org/directory 
Reply
Posts: 8
 dan
Topic starter
(@dirtyharrywk)
Active Member
Joined: 10 months ago

traefik.yml:

providers:
  docker:
    exposedByDefault: false
  file:
    filename: /etc/traefik/dynamic.yml
  http:
    routers:
      dashboard:
        rule: Host(`traefik.MY_DOMAIN.com`)
        service: api@internal
        middlewares:
          - traefik-auth
        tls:
          certResolver: dns-cloudflare
    middlewares:
      traefik-auth:
        basicAuth:
          users:
            - "admin:admin"
      redirect-to-https:
        redirectScheme:
          scheme: https
certificatesResolvers:
  dns-cloudflare:
    acme:
      email: MY_EMAIL
      storage: /letsencrypt/acme.json
      dnsChallenge:
        provider: cloudflare
        delayBeforeCheck: 0
      caServer:  https://acme-v02.api.letsencrypt.org/directory 

ย 

log file is displaying this:

2024/02/20 17:21:51 command traefik error: field not found, node: middlewares
Reply
Page 1 / 2