{"id":35124316,"url":"https://github.com/hatlabs/halos-mdns-publisher","last_synced_at":"2026-02-09T12:17:51.399Z","repository":{"id":329566181,"uuid":"1120031045","full_name":"hatlabs/halos-mdns-publisher","owner":"hatlabs","description":"mDNS publisher for HaLOS - advertises *.halos.local subdomains via Avahi","archived":false,"fork":false,"pushed_at":"2026-01-06T17:53:14.000Z","size":126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-09T02:48:57.233Z","etag":null,"topics":["apt-package","halos"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hatlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-12-20T10:43:16.000Z","updated_at":"2026-01-06T17:48:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hatlabs/halos-mdns-publisher","commit_stats":null,"previous_names":["hatlabs/halos-mdns-publisher"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/hatlabs/halos-mdns-publisher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatlabs%2Fhalos-mdns-publisher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatlabs%2Fhalos-mdns-publisher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatlabs%2Fhalos-mdns-publisher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatlabs%2Fhalos-mdns-publisher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hatlabs","download_url":"https://codeload.github.com/hatlabs/halos-mdns-publisher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatlabs%2Fhalos-mdns-publisher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apt-package","halos"],"created_at":"2025-12-28T01:38:27.697Z","updated_at":"2026-01-13T22:52:57.486Z","avatar_url":"https://github.com/hatlabs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HaLOS mDNS Publisher\n\nNative systemd service that advertises container subdomains via mDNS for HaLOS, and configures the system to resolve multi-label mDNS hostnames.\n\n## Overview\n\nThis package provides two key mDNS capabilities:\n\n1. **Publishing**: Monitors Docker containers for the `halos.subdomain` label and uses `avahi-publish` to advertise the corresponding mDNS records. This enables automatic subdomain resolution for HaLOS services on the local network.\n\n2. **Resolution**: Configures the system to resolve multi-label mDNS hostnames (e.g., `auth.hostname.local`). By default, Debian only resolves single-label `.local` names; this package enables full subdomain resolution.\n\n## Installation\n\nThe package is available from the Hat Labs APT repository:\n\n```bash\n# Add Hat Labs repository (if not already added)\ncurl -fsSL https://apt.hatlabs.fi/hat-labs-apt-key.asc | sudo gpg --dearmor -o /usr/share/keyrings/hatlabs-apt-key.gpg\necho \"deb [signed-by=/usr/share/keyrings/hatlabs-apt-key.gpg] https://apt.hatlabs.fi stable main\" | sudo tee /etc/apt/sources.list.d/hatlabs.list\n\n# Install the package\nsudo apt update\nsudo apt install halos-mdns-publisher\n```\n\nThe service starts automatically after installation.\n\n## Container Labels\n\nAdd the `halos.subdomain` label to containers you want to advertise:\n\n```yaml\nservices:\n  authelia:\n    image: authelia/authelia:4.39\n    labels:\n      - \"halos.subdomain=auth\"  # Advertises auth.\u003chostname\u003e.local\n```\n\n## How It Works\n\n1. On startup, scans all running Docker containers for `halos.subdomain` labels\n2. Monitors Docker events for container start/stop\n3. Uses `avahi-publish` to advertise subdomains pointing to the host IP\n4. Cleans up mDNS records when containers stop\n5. Graceful degradation: waits for Docker if not immediately available\n\n## Service Management\n\n```bash\n# Check status\nsudo systemctl status halos-mdns-publisher\n\n# View logs\nsudo journalctl -u halos-mdns-publisher -f\n\n# Restart service\nsudo systemctl restart halos-mdns-publisher\n```\n\n## Command Line Options\n\n```\nUsage: halos-mdns-publisher [OPTIONS]\n\nOptions:\n  -s, --socket \u003cSOCKET\u003e  Docker socket path [default: /var/run/docker.sock]\n  -d, --debug            Enable debug logging\n      --health-interval  Health check interval in seconds [default: 60]\n  -h, --help             Print help\n  -V, --version          Print version\n```\n\n## mDNS Resolution Configuration\n\nThis package configures the system to resolve multi-label mDNS hostnames by:\n\n1. Installing `/etc/mdns.allow` to permit resolution of all `.local` domain names\n2. Updating `/etc/nsswitch.conf` to use `mdns4` instead of `mdns4_minimal`\n\nThe `mdns4_minimal` resolver (Debian default) only resolves 2-label hostnames like `hostname.local`. The `mdns4` resolver with `mdns.allow` enables resolution of multi-label names like `auth.hostname.local`.\n\nThese changes are reverted when the package is purged (`apt purge halos-mdns-publisher`).\n\n## Requirements\n\n- Avahi daemon (`avahi-daemon` package)\n- Avahi utilities (`avahi-utils` package)\n- libnss-mdns (`libnss-mdns` package) - for mDNS name resolution\n- Docker (recommended but not required at startup)\n\n## Development\n\n```bash\n# Build\n./run build\n\n# Run tests\n./run test\n\n# Run linting\n./run lint\n\n# Install pre-commit hooks\n./run hooks-install\n```\n\n## Migration from Container Version\n\nThis native package replaces the container-based `halos-mdns-publisher-container` package. The migration is automatic - installing this package will remove the container version.\n\n## License\n\nMIT License - see [LICENSE](LICENSE)\n\n## Related\n\n- [HaLOS Distro](https://github.com/hatlabs/halos-distro) - HaLOS workspace\n- [HaLOS Core Containers](https://github.com/hatlabs/halos-core-containers) - Core container definitions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatlabs%2Fhalos-mdns-publisher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhatlabs%2Fhalos-mdns-publisher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatlabs%2Fhalos-mdns-publisher/lists"}