GitHub - ducklol2/quack_domains
github.com
external-link
Contribute to ducklol2/quack_domains development by creating an account on GitHub.

Inspired by everyone here, I’ve spent the past few months playing with hosting my own instances of various open source projects. I just use them on my local network, and love the automatic mDNS my_machine_name.local addresses.

I also love Traefik’s use of Docker Compose labels as a source of hostname configuration (docs), so I thought it would be nice to automatically publish these too!

If this sounds interesting, you can find usage instructions and technical details on GitHub. This is my first published project, so I apologize for any rough edges, but I’ll try my best to accommodate feedback :)

@duck_lol@programming.dev
creator
link
fedilink
English
4
edit-2
1Y

If anybody liked this but wished it automatically picked up label changes, I just spent some time and hacked it in :) Let me know if anything doesn’t work or is unclear!

@Decronym@lemmy.decronym.xyz
bot account
link
fedilink
English
2
edit-2
1Y

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

Fewer Letters More Letters
DNS Domain Name Service/System
HTTP Hypertext Transfer Protocol, the Web
SSL Secure Sockets Layer, for transparent encryption
nginx Popular HTTP server

[Thread #195 for this sub, first seen 7th Oct 2023, 15:15] [FAQ] [Full list] [Contact] [Source code]

jrbaconcheese
link
fedilink
English
91Y

If I’m understanding this correctly, this (plus some other stuff I probably don’t have setup, like traefik) would publish to a local-DNS-like entity so that I could go to sonarr.local and jellyfin.local instead of my current way of memorizing/ bookmarking all the various addresses in the form of server_ip:port# ?

@duck_lol@programming.dev
creator
link
fedilink
English
8
edit-2
1Y

Yes, exactly!

Edit: …actually, almost! You don’t even need Traefik, but this actually doesn’t handle ports for you. You’ll still need to visit sonarr.local:port. If you want to get rid of the ports, you’ll need to set up Traefik or another reverse proxy - see the compose_example.yaml in the repo for a simple example.

If your containers are already available at server_ip:port, on your local network, whether directly or by another proxy, you can just add the label (traefik.http.routers.x.rule=Host(`example.local`)) to the container and this will pick it up, no Traefik needed. (And then visit example.local, or example.local:port if not 80.)

I’m meaning to rework the README a bit to make this clear, and perhaps add a simpler label you can use :)

Edit 2: Reworked the README a bit and added support for a quack_domains.hosts label so you don’t have to write out all that Traefik stuff if you don’t want :) But to access multiple services without a port, you’ll still need to set up a reverse proxy like Traefik, or nginx, or Caddy.

I know some are vehemently against the use of .local for a home network. It would be nice to be able to set a custom TLD like .home or .lan (these don’t have any special meaning or usage as of now).

@duck_lol@programming.dev
creator
link
fedilink
English
1
edit-2
1Y

If you prefer, I think Avahi is able to publish other TLDs, but I played around with it just now and couldn’t get it to work. If you have any luck, let me know what worked for you and I’ll try to add support :)

This is what I tried, but it fails with Failed to add address: Not supported:

# Set domain-name=lan and enable-wide-area=no
nano /etc/avahi/avahi-daemon.conf
sudo avahi-daemon --reload
sudo avahi-publish-address -R example.lan 192.168.1.123
@pezhore@lemmy.ml
link
fedilink
English
21Y

I’ve switched over to using a publicly resolvable domain name, but with a lan prefix (e.g. lan.mystuff.dev) so that I can do DNS challenge let’s encrypt certs.

Paired with PowerDNS that acts as an authority for the lan.mystuff.dev domain, I can go to a legit certificate/SSL protected https://sonarr.lan.mystuff.dev url. If I wanted to, I could add cloudflare records for the same services exposed through my router (Like for vpn.lan.mystuff.dev) so that both internal and external resolution is possible.

Melmi
link
fedilink
English
11
edit-2
1Y

This project uses mDNS, which is specific to the .local TLD. The whole reason that people are against the use of .local is because it would break mDNS. So you can set a custom TLD, but it doesn’t matter because this is actually the correct context for .local to be used, and changing the TLD will actually break things for a lot of clients.

@Telodzrum@lemmy.world
link
fedilink
English
31Y

Oh man this is great; I’m going to set it up tonight. I’m far too lazy maintaining my Heimdall links.

@duck_lol@programming.dev
creator
link
fedilink
English
21Y

Hey, thanks, I too am very lazy and that’s why I wrote this :) Let me know if you need any tweaks.

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 279 users / day
  • 589 users / week
  • 1.34K users / month
  • 4.55K users / 6 months
  • 1 subscriber
  • 3.49K Posts
  • 69.8K Comments
  • Modlog