From 404086ded17596a1337d64d19970db0466ccb56f Mon Sep 17 00:00:00 2001 From: patrickbeane Date: Fri, 30 Oct 2026 12:10:13 -0400 Subject: [PATCH] Fix references that moved with the text 'above', 'below' and 'as above' pointed at sections that are now on other pages, so they become links; server/install.sh's pointer to the README now names docs/reverse-proxy.md; server.md gains the next steps that used to be the following README sections. Co-Authored-By: Claude Sonnet 5.5 --- docs/agents.md | 2 +- docs/how-it-works.md | 2 +- docs/operations.md | 6 +++--- docs/reverse-proxy.md | 4 ++-- docs/server.md | 7 ++++++- server/install.sh | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/agents.md b/docs/agents.md index 5a6e4e7..a49b505 100644 --- a/docs/agents.md +++ b/docs/agents.md @@ -31,7 +31,7 @@ missing and sets it to *list* services after apt upgrades instead of asking interactively. Delete `/etc/needrestart/conf.d/kernelwatch.conf` to undo that. Add `--with-apt-update` to refresh apt's package lists before each report -(recommended on Debian, see above). It's the same as running `apt update` +(recommended on Debian, see "Fresh package lists" in [How it works](how-it-works.md)). It's the same as running `apt update` hourly: lists only, nothing is installed. If apt is busy, the refresh is skipped and the report goes ahead. `--without-apt-update` turns it off; re-running the installer with neither keeps the current setting. diff --git a/docs/how-it-works.md b/docs/how-it-works.md index 515d057..887ff20 100644 --- a/docs/how-it-works.md +++ b/docs/how-it-works.md @@ -24,7 +24,7 @@ How the agent works it out: package was upgraded in place after boot; `uname -r` didn't change, but a reboot is still needed. - [`needrestart`](https://github.com/liske/needrestart)'s kernel result, for - build strings the server doesn't recognise (see below). + build strings the server doesn't recognise (see "Services needing a restart", below). - **Services needing a restart** (e.g. nginx still using the old OpenSSL after an upgrade): from `needrestart -b`, if it's installed. Ubuntu ships it; on Debian, install with `install.sh --with-needrestart`. Without it, the diff --git a/docs/operations.md b/docs/operations.md index 522ec93..19b00aa 100644 --- a/docs/operations.md +++ b/docs/operations.md @@ -6,7 +6,7 @@ `kernelwatch status` prints the fleet the way the dashboard shows it, from the database, with no network port or token involved. It needs `sudo`, like the other -admin commands. Run it over SSH from anywhere else. +[admin commands](server.md#admin-commands). Run it over SSH from anywhere else. ``` $ sudo kernelwatch status @@ -93,8 +93,8 @@ newest backup still on disk. The cause is in `journalctl -u kernelwatch-backup`. Without `ntfy_url` it only logs that it had nothing to send to. If ntfy itself is unreachable at that moment, the failure shows up only in the journal (`journalctl -u kernelwatch-backup-failed`). It can't tell you that the timer -never ran at all, for example because the host was down; that needs a heartbeat -monitor. You can check delivery with +never ran at all, for example because the host was down; that needs a [heartbeat +monitor](alerts.md#heartbeat-is-kernelwatch-itself-running). You can check delivery with `sudo kernelwatch notify-backup-failure`, which sends the same message. These copies sit on the dashboard host, so they protect against a corrupted or diff --git a/docs/reverse-proxy.md b/docs/reverse-proxy.md index a38ba7f..637484e 100644 --- a/docs/reverse-proxy.md +++ b/docs/reverse-proxy.md @@ -34,7 +34,7 @@ With either proxy, set `trust_proxy_headers = true` in `server.toml` so login rate limiting sees real client IPs. If you use a private CA (e.g. Caddy's `tls internal`), give the agents its -root cert with `--ca` (below). +root cert with `--ca` (see [Agents](agents.md#adding-a-host)). You can expose only `/api/v1/report` to the fleet network and keep the dashboard on a VPN or tailnet. That's a proxy rule, not a kernelwatch setting. @@ -44,7 +44,7 @@ dashboard on a VPN or tailnet. That's a proxy rule, not a kernelwatch setting. CloudPanel gives each site its own Linux user and a document root at `/home//htdocs//`. kernelwatch doesn't use that directory. nginx forwards requests to the app; it doesn't serve kernelwatch's files. Install -with `server/install.sh` as above, so the app runs as the `kernelwatch` user +with `server/install.sh` as in [Server](server.md), so the app runs as the `kernelwatch` user with its data in `/var/lib/kernelwatch`, outside every site user's home. Leave the document root empty, and keep your clone of this repo out of `htdocs`. diff --git a/docs/server.md b/docs/server.md index 1bed30a..a562a7a 100644 --- a/docs/server.md +++ b/docs/server.md @@ -13,10 +13,15 @@ sudo kernelwatch set-password admin # dashboard login ``` This installs to `/opt/kernelwatch` and keeps config in `/etc/kernelwatch/server.toml` -(see [`server/server.toml.example`](server/server.toml.example)) and data in +(see [`server/server.toml.example`](../server/server.toml.example)) and data in `/var/lib/kernelwatch`. The `kernelwatch.service` unit runs it as the unprivileged `kernelwatch` user. Re-run `install.sh` to upgrade; it keeps your config. +The server speaks plain HTTP on `127.0.0.1:8080`. Put a TLS reverse proxy in front +of it; [Reverse proxy and access control](reverse-proxy.md) has the setups. Then +[add hosts](agents.md), and set up [alerts](alerts.md) and +[backups](operations.md#backups). + ## Admin commands ``` diff --git a/server/install.sh b/server/install.sh index 70b80e9..f6282b8 100755 --- a/server/install.sh +++ b/server/install.sh @@ -5,7 +5,7 @@ # # Installs to /opt/kernelwatch, config in /etc/kernelwatch/server.toml (kept # on upgrade), data in /var/lib/kernelwatch. Then put a TLS reverse proxy in -# front (see README) and create a dashboard user: sudo kernelwatch set-password admin +# front (see docs/reverse-proxy.md) and create a dashboard user: sudo kernelwatch set-password admin set -euo pipefail here=$(cd "$(dirname "$0")" && pwd)