Skip to content

Machines: this server shows its own restart, failed-service and port readings - #1193

Open
CG-8663 wants to merge 1 commit into
MyOwnDataCenter:mainfrom
CG-8663:feat/server-posture
Open

CG-8663 wants to merge 1 commit into
MyOwnDataCenter:mainfrom
CG-8663:feat/server-posture

Conversation

@CG-8663

@CG-8663 CG-8663 commented Nov 30, 2026

Copy link
Copy Markdown

What this changes

This server's machine page shows its own restart, failed-service and listening-port readings, the way a joined computer's page already does.

A joined computer's connector reports those readings and they appear beside its gauges. This server reported none of them about itself, so the one machine everything depends on was the one with no such readings.

  • omarchyd/posture.mjs (new) reads the same things for this server:
    • Restart needed: after a kernel update (the running kernel's modules are gone), or when the system says so (/var/run/reboot-required).
    • Failed services: systemctl --system list-units --state=failed, asked at most once a minute.
    • Listening ports: TCP ports listening beyond this machine itself, from /proc/net/tcp and tcp6.
    • Reads only. Nothing needs root, and the helper is not involved.
  • system.posture (new query) is owner only, as a joined computer's details are. A member's browser never asks for it.
  • No new screen: this server's card and machine page pass the result to the readings a joined computer already uses (LiveStats), so the account's stat view and picks apply as usual.

This follows docs/plans/ux-security-posture.md: findings sit on the machine page, not in a separate Security screen.

How you tested it

  • npm run typecheck and npm run build pass on main (02c7fdb).
  • New test/posture.test.mjs (6 tests): port parsing including loopback, damaged files and the 50-port cap; failed-service counting; restart after a kernel update and from the system's flag; the once-a-minute limit. A new test in omarchyd.test.mjs checks a member is refused and the owner is answered.
  • With the allowed-list, stat-view and server tests: 79 of 80 on my Mac. The one failure, "a member cannot replace this server or change storage pools", fails the same way on unchanged main there.
  • Looked at in a browser against the stand-in backend (which now answers system.posture): Machines › this server shows Restart Needed, 1 failed service and 2 ports beside the gauges.
  • The real module run inside a Linux container: it answers with no restart, no failed services and no ports, as expected there.
  • Not yet tried on a real Omarchy machine, where systemd and a real kernel update can be checked.
  • I did not run the whole suite locally (it stalls on my Mac at test/api-proxy.test.mjs, on unchanged main too), so the full run is the one GitHub does here.

Anything to know

  • Security updates stay absent for this server: its waiting updates are not split into security and other. That could follow.
  • These readings do not change this server's Healthy pill or raise a notification yet. A joined computer's do, through swarm.alerts; doing the same for this server is a separate change.
  • Possible follow-ups in the same place: two-factor off for the owner, the firewall off, and the web app open to any address (see Installer: a new server is reachable from the home network and Tailscale only #1192).

Built with Chronara AI

…readings

A joined computer's connector reports whether it needs a restart, how
many system services have failed and which ports it listens on, and its
machine page shows them beside the gauges. This server showed none of
that about itself.

- omarchyd/posture.mjs reads the same things for this server: a restart
  needed after a kernel update (or when the system says so), failed
  system services (systemctl, asked at most once a minute) and TCP ports
  listening beyond this machine (/proc/net/tcp and tcp6). Reads only,
  nothing needs root.
- New query system.posture, owner only, as a joined computer's details
  are. A member's browser never asks for it.
- This server's card and machine page pass it to the same readings a
  joined computer uses, so no new screen or drawing.

Security updates stay absent for this server: its waiting updates are
not split into security and other.

Co-Authored-By: Chronara AI <info@chronara.io>
@CG-8663
CG-8663 force-pushed the feat/server-posture branch from b1cf4de to 2238046 Compare December 5, 2026 10:09
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