<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Wild card certs with traefik - to many guides out there and none help - Kubernetes and Containers				            </title>
            <link>https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/</link>
            <description>Virtualization Howto Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Sat, 11 Apr 2026 11:15:07 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Wild card certs with traefik - to many guides out there and none help</title>
                        <link>https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-670</link>
                        <pubDate>Fri, 23 Feb 2024 03:13:20 +0000</pubDate>
                        <description><![CDATA[@dirtyharrywk Hey don&#039;t get confused with the example. In the example file, we are just setting up a simple Nginx web container to see how the letsencrypt SSL certs work with Traefik. I thin...]]></description>
                        <content:encoded><![CDATA[@dirtyharrywk Hey don't get confused with the example. In the example file, we are just setting up a simple Nginx web container to see how the letsencrypt SSL certs work with Traefik. I think this is the best place to start. If you can get this example to work, it is just a matter of adding your containers as you want to benefit from the wildcard cert. Does this make sense? I would like to see you get to the point of having a small test environment with a single Docker compose file before moving on to more complex setups.]]></content:encoded>
						                            <category domain="https://www.virtualizationhowto.com/community/kubernetes-and-containers/">Kubernetes and Containers</category>                        <dc:creator>Brandon Lee</dc:creator>
                        <guid isPermaLink="true">https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-670</guid>
                    </item>
				                    <item>
                        <title>RE: Wild card certs with traefik - to many guides out there and none help</title>
                        <link>https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-669</link>
                        <pubDate>Fri, 23 Feb 2024 00:24:08 +0000</pubDate>
                        <description><![CDATA[Why the nginx container?  I thought I was using traefik, not nginx.  Again this makes no sense at all.]]></description>
                        <content:encoded><![CDATA[<p>Why the nginx container?  I thought I was using traefik, not nginx.  Again this makes no sense at all.</p>]]></content:encoded>
						                            <category domain="https://www.virtualizationhowto.com/community/kubernetes-and-containers/">Kubernetes and Containers</category>                        <dc:creator>dan</dc:creator>
                        <guid isPermaLink="true">https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-669</guid>
                    </item>
				                    <item>
                        <title>RE: Wild card certs with traefik - to many guides out there and none help</title>
                        <link>https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-668</link>
                        <pubDate>Fri, 23 Feb 2024 00:19:55 +0000</pubDate>
                        <description><![CDATA[I have no idea where this is suppose to go.  Dashboard rule?  Huh?  In the docker-compose.yml?  That is the only file I have.]]></description>
                        <content:encoded><![CDATA[
<p>Hi</p>
<p>@dirtyharrywk. Unfortunately the Traefik docs are a confusing and disorganized mess (well, in my opinion!)</p>
<hr />
<p>Most importantly, your http block should not be a child of providers. It needs to be unindented so it's at the root.</p>
<hr />
<p>Your dashboard rule needs tweaking:</p>
<pre contenteditable="false">http:
  routers:
    dashboard:
      rule: Host(`traefik.MY_DOMAIN.com`) &amp;&amp; (PathPrefix(`/api`) || PathPrefix(`/dashboard`))</pre>
<hr />
<p>https redirection can be accomplished using this recipe instead of a middleware:</p>
<pre contenteditable="false">entryPoints:
  web:
    address: :80
    http:
      redirections:
        entryPoint:
          to: websecure
          scheme: https

  websecure:
    address: :443
</pre>
<p>I hope this solves your problem, or at least gets you further along.</p>
<p></p>
<p>I have no idea where this is suppose to go.  Dashboard rule?  Huh?  In the docker-compose.yml?  That is the only file I have.</p>
<p> </p>]]></content:encoded>
						                            <category domain="https://www.virtualizationhowto.com/community/kubernetes-and-containers/">Kubernetes and Containers</category>                        <dc:creator>dan</dc:creator>
                        <guid isPermaLink="true">https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-668</guid>
                    </item>
				                    <item>
                        <title>RE: Wild card certs with traefik - to many guides out there and none help</title>
                        <link>https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-662</link>
                        <pubDate>Thu, 22 Feb 2024 16:30:12 +0000</pubDate>
                        <description><![CDATA[@dirtyharrywk On the network portion, this is due to the network config I had pasted in the sample file. You can remove that if you want and the network line for containers and it shouldn&#039;t ...]]></description>
                        <content:encoded><![CDATA[@dirtyharrywk On the network portion, this is due to the network config I had pasted in the sample file. You can remove that if you want and the network line for containers and it shouldn't cause an issue. @termv totally agreed about the Traefik documentation. It is all over the place!]]></content:encoded>
						                            <category domain="https://www.virtualizationhowto.com/community/kubernetes-and-containers/">Kubernetes and Containers</category>                        <dc:creator>Brandon Lee</dc:creator>
                        <guid isPermaLink="true">https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-662</guid>
                    </item>
				                    <item>
                        <title>RE: Wild card certs with traefik - to many guides out there and none help</title>
                        <link>https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-661</link>
                        <pubDate>Thu, 22 Feb 2024 15:04:26 +0000</pubDate>
                        <description><![CDATA[Hi
@dirtyharrywk. Unfortunately the Traefik docs are a confusing and disorganized mess (well, in my opinion!)

Most importantly, your http block should not be a child of providers. It nee...]]></description>
                        <content:encoded><![CDATA[Hi
<p>@dirtyharrywk. Unfortunately the Traefik docs are a confusing and disorganized mess (well, in my opinion!)</p>
<hr />
<p>Most importantly, your http block should not be a child of providers. It needs to be unindented so it's at the root.</p>
<hr />
<p>Your dashboard rule needs tweaking:</p>
<pre contenteditable="false">http:
  routers:
    dashboard:
      rule: Host(`traefik.MY_DOMAIN.com`) &amp;&amp; (PathPrefix(`/api`) || PathPrefix(`/dashboard`))</pre>
<hr />https redirection can be accomplished using this recipe instead of a middleware:
<pre contenteditable="false">entryPoints:
  web:
    address: :80
    http:
      redirections:
        entryPoint:
          to: websecure
          scheme: https

  websecure:
    address: :443
</pre>
<p>I hope this solves your problem, or at least gets you further along.</p>]]></content:encoded>
						                            <category domain="https://www.virtualizationhowto.com/community/kubernetes-and-containers/">Kubernetes and Containers</category>                        <dc:creator>TermV</dc:creator>
                        <guid isPermaLink="true">https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-661</guid>
                    </item>
				                    <item>
                        <title>RE: Wild card certs with traefik - to many guides out there and none help</title>
                        <link>https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-658</link>
                        <pubDate>Thu, 22 Feb 2024 01:38:01 +0000</pubDate>
                        <description><![CDATA[I&#039;m getting this after running docker-compose up -d
Recreating nginx ...

Recreating traefik ... error

Recreating nginx   ... error

ork&#039;s subnets

ERROR: for nginx  Cannot start s...]]></description>
                        <content:encoded><![CDATA[<p>I'm getting this after running <strong>docker-compose up -d</strong></p>
<pre contenteditable="false">Recreating nginx ...

Recreating traefik ... error

Recreating nginx   ... error

ork's subnets

ERROR: for nginx  Cannot start service nginx: Invalid address 172.19.0.11: It does not belong to any of this network's subnets

ERROR: for traefik2  Cannot start service traefik2: Invalid address 172.19.0.10: It does not belong to any of this network's subnets

ERROR: for nginx  Cannot start service nginx: Invalid address 172.19.0.11: It does not belong to any of this network's subnets

ERROR: Encountered errors while bringing up the project.</pre>]]></content:encoded>
						                            <category domain="https://www.virtualizationhowto.com/community/kubernetes-and-containers/">Kubernetes and Containers</category>                        <dc:creator>dan</dc:creator>
                        <guid isPermaLink="true">https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-658</guid>
                    </item>
				                    <item>
                        <title>RE: Wild card certs with traefik - to many guides out there and none help</title>
                        <link>https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-648</link>
                        <pubDate>Wed, 21 Feb 2024 03:12:47 +0000</pubDate>
                        <description><![CDATA[@dirtyharrywk Let&#039;s go back to the basics and start with a simple example. I would eliminate all the other variables. You don&#039;t have to configure the middleware for auth to Traefik. I would ...]]></description>
                        <content:encoded><![CDATA[<p>@dirtyharrywk Let's go back to the basics and start with a simple example. I would eliminate all the other variables. You don't have to configure the middleware for auth to Traefik. I would start with your Docker host and Docker compose YAML that is configured for the basics. Take a look at the example below. You should be able to use this example and get up and running with Traefik to get a better feel for how things work.</p>
<p>Below:</p>
<ul>
<li>Replace with your email address</li>
<li>Replace "testdomain.com" with your domain</li>
<li>Replace the cloudflare email and API token with your own</li>
<li>Replace the IP address I have in the traefik.http.routers.traefik.rule=host('10.1.149.76')' with your own IP that you want to use to access Traefik itself</li>
<li>For the Nginx container, replace the nginx.testdomain.com with a record for your domain to test with.</li>
<li>***Note, I would uncomment the "certificateresolvers.myresolver.acme.caserver="....staging...." - When you are testing, you can uncomment this and they won't rate limit you when trying to get things right. When you get a cert from their staging server, it will present with an SSL error, but you just need to look in your browser dev console &gt; security tab and get the cert details to see that you are pulling from their staging server....Once you verify you are, you should be able to comment it back out and hit their production server.</li>
</ul>
<p>Let's start with this example and see where you get.....</p>
<pre contenteditable="false">version: '3.8'

services:
  traefik2:
    image: traefik:latest
    restart: always
    command:
      # Tell Traefik to discover containers using the Docker API
      - --providers.docker=true
      # Enable the Trafik dashboard
      - --api.dashboard=true
      # Set up LetsEncrypt
      - --certificatesresolvers.letsencrypt.acme.dnschallenge=true
      - --certificatesresolvers.letsencrypt.acme.dnschallenge.provider=cloudflare
      - --certificatesresolvers.letsencrypt.acme.email=&lt;your email address&gt;
      - --certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json
      #- --certificatesresolvers.myresolver.acme.caserver="https://acme-staging-v02.api.letsencrypt.org/directory"
      # Set up an insecure listener that redirects all traffic to TLS
      - --entrypoints.web.address=:80
      - --entrypoints.web.http.redirections.entrypoint.to=websecure
      - --entrypoints.web.http.redirections.entrypoint.scheme=https
      - --entrypoints.websecure.address=:443
      # Set up the TLS configuration for our websecure listener
      - --entrypoints.websecure.http.tls=true
      - --entrypoints.websecure.http.tls.certResolver=letsencrypt
      - --entrypoints.websecure.http.tls.domains.main=testdomain.com
      - --entrypoints.websecure.http.tls.domains.sans=*.testdomain.com
      - --serverstransport.insecureskipverify=true
    environment:
      - CLOUDFLARE_EMAIL=&lt;your email address&gt;
      - CLOUDFLARE_DNS_API_TOKEN=&lt;cloudflare API token&gt;
    ports:
      - 80:80
      - 443:443
    networks:
      traefik:
        ipv4_address: 172.19.0.10
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ~/homelabservices/letsencrypt:/letsencrypt
    labels:
      - "traefik.enable=true"
      - 'traefik.http.routers.traefik.rule=Host(`10.1.149.76`)'
      - "traefik.http.routers.traefik.entrypoints=websecure"
      - "traefik.http.routers.traefik.service=api@internal"
      - 'traefik.http.routers.traefik.middlewares=strip'
      - 'traefik.http.middlewares.strip.stripprefix.prefixes=/traefik'
    container_name: traefik

  nginx:
    container_name: nginx
    image: nginx:latest
    restart: always
    networks:
      traefik:
        ipv4_address: 172.19.0.11
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.nginx.rule=Host(`nginx.testdomain.com`)"
      - "traefik.http.routers.nginx.entrypoints=websecure"
      - "traefik.http.routers.nginx.tls=true"
       

networks:
  traefik:
    driver: bridge
    name: traefik
    ipam:
      driver: default
      config:
        - subnet: 172.19.0.0/16</pre>
<p> </p>
<p> </p>]]></content:encoded>
						                            <category domain="https://www.virtualizationhowto.com/community/kubernetes-and-containers/">Kubernetes and Containers</category>                        <dc:creator>Brandon Lee</dc:creator>
                        <guid isPermaLink="true">https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-648</guid>
                    </item>
				                    <item>
                        <title>RE: Wild card certs with traefik - to many guides out there and none help</title>
                        <link>https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-643</link>
                        <pubDate>Tue, 20 Feb 2024 18:33:51 +0000</pubDate>
                        <description><![CDATA[I should add this to the mix... I&#039;m running pi-hole on a separate server.]]></description>
                        <content:encoded><![CDATA[<p>I should add this to the mix... I'm running pi-hole on a separate server.</p>]]></content:encoded>
						                            <category domain="https://www.virtualizationhowto.com/community/kubernetes-and-containers/">Kubernetes and Containers</category>                        <dc:creator>dan</dc:creator>
                        <guid isPermaLink="true">https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/paged/2/#post-643</guid>
                    </item>
				                    <item>
                        <title>RE: Wild card certs with traefik - to many guides out there and none help</title>
                        <link>https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/#post-642</link>
                        <pubDate>Tue, 20 Feb 2024 17:22:41 +0000</pubDate>
                        <description><![CDATA[traefik.yml:
providers:
  docker:
    exposedByDefault: false
  file:
    filename: /etc/traefik/dynamic.yml
  http:
    routers:
      dashboard:
        rule: Host(`traefik.MY_DOM...]]></description>
                        <content:encoded><![CDATA[<p>traefik.yml:</p>
<pre contenteditable="false">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</pre>
<p> </p>
<p>log file is displaying this:</p>
<pre contenteditable="false">2024/02/20 17:21:51 command traefik error: field not found, node: middlewares</pre>]]></content:encoded>
						                            <category domain="https://www.virtualizationhowto.com/community/kubernetes-and-containers/">Kubernetes and Containers</category>                        <dc:creator>dan</dc:creator>
                        <guid isPermaLink="true">https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/#post-642</guid>
                    </item>
				                    <item>
                        <title>RE: Wild card certs with traefik - to many guides out there and none help</title>
                        <link>https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/#post-641</link>
                        <pubDate>Tue, 20 Feb 2024 17:17:29 +0000</pubDate>
                        <description><![CDATA[I&#039;m confused on the step &quot;Redirect to HTTPS&quot;.  Where does that go?  The traefik.yml file already has &quot;middlewares&quot; for HTTP.
traefik.yml:
providers:
  docker:
    exposedByDefault: false...]]></description>
                        <content:encoded><![CDATA[<p>I'm confused on the step "<strong>Redirect to HTTPS</strong>".  Where does that go?  The traefik.yml file already has "middlewares" for HTTP.</p>
<p>traefik.yml:</p>
<pre contenteditable="false">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</pre>]]></content:encoded>
						                            <category domain="https://www.virtualizationhowto.com/community/kubernetes-and-containers/">Kubernetes and Containers</category>                        <dc:creator>dan</dc:creator>
                        <guid isPermaLink="true">https://www.virtualizationhowto.com/community/kubernetes-and-containers/wild-card-certs-with-traefik-to-many-guides-out-there-and-none-help/#post-641</guid>
                    </item>
							        </channel>
        </rss>
		