avahi-publish-address
Publish an IP address via Avahi
SYNOPSIS
avahi-publish-address [options] <hostname> <address>
PARAMETERS
-d, --domain=<DOMAIN>
Domain to publish record on (default: .local)
-v, --verbose
Increase verbosity of output
-q, --quiet
Suppress non-essential output
--no-rlimit
Disable Avahi daemon's resource limits
-h, --help
Display help and exit
-V, --version
Output version information and exit
DESCRIPTION
avahi-publish-address is a command-line utility from the Avahi package, an open-source implementation of Zeroconf (mDNS/DNS-SD) for Linux and Unix-like systems. It announces a specific hostname-to-IP address mapping on the local network using multicast DNS, allowing devices to resolve the hostname without traditional DNS servers.
Primarily used for testing, debugging, or temporary setups, it enables quick advertisement of custom hostnames, such as mapping devserver.local to a private IP like 192.168.1.50. This is ideal for development environments, container networking, or ad-hoc service discovery where Bonjour-like functionality is needed.
The tool requires the avahi-daemon service to be running and configured to publish addresses (check /etc/avahi/avahi-daemon.conf). It supports both IPv4 and IPv6 addresses and defaults to the .local domain. Once invoked, it runs in the foreground indefinitely, periodically publishing the record until terminated (e.g., Ctrl+C). Output indicates successful publication, like "Found user-configured hostname".
Unlike avahi-publish-service, it only handles A/AAAA records, not full service (SRV/TXT) announcements.
CAVEATS
Requires running avahi-daemon; runs foreground indefinitely (use & or nohup); limited to local multicast domain; hostname must not conflict with existing records.
EXAMPLE USAGE
avahi-publish-address myserver.local 192.168.1.100
Verify: avahi-resolve-host-name myserver.local
Output: myserver.local 192.168.1.100
IPV6 EXAMPLE
avahi-publish-address myhost.local fe80::1%eth0
HISTORY
Introduced in early Avahi releases (~2004-2006) by Lennart Poettering as part of avahi-utils; stable since Avahi 0.6; focuses on simplicity for mDNS address publishing.
SEE ALSO
avahi-publish-service(1), avahi-browse(1), avahi-resolve-host-name(1), avahi-daemon(8)


