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:
parent
a96ae4e825
commit
cd2deda996
9 changed files with 136 additions and 17 deletions
|
|
@ -39,6 +39,9 @@ The mode is stored as `INSTALL_MODE` in `/opt/<name>/.env`.
|
|||
|
||||
The intended topology:
|
||||
- **Proxmox VE nodes:** `lxc` mode, the default when `pct` and `/etc/pve` exist. Running the installer on the node as root creates (or reuses, found by tag `netmon-hub` / `netmon-probe`) an unprivileged Debian LXC on `vmbr0`. It then `pct push`es itself into the container (re-assembled from its own functions with `declare -f`) and runs there in native mode. `LXC_*` variables override ID, storage, bridge, IP and size. Day to day: `pct exec <ctid> -- network-probe-update`, `pct enter <ctid>`.
|
||||
- **Names and port:** in an LXC (lxc mode, or native mode where `systemd-detect-virt -c` says lxc), `native/setup.sh` installs avahi-daemon, which announces `<hostname>.local`. It comments out `rlimit-nproc` in `avahi-daemon.conf`, because the stock value stops avahi-daemon from starting in unprivileged containers. The hub defaults to `HOST_PORT=80` there, granted by `AmbientCapabilities=CAP_NET_BIND_SERVICE`, unless `HOST_PORT` is passed.
|
||||
- **Inner run:** lxc mode runs the inner installer with `LANG/LC_ALL=C.UTF-8` (the node's locale may not exist in the container) and `NETMON_NESTED=1`, which shortens the inner summary.
|
||||
- **Probe commands:** Linux probes usually can't resolve `.local`. When the UI is opened by a `.local` name, the Add probe command uses `hub_lan_url` (the hub's own IP, native installs only) as `HUB_URL`.
|
||||
- Do **not** install Docker on a PVE node itself: Docker changes the host firewall, and with the Proxmox firewall on that can break guest networking.
|
||||
- The first real deploy (gmktec-g9, 2026-11-05) predates `lxc` mode and installed the hub with Docker on the node. The README section "Removing a Docker install from a Proxmox node" covers cleanup.
|
||||
- **Mac mini:** native probe.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue