Hi guys, i am migrating from Caddy, been at this for some time now.
I have got all my local only services up with certs and I can connect to them on LAN with a subdomain on duckdns, and it seems to be working good so far.
But I have one service which I want to expose externally and I am having some problems doing so, and any pointers in the right direction would be much appreciated!
I know its most common to use labels to expose containers but for several reasons I cant do that. And since this setup works for ny local only services I assume its possible to get it wokring externally too?
PS.I am kind of new at network stuff so please bare with me.
this is my configs
--> /opt/traefik/config/traefik.toml <--
[accessLog]
filePath = "/etc/traefik/access.log"
bufferingSize = 100
[api]
dashboard = true
subdomain1 = true
subdomain2 = true
subdomain3 = true
subdomain4 = true
sub = true
[entrypoints]
[entrypoints.web]
address = ":80"
[entrypoints.websecure]
address = ":443"
[providers.docker]
exposedbydefault = false
network = "traefik"
[providers.file]
directory = "/etc/traefik"
watch = true
[certificatesresolvers.letsEncrypt.acme]
email = "mail@mail.com"
storage = "/acme.json"
[certificatesresolvers.letsEncrypt.acme.dnschallenge]
provider = "duckdns"
delayBeforeCheck = 0
--> /opt/traefik/config/middleware/redirect.toml <--
[provider.file]
watch = true
[http.middlewares.redirect.redirectscheme]
scheme = "https"
[http.routers]
[http.routers.http-to-https]
entryPoints = ["web"]
middlewares = ["redirect"]
rule = "HostRegexp(`{host:.+}`)"
service = "dummy"
[http.services]
[http.services.dummy.loadBalancer]
[[http.services.dummy.loadBalancer.servers]]
url = ""
--> /opt/traefik/config/routers/sub.toml <--
[provider.file]
watch = true
[http.routers]
[http.routers.sub]
entrypoints = ["websecure"]
rule = "Host(`sub.domain.duckdns.org`)"
service = "sub"
[http.routers.sub.tls]
certresolver = "letsEncrypt"
[http.services]
[http.services.sub.Balancer]
[[http.services.sub.loadBalancer.servers]]
url = "http://192.168.1.222:3333"