Docs: repo is public; simplify install commands

The raw installer URL is confirmed (200, matches main) and anonymous clone
works, so installs need no token. Private-repo steps move to a fallback note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
neil 2026-11-04 18:16:12 -08:00
parent efd3836945
commit edeb77f833
2 changed files with 13 additions and 19 deletions

View file

@ -57,19 +57,11 @@ Either way, the service starts on boot and restarts if it crashes.
### 1. The hub
The repo is private, so fetching the installer needs a read-only Gitea token (Settings → Applications → Access tokens, scope `read:repository`). The token is read without echoing it or saving it in history, and the installer reuses it to clone:
```bash
read -rsp 'Gitea token: ' GIT_TOKEN && export GIT_TOKEN && curl -fsSL -H "Authorization: token $GIT_TOKEN" https://git.neilbantoc.dev/services/network-monitor/raw/branch/main/install.sh | bash
curl -fsSL https://git.neilbantoc.dev/services/network-monitor/raw/branch/main/install.sh | bash
```
Inside an LXC you are root, so that's it. On another Linux machine in native mode, use `| sudo -E env INSTALL_MODE=native bash`. If the raw URL gives a 404 even with the token, clone and run the installer instead:
```bash
git clone https://git.neilbantoc.dev/services/network-monitor.git /tmp/nm && bash /tmp/nm/install.sh
```
The token is saved in `/opt/network-monitor/.env` (`GIT_TOKEN`) so `update` can fetch. Only the update step sees it, not the running app.
Inside an LXC you are root, so that's it. On another Linux machine in native mode, use `| sudo env INSTALL_MODE=native bash`.
Then connect AdGuard Home in `/opt/network-monitor/.env`:
@ -95,7 +87,7 @@ curl -fsSL http://192.168.1.10:8000/install-probe.sh | HUB_URL=http://192.168.1.
curl -fsSL http://192.168.1.10:8000/install-probe.sh | sudo env HUB_URL=http://192.168.1.10:8000 PROBE_TOKEN=... bash
```
Because the repo is private, the installer asks for a read-only Gitea token on the terminal before it clones. To skip the prompt, put `GIT_TOKEN=...` before `bash`.
The same installer is also at `https://git.neilbantoc.dev/services/network-monitor/raw/branch/main/install-probe.sh`.
The probe's test server listens on port 8765 (`PROBE_PORT`) on all interfaces.
@ -135,12 +127,13 @@ curl -fsSL http://<hub-ip>:8000/install-probe.sh | HUB_URL=http://<hub-ip>:8000
On the VPS, run `install-probe.sh` with no `HUB_URL` or `PROBE_TOKEN`, and open 8765/tcp in its firewall. Then set `VPS_URL=http://<vps>:8765` in the hub's `.env`. Every probe then tests the VPS too.
### Private repo
### If the repo becomes private
- **Fetching:** the hub installer comes from Gitea with a token (above), and probe installers come from the hub.
- **Cloning:** both installers clone with `GIT_TOKEN` and ask for it on the terminal if they can't read the repo.
- **Storage:** the token goes into that machine's `.env` for later updates.
- **Revoking:** use a read-only token per machine, so one can be revoked without touching the others.
The installers ask for a read-only token on the terminal when they can't read the repo, and save it in that machine's `.env` for updates (`GIT_TOKEN`). Probe install commands keep working, because they fetch the installer from the hub. To fetch the hub installer, pass the token to curl (Gitea's header):
```bash
read -rsp 'Gitea token: ' GIT_TOKEN && export GIT_TOKEN && curl -fsSL -H "Authorization: token $GIT_TOKEN" https://git.neilbantoc.dev/services/network-monitor/raw/branch/main/install.sh | bash
```
## Deploy changes