home-hosted 0.7.17 → 0.7.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +193 -385
- package/README.md +25 -6
- package/dist/cli.js +1055 -533
- package/dist/cli.js.map +1 -1
- package/docs/DDNS.md +6 -2
- package/docs/REVERSE_PROXY.md +11 -4
- package/docs/SERVERS.md +8 -3
- package/docs/UI_CREATION.md +13 -4
- package/package.json +3 -2
- package/uis/stock/dist/assets/{index-CAp6K13b.js → index-DaynUz2r.js} +7 -7
- package/uis/stock/dist/assets/{index-D8S55m4E.css → index-Dp4rjHQQ.css} +1 -1
- package/uis/stock/dist/index.html +2 -2
- package/uis/stock/dist/ui.json +3 -3
package/README.md
CHANGED
|
@@ -269,8 +269,8 @@ can be told what to be: *"Help me build a UI for home-hosted: nostalgic game the
|
|
|
269
269
|
| 📝 **Hand edits welcome** | Change a workspace's `servers.config.json` in an editor, a `git checkout` or a config tool: the panel notices within seconds, no restart. A file it cannot read is reported in the panel, and the running servers are left alone. |
|
|
270
270
|
| ♻️ **Auto-restart** | Exponential backoff on crash, with the counter reset once a process stays up. |
|
|
271
271
|
| 🩺 **Health that acts** | TCP or HTTP probes per server: warn on the card, force a restart after a timeout, check ports before starting — and [follow or replace](./docs/SERVERS.md#when-a-program-restarts-itself) a program that restarts itself. |
|
|
272
|
-
| 🔗 **Ordered startup** | `dependsOn` waits for a dependency to be *healthy* — not merely spawned
|
|
273
|
-
| 📜 **Logs** | Live per-server stream, buffer plus rotated files on disk, search, download, one click to clear. |
|
|
272
|
+
| 🔗 **Ordered startup** | `dependsOn` waits for a dependency to be *healthy* — not merely spawned. `stop-all`/`down` stop dependents before their dependencies; stopping one server names the dependents it leaves running. [SERVERS.md](./docs/SERVERS.md#field-reference) |
|
|
273
|
+
| 📜 **Logs** | Live per-server stream, buffer plus rotated files on disk, search, filter to one stream, download, one click to clear. |
|
|
274
274
|
| 📈 **Resources** | CPU and RSS of the whole process tree, with an optional memory ceiling that triggers a restart. |
|
|
275
275
|
| 🌡️ **Host vitals** | Load, memory, swap, disk and CPU temperature, with thresholds that notify once and again on recovery. |
|
|
276
276
|
| 🤖 **Token API** | Scripts and agents drive it with `Authorization: Bearer` — no browser, no session. [↑](#-agents-scripts-and-tools) |
|
|
@@ -341,7 +341,7 @@ restarts itself), and how hand-edits are validated: [SERVERS.md](./docs/SERVERS.
|
|
|
341
341
|
| `home-hosted up` | start the panel detached, and keep it alive in the background |
|
|
342
342
|
| `home-hosted down` | stop it cleanly — supervised processes included, persistent entries left running |
|
|
343
343
|
| `home-hosted restart` | `down`, then `up` — or `restart <id>` to restart one server, leaving the panel up |
|
|
344
|
-
| `home-hosted status` | pid, URL, health, uptime, state and log paths (`--json` for scripts) |
|
|
344
|
+
| `home-hosted status` | pid, URL, health, uptime, state and log paths — the panel's console *and* the per-server directory, naming the `<id>.log` convention once logs exist (`--json` for scripts; stopped answers `{ running: false, initialised }`, where `initialised: false` means nothing was ever set up here) |
|
|
345
345
|
| `home-hosted start <id>` | start one server in the default workspace — and anything it `dependsOn` (`--workspace <id>`) |
|
|
346
346
|
| `home-hosted stop <id>` | stop one server, nothing else (`--workspace <id>`) |
|
|
347
347
|
| `home-hosted restart <id>` | restart one server, nothing else (`--workspace <id>`) — the same as the panel's per-server Restart |
|
|
@@ -385,6 +385,10 @@ given. Given a server id — `restart web` — it restarts only that entry, and
|
|
|
385
385
|
for a launcher that pins one; a workspace picked in the UI keeps its own. `start`/`stop` omit
|
|
386
386
|
`--workspace` to act in the panel's default workspace.
|
|
387
387
|
|
|
388
|
+
A misspelled command or option names the one you meant — `home-hosted restar` answers
|
|
389
|
+
`did you mean \`restart\`?`, and `up --prt 4000` answers `did you mean \`--port\`?`. Both stay quiet
|
|
390
|
+
when nothing is close, rather than guessing.
|
|
391
|
+
|
|
388
392
|
</details>
|
|
389
393
|
|
|
390
394
|
<details>
|
|
@@ -420,7 +424,7 @@ Everything binds `127.0.0.1` until you say otherwise.
|
|
|
420
424
|
- **A password is required to expose the panel.** Replace the default, then bind to `lan` — in the
|
|
421
425
|
UI, in the config, or with `--host lan`. The same guard applies in all three places.
|
|
422
426
|
- **Sessions** live in memory only; the cookie is `HttpOnly` and `SameSite=Strict`, and the login
|
|
423
|
-
route locks out repeated failures per IP.
|
|
427
|
+
route locks out repeated failures per IP — see the `trustProxy` note below for when that is advisory.
|
|
424
428
|
- **API tokens** for scripts and agents: `home-hosted set-token --generate` prints one once, and a
|
|
425
429
|
request proves itself with `Authorization: Bearer …` — the same access as a signed-in browser,
|
|
426
430
|
stored as a SHA-256 hash, revoked with `set-token --clear`.
|
|
@@ -433,8 +437,16 @@ Everything binds `127.0.0.1` until you say otherwise.
|
|
|
433
437
|
`.hh/.control-secrets.json`, each workspace's Telegram bot token and DDNS credentials in its own
|
|
434
438
|
`.hh/<workspace>/.secrets.json`, all mode `0600`; the TLS pair sits in `.hh/.tls/`. DDNS credentials
|
|
435
439
|
are sealed with AES-256-GCM under `HHOSTED_DDNS_SECRET` (default `hh` — set your own).
|
|
436
|
-
- **Behind a proxy**
|
|
440
|
+
- **Behind a proxy** pick how far to trust it, and let `cookieSecure: auto` add `Secure` on https — or
|
|
437
441
|
upload a PEM pair and let home-hosted terminate TLS itself.
|
|
442
|
+
- **`loopback`** trusts `x-forwarded-*` only when the request really came from this machine. That is the
|
|
443
|
+
right choice for a proxy on the same host: the panel gets the real client address for its lockout and
|
|
444
|
+
the logs, and a forged header from anywhere else is ignored.
|
|
445
|
+
- **on** trusts the header from *any* peer. Only when the proxy is the only way in: the client address
|
|
446
|
+
then comes from the caller's own header, so the per-IP lockout counts per *forged* address and stops
|
|
447
|
+
throttling brute force. The panel warns at startup when that combination is exposed.
|
|
448
|
+
- **off** ignores the header entirely. Use it when nothing sits in front, or when the proxy does not set
|
|
449
|
+
one.
|
|
438
450
|
|
|
439
451
|
---
|
|
440
452
|
|
|
@@ -522,6 +534,7 @@ doing and anything it could not finish:
|
|
|
522
534
|
home-hosted logs # the last 50 lines
|
|
523
535
|
home-hosted logs --follow # keep printing, like tail -f
|
|
524
536
|
home-hosted logs --lines all # the whole thing, including the rotation
|
|
537
|
+
home-hosted logs --json # { path, lines } — or one object per line with --follow
|
|
525
538
|
```
|
|
526
539
|
|
|
527
540
|
It is the same file `status` names, and reading it needs no session or API token — a panel that
|
|
@@ -574,12 +587,13 @@ workspaces.json the registry: ids and labels, in selector order
|
|
|
574
587
|
.ui/ an installed custom UI
|
|
575
588
|
.backups/ zip archives
|
|
576
589
|
.logs/ the panel's own console log
|
|
590
|
+
.proxy/ the reverse proxy's engine, its config and state
|
|
577
591
|
run.json the running panel (pid, url, token, mode 0600)
|
|
578
592
|
|
|
579
593
|
<workspace>/settings.json server defaults, log retention, notifications, DDNS
|
|
580
594
|
<workspace>/servers.config.json your servers, plus meta: which release and schema wrote it
|
|
581
595
|
<workspace>/.secrets.json Telegram token + DDNS credentials (mode 0600)
|
|
582
|
-
<workspace>/.logs/
|
|
596
|
+
<workspace>/.logs/ per-server logs: <id>.log, rotated to <id>.log.1 … (newest first)
|
|
583
597
|
<workspace>/.state/ persistent entries' nanny state
|
|
584
598
|
```
|
|
585
599
|
|
|
@@ -595,6 +609,11 @@ proxy is the one panel-wide listener, and only when you switch it on: `80`/`443`
|
|
|
595
609
|
or `4480`/`4443` unprivileged with your router forwarding to them
|
|
596
610
|
([REVERSE_PROXY.md](./docs/REVERSE_PROXY.md#ports)).
|
|
597
611
|
|
|
612
|
+
**If that port is taken, `up` names who holds it** — the pid and the command line, when the OS will
|
|
613
|
+
tell it — rather than only reporting the number. A `follow` entry adopts the process that replaced it;
|
|
614
|
+
an unrelated listener is never signalled
|
|
615
|
+
([SERVERS.md](./docs/SERVERS.md#a-busy-port)).
|
|
616
|
+
|
|
598
617
|
</details>
|
|
599
618
|
|
|
600
619
|
<details>
|