Files
kernel-automation/docs/server.md
T
patrickandClaude Sonnet 5.5 4b5dcae2ad
CI / tests (Python 3.10) (pull_request) Successful in 25s
CI / tests (Python 3.11) (pull_request) Successful in 25s
CI / tests (Python 3.12) (pull_request) Successful in 24s
CI / tests (Python 3.13) (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 3s
Add a one-line summary to each docs page and tidy the development page
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 12:10:45 -04:00

45 lines
2.0 KiB
Markdown

# Server
[← kernelwatch](../README.md)
Installing and upgrading the dashboard server, and the admin commands.
## Install and upgrade
On the dashboard host:
```sh
git clone <this repo> && cd kernel-automation
sudo ./server/install.sh
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
`/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
```
sudo kernelwatch add-host NAME register a host, print its token (--token-only for scripts)
sudo kernelwatch rotate-token NAME issue a new token (old one stops working)
sudo kernelwatch remove-host NAME delete a host and its history
sudo kernelwatch list-hosts hosts and when they last reported
sudo kernelwatch status [--json] fleet status like the dashboard (--host, --level to filter)
sudo kernelwatch set-password USER create a user / change password (logs out their sessions)
sudo kernelwatch remove-user USER
sudo kernelwatch list-users
sudo kernelwatch backup PATH write a consistent copy of the database (safe while running)
sudo kernelwatch scheduled-backup dated copy in backup_dir, then prune old ones (what the timer runs)
sudo kernelwatch notify-backup-failure send the failed-backup notification now (also runs on failure)
sudo kernelwatch check-alerts check for stale, recovered, reboot and update alerts now
sudo kernelwatch test-alert send a test notification to the configured ntfy topic
sudo kernelwatch test-heartbeat ping the configured heartbeat URLs once and report
```