Skip to content

server: UPS monitoring via NUT + PeaNUT dashboard#59

Merged
ulises-c merged 3 commits into
mainfrom
feat/linux-server-ups-support
Jul 12, 2026
Merged

server: UPS monitoring via NUT + PeaNUT dashboard#59
ulises-c merged 3 commits into
mainfrom
feat/linux-server-ups-support

Conversation

@ulises-c

Copy link
Copy Markdown
Owner

Why

Adds UPS monitoring for the CyberPower PR1500LCDRT2U so the home server can see
battery/load/runtime and react to power events. Deployed and running live
(peanut / peanut-ts healthy).

What

  • UPS support via NUTnut talks to the CyberPower over USB; config +
    notify hook in linux-server/ups/ (ups.conf, upsd.conf, upsmon.conf,
    ups-notify.sh, setup.sh, README).
  • PeaNUT dashboard — a web UI for the UPS, with a homepage card/widget.
  • Tailscale HTTPS sidecar — fronts PeaNUT at https://peanut.<tailnet>.ts.net,
    same decoupled-sidecar pattern as the other services.

peanut-config/ (PeaNUT's runtime settings) is intentionally gitignored — PeaNUT
manages it locally, no template needed.

Note on overlap with #58

This branch's f542763 adds a PeaNUT card to homepage/config/services.yaml
against the old flat layout. PR #58 reflows that same file into nested rows, so
whichever of #58 / this PR merges second will hit a services.yaml conflict
resolve by keeping the reflowed structure and slotting the PeaNUT card into the
Network group. (The glances-rename commit that used to live here, ba31db2, was
folded into #58 and dropped from this branch to avoid a duplicate.)

Test plan

  • upsc <ups> reports battery.charge / ups.load / battery.runtime.
  • PeaNUT dashboard loads at its tailnet URL; homepage UPS card shows live values.
  • Pull the wall plug briefly → ups.status flips to OB (on battery), notify hook fires.

🤖 Generated with Claude Code

ulises-c and others added 3 commits July 1, 2026 21:45
Adds a nut package entry (server/apt) and a linux-server/ups/ service dir:
standalone NUT config for usbhid-ups on loopback, an idempotent sudo
setup.sh that renders the upsmon password from a gitignored .env into
/etc/nut, and a NOTIFYCMD hook pushing power events to ntfy. Low battery
triggers a clean shutdown + UPS outlet power-off so the server restarts
when wall power returns.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Host-networked PeaNUT container on :8097 (upsd is loopback-only) with
charge/load/runtime graphs, plus a homepage ups card using the native
peanut widget. Runtime settings dir gitignored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Moves the homepage ups tile from the raw LAN port to the standard
peanut.<tailnet>.ts.net convention: host-networked-variant sidecar (per
HTTPS.md, like glances) proxying to :8097, HOMEPAGE_VAR_PEANUT_DOMAIN
for the tile href, widget still reads localhost.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ulises-c
ulises-c merged commit 92c6075 into main Jul 12, 2026
5 checks passed
@ulises-c
ulises-c deleted the feat/linux-server-ups-support branch July 12, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant