Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Announce service domains via mDNS #6334

Closed
schildbach opened this issue Feb 18, 2020 · 8 comments
Closed

Announce service domains via mDNS #6334

schildbach opened this issue Feb 18, 2020 · 8 comments

Comments

@schildbach
Copy link

I'd like Traefik to announce a domain within my local network via Multicast DNS (Avahi/Zeroconf/Bonjour). Note this is explicitely not requiring a DNS server like #1191 is suggesting.

This would make it a lot easier for deploying multiple docker/docker-compose services on a small home network with just one server. E.g. Node-RED, Riot-Web, Nextcloud could be published as nodered.local, riot.local, nextcloud.local, etc. Home networks usually don't run their own internal DNS server, and services (e.g. Printers, Sensors, etc.) usually announce themselves in a P2P manner (mDNS).

@traefiker
Copy link
Contributor

Hi! I'm Træfiker 🤖 the bot in charge of communication regulation.

Thanks for your interest in Traefik!

Issue templates help us help you by providing all necessary information.

Please edit your issue and use the available templates:

And remember: each time someone ignores the template, a cute little bunny dies.

#SaveTheCuteBunny ❤️ 🐰 ❤️

southpark - estrella kill rabbit

southpark - estrella kill rabbit2

@mpl
Copy link
Collaborator

mpl commented Feb 18, 2020

Hi @schildbach ,
In addition to respecting the template, could you please describe a specific use-case of a problem, detailing how mDNS would help and fix the problem (just as if we did not know how mDNS works, which is pretty much the case)?

@schildbach
Copy link
Author

I thought I had described a usecase in the second paragraph. mDNS is decentralized DNS. Any host or device in your local network can publish (broadcast) DNS records, that is hosts or services. Others use these broadcast to resolve named hosts or services.

Now, if you want to deploy e.g. Node-RED in your local network (on a server), you would want to announce a host for that app, e.g. "nodered.local". Traefik would be responsible for this; currently I'm doing this manually. Traefik would use SNI to destinguish between multiple these apps based on mDNS, just as it does already for normal DNS.

@mpl
Copy link
Collaborator

mpl commented Feb 19, 2020

Sorry, but we do not think that feature belongs among the roles of a reverse-proxy.

@spacemud
Copy link

This is precisely what I'm trying to do at the moment - understandable that it's not considered to be within the scope of Traefik itself.

I wonder if you were able to find a solution @schildbach ? I'm struggling to create a config that can handle mDNS domains.

@schildbach
Copy link
Author

@spacemud I've manually configured one mDNS domain per service. You might want to read avahi/avahi#40 as the intuitive way to add the domains /etc/avahi/hosts cannot be used either. See the discussion for workarounds via systemd.

@viraptor
Copy link

viraptor commented Apr 1, 2020

This can be done externally rather than in traefik itself. I've created this project which may satisfy what you're after. https://gitlab.com/viraptor/docker_mdns

@schildbach
Copy link
Author

I think the solution I (and probably others) are looking for is an automatic one. As soon as a service is brought up that announces a .local domain to Traefik, the mDNS domain shall be broadcast. I agree that this is probably out of focus for Traefik itself – on the other hand I currently don't see another component that could automate this.

@traefik traefik locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants