LXC installs: announce <hostname>.local with Avahi, hub on port 80

In an LXC (lxc mode on a Proxmox node, or native mode inside an LXC), the
installer now:
- installs avahi-daemon (with the rlimit-nproc fix for unprivileged
  containers), so the container answers at <hostname>.local, and lists the
  web UI as a _http._tcp service
- serves the hub on port 80 (CAP_NET_BIND_SERVICE for the netmon user) unless
  HOST_PORT is given, so http://netmon-hub.local works without a port
- runs the inner install with LANG/LC_ALL=C.UTF-8 (no locale warnings from
  the node's LANG) and prints one summary, with the .local address

When the UI is opened by a .local name, the Add probe command uses the hub's
own IP for HUB_URL, since Linux probes usually can't resolve .local.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
neil 2026-11-04 19:19:47 -08:00
parent a96ae4e825
commit cd2deda996
9 changed files with 136 additions and 17 deletions

View file

@ -12,7 +12,9 @@ export function mount(root, ctx) {
}
function installCommand(info, token) {
const hub = info.hub_url || location.origin;
// A .local name works in browsers but usually not inside Linux probes: use the hub's IP then.
const viaMdns = location.hostname.endsWith('.local');
const hub = info.hub_url || (viaMdns && info.hub_lan_url) || location.origin;
const url = info.install_url || `${hub}/install-probe.sh`;
return `curl -fsSL ${url} | HUB_URL=${hub} PROBE_TOKEN=${token} bash`;
}