[GH-ISSUE #11101] apt-cacher-ng: Add avahi-daemon package to install script #2373

Closed
opened 2026-02-26 12:52:13 +03:00 by kerem · 0 comments
Owner

Originally created by @mwpastore on GitHub (Jan 23, 2026).
Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/11101

🌟 Briefly describe the feature

Add avahi-daemon package to install script

📝 Detailed description

apt-cacher-ng configures Avahi to advertise itself via mDNS, but it needs avahi-daemon installed and running locally to function:

root@apt-cacher-ng:~# dpkg -L apt-cacher-ng | grep avahi
/etc/avahi
/etc/avahi/services
/etc/avahi/services/apt-cacher-ng.service
root@apt-cacher-ng:~# cat /etc/avahi/services/apt-cacher-ng.service
<?xml version="1.0" standalone='no'?>
<!--
From: Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
X-Source: http://blog.surgut.co.uk/2013/03/avahi-apt-cacher-ng-sbuild.html
 See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704790 for details.
-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">apt-cacher-ng proxy on %h</name>
 <service protocol="ipv6">
  <type>_apt_proxy._tcp</type>
  <port>3142</port>
 </service>
 <service protocol="ipv4">
  <type>_apt_proxy._tcp</type>
  <port>3142</port>
 </service>
</service-group>

Adding avahi-daemon to the list of packages to install via apt is sufficient to provide this functionality.

💡 Why is this useful?

Home networks with multiple subnets can benefit from mDNS by allowing service discovery across network segments. You still need firewall rules to allow the traffic but you don't have to configure DNS CNAME/SRV records for each subnet.

I've installed avahi-daemon in my apt-cacher-ng LXC container (and restarted the container). Here's an example session from a client on a different subnet:

$ dig apt-proxy +search +short
$ avahi-browse -d local _apt_proxy._tcp --resolve -t
+ wlp2s0 IPv4 apt-cacher-ng proxy on apt-cacher-ng          _apt_proxy._tcp      local
= wlp2s0 IPv4 apt-cacher-ng proxy on apt-cacher-ng          _apt_proxy._tcp      local
   hostname = [apt-cacher-ng.local]
   address = [192.168.1.124]
   port = [3142]
   txt = []
$ auto-apt-proxy
http://192.168.1.124:3142
Originally created by @mwpastore on GitHub (Jan 23, 2026). Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/11101 ### 🌟 Briefly describe the feature Add avahi-daemon package to install script ### 📝 Detailed description apt-cacher-ng configures Avahi to advertise itself via mDNS, but it needs avahi-daemon installed and running locally to function: ```console root@apt-cacher-ng:~# dpkg -L apt-cacher-ng | grep avahi /etc/avahi /etc/avahi/services /etc/avahi/services/apt-cacher-ng.service root@apt-cacher-ng:~# cat /etc/avahi/services/apt-cacher-ng.service <?xml version="1.0" standalone='no'?> <!-- From: Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org> X-Source: http://blog.surgut.co.uk/2013/03/avahi-apt-cacher-ng-sbuild.html See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704790 for details. --> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">apt-cacher-ng proxy on %h</name> <service protocol="ipv6"> <type>_apt_proxy._tcp</type> <port>3142</port> </service> <service protocol="ipv4"> <type>_apt_proxy._tcp</type> <port>3142</port> </service> </service-group> ``` Adding avahi-daemon to the list of packages to install via apt is sufficient to provide this functionality. ### 💡 Why is this useful? Home networks with multiple subnets can benefit from mDNS by allowing service discovery across network segments. You still need firewall rules to allow the traffic but you don't have to configure DNS CNAME/SRV records for each subnet. I've installed avahi-daemon in my apt-cacher-ng LXC container (and restarted the container). Here's an example session from a client on a different subnet: ```sh $ dig apt-proxy +search +short $ avahi-browse -d local _apt_proxy._tcp --resolve -t + wlp2s0 IPv4 apt-cacher-ng proxy on apt-cacher-ng _apt_proxy._tcp local = wlp2s0 IPv4 apt-cacher-ng proxy on apt-cacher-ng _apt_proxy._tcp local hostname = [apt-cacher-ng.local] address = [192.168.1.124] port = [3142] txt = [] $ auto-apt-proxy http://192.168.1.124:3142 ```
kerem 2026-02-26 12:52:13 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#2373
No description provided.