Vhtforums
AI Assistant
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
9,518 Views
Posts: 8
 dan
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@dirtyharrywk)
Active Member
Joined: 2 years ago
[#203]

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: 682
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@brandon-lee)
Member
Joined: 16 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:

https://www.virtualizationhowto.com/2023/02/traefik-letsencrypt-certificates-configuration/

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

https://www.virtualizationhowto.com/2023/10/setting-up-nginx-proxy-manager-on-docker-with-easy-letsencrypt-ssl/

Hopefully we can work through the issues 👍 


Reply
Brandon Lee
Posts: 682
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@brandon-lee)
Member
Joined: 16 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: 2 years ago

Active Member
Posts: 8
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

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


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

Member
Posts: 682
Brandon Lee
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@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
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@dirtyharrywk)
Active Member
Joined: 2 years 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
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@dirtyharrywk)
Active Member
Joined: 2 years 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