Splitting local vs. external DNS with separate domain names on Traefik. Is this possible?

Thanks to the entire community - been so helpful.

To preface, my setup:

  • Synology 920+ at home, DSM7
  • I have my own domain (ie. mydomain.com) and Traefik successfully set up to grab certificates and route through Cloudflare for EXTERNAL access. I am using Authelia for middleware protection, and this is generally based off of guides procured by smarthomebeginner.com

What I'm trying to accomplish:

  • I am looking to set up a LOCAL network with a SEPARATE domain ie. "mydomain.lan" for me to access various Docker services while on the home network bypassing CF altogether.
    • I have Pi-Hole set up and am hoping to use local DNS functions within PH to route internally. ie: DNS: mydomain.lan routed to ; then using CNAMEs to point to separate services within mydomain.lan
    • I recognize that in order to do this, I will need to utilize something to reverse proxy to resolve the ports for specific purposes. From what I understand, that's where Traefik can come in .

Is this somehow possible...? I notice that in smarthomebeginner's guides - they have the option to specify multiple domain names. Is that where I want to begin?

In order to have a local domain, I would suggest configuring one of the DNS servers e.g Bind. I found a nice tutorial explaining how to manage that, but there is a lot of documentation around that topic.

Once you create all necessary DNS entries you can use Traefik Proxy and create a routing rule based on the HTTP Host header and then Traefik will router the incoming request to your backend (to the specific application running inside your local network. Depending on your configuration you can start with creating a dynamic configuration using File Provider or Docker - you have already mentioned that you have deployed Docker.

Please let us know if you will have more specific questions concerning Traefik configuration.

1 Like