home-hosted 0.11.0 → 0.13.0
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/README.md +319 -628
- package/dist/chunks/archive-DP-XQR8X.js +352 -0
- package/dist/chunks/archive-DP-XQR8X.js.map +1 -0
- package/dist/chunks/atomic-C1PfJpE7.js +26 -0
- package/dist/chunks/atomic-C1PfJpE7.js.map +1 -0
- package/dist/chunks/backup-CZcVca2a.js +822 -0
- package/dist/chunks/backup-CZcVca2a.js.map +1 -0
- package/dist/chunks/backups-CFRaWe_m.js +4691 -0
- package/dist/chunks/backups-CFRaWe_m.js.map +1 -0
- package/dist/chunks/config-text-DifCHhnz.js +50 -0
- package/dist/chunks/config-text-DifCHhnz.js.map +1 -0
- package/dist/chunks/contracts-CMBD1TF9.js +2230 -0
- package/dist/chunks/contracts-CMBD1TF9.js.map +1 -0
- package/dist/chunks/daemon-log-BVj8cDEo.js +241 -0
- package/dist/chunks/daemon-log-BVj8cDEo.js.map +1 -0
- package/dist/chunks/daemon-qKVECISl.js +247 -0
- package/dist/chunks/daemon-qKVECISl.js.map +1 -0
- package/dist/chunks/docker-Cy9Lyvda.js +437 -0
- package/dist/chunks/docker-Cy9Lyvda.js.map +1 -0
- package/dist/chunks/down-pKbGCW9d.js +383 -0
- package/dist/chunks/down-pKbGCW9d.js.map +1 -0
- package/dist/chunks/init-BZ7hK9Vf.js +276 -0
- package/dist/chunks/init-BZ7hK9Vf.js.map +1 -0
- package/dist/chunks/last-stop-C-BXz_XI.js +53 -0
- package/dist/chunks/last-stop-C-BXz_XI.js.map +1 -0
- package/dist/chunks/layout-DwTtmund.js +24 -0
- package/dist/chunks/layout-DwTtmund.js.map +1 -0
- package/dist/chunks/lazy-Ce5zEAq1.js +66 -0
- package/dist/chunks/lazy-Ce5zEAq1.js.map +1 -0
- package/dist/chunks/log-buffer-Dy9HHDMD.js +414 -0
- package/dist/chunks/log-buffer-Dy9HHDMD.js.map +1 -0
- package/dist/chunks/logger-B5U4GD3j.js +13 -0
- package/dist/chunks/logger-B5U4GD3j.js.map +1 -0
- package/dist/chunks/logs---TI_bxM.js +267 -0
- package/dist/chunks/logs---TI_bxM.js.map +1 -0
- package/dist/chunks/migrate-Cfoq-Vgh.js +155 -0
- package/dist/chunks/migrate-Cfoq-Vgh.js.map +1 -0
- package/dist/chunks/nanny-B-Eu0sFW.js +132 -0
- package/dist/chunks/nanny-B-Eu0sFW.js.map +1 -0
- package/dist/chunks/nanny-BtWfy0QH.js +1167 -0
- package/dist/chunks/nanny-BtWfy0QH.js.map +1 -0
- package/dist/chunks/nanny-ChMtq1Zl.js +39 -0
- package/dist/chunks/nanny-ChMtq1Zl.js.map +1 -0
- package/dist/chunks/nanny-sweep-DErnlPY1.js +105 -0
- package/dist/chunks/nanny-sweep-DErnlPY1.js.map +1 -0
- package/dist/chunks/nearest-6KgQEDUe.js +41 -0
- package/dist/chunks/nearest-6KgQEDUe.js.map +1 -0
- package/dist/chunks/parse-DhmG26fI.js +383 -0
- package/dist/chunks/parse-DhmG26fI.js.map +1 -0
- package/dist/chunks/paths-CGlGDrOU.js +206 -0
- package/dist/chunks/paths-CGlGDrOU.js.map +1 -0
- package/dist/chunks/port-B8WBTRMk.js +333 -0
- package/dist/chunks/port-B8WBTRMk.js.map +1 -0
- package/dist/chunks/restart-Des4DrAN.js +92 -0
- package/dist/chunks/restart-Des4DrAN.js.map +1 -0
- package/dist/chunks/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/chunks/schema-B240VXcV.js +103 -0
- package/dist/chunks/schema-B240VXcV.js.map +1 -0
- package/dist/chunks/secrets-BieELnZh.js +562 -0
- package/dist/chunks/secrets-BieELnZh.js.map +1 -0
- package/dist/chunks/server-Bge2r2qQ.js +169 -0
- package/dist/chunks/server-Bge2r2qQ.js.map +1 -0
- package/dist/chunks/server-ids-DRuNLVCV.js +32 -0
- package/dist/chunks/server-ids-DRuNLVCV.js.map +1 -0
- package/dist/chunks/set-password-D5vZqqSX.js +43 -0
- package/dist/chunks/set-password-D5vZqqSX.js.map +1 -0
- package/dist/chunks/set-token-obPiEJYk.js +78 -0
- package/dist/chunks/set-token-obPiEJYk.js.map +1 -0
- package/dist/chunks/settings-xu-XTfWg.js +423 -0
- package/dist/chunks/settings-xu-XTfWg.js.map +1 -0
- package/dist/chunks/setup-temp-CAN4_bA-.js +150 -0
- package/dist/chunks/setup-temp-CAN4_bA-.js.map +1 -0
- package/dist/chunks/shape-DnTKzjQ2.js +24 -0
- package/dist/chunks/shape-DnTKzjQ2.js.map +1 -0
- package/dist/chunks/src-BtWMFmzZ.js +12338 -0
- package/dist/chunks/src-BtWMFmzZ.js.map +1 -0
- package/dist/chunks/status-DT1EsA-B.js +123 -0
- package/dist/chunks/status-DT1EsA-B.js.map +1 -0
- package/dist/chunks/ui-D562aqw5.js +325 -0
- package/dist/chunks/ui-D562aqw5.js.map +1 -0
- package/dist/chunks/ui-dir-CsU3uLNV.js +39 -0
- package/dist/chunks/ui-dir-CsU3uLNV.js.map +1 -0
- package/dist/chunks/ui-release-DKzVvlLd.js +312 -0
- package/dist/chunks/ui-release-DKzVvlLd.js.map +1 -0
- package/dist/chunks/ui-revert-EkBBwRTt.js +27 -0
- package/dist/chunks/ui-revert-EkBBwRTt.js.map +1 -0
- package/dist/chunks/ui-switch-BnZTdMDd.js +150 -0
- package/dist/chunks/ui-switch-BnZTdMDd.js.map +1 -0
- package/dist/chunks/ui-update-_xryLYxw.js +272 -0
- package/dist/chunks/ui-update-_xryLYxw.js.map +1 -0
- package/dist/chunks/up-Pdz-l6IH.js +210 -0
- package/dist/chunks/up-Pdz-l6IH.js.map +1 -0
- package/dist/chunks/usage-DFrCVXpT.js +111 -0
- package/dist/chunks/usage-DFrCVXpT.js.map +1 -0
- package/dist/chunks/workspaces-DYcfvKV_.js +229 -0
- package/dist/chunks/workspaces-DYcfvKV_.js.map +1 -0
- package/dist/chunks/wsl-temperature-BiCI4iK6.js +322 -0
- package/dist/chunks/wsl-temperature-BiCI4iK6.js.map +1 -0
- package/dist/cli.js +441 -25418
- package/dist/cli.js.map +1 -1
- package/dist/client.js +144 -0
- package/dist/client.js.map +1 -0
- package/dist/types/api/acme.d.ts +24 -0
- package/dist/types/api/auth/$.routes.d.ts +103 -0
- package/dist/types/api/backups.d.ts +184 -0
- package/dist/types/api/control.d.ts +470 -0
- package/dist/types/api/ddns.d.ts +432 -0
- package/dist/types/api/events.d.ts +22 -0
- package/dist/types/api/health.d.ts +28 -0
- package/dist/types/api/logs.d.ts +95 -0
- package/dist/types/api/metrics.d.ts +21 -0
- package/dist/types/api/notifications.d.ts +141 -0
- package/dist/types/api/proxy.d.ts +1128 -0
- package/dist/types/api/servers/$.routes.d.ts +1318 -0
- package/dist/types/api/settings.d.ts +642 -0
- package/dist/types/api/state.d.ts +498 -0
- package/dist/types/api/static.d.ts +11 -0
- package/dist/types/api/tls.d.ts +112 -0
- package/dist/types/api/workspaces/$.routes.d.ts +797 -0
- package/dist/types/api/wsl-temperature.d.ts +113 -0
- package/dist/types/app.d.ts +6095 -0
- package/dist/types/cli/args.d.ts +75 -0
- package/dist/types/cli/backup-offline.d.ts +23 -0
- package/dist/types/cli/backup.d.ts +86 -0
- package/dist/types/cli/down.d.ts +80 -0
- package/dist/types/cli/init.d.ts +60 -0
- package/dist/types/cli/io.d.ts +65 -0
- package/dist/types/cli/logs.d.ts +76 -0
- package/dist/types/cli/migrate.d.ts +33 -0
- package/dist/types/cli/nanny.d.ts +19 -0
- package/dist/types/cli/nearest.d.ts +10 -0
- package/dist/types/cli/restart.d.ts +41 -0
- package/dist/types/cli/server.d.ts +68 -0
- package/dist/types/cli/set-password.d.ts +14 -0
- package/dist/types/cli/set-token.d.ts +21 -0
- package/dist/types/cli/setup-temp.d.ts +65 -0
- package/dist/types/cli/status.d.ts +14 -0
- package/dist/types/cli/ui-revert.d.ts +3 -0
- package/dist/types/cli/ui-switch.d.ts +27 -0
- package/dist/types/cli/ui-update.d.ts +72 -0
- package/dist/types/cli/up.d.ts +96 -0
- package/dist/types/cli/usage.d.ts +23 -0
- package/dist/types/cli.d.ts +12 -0
- package/dist/types/client.d.ts +11891 -0
- package/dist/types/config/layout.d.ts +11 -0
- package/dist/types/config/migrations.d.ts +69 -0
- package/dist/types/config/parse.d.ts +54 -0
- package/dist/types/config/patch.d.ts +20 -0
- package/dist/types/config/schema.d.ts +318 -0
- package/dist/types/config/secret-parts.d.ts +48 -0
- package/dist/types/config/secrets.d.ts +208 -0
- package/dist/types/config/seed.d.ts +30 -0
- package/dist/types/config/server-ids.d.ts +14 -0
- package/dist/types/config/settings.d.ts +120 -0
- package/dist/types/config/store.d.ts +145 -0
- package/dist/types/config/workspaces.d.ts +99 -0
- package/dist/types/helpers/action-result.d.ts +46 -0
- package/dist/types/helpers/atomic.d.ts +9 -0
- package/dist/types/helpers/backoff.d.ts +7 -0
- package/dist/types/helpers/bind.d.ts +16 -0
- package/dist/types/helpers/config-text.d.ts +23 -0
- package/dist/types/helpers/cookies.d.ts +19 -0
- package/dist/types/helpers/copy-tree.d.ts +20 -0
- package/dist/types/helpers/daemon-log.d.ts +45 -0
- package/dist/types/helpers/daemon.d.ts +135 -0
- package/dist/types/helpers/deferred.d.ts +7 -0
- package/dist/types/helpers/env-file.d.ts +20 -0
- package/dist/types/helpers/error.d.ts +26 -0
- package/dist/types/helpers/event-stream.d.ts +21 -0
- package/dist/types/helpers/factory.d.ts +6 -0
- package/dist/types/helpers/last-stop.d.ts +20 -0
- package/dist/types/helpers/logger.d.ts +7 -0
- package/dist/types/helpers/open.d.ts +2 -0
- package/dist/types/helpers/openapi.d.ts +34 -0
- package/dist/types/helpers/paths.d.ts +112 -0
- package/dist/types/helpers/restore-lock.d.ts +32 -0
- package/dist/types/helpers/runtime.d.ts +18 -0
- package/dist/types/helpers/secret-compare.d.ts +13 -0
- package/dist/types/helpers/shell.d.ts +19 -0
- package/dist/types/helpers/sse.d.ts +23 -0
- package/dist/types/helpers/template.d.ts +8 -0
- package/dist/types/helpers/ui-dir.d.ts +11 -0
- package/dist/types/helpers/utf8-chunks.d.ts +15 -0
- package/dist/types/helpers/validate.d.ts +7 -0
- package/dist/types/helpers/validator.d.ts +12 -0
- package/dist/types/helpers/version.d.ts +10 -0
- package/dist/types/helpers/workspace.d.ts +25 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/middleware/auth.d.ts +53 -0
- package/dist/types/middleware/host.d.ts +29 -0
- package/dist/types/middleware/loopback.d.ts +18 -0
- package/dist/types/openapi-reference.d.ts +22 -0
- package/dist/types/openapi.d.ts +34 -0
- package/dist/types/providers/archive.d.ts +54 -0
- package/dist/types/providers/backup-hook.d.ts +34 -0
- package/dist/types/providers/ddns/cloudflare.d.ts +2 -0
- package/dist/types/providers/ddns/desec.d.ts +2 -0
- package/dist/types/providers/ddns/digitalocean.d.ts +2 -0
- package/dist/types/providers/ddns/duckdns.d.ts +2 -0
- package/dist/types/providers/ddns/dyndns2.d.ts +15 -0
- package/dist/types/providers/ddns/dynu.d.ts +2 -0
- package/dist/types/providers/ddns/freedns.d.ts +2 -0
- package/dist/types/providers/ddns/gandi.d.ts +2 -0
- package/dist/types/providers/ddns/godaddy.d.ts +2 -0
- package/dist/types/providers/ddns/henet.d.ts +3 -0
- package/dist/types/providers/ddns/index.d.ts +12 -0
- package/dist/types/providers/ddns/ip.d.ts +27 -0
- package/dist/types/providers/ddns/namecheap-api.d.ts +13 -0
- package/dist/types/providers/ddns/namecheap.d.ts +6 -0
- package/dist/types/providers/ddns/noip.d.ts +2 -0
- package/dist/types/providers/ddns/porkbun.d.ts +2 -0
- package/dist/types/providers/ddns/spaceship.d.ts +7 -0
- package/dist/types/providers/ddns/types.d.ts +98 -0
- package/dist/types/providers/ddns/zone.d.ts +11 -0
- package/dist/types/providers/docker.d.ts +117 -0
- package/dist/types/providers/entry-state.d.ts +15 -0
- package/dist/types/providers/health-check.d.ts +27 -0
- package/dist/types/providers/host.d.ts +147 -0
- package/dist/types/providers/identity.d.ts +54 -0
- package/dist/types/providers/log-tail.d.ts +56 -0
- package/dist/types/providers/nanny-sweep.d.ts +54 -0
- package/dist/types/providers/nanny.d.ts +104 -0
- package/dist/types/providers/port.d.ts +142 -0
- package/dist/types/providers/proc.d.ts +125 -0
- package/dist/types/providers/process.d.ts +78 -0
- package/dist/types/providers/proxy/caddy.d.ts +2 -0
- package/dist/types/providers/proxy/index.d.ts +7 -0
- package/dist/types/providers/proxy/types.d.ts +54 -0
- package/dist/types/providers/server-vars.d.ts +4 -0
- package/dist/types/providers/telegram.d.ts +74 -0
- package/dist/types/providers/ui-release.d.ts +113 -0
- package/dist/types/providers/webhook.d.ts +64 -0
- package/dist/types/providers/wsl-temperature.d.ts +65 -0
- package/dist/types/services/acme-challenge.d.ts +44 -0
- package/dist/types/services/auth.d.ts +177 -0
- package/dist/types/services/backups.d.ts +476 -0
- package/dist/types/services/config-watch.d.ts +40 -0
- package/dist/types/services/control-server.d.ts +58 -0
- package/dist/types/services/ddns.d.ts +72 -0
- package/dist/types/services/dependencies.d.ts +21 -0
- package/dist/types/services/events.d.ts +17 -0
- package/dist/types/services/exposure.d.ts +86 -0
- package/dist/types/services/history.d.ts +37 -0
- package/dist/types/services/host-monitor.d.ts +33 -0
- package/dist/types/services/init.d.ts +71 -0
- package/dist/types/services/log-buffer.d.ts +39 -0
- package/dist/types/services/log-files.d.ts +77 -0
- package/dist/types/services/log-relay.d.ts +35 -0
- package/dist/types/services/nanny.d.ts +14 -0
- package/dist/types/services/notifications.d.ts +124 -0
- package/dist/types/services/panel.d.ts +213 -0
- package/dist/types/services/proxy-certificates/certificates.d.ts +116 -0
- package/dist/types/services/proxy-config.d.ts +83 -0
- package/dist/types/services/proxy.d.ts +431 -0
- package/dist/types/services/state.d.ts +38 -0
- package/dist/types/services/supervisor/compose.d.ts +17 -0
- package/dist/types/services/supervisor/entry.d.ts +149 -0
- package/dist/types/services/supervisor/health.d.ts +56 -0
- package/dist/types/services/supervisor/output.d.ts +126 -0
- package/dist/types/services/supervisor/pending-load.d.ts +6 -0
- package/dist/types/services/supervisor/persistent.d.ts +58 -0
- package/dist/types/services/supervisor/port-preflight.d.ts +45 -0
- package/dist/types/services/supervisor/records.d.ts +118 -0
- package/dist/types/services/supervisor/spawn.d.ts +15 -0
- package/dist/types/services/supervisor/view.d.ts +4 -0
- package/dist/types/services/supervisor.d.ts +145 -0
- package/dist/types/services/tls.d.ts +48 -0
- package/dist/types/services/ui-update.d.ts +44 -0
- package/dist/types/services/ui.d.ts +50 -0
- package/dist/types/shared/action-outcome.d.ts +25 -0
- package/dist/types/shared/api-client.d.ts +351 -0
- package/dist/types/shared/backup-scope.d.ts +167 -0
- package/dist/types/shared/clone.d.ts +14 -0
- package/dist/types/shared/contracts.d.ts +4175 -0
- package/dist/types/shared/cpu-scale.d.ts +25 -0
- package/dist/types/shared/ddns-form.d.ts +75 -0
- package/dist/types/shared/endpoint.d.ts +8 -0
- package/dist/types/shared/error-message.d.ts +8 -0
- package/dist/types/shared/fields.d.ts +21 -0
- package/dist/types/shared/form-repair.d.ts +6 -0
- package/dist/types/shared/generated.d.ts +26 -0
- package/dist/types/shared/host-readings.d.ts +185 -0
- package/dist/types/shared/lazy.d.ts +4 -0
- package/dist/types/shared/live-frames.d.ts +22 -0
- package/dist/types/shared/live-series.d.ts +21 -0
- package/dist/types/shared/live-store.d.ts +72 -0
- package/dist/types/shared/patch-diff.d.ts +105 -0
- package/dist/types/shared/probe-latency.d.ts +25 -0
- package/dist/types/shared/proxy-form.d.ts +184 -0
- package/dist/types/shared/server-attention.d.ts +37 -0
- package/dist/types/shared/server-form.d.ts +121 -0
- package/dist/types/shared/server-key.d.ts +13 -0
- package/dist/types/shared/server-readings.d.ts +55 -0
- package/dist/types/shared/server-url.d.ts +43 -0
- package/dist/types/shared/shape.d.ts +17 -0
- package/dist/types/shared/stream-access.d.ts +20 -0
- package/dist/types/shared/ui-format.d.ts +89 -0
- package/docs/API.md +209 -0
- package/docs/BACKUPS.md +117 -0
- package/docs/CLI.md +95 -0
- package/docs/DDNS.md +11 -1
- package/docs/NOTIFICATIONS.md +7 -1
- package/docs/REVERSE_PROXY.md +9 -3
- package/docs/SECURITY.md +93 -0
- package/docs/SERVERS.md +141 -34
- package/docs/UI_CREATION.md +91 -291
- package/docs/demo/blank-host-restore.sh +4 -3
- package/package.json +22 -14
- package/uis/stock/dist/assets/CopyButton-BUBKRJyY.js +1 -0
- package/uis/stock/dist/assets/GlobalSettingsView-yYMcRWvt.js +1 -0
- package/uis/stock/dist/assets/LogViewer-DIliXy62.js +1 -0
- package/uis/stock/dist/assets/LogsView-B7Z-7RNg.js +1 -0
- package/uis/stock/dist/assets/Modal-DmKa5Qpp.js +39 -0
- package/uis/stock/dist/assets/ProxyView-DvZiNkwb.js +1 -0
- package/uis/stock/dist/assets/ServerDetailView-6idGT_EX.js +2 -0
- package/uis/stock/dist/assets/SettingsShell-CeGtleYI.js +1 -0
- package/uis/stock/dist/assets/SettingsView-BrhJIrmk.js +2 -0
- package/uis/stock/dist/assets/de-BRITeb0H.js +1 -0
- package/uis/stock/dist/assets/es-B2zIEssV.js +1 -0
- package/uis/stock/dist/assets/fr-s0ZOBEqh.js +1 -0
- package/uis/stock/dist/assets/index-C1MehbKy.css +2 -0
- package/uis/stock/dist/assets/index-CnBN54wF.js +15 -0
- package/uis/stock/dist/assets/ja-CU7MR85V.js +1 -0
- package/uis/stock/dist/assets/ko-tL5Me6d-.js +1 -0
- package/uis/stock/dist/assets/ru-92yrvkNJ.js +1 -0
- package/uis/stock/dist/assets/vi-CzvY16k2.js +1 -0
- package/uis/stock/dist/assets/zh-CN-DDwFW_uW.js +1 -0
- package/uis/stock/dist/index.html +3 -2
- package/uis/stock/dist/ui.json +3 -3
- package/docs/RESTORE_DEMO.md +0 -306
- package/uis/stock/dist/assets/de-0YLueNal.js +0 -1
- package/uis/stock/dist/assets/es-FCHhRmn2.js +0 -1
- package/uis/stock/dist/assets/fr-C69Z8o0z.js +0 -1
- package/uis/stock/dist/assets/index-Cok5msAO.css +0 -2
- package/uis/stock/dist/assets/index-KdyqrVv8.js +0 -53
- package/uis/stock/dist/assets/ja-Chz9YOqR.js +0 -1
- package/uis/stock/dist/assets/ko-CtXZ2x1l.js +0 -1
- package/uis/stock/dist/assets/ru-D_jE64xN.js +0 -1
- package/uis/stock/dist/assets/vi-sxSffss7.js +0 -1
- package/uis/stock/dist/assets/zh-CN-ChTpf29X.js +0 -1
package/README.md
CHANGED
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
<sub>The harness for your servers.</sub>
|
|
10
10
|
|
|
11
|
-
Point it at the things you run — a gateway, a media server, a bot, a database — and it starts
|
|
12
|
-
|
|
13
|
-
[workspaces](#-workspaces) when one panel holds more than one setup
|
|
14
|
-
|
|
11
|
+
Point it at the things you run — a gateway, a media server, a bot, a database — and it starts them,
|
|
12
|
+
watches them, restarts what dies, and shows you one page of what is going on. Split them into
|
|
13
|
+
[workspaces](#-workspaces) when one panel holds more than one setup (a workspace is just a named
|
|
14
|
+
group that owns its own servers, secrets and logs), and
|
|
15
|
+
[bring your own UI](#-bring-your-own-ui-byou) (BYOU: a static site the panel serves instead of the
|
|
16
|
+
stock one) when you want one that fits you exactly.
|
|
15
17
|
|
|
16
18
|
[](https://www.npmjs.com/package/home-hosted)
|
|
17
19
|
[](https://www.npmjs.com/package/home-hosted)
|
|
@@ -19,7 +21,7 @@ them, watches them, restarts what dies, and shows you one page of what is going
|
|
|
19
21
|
[](./LICENSE)
|
|
20
22
|
[](https://nodejs.org)
|
|
21
23
|
|
|
22
|
-
[🚀 Quick start](#-quick-start) · [🗂 Workspaces](#-workspaces) · [🧩 Servers](./docs/SERVERS.md) · [🤖 Agents & API](#-agents-scripts-and-tools) · [✨ Features](#-features) · [🛠 CLI](#-cli) · [🔔 Notifications](./docs/NOTIFICATIONS.md) · [🔀 Reverse proxy](./docs/REVERSE_PROXY.md) · [🎨 BYOU](#-bring-your-own-ui-byou)
|
|
24
|
+
[🚀 Quick start](#-quick-start) · [🗂 Workspaces](#-workspaces) · [🧩 Servers](./docs/SERVERS.md) · [🤖 Agents & API](#-agents-scripts-and-your-own-tools) · [✨ Features](#-features) · [🛠 CLI](#-cli) · [🔔 Notifications](./docs/NOTIFICATIONS.md) · [🌐 Dynamic DNS](./docs/DDNS.md) · [💾 Backups](#-backups) · [🔀 Reverse proxy](./docs/REVERSE_PROXY.md) · [🔐 Security](#-security) · [🎨 BYOU](#-bring-your-own-ui-byou) · [❓ FAQ](#-faq)
|
|
23
25
|
|
|
24
26
|
</div>
|
|
25
27
|
|
|
@@ -27,11 +29,10 @@ them, watches them, restarts what dies, and shows you one page of what is going
|
|
|
27
29
|
|
|
28
30
|
<div align="center">
|
|
29
31
|
|
|
30
|
-

|
|
31
33
|
|
|
32
|
-
<sub>The stock panel, the [NOC
|
|
33
|
-
|
|
34
|
-
<a href="#-bring-your-own-ui-byou">BYOU</a>.</sub>
|
|
34
|
+
<sub>The stock panel, the [NOC console](./uis/noc-console) that ships alongside it, and UI directions
|
|
35
|
+
you could build yourself — <a href="#-bring-your-own-ui-byou">BYOU</a>.</sub>
|
|
35
36
|
|
|
36
37
|
</div>
|
|
37
38
|
|
|
@@ -40,17 +41,17 @@ shortcuts wizards), and UI directions you could build yourself —
|
|
|
40
41
|
## 🤔 Why?
|
|
41
42
|
|
|
42
43
|
You run a handful of services at home. The usual choices are extremes — 🧟 `tmux` sessions you
|
|
43
|
-
forget about, 📜 a hand-written systemd unit per service
|
|
44
|
-
|
|
44
|
+
forget about, 📜 a hand-written systemd unit per service, or 🐳 a whole container orchestrator — plus
|
|
45
|
+
😩 the monitoring, the reboots and the day you move to a new machine.
|
|
45
46
|
|
|
46
|
-
🙂✨ home-hosted
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
🙂✨ home-hosted sits in between: declare a server once, and it is started, watched, restarted,
|
|
48
|
+
alerted on, backed up and shown on one page — whether it is a plain command or a `docker compose`
|
|
49
|
+
stack.
|
|
49
50
|
|
|
50
51
|
```text
|
|
51
52
|
┌──────────────────────────────────────┐
|
|
52
|
-
your browser ──▶│ home-hosted · 127.0.0.1:3999
|
|
53
|
-
│
|
|
53
|
+
your browser ──▶│ home-hosted · 127.0.0.1:3999 │◀── scripts, agents, your own UI
|
|
54
|
+
│ UI + JSON API + live events (SSE) │ (Bearer token, OpenAPI)
|
|
54
55
|
└───────────────┬──────────────────────┘
|
|
55
56
|
│ supervises
|
|
56
57
|
┌──────────────────────────┼──────────────────────────┐
|
|
@@ -59,250 +60,167 @@ command or a `docker compose` stack.
|
|
|
59
60
|
│ gateway │ │ files │ │ bot │
|
|
60
61
|
│ :4000 │ │ :4010 │ │ ... │
|
|
61
62
|
└────┬────┘ └─────────┘ └─────────┘
|
|
62
|
-
│ compose up
|
|
63
|
+
│ compose up restarts ↻ · health ✓ · logs · alerts
|
|
63
64
|
▼
|
|
64
65
|
┌────────────┬────────────┬────────────┐
|
|
65
|
-
│ gateway │ postgres │ redis │
|
|
66
|
+
│ gateway │ postgres │ redis │ + backups · DDNS · reverse proxy (HTTPS)
|
|
66
67
|
└────────────┴────────────┴────────────┘
|
|
67
|
-
health ✓ (the published port is the probe)
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
| | |
|
|
71
71
|
| --- | --- |
|
|
72
|
-
| ❌ **"Is it still running?"** | Health, CPU/
|
|
73
|
-
| ❌ **Silent deaths** | Restarted automatically, and the panel or
|
|
72
|
+
| ❌ **"Is it still running?"** | Health, CPU/memory, uptime and live logs per server |
|
|
73
|
+
| ❌ **Silent deaths** | Restarted automatically, and you are told — in the panel, Telegram or a webhook |
|
|
74
74
|
| ❌ **Fragile reboots** | `autostart` brings the stack back; one `down` stops it all cleanly |
|
|
75
|
-
| ❌ **"Move it to the new box"** | One archive
|
|
76
|
-
| ✅ **home-hosted** | Declare it once, watch it forever
|
|
75
|
+
| ❌ **"Move it to the new box"** | One archive — config **and** data — restored on a blank host |
|
|
76
|
+
| ✅ **home-hosted** | Declare it once, watch it forever |
|
|
77
77
|
|
|
78
|
-
It ships with **no servers configured**:
|
|
79
|
-
environment you give it. A preset can fill that in for you, and you can change every field after:
|
|
78
|
+
It ships with **no servers configured**: a server is a command, its arguments and its environment.
|
|
80
79
|
|
|
81
80
|
```json
|
|
82
81
|
{ "id": "gateway", "command": "node", "args": ["server.js"], "port": 4000, "autostart": true }
|
|
83
82
|
```
|
|
84
83
|
|
|
85
|
-
<sub>Manage them from the panel, `home-hosted start|stop <id>` from a shell, `home-hosted status --json`,
|
|
86
|
-
or `GET /api/state`; `GET /healthz` is the same status line for your own monitor, no session needed —
|
|
87
|
-
`503` when a server has crashed, when the panel stopped one because it could not serve, or while
|
|
88
|
-
a running one is failing its health check.</sub>
|
|
89
|
-
|
|
90
84
|
---
|
|
91
85
|
|
|
92
86
|
## ⚡ Quick start
|
|
93
87
|
|
|
94
88
|
```bash
|
|
95
|
-
npx home-hosted # start it — detached, it
|
|
96
|
-
npx home-hosted status # where is
|
|
97
|
-
#
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
That is it. The panel is on **<http://127.0.0.1:3999>** and keeps running after the terminal
|
|
101
|
-
closes. <sub>Needs Node 24 or newer.</sub> Stop it whenever you like:
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
npx home-hosted down # stops the panel *and* everything it started
|
|
89
|
+
npx home-hosted # start it — detached, it keeps running — and print the first-run password
|
|
90
|
+
npx home-hosted status # where it is, what is running, the first-run password until you change it
|
|
91
|
+
npx home-hosted down # stop the panel *and* everything it started
|
|
105
92
|
```
|
|
106
93
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
94
|
+
Open **<http://127.0.0.1:3999>**, sign in with the printed password, and change it under **Global
|
|
95
|
+
settings → Authentication**. Then supervise something: **➕ Add server** in the panel, or add an entry
|
|
96
|
+
to `~/.home-hosted/.hh/default/servers.config.json` and run `npx home-hosted start <id>`.
|
|
97
|
+
<sub>Needs Node 24+. `pnpm dlx home-hosted …` works too. `--port`/`--host` on `up` are saved to
|
|
98
|
+
`settings.json`, so the next plain `up` binds the same way.</sub>
|
|
99
|
+
|
|
100
|
+
> [!IMPORTANT]
|
|
101
|
+
> **Before you expose it to anything but this machine.** It listens on `127.0.0.1` until you say
|
|
102
|
+
> otherwise, and it refuses to bind further — or to be put behind its own reverse proxy — while it
|
|
103
|
+
> still has the generated password. So: set your own password first, *then* bind to `lan` (UI,
|
|
104
|
+
> `settings.json`, or `up --host lan`). And an API token is **full admin**: it can create and start a
|
|
105
|
+
> server entry, and an entry runs any command as the panel's user. Changing the password does **not**
|
|
106
|
+
> revoke a token — rotate it with `set-token --generate`. The whole model, including which actions a
|
|
107
|
+
> token is refused: [SECURITY.md](./docs/SECURITY.md).
|
|
110
108
|
|
|
111
109
|
<details>
|
|
112
110
|
<summary><b>📦 Install it instead of npx-ing it</b></summary>
|
|
113
111
|
|
|
114
112
|
```bash
|
|
115
113
|
npm install -g home-hosted # or: pnpm add -g home-hosted
|
|
116
|
-
|
|
114
|
+
hh up # `hh` is the short name for `home-hosted`
|
|
117
115
|
```
|
|
118
116
|
|
|
119
|
-
Everything it owns
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
<sub>An installed home-hosted answers to **`hh`** too — `hh up`, `hh status`, `hh down`. Only the
|
|
123
|
-
installed form gets it; npx stays `npx home-hosted …`.</sub>
|
|
117
|
+
Everything it owns lives under `$HHOSTED_HOME/.hh` (default `~/.home-hosted/.hh`). Delete that and
|
|
118
|
+
nothing of it is left behind.
|
|
124
119
|
|
|
125
120
|
</details>
|
|
126
121
|
|
|
127
122
|
<details>
|
|
128
|
-
<summary><b>📁 Keep a whole setup in a
|
|
129
|
-
|
|
130
|
-
Commit the project and it *is* the setup. `init` scaffolds it:
|
|
123
|
+
<summary><b>📁 Keep a whole setup in a git repository</b></summary>
|
|
131
124
|
|
|
132
125
|
```bash
|
|
133
|
-
npx home-hosted init #
|
|
134
|
-
# project directory, package name, package manager, install, git — every step has a default
|
|
135
|
-
# `--yes` takes them all, for an agent or a CI job
|
|
126
|
+
npx home-hosted init # every step has a default; --yes takes them all
|
|
136
127
|
```
|
|
137
128
|
|
|
138
|
-
|
|
129
|
+
The project's scripts all pass `--home ./state`, and its `.gitignore` commits the server
|
|
130
|
+
definitions while keeping secrets, logs, TLS keys and archives local:
|
|
139
131
|
|
|
140
132
|
```jsonc
|
|
141
133
|
// package.json
|
|
142
|
-
{
|
|
143
|
-
"scripts": {
|
|
144
|
-
"up": "home-hosted up --home ./state",
|
|
145
|
-
"down": "home-hosted down --home ./state",
|
|
146
|
-
"status": "home-hosted status --home ./state"
|
|
147
|
-
// …and restart, set-password, set-token, migrate
|
|
148
|
-
}
|
|
149
|
-
}
|
|
134
|
+
{ "scripts": { "up": "home-hosted up --home ./state", "down": "home-hosted down --home ./state", "status": "home-hosted status --home ./state" } }
|
|
150
135
|
```
|
|
151
136
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
!state/.hh/settings.json # …but the workspace definitions are committed
|
|
156
|
-
!state/.hh/workspaces.json
|
|
157
|
-
state/.hh/*/*
|
|
158
|
-
!state/.hh/*/ # git will not descend into an excluded directory,
|
|
159
|
-
# so the directories must be un-ignored first
|
|
160
|
-
!state/.hh/*/settings.json
|
|
161
|
-
!state/.hh/*/servers.config.json
|
|
162
|
-
data/ # per-server data directories, declared through dataEnvs
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
One clone, `pnpm install --frozen-lockfile`, `pnpm run up` — the setup is up on any machine with Node.
|
|
166
|
-
Worked example, with per-server data inside the project:
|
|
137
|
+
Clone, `pnpm install`, `pnpm run up` — the same setup on any machine with Node. Give each project its
|
|
138
|
+
own panel port (`control.port`, e.g. `4399`) so two can run side by side. Call it `pnpm run up`:
|
|
139
|
+
`pnpm up` is pnpm's own update command. Worked example:
|
|
167
140
|
**[hhosted-ai-pack](https://github.com/NamesMT/hhosted-ai-pack)**.
|
|
168
141
|
|
|
169
|
-
<sub>Call them as `pnpm run up` — `pnpm up` is pnpm's own update, not your script.</sub>
|
|
170
|
-
|
|
171
|
-
<sub>Working **on** this repo? Its own scripts keep state in `.dev-state/`, so trying a change cannot
|
|
172
|
-
touch an installed panel: `pnpm run up|down|status|restart` are shorthand, and `pnpm run cli <command>`
|
|
173
|
-
runs anything else the CLI takes — `pnpm run cli backup list`.</sub>
|
|
174
|
-
|
|
175
|
-
> [!TIP]
|
|
176
|
-
> Recommended to give a project its own panel port (`control.port`, e.g. `4399`), to avoid port conflict
|
|
177
|
-
> with other projects.
|
|
178
|
-
|
|
179
142
|
</details>
|
|
180
143
|
|
|
181
144
|
<details>
|
|
182
|
-
<summary><b>🧰
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
home-hosted up --foreground # stays in the foreground, logs to stderr
|
|
186
|
-
```
|
|
145
|
+
<summary><b>🧰 Start it at boot: systemd or Docker</b></summary>
|
|
187
146
|
|
|
188
147
|
```ini
|
|
189
148
|
[Unit]
|
|
190
149
|
Description=home-hosted
|
|
150
|
+
After=network-online.target
|
|
151
|
+
|
|
191
152
|
[Service]
|
|
192
|
-
User
|
|
153
|
+
User=youruser
|
|
193
154
|
WorkingDirectory=/srv/home-hosted
|
|
194
|
-
ExecStart=/usr/local/bin/home-hosted up --foreground
|
|
195
155
|
Environment=HHOSTED_HOME=/srv/home-hosted
|
|
156
|
+
ExecStart=/usr/local/bin/home-hosted up --foreground
|
|
196
157
|
Restart=always
|
|
158
|
+
|
|
197
159
|
[Install]
|
|
198
160
|
WantedBy=multi-user.target
|
|
199
161
|
```
|
|
162
|
+
|
|
200
163
|
> [!CAUTION]
|
|
201
|
-
>
|
|
202
|
-
>
|
|
203
|
-
>
|
|
204
|
-
> path in your `servers.config.json` points somewhere under `/` and the entries fail to start.
|
|
205
|
-
> Docker does the same unless you pass `-w`. Set it to the directory holding the config you run
|
|
206
|
-
> from, or pin it explicitly with `Environment=HHOSTED_PROJECT=/srv/home-hosted`.
|
|
207
|
-
>
|
|
208
|
-
> Note: change `$YOUR_USER` to your actual user account, or remove for `root`.
|
|
209
|
-
> You could also change `/srv/home-hosted` to change where the data stores.
|
|
164
|
+
> **Set `WorkingDirectory`.** Relative paths in your servers (`cwd`, `{projectDir}`, `dataEnvs`)
|
|
165
|
+
> resolve against the directory the panel starts in, and systemd starts in `/`. Docker does the same
|
|
166
|
+
> without `-w`. Or pin it with `HHOSTED_PROJECT`.
|
|
210
167
|
|
|
211
168
|
</details>
|
|
212
169
|
|
|
213
170
|
---
|
|
214
171
|
|
|
215
|
-
## 🤖 Agents, scripts and tools
|
|
172
|
+
## 🤖 Agents, scripts and your own tools
|
|
216
173
|
|
|
217
|
-
Everything the panel does
|
|
218
|
-
|
|
219
|
-
and read logs.
|
|
174
|
+
Everything the panel does goes through one HTTP API — the stock UI is just one client of it. Get a
|
|
175
|
+
token, then plain HTTP:
|
|
220
176
|
|
|
221
177
|
```bash
|
|
222
|
-
home-hosted set-token --generate
|
|
223
|
-
#
|
|
178
|
+
home-hosted set-token --generate # hh_9uA2… — printed once, only its hash is kept
|
|
179
|
+
# (or Global settings → Authentication → Generate token)
|
|
224
180
|
|
|
225
|
-
curl -H "Authorization: Bearer
|
|
226
|
-
curl -H "Authorization: Bearer
|
|
227
|
-
curl -N -H "Authorization: Bearer
|
|
228
|
-
home-hosted status --json
|
|
181
|
+
curl -H "Authorization: Bearer hh_…" http://127.0.0.1:3999/api/state
|
|
182
|
+
curl -H "Authorization: Bearer hh_…" -X POST 'http://127.0.0.1:3999/api/servers/gateway/restart?workspace=default'
|
|
183
|
+
curl -N -H "Authorization: Bearer hh_…" http://127.0.0.1:3999/api/events # live SSE
|
|
184
|
+
home-hosted status --json # where everything is
|
|
229
185
|
```
|
|
230
186
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
187
|
+
Building in TypeScript? `import { createClient } from 'home-hosted/client'` — a ~2 KB gzipped client
|
|
188
|
+
(5.2 KB raw) typed from the panel's own routes, with the live event stream
|
|
189
|
+
([API.md](./docs/API.md#the-typescript-client)).
|
|
190
|
+
Any other language: `GET /openapi/spec.json` documents every API route and its bodies (browse at
|
|
191
|
+
`/openapi/ui`), so an OpenAPI generator gives you a typed client. `GET /healthz` needs no credential
|
|
192
|
+
and is `503` while any server needs attention — point your uptime monitor at it.
|
|
193
|
+
|
|
194
|
+
> [!WARNING]
|
|
195
|
+
> **A token is full admin.** It can create and start server entries, which run commands as the
|
|
196
|
+
> panel's user. Keep it like a password; rotate with `set-token --generate`.
|
|
237
197
|
|
|
238
198
|
<details>
|
|
239
199
|
<summary><b>🌐 The endpoints worth knowing</b></summary>
|
|
240
200
|
|
|
241
|
-
|
|
201
|
+
✅ takes `?workspace=<id>` (omitted = the default workspace); ❌ is panel-wide.
|
|
202
|
+
|
|
203
|
+
| | | |
|
|
242
204
|
| --- | --- | --- |
|
|
243
|
-
| `GET /api/state` | the full snapshot:
|
|
244
|
-
| `GET
|
|
245
|
-
| `GET /api/
|
|
246
|
-
| `
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
| `GET /api/logs` | persisted history and files | ✅ |
|
|
251
|
-
| `GET`/`PUT /api/ddns`, `/api/ddns/credentials/:id`, `/api/ddns/check` | that workspace's Dynamic DNS policy, credentials and a check | ✅ |
|
|
252
|
-
| `PUT`/`DELETE /api/notifications/destinations/:id/token`, `POST /api/notifications/destinations/:id/{test,detect-chats}`, `POST /api/notifications/test-webhook` | one destination's bot credential, and a test send | ✅ |
|
|
253
|
-
| `GET`/`PATCH /api/settings/workspace` | server defaults, logs, notifications | ✅ |
|
|
254
|
-
| `GET`/`PATCH /api/settings` | panel-wide: listener, authentication, TLS, host vitals, backups | ❌ |
|
|
255
|
-
| `GET`/`POST /api/backups`, restore | archives; a create or restore body selects with `include` and/or `exclude` | ❌ |
|
|
256
|
-
| `GET`/`PATCH /api/proxy`, `POST /api/proxy/{engine,start,stop,apply,revert}`, `PUT`/`DELETE /api/proxy/certificates/:id` | the reverse proxy: its engine, its route table, and its uploaded certificates | ❌ |
|
|
257
|
-
| `GET /healthz` | no session needed — the one an external monitor wants (its per-server detail needs a credential) | ❌ |
|
|
258
|
-
| `GET /api/metrics` | Prometheus text (needs a token or session, like every `/api` route) — scrape it with a bearer token | ❌ |
|
|
259
|
-
|
|
260
|
-
✅ takes `?workspace=<id>`; ❌ is panel-wide. Omitting `?workspace` means `default` workspace is used.
|
|
261
|
-
|
|
262
|
-
**Scraping it.** Point your scraper at `/api/metrics` with the token from `home-hosted set-token
|
|
263
|
-
--generate` as `Authorization: Bearer …`, because it lives under `/api` like every other route.
|
|
264
|
-
`hh_host_cpu_used_percent` is the machine's own CPU share (0–100) — the figure to alert on.
|
|
265
|
-
`hh_host_load1_per_cpu` beside it is a **count of runnable tasks per core**, not a percentage:
|
|
266
|
-
`1.0` means one core's worth of work waiting, so it is fine on a busy box and not comparable with the
|
|
267
|
-
percentage above. A host gauge appears only once the host has been sampled, so a series that is
|
|
268
|
-
*absent* means "no reading", never "zero": do not let a dashboard fill that in. `hh_server_restarts`
|
|
269
|
-
counts the retry attempts spent on a server's **current** crash sequence and drops back to `0` when
|
|
270
|
-
someone starts it, so it is a state, not a counter to `rate()` — `hh_server_crashes_24h` is the one
|
|
271
|
-
that only grows within its window. No series here is a Prometheus counter: every one is a snapshot a
|
|
272
|
-
stop, a delete or a manual start can lower, so no name ends in `_total`.
|
|
273
|
-
|
|
274
|
-
> **Upgrading from 0.9.x — a dashboard needs one edit.** The series formerly named
|
|
275
|
-
> `hh_server_restarts_total` is now `hh_server_restarts` (a gauge, unchanged in meaning and labels).
|
|
276
|
-
> It was never a valid counter: a start you asked for reset it to `0`, so `rate()` reported a phantom
|
|
277
|
-
> counter reset. Replace every query on `hh_server_restarts_total` with `hh_server_restarts`, and use
|
|
278
|
-
> the gauge directly (`hh_server_restarts > 2`) rather than `rate()`/`increase()`. The count series
|
|
279
|
-
> `hh_servers_total` is now `hh_servers` for the same reason. Old dashboards will show *no data*
|
|
280
|
-
> for those two series after the upgrade — the panel publishes neither old name.
|
|
281
|
-
|
|
282
|
-
`GET /openapi/spec.json` describes all of it, `/openapi/ui` is the browsable version, and every error
|
|
283
|
-
comes back as one envelope (`{ message, code, detail }`) with a stable `code` a tool can branch on. The
|
|
284
|
-
document declares its own `securitySchemes` (`bearerAuth`), every documented 2xx carries a schema, and
|
|
285
|
-
each operation is tagged — so `openapi-typescript`, `openapi-generator` or a docs renderer can generate
|
|
286
|
-
a working client without hand-written glue. `/openapi/ui` builds its route index from the spec itself, so
|
|
287
|
-
it stays readable on a box with no internet; the richer interactive browser it also offers is fetched
|
|
288
|
-
from a **version-pinned** CDN and is optional — the plain index is what you get when that CDN is
|
|
289
|
-
unreachable. Scalar's bundle does render offline when self-hosted, but it is 4.9 MB, so the index is the
|
|
290
|
-
cheaper trade for a panel that ships no other web assets.
|
|
205
|
+
| `GET /api/state` | the full snapshot: settings, every workspace and server, host vitals | ❌ |
|
|
206
|
+
| `GET /api/events` | SSE: `hello` (full state), then `state`, `server`, `log`, `ping` | optional |
|
|
207
|
+
| `GET`/`PUT`/`PATCH`/`DELETE /api/servers/:id` | entries — `PUT` is create-or-replace, so a re-run converges | ✅ |
|
|
208
|
+
| `POST /api/servers/:id/{start,stop,restart,free-port}` | lifecycle | ✅ |
|
|
209
|
+
|
|
210
|
+
Every error is one envelope — `{ "message", "code", "detail"? }` — with a stable `code` to branch on.
|
|
211
|
+
Every endpoint, SSE frames, metrics and compatibility rules: **[API.md](./docs/API.md)**.
|
|
291
212
|
|
|
292
213
|
</details>
|
|
293
214
|
|
|
294
215
|
<details>
|
|
295
|
-
<summary><b>🧑💻 Pointing an agent at it</b></summary>
|
|
216
|
+
<summary><b>🧑💻 Pointing an AI agent at it</b></summary>
|
|
296
217
|
|
|
297
|
-
Give
|
|
218
|
+
Give it four things and it can run your home server without guessing:
|
|
298
219
|
|
|
299
220
|
1. the token (`home-hosted set-token --generate`),
|
|
300
221
|
2. `http://127.0.0.1:3999/openapi/spec.json` — the API it may call,
|
|
301
222
|
3. `home-hosted status --json` — where things are,
|
|
302
|
-
4. [SERVERS.md](./docs/SERVERS.md) — how
|
|
303
|
-
|
|
304
|
-
For a UI rather than the API, [UI_CREATION.md](./docs/UI_CREATION.md) is the whole contract, and the panel
|
|
305
|
-
can be told what to be: *"Help me build a UI for home-hosted: nostalgic game theme, including …"*.
|
|
223
|
+
4. [SERVERS.md](./docs/SERVERS.md) — how a server is declared.
|
|
306
224
|
|
|
307
225
|
</details>
|
|
308
226
|
|
|
@@ -310,51 +228,62 @@ can be told what to be: *"Help me build a UI for home-hosted: nostalgic game the
|
|
|
310
228
|
|
|
311
229
|
## ✨ Features
|
|
312
230
|
|
|
231
|
+
### What a plain supervisor does not do
|
|
232
|
+
|
|
233
|
+
| | |
|
|
234
|
+
| --- | --- |
|
|
235
|
+
| ♾️ **`persistent: true` survives the panel** | The entry runs under its own tiny supervisor (a **nanny** — this same CLI in a hidden mode) that owns its pipes and log file, so `down`, an upgrade or a crash leaves it serving; the next panel re-attaches |
|
|
236
|
+
| 🔗 **`dependsOn` waits for *healthy*** | A dependent is held until the health probe of what it needs has passed — not until that process merely exists — so a web app never binds before its database accepts connections |
|
|
237
|
+
| 🔄 **`onPortConflict: follow` adopts a self-restarting program** | A plugin that re-execs, or an updater that hands over to a new detached process, is recognised as *this entry's own successor* and taken over — pid, health, resources, stop — instead of blocking on its own port |
|
|
238
|
+
| 👻 **The orphan list** | A process this panel started that no entry owns any more — a renamed or removed entry left it behind — is listed under **Servers** by id, pid and start time, with a **Stop it** button. Nothing is killed on a guess |
|
|
239
|
+
|
|
240
|
+
The rest, one line each:
|
|
241
|
+
|
|
242
|
+
<details>
|
|
243
|
+
<summary><b>📋 The full feature list</b></summary>
|
|
244
|
+
|
|
313
245
|
| | |
|
|
314
246
|
| --- | --- |
|
|
315
|
-
| 🗂 **Workspaces** | One panel, many
|
|
316
|
-
| 🚦 **Lifecycle** | Start, stop, restart from the panel or the API; `autostart` entries come up with it
|
|
317
|
-
| 📝 **Hand edits welcome** | Edit `servers.config.json` in an editor or
|
|
318
|
-
| ♻️ **Auto-restart** | Exponential backoff on crash, with
|
|
319
|
-
| 🩺 **Health that acts** | TCP or HTTP probes
|
|
320
|
-
|
|
|
321
|
-
|
|
|
322
|
-
|
|
|
323
|
-
|
|
|
324
|
-
|
|
|
325
|
-
|
|
|
326
|
-
|
|
|
327
|
-
|
|
|
328
|
-
|
|
|
329
|
-
| 🌍 **Translated
|
|
330
|
-
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
| 🖥 **Cross-platform** | Linux, macOS and Windows: `/proc`, `ps` or Win32_Process, process groups or `taskkill /T`, no shell dependencies. |
|
|
247
|
+
| 🗂 **Workspaces** | One panel, many setups. Each owns its servers, secrets, logs and settings; listener, auth, backups, TLS and UI stay panel-wide |
|
|
248
|
+
| 🚦 **Lifecycle** | Start, stop, restart from the panel, the CLI or the API; `autostart` entries come up with it |
|
|
249
|
+
| 📝 **Hand edits welcome** | Edit `servers.config.json` or the panel's `settings.json` in an editor or `git checkout` — picked up in seconds. A file it cannot read is reported in the UI, and what is running is left alone |
|
|
250
|
+
| ♻️ **Auto-restart** | Exponential backoff on crash, with a retry budget that survives a panel restart |
|
|
251
|
+
| 🩺 **Health that acts** | TCP or HTTP probes: a card warns after `unhealthyThreshold` failed probes (default 3). Forcing a restart after a set time is **opt-in** — `forceRestartAfterMs` defaults to `0`, which never fires. Ports are checked before starting, and a program that restarts itself can be [followed](./docs/SERVERS.md#when-a-program-restarts-itself) |
|
|
252
|
+
| 📜 **Logs** | Live stream, rotated files, search, download, clear |
|
|
253
|
+
| 📈 **Resources** | CPU and memory per process tree (summed containers for compose), with an optional memory ceiling |
|
|
254
|
+
| 🌡️ **Host vitals** | CPU, memory, swap, disk, temperature and load, with thresholds that alert once and again on recovery |
|
|
255
|
+
| 🔔 **Notifications** | Telegram and webhooks (ntfy, Discord, Slack, …) on crash, unhealthy, recovery, host thresholds and DNS changes |
|
|
256
|
+
| 🌐 **Dynamic DNS** | Keep hostnames on your public IP — Cloudflare, Namecheap, Porkbun, GoDaddy, Gandi, deSEC, DuckDNS, No-IP and more |
|
|
257
|
+
| 🔀 **Reverse proxy** | One Caddy engine with automatic HTTPS: `git.example.com` → a Gitea entry, `panel.example.com` → the panel |
|
|
258
|
+
| 💾 **Backups** | Config, secrets and data in one zip — plain or AES-256, scheduled or manual, restorable on a blank host |
|
|
259
|
+
| 🤖 **API first** | Bearer tokens, OpenAPI, SSE — scripts, agents, TUIs and desktop apps get everything the UI gets |
|
|
260
|
+
| 🎨 **Bring your own UI** | Upload a static build; `ui-update` follows its releases, `ui-revert` goes back |
|
|
261
|
+
| 🌍 **Translated** | English, Vietnamese, Chinese, Japanese, Spanish, Korean, Russian, French, German |
|
|
262
|
+
| 🖥 **Cross-platform** | Linux, macOS and Windows — no shell utilities assumed |
|
|
263
|
+
|
|
264
|
+
</details>
|
|
334
265
|
|
|
335
266
|
---
|
|
336
267
|
|
|
337
268
|
## 🗂 Workspaces
|
|
338
269
|
|
|
339
|
-
A workspace is the ownership boundary: its own servers, secrets, logs
|
|
340
|
-
|
|
270
|
+
A workspace is the ownership boundary: its own servers, secrets, logs and settings. The first boot
|
|
271
|
+
creates `default`. A server id is unique only inside its workspace.
|
|
341
272
|
|
|
342
273
|
| page | url | scope |
|
|
343
274
|
| --- | --- | --- |
|
|
344
|
-
| **Overview** | `/w/<workspace>`
|
|
345
|
-
| **
|
|
346
|
-
| **
|
|
347
|
-
| **
|
|
348
|
-
| **Global settings** | `/global/settings` | Listener, Authentication, Host vitals, Backups, TLS, Interface, Paths |
|
|
349
|
-
| **Reverse Proxy** | `/proxy` | panel-wide: one engine, every workspace's servers ([REVERSE_PROXY.md](./docs/REVERSE_PROXY.md)) |
|
|
275
|
+
| **Overview** · **Servers** · **Logs** · **Settings** | `/w/<workspace>` · `…/servers` · `…/logs` · `…/settings` | one workspace |
|
|
276
|
+
| **One server** | `/w/<workspace>/servers/<id>` | config, live logs, resources |
|
|
277
|
+
| **Global overview** · **Global settings** | `/global/overview` · `/global/settings` | every workspace; listener, auth, backups, TLS, UI |
|
|
278
|
+
| **Reverse proxy** | `/proxy` | panel-wide |
|
|
350
279
|
|
|
351
280
|
<details>
|
|
352
281
|
<summary><b>🗂 What lives where</b></summary>
|
|
353
282
|
|
|
354
283
|
| | |
|
|
355
284
|
| --- | --- |
|
|
356
|
-
|
|
|
357
|
-
| workspace — `.hh/<id>/` | `settings.json` (server defaults, logs, notifications, DDNS), `servers.config.json`, `.secrets.json` (
|
|
285
|
+
| panel-wide — `$HHOSTED_HOME/.hh/` | `settings.json` (listener, auth, TLS, host vitals, backups, proxy), `workspaces.json`, `.control-secrets.json` (password + token hashes, 0600), `.tls/`, `.ui/`, `.backups/`, `.logs/`, `.proxy/` (the engine and its state), `run.json` (the live panel, 0600) |
|
|
286
|
+
| per workspace — `.hh/<id>/` | `settings.json` (server defaults, logs, notifications, DDNS), `servers.config.json`, `.secrets.json` (0600), `.logs/<id>.log`, `.state/` |
|
|
358
287
|
|
|
359
288
|
</details>
|
|
360
289
|
|
|
@@ -362,24 +291,30 @@ The first boot creates a `default` workspace.
|
|
|
362
291
|
|
|
363
292
|
## 🧩 Servers
|
|
364
293
|
|
|
365
|
-
|
|
366
|
-
|
|
294
|
+
Add one with **➕ Add server** — presets for Node, Python, Jellyfin, Minecraft, Gitea, MongoDB, Docker
|
|
295
|
+
Compose and more fill the form — or write it into the workspace's `servers.config.json`:
|
|
367
296
|
|
|
368
297
|
```json
|
|
369
298
|
{
|
|
370
|
-
"id": "
|
|
299
|
+
"id": "blog",
|
|
371
300
|
"command": "node",
|
|
372
|
-
"args": ["server.js"],
|
|
301
|
+
"args": ["server.js", "--port", "{port}"],
|
|
302
|
+
"cwd": "./apps/blog",
|
|
373
303
|
"port": 8080,
|
|
304
|
+
"bind": "lan",
|
|
374
305
|
"autostart": true,
|
|
375
|
-
"dataEnvs": { "DATA_DIR": "{projectDir}/data/
|
|
306
|
+
"dataEnvs": { "DATA_DIR": "{projectDir}/data/blog" }
|
|
376
307
|
}
|
|
377
308
|
```
|
|
378
309
|
|
|
379
|
-
`
|
|
310
|
+
- `command` is a **program, not a shell line** — `"node server.js"` looks for a program of that name.
|
|
311
|
+
- `port` turns on the readiness wait, health checks and port-conflict detection.
|
|
312
|
+
- `bind` is `local` (`127.0.0.1`), `lan` (`0.0.0.0`) or one of this machine's IPv4 addresses; the
|
|
313
|
+
program reads it as `{host}`.
|
|
314
|
+
- `dataEnvs` sets an environment variable *and* marks that directory for backups.
|
|
380
315
|
|
|
381
|
-
**Every field,
|
|
382
|
-
|
|
316
|
+
**Every field, placeholder and port-conflict policy, plus Docker Compose and persistent entries:
|
|
317
|
+
[SERVERS.md](./docs/SERVERS.md).**
|
|
383
318
|
|
|
384
319
|
---
|
|
385
320
|
|
|
@@ -387,58 +322,61 @@ restarts itself), and how hand-edits are validated: [SERVERS.md](./docs/SERVERS.
|
|
|
387
322
|
|
|
388
323
|
| command | |
|
|
389
324
|
| --- | --- |
|
|
390
|
-
| `home-hosted up` | start the panel detached
|
|
391
|
-
| `home-hosted down` | stop it
|
|
392
|
-
| `home-hosted restart` | `down
|
|
393
|
-
| `home-hosted status` |
|
|
394
|
-
| `home-hosted start <id>` |
|
|
395
|
-
| `home-hosted
|
|
396
|
-
| `home-hosted
|
|
397
|
-
| `home-hosted
|
|
398
|
-
| `home-hosted
|
|
399
|
-
| `home-hosted
|
|
400
|
-
| `home-hosted
|
|
401
|
-
| `home-hosted
|
|
402
|
-
| `home-hosted
|
|
403
|
-
| `home-hosted
|
|
404
|
-
| `home-hosted ui-switch` | install a UI from a release asset, a zip file or a URL (interactive) |
|
|
405
|
-
| `home-hosted ui-update` | bring an installed UI up to date automatically (official UI) or pick a release (`--old`, `--check`) |
|
|
406
|
-
| `home-hosted ui-revert` | go back to the stock panel UI after uploading your own |
|
|
325
|
+
| `home-hosted up` | start the panel detached. With one already running: says where and exits `0` — **if the flags agree**. `--port`/`--host` naming something else is refused (exit `1`, "`--port X` was not honoured"), because a re-run must not report success for a move it did not make |
|
|
326
|
+
| `home-hosted down` | stop it and everything it started — persistent entries stay unless `--with-persistent` |
|
|
327
|
+
| `home-hosted restart [<id>]` | the panel (`down` then `up`), or just one server, leaving the panel up |
|
|
328
|
+
| `home-hosted status` | running? where? how many servers up? every path (`--json`) |
|
|
329
|
+
| `home-hosted start <id>` / `stop <id>` | one server — `start` brings up what it `dependsOn` first; `stop` stops only that one (`-w <workspace>`, `--free-port`) |
|
|
330
|
+
| `home-hosted free-port <id>` | ask whatever holds that server's port to stop; supervised holders are refused |
|
|
331
|
+
| `home-hosted logs [<id>]` | the panel's console, or one server's log (`--lines`, `--follow`, `--json`) |
|
|
332
|
+
| `home-hosted usage` | CPU and memory per server, loudest first, plus starts and crashes over the history window |
|
|
333
|
+
| `home-hosted backup` | `list`, `create`, `restore` — works with the panel stopped |
|
|
334
|
+
| `home-hosted set-password` / `set-token` | credentials, without a browser |
|
|
335
|
+
| `home-hosted migrate` | bring configs up to this release's schema (`--dry-run`) |
|
|
336
|
+
| `home-hosted init` | scaffold a self-contained project |
|
|
337
|
+
| `home-hosted ui-switch` / `ui-update` / `ui-revert` | install, update or remove a custom UI |
|
|
338
|
+
| `home-hosted setup-temp --wsl` | read the CPU temperature through the Windows host on WSL2 |
|
|
407
339
|
|
|
408
340
|
<details>
|
|
409
|
-
<summary><b>⚙️
|
|
410
|
-
|
|
411
|
-
`home-hosted <command> --help` prints what that command takes.
|
|
341
|
+
<summary><b>⚙️ Every command and its flags</b></summary>
|
|
412
342
|
|
|
413
343
|
```text
|
|
414
|
-
up -p/--port --host --open --no-autostart --foreground --print-config
|
|
415
|
-
|
|
344
|
+
up -p/--port <port> --host <local|lan|ipv4> --open --no-autostart --foreground --print-config
|
|
345
|
+
(--port and --host are saved to settings.json)
|
|
416
346
|
down --with-persistent
|
|
347
|
+
restart (no id) down, then up: up's flags plus --with-persistent
|
|
348
|
+
restart <id> one server through the panel: [-w/--workspace <id>] — up's flags are refused here
|
|
417
349
|
status --json
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
350
|
+
start <id> [-w/--workspace <id>] [--free-port]
|
|
351
|
+
stop <id> [-w/--workspace <id>]
|
|
352
|
+
free-port <id> [-w/--workspace <id>]
|
|
353
|
+
logs [<id>] --lines <n≥1|all> --follow --json [-w/--workspace <id>]
|
|
354
|
+
usage --json
|
|
355
|
+
backup list --json
|
|
356
|
+
backup create (--include <ids> | --all) [--exclude <ids>] --password <text> --confirm --json
|
|
357
|
+
backup restore (<name> | --from <path>) (--include <ids> | --all) [--exclude <ids>] --password <text> --confirm --json
|
|
358
|
+
init --dir <dir> --name <name> --pm <pnpm|npm|yarn|bun> --no-install -y/--yes
|
|
359
|
+
set-password --clear (HHOSTED_PASSWORD for a script; --clear locks every sign-in out)
|
|
360
|
+
set-token --generate --clear (HHOSTED_TOKEN for a script)
|
|
361
|
+
migrate --dry-run -y/--yes (HHOSTED_MIGRATE=allow for a script)
|
|
362
|
+
ui-switch --repo <owner/name> --tag <tag> --asset <name> --file <path|url> --list --token <token> -y/--yes
|
|
363
|
+
ui-update --check --tag <tag> --asset <name> --old --repo <owner/name> --token <token> -y/--yes
|
|
428
364
|
ui-revert (no flags)
|
|
365
|
+
setup-temp --wsl [--download | --no-download] | --clear
|
|
429
366
|
|
|
430
|
-
every command --home <dir> --project <dir>
|
|
431
|
-
|
|
367
|
+
every command --home <dir> --project <dir> -h/--help -v/--version (or $HHOSTED_HOME, $HHOSTED_PROJECT)
|
|
368
|
+
help <command> the same as <command> --help
|
|
369
|
+
environment HHOSTED_PASSWORD, HHOSTED_TOKEN, HHOSTED_MIGRATE=allow, HHOSTED_DDNS_SECRET,
|
|
370
|
+
GITHUB_TOKEN / GH_TOKEN (ui-switch, ui-update)
|
|
432
371
|
```
|
|
433
372
|
|
|
434
|
-
`
|
|
435
|
-
|
|
436
|
-
A
|
|
437
|
-
`--
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
when nothing is close, rather than guessing.
|
|
373
|
+
- `--json` prints one document on stdout or nothing; refusals go to stderr. Branch on the exit code.
|
|
374
|
+
The exception is a stream: `logs --follow --json` prints one `{ path, line }` object per line.
|
|
375
|
+
- A flag a command cannot honour is refused, and `backup create`/`restore` without a terminal need
|
|
376
|
+
`--confirm` (without it they show the plan and exit 1). Depth: [CLI.md](./docs/CLI.md).
|
|
377
|
+
- Piping into `head`/`grep -q` exits 0, so `set -o pipefail` is safe.
|
|
378
|
+
- `start web && curl …` works: `start` waits to confirm the process stayed up.
|
|
379
|
+
- A misspelled command or flag suggests the one you meant.
|
|
442
380
|
|
|
443
381
|
</details>
|
|
444
382
|
|
|
@@ -446,75 +384,25 @@ when nothing is close, rather than guessing.
|
|
|
446
384
|
<summary><b>🧭 Upgrading, and why the panel sometimes refuses to start</b></summary>
|
|
447
385
|
|
|
448
386
|
```bash
|
|
449
|
-
home-hosted migrate --dry-run #
|
|
450
|
-
home-hosted migrate #
|
|
387
|
+
home-hosted migrate --dry-run # what would change
|
|
388
|
+
home-hosted migrate # asks before each schema step, keeps a .bak beside each file
|
|
451
389
|
```
|
|
452
390
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
- **A newer home-hosted always reads an older config** — every existing key keeps its meaning.
|
|
459
|
-
- **Keys a newer release added are ignored, not fatal.** The panel names them in its log, leaves them
|
|
460
|
-
in the file, and never resets the settings around them.
|
|
461
|
-
|
|
462
|
-
What it will not do is run a config it cannot read. A wrong value, a duplicate id, an unreadable file
|
|
463
|
-
or a config whose schema is newer than the running release stops `up` with the exact problem, rather
|
|
464
|
-
than starting with defaults that quietly differ from your file. Fix the file, or install the release
|
|
465
|
-
that wrote it.
|
|
466
|
-
|
|
467
|
-
### Two things `migrate` cannot fix
|
|
468
|
-
|
|
469
|
-
`migrate` moves a config file. Two changes in this release are *outside* the config, so read these
|
|
470
|
-
before upgrading — a stale one fails quietly, which is the worst way to fail.
|
|
471
|
-
|
|
472
|
-
**A dashboard on `/api/metrics`.** Two series were renamed in the release that made every metric
|
|
473
|
-
honest about being a gauge: `hh_server_restarts_total` is now `hh_server_restarts`, and
|
|
474
|
-
`hh_servers_total` is now `hh_servers`. The old names are not published, so a query still on one
|
|
475
|
-
shows *no data* rather than a stale number. Compare the gauge directly (`hh_server_restarts > 2`);
|
|
476
|
-
do not wrap it in `rate()`/`increase()`, because a start you asked for resets it.
|
|
477
|
-
|
|
478
|
-
**A script that holds only an API token.** Three operations now require a signed-in session, because
|
|
479
|
-
each would otherwise let a stolen token end up holding the panel: clearing the password, switching
|
|
480
|
-
authentication off, and restoring an archive that carries `global:secrets`. Each answers 403
|
|
481
|
-
`SESSION_REQUIRED`. Scripts should either sign in first, pass `--exclude global:secrets` to a
|
|
482
|
-
restore, or run the command on the machine (`home-hosted set-password --clear`,
|
|
483
|
-
`home-hosted backup restore`, which both go through the local channel).
|
|
484
|
-
|
|
485
|
-
### Coming from 0.6.x
|
|
486
|
-
|
|
487
|
-
**Install the latest 0.7.x first, and run it once.** 0.7.0 moved all state from `$HHOSTED_HOME` itself
|
|
488
|
-
into `$HHOSTED_HOME/.hh`, splitting the old all-in-one `servers.config.json` into global settings, a
|
|
489
|
-
`default` workspace, and that workspace's servers — and it did the move automatically on its first
|
|
490
|
-
run. 0.8.0 dropped that relocation.
|
|
491
|
-
|
|
492
|
-
So a home that is still on the 0.6.x layout is not read: `up` stops and names the file it found,
|
|
493
|
-
rather than starting against an empty state directory beside a config it never opened. 0.7.x does
|
|
494
|
-
the move on its first run; 0.8.0 then starts against the result.
|
|
391
|
+
A newer release always reads an older config, and unknown keys are kept and reported, never reset.
|
|
392
|
+
What it will not do is run a config it cannot read — a wrong value, a duplicate id, a newer schema —
|
|
393
|
+
so `up` stops with the exact problem instead of starting on defaults. Release notes say what each
|
|
394
|
+
upgrade needs from you. **Coming from 0.6.x:** run the latest 0.7.x once first.
|
|
495
395
|
|
|
496
396
|
</details>
|
|
497
397
|
|
|
498
398
|
<details>
|
|
499
|
-
<summary><b>🤔 What <code>status</code> tells you
|
|
500
|
-
|
|
501
|
-
`home-hosted status` prints the panel's console path *and* the per-server log directory, naming the
|
|
502
|
-
`<id>.log` convention once logs exist.
|
|
503
|
-
|
|
504
|
-
`--json` is for scripts. A stopped panel answers `{ running: false, initialised }` —
|
|
505
|
-
`initialised: false` means nothing was ever set up in this state directory — plus `liveness`:
|
|
506
|
-
|
|
507
|
-
| `liveness` | Means |
|
|
508
|
-
| --- | --- |
|
|
509
|
-
| `alive` | the recorded pid is this panel |
|
|
510
|
-
| `gone` | it is not running; the record is stale and may be cleared |
|
|
511
|
-
| `recycled` | the OS has handed the recorded pid to **another** process. The record is stale, but a signal would hit a stranger, so only the token-authenticated shutdown touches it |
|
|
512
|
-
|
|
513
|
-
Piping a command into `head`, `grep -q` or anything that stops reading early is ordinary shell and it
|
|
514
|
-
works: the command exits **0**, not with a broken-pipe error, so `set -o pipefail` stays happy.
|
|
399
|
+
<summary><b>🤔 What <code>status --json</code> tells you</b></summary>
|
|
515
400
|
|
|
516
|
-
|
|
517
|
-
|
|
401
|
+
`running` and `liveness` are always present. `liveness` is `live` (it is this panel), `unknown`
|
|
402
|
+
(alive, start time unavailable — counted as running), `gone`, or `recycled` (the pid now belongs to
|
|
403
|
+
another process — nothing is signalled). Then `answering: false` means the process exists but does not
|
|
404
|
+
respond, and `exitedCleanly` says whether someone ran `down` or it died. There is more in that
|
|
405
|
+
document (paths, ports, the missing-record cases) — [CLI.md](./docs/CLI.md#what-status-tells-you).
|
|
518
406
|
|
|
519
407
|
</details>
|
|
520
408
|
|
|
@@ -522,269 +410,115 @@ any list it explains, go to stderr, so a script can parse stdout without filteri
|
|
|
522
410
|
|
|
523
411
|
## 🔐 Security
|
|
524
412
|
|
|
525
|
-
**Safe out of the box.** The panel
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
exposed until you decide it should be.
|
|
529
|
-
|
|
530
|
-
One setting only warns: turning on **trust a proxy from any peer** while the panel is also exposed
|
|
531
|
-
weakens the login lockout, and the panel says so at startup rather than refusing, because a proxy on
|
|
532
|
-
another machine is a legitimate setup.
|
|
413
|
+
**Safe out of the box.** The panel listens on `127.0.0.1` only, behind a password generated on first
|
|
414
|
+
start. It refuses to listen anywhere else — or to be served through its own reverse proxy — until you
|
|
415
|
+
set your own password.
|
|
533
416
|
|
|
534
417
|
<details>
|
|
535
418
|
<summary><b>🛡️ The three things you actually have to do</b></summary>
|
|
536
419
|
|
|
537
|
-
1. **Set your own password before
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
password does *not* revoke it. If one may have leaked, rotate it: `set-token --generate`.
|
|
541
|
-
3. **If you forget the password, clear it from the machine.** `home-hosted set-password --clear`
|
|
542
|
-
edits the secrets file directly, so it needs no login — that is the way back in. Signed in, the
|
|
543
|
-
same thing is *Global settings → Authentication → Clear password*.
|
|
420
|
+
1. **Set your own password before exposing it**, then bind to `lan` (UI, config, or `up --host lan`).
|
|
421
|
+
2. **Treat an API token as the account it runs as** — changing the password does *not* revoke it.
|
|
422
|
+
3. **Forgot the password?** Run `home-hosted set-password` on the machine to set a new one; no login needed.
|
|
544
423
|
|
|
545
424
|
</details>
|
|
546
425
|
|
|
547
426
|
<details>
|
|
548
|
-
<summary><b>🔍
|
|
549
|
-
|
|
550
|
-
**Sessions.** Kept in memory only, never on disk. The cookie is `HttpOnly` and `SameSite=Strict`, and
|
|
551
|
-
it is an **idle** timeout: every request slides both the session and the cookie, so a panel in regular
|
|
552
|
-
use stays signed in while one left alone signs out. Repeated login failures lock out per IP — see
|
|
553
|
-
*behind a proxy* below for when that is advisory.
|
|
554
|
-
|
|
555
|
-
**Tokens.** `home-hosted set-token --generate` prints one once and stores only its SHA-256 hash;
|
|
556
|
-
`set-token --clear` revokes it. Three operations need a signed-in session rather than a token, because
|
|
557
|
-
each would otherwise let a stolen token end up holding the panel:
|
|
558
|
-
|
|
559
|
-
| Operation | Instead |
|
|
560
|
-
| --- | --- |
|
|
561
|
-
| clearing the password | sign in, or `set-password --clear` on the machine |
|
|
562
|
-
| switching authentication off | sign in |
|
|
563
|
-
| restoring an archive carrying `global:secrets` | `--exclude global:secrets`, or the CLI on the machine |
|
|
564
|
-
|
|
565
|
-
All three answer `403 SESSION_REQUIRED`. Commands run on the machine use the local channel, so they
|
|
566
|
-
need no session.
|
|
567
|
-
|
|
568
|
-
**Where secrets live.** Never in a config file — every one of these is mode `0600`:
|
|
427
|
+
<summary><b>🔍 How a request is trusted</b></summary>
|
|
569
428
|
|
|
570
|
-
|
|
|
429
|
+
| Check | Rule |
|
|
571
430
|
| --- | --- |
|
|
572
|
-
|
|
|
573
|
-
|
|
|
574
|
-
|
|
|
431
|
+
| **Host** | an IP, `localhost`, a local name (`.local`, `.lan`, `homeserver`, …), a panel proxy route, or listed in `control.allowedHosts` — otherwise `421`. This blocks DNS-rebinding attacks from web pages you visit |
|
|
432
|
+
| **Origin** | a cookie-authenticated write must be same-origin; bearer-token requests are exempt (browsers never attach one by themselves) |
|
|
433
|
+
| **"This machine"** | a loopback peer that also carries **none** of `Forwarded`, `X-Forwarded-For`, `X-Real-IP` or the `X-Forwarded-Proto`/`-Host`/`-Port`/`-Prefix` family. That is right for the panel's own reverse proxy and for any proxy that adds at least one of them — but it is a **heuristic, not a guarantee**: a proxy that strips them all is indistinguishable from a local client. Set `trustProxy` deliberately and never put the panel behind a header-stripping proxy |
|
|
434
|
+
| **Lockout** | repeated failures lock out per client address; `trustProxy: "loopback"` (default) reads the real address from a proxy on this machine |
|
|
575
435
|
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
a PEM pair and let home-hosted terminate TLS itself.
|
|
581
|
-
|
|
582
|
-
| Setting | Trusts `x-forwarded-*` from | Use when |
|
|
583
|
-
| --- | --- | --- |
|
|
584
|
-
| `loopback` | this machine only | a proxy on the same host — real client address in logs and lockout, forged headers ignored |
|
|
585
|
-
| `on` | any peer | the proxy is the only way in. **The client address is then the caller's own header**, so the per-IP lockout counts per *forged* address and stops throttling brute force; the panel warns at startup if that panel is exposed |
|
|
586
|
-
| `off` | nobody | nothing in front, or the proxy sets no header |
|
|
587
|
-
|
|
588
|
-
**A plain-`http://` LAN address is not a secure context.** Browsers withhold some APIs from it, and the
|
|
589
|
-
panel works around the one it uses: **Copy** (the archive directory, the logs directory, the TLS
|
|
590
|
-
fingerprint, a server's JSON config) falls back to the legacy clipboard call, so it still works from
|
|
591
|
-
`http://192.168.1.201:3999`. Where even that is refused, the button says *Could not copy* instead of
|
|
592
|
-
doing nothing.
|
|
593
|
-
|
|
594
|
-
**Port conflicts.** A busy port is named — `port 4010 is already in use (pid 4242)` — and can be
|
|
595
|
-
resolved from a confirmation popover. The holder is looked up again at that moment, never taken from
|
|
596
|
-
the message, and anything the panel supervises is refused rather than killed. A server that
|
|
597
|
-
[restarts itself](./docs/SERVERS.md#when-a-program-restarts-itself) can be followed, or replaced with
|
|
598
|
-
a supervised copy.
|
|
436
|
+
Secrets never go in a config file: every secret file is `0600`, and `.hh` is `0700` from the moment
|
|
437
|
+
any command creates it. DDNS
|
|
438
|
+
credentials are also sealed under `HHOSTED_DDNS_SECRET` — set your own if you commit or share `.hh/`.
|
|
439
|
+
Details: [SECURITY.md](./docs/SECURITY.md).
|
|
599
440
|
|
|
600
441
|
</details>
|
|
601
442
|
|
|
602
|
-
|
|
603
443
|
---
|
|
604
444
|
|
|
605
445
|
## 🔔 Notifications
|
|
606
446
|
|
|
607
447
|
A message when something happens while you are not looking: a server that gave up restarting, a
|
|
608
|
-
failing health check, a forced restart, a recovery, a host threshold
|
|
609
|
-
|
|
448
|
+
failing health check, a forced restart, a recovery, a host threshold, a DNS change. Alerts go to
|
|
449
|
+
**destinations** — Telegram chats and webhooks — with event toggles and a throttle set once and
|
|
450
|
+
inherited or overridden per destination. **Two minutes of setup: [NOTIFICATIONS.md](./docs/NOTIFICATIONS.md).**
|
|
610
451
|
|
|
611
|
-
|
|
612
|
-
event toggles and the throttle are set **once**, and each destination either inherits them or carries
|
|
613
|
-
its own. Rate-limited per destination, server *and* reason. Bot tokens and webhook credentials stay in
|
|
614
|
-
the secrets file, never in a config. **Two minutes of setup:
|
|
615
|
-
[NOTIFICATIONS.md](./docs/NOTIFICATIONS.md).**
|
|
452
|
+
## 🌐 Dynamic DNS
|
|
616
453
|
|
|
617
|
-
|
|
454
|
+
**Workspace settings → Dynamic DNS** keeps hostnames pointed at this machine's public IP: add an
|
|
455
|
+
account, paste credentials, add hostnames. A provider is called only when the address changed, and a
|
|
456
|
+
permanent refusal (bad credentials) stops retrying until you fix it. **[DDNS.md](./docs/DDNS.md).**
|
|
618
457
|
|
|
619
|
-
##
|
|
458
|
+
## 🔀 Reverse proxy
|
|
620
459
|
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
Provider tokens stay in the workspace's secrets file. **Providers and the config shape:
|
|
625
|
-
[DDNS.md](./docs/DDNS.md).**
|
|
460
|
+
One Caddy engine in front of everything, installed and supervised by the panel, with automatic HTTPS
|
|
461
|
+
(or your own certificates): route a hostname to any server, to an external address, or to the panel.
|
|
462
|
+
**[REVERSE_PROXY.md](./docs/REVERSE_PROXY.md).**
|
|
626
463
|
|
|
627
464
|
---
|
|
628
465
|
|
|
629
466
|
## 💾 Backups
|
|
630
467
|
|
|
631
468
|
**Global settings → Backups** takes one `.zip` of the panel and the workspaces you pick — settings,
|
|
632
|
-
servers, secrets, declared data —
|
|
633
|
-
|
|
634
|
-
Both directions are **two-level**: pick whole workspaces, or open one and drop any single piece (its
|
|
635
|
-
settings, servers, secrets, or one data directory). Each secret has its own tick.
|
|
469
|
+
servers, secrets, declared data — plain or AES-256, and puts it back.
|
|
636
470
|
|
|
637
471
|
```bash
|
|
638
|
-
home-hosted backup create --all --confirm
|
|
472
|
+
home-hosted backup create --all --confirm
|
|
639
473
|
home-hosted backup create --all --exclude global:secrets --confirm
|
|
640
|
-
home-hosted backup restore <name> --all --confirm
|
|
474
|
+
home-hosted backup restore <name> --all --confirm
|
|
641
475
|
home-hosted backup restore --from /media/usb/x.zip --all --confirm
|
|
642
476
|
```
|
|
643
477
|
|
|
644
|
-
Both work with the panel **stopped**, which is when you
|
|
645
|
-
|
|
646
|
-
<details>
|
|
647
|
-
<summary><b>⏱️ Automatic backups, and choosing what they contain</b></summary>
|
|
648
|
-
|
|
649
|
-
A schedule writes one archive every N hours, with its own retention (`Keep automatic`). The two counts
|
|
650
|
-
are independent: `Keep` bounds the ones you take by hand, and a scheduled pass never prunes yours to
|
|
651
|
-
make room. Automatic archives are named `auto-…` so you can tell them apart.
|
|
652
|
-
|
|
653
|
-
**What it contains** is yours to choose, in the same two-level dialog, saved into the schedule as
|
|
654
|
-
`scope`:
|
|
655
|
-
|
|
656
|
-
| Mode | Carries | CLI spelling |
|
|
657
|
-
| --- | --- | --- |
|
|
658
|
-
| **Everything** *(default)* | every workspace, plus `includePaths` | *no flag* |
|
|
659
|
-
| **Only these** | only what you tick | `--include <ids>` |
|
|
660
|
-
| **Everything except** | everything but what you tick, **including workspaces you add later** | `--all --exclude <ids>` |
|
|
661
|
-
|
|
662
|
-
Only **Everything** follows a workspace you add tomorrow — a stored list names today's ids. Ticking
|
|
663
|
-
everything in the dialog is therefore saved as *no scope*, not as the list it currently amounts to.
|
|
664
|
-
An empty selection is refused, because it cannot be told apart from "everything" in the file.
|
|
665
|
-
|
|
666
|
-
Generated directories (`node_modules`, `dist`, `.next`, framework caches) are skipped per entry;
|
|
667
|
-
`backupIgnoreGenerated: false` captures them anyway.
|
|
668
|
-
|
|
669
|
-
</details>
|
|
670
|
-
|
|
671
|
-
<details>
|
|
672
|
-
<summary><b>🔑 Restoring a secret, and what not to restore</b></summary>
|
|
673
|
-
|
|
674
|
-
An archive records the release and config schema that wrote it. A restore refuses a **newer** schema
|
|
675
|
-
outright rather than restoring the parts it recognizes, and **lifts an older one** through the same
|
|
676
|
-
migrations `home-hosted migrate` would run — the archive you take before an upgrade is the one you
|
|
677
|
-
reach for afterwards, so its configs are brought to this release's shape as they are written back.
|
|
678
|
-
|
|
679
|
-
Ticking a **single secret** merges by field — restoring the Telegram token leaves the DDNS
|
|
680
|
-
credentials alone. Ticking the whole **Secrets** entry replaces that file with the archive's copy.
|
|
681
|
-
|
|
682
|
-
Two things to know before restoring onto a machine already in use:
|
|
683
|
-
|
|
684
|
-
- **The password hash and API token hash are secrets too.** Restoring them reinstates the old
|
|
685
|
-
machine's password and long-lived token, so whoever holds that token keeps access. Leave them
|
|
686
|
-
unticked, or rotate afterwards.
|
|
687
|
-
- **`HHOSTED_DDNS_SECRET` is not in the archive.** DDNS credentials travel sealed under it, so a host
|
|
688
|
-
with a different value cannot open them. Supply the same secret, or re-enter the credentials.
|
|
689
|
-
|
|
690
|
-
</details>
|
|
478
|
+
Both work with the panel **stopped**, which is when you usually need them.
|
|
691
479
|
|
|
692
480
|
<details>
|
|
693
481
|
<summary><b>🚚 One archive is a whole setup</b></summary>
|
|
694
482
|
|
|
695
|
-
Start a **blank** home-hosted anywhere
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
Path matching is by **declaration** (`omniroute:DATA_DIR`), not by an absolute path from the source
|
|
701
|
-
machine. A declaration using `{projectDir}`, `{dataRoot}` or `{home}` follows the restoring panel; a
|
|
702
|
-
literal absolute path is restored to that same path.
|
|
703
|
-
|
|
704
|
-
**A restore never writes where no config declares, and never across workspaces.** A data path is only
|
|
705
|
-
placed under a workspace the archive says it belongs to — if that workspace's `servers.config.json` is
|
|
706
|
-
not part of the restore, its data is reported as skipped rather than guessed at.
|
|
707
|
-
|
|
708
|
-
**A declared path is the capture boundary.** A symlink *inside* a declared directory that resolves
|
|
709
|
-
outside it is left out of the archive rather than followed, so a `media -> /mnt/nas` link does not
|
|
710
|
-
silently pull a share you never declared into every backup. A link that stays inside is captured once,
|
|
711
|
-
under the first name the walk reaches it by, and a declared path that is *itself* a symlink is
|
|
712
|
-
captured through. File permission bits travel: a `0600` key comes back `0600`, a `0700` directory
|
|
713
|
-
`0700`, a `0755` script executable — a backup must not widen access to what it was taken to protect.
|
|
483
|
+
Start a **blank** home-hosted anywhere, upload the archive, restore: workspaces come back, data lands
|
|
484
|
+
where *this* machine's config says (`{projectDir}`, `{home}` follow the new host), and `autostart`
|
|
485
|
+
entries come up. A restore never writes where no config declares. Older archives are migrated on the
|
|
486
|
+
way in; archives from a newer release are refused.
|
|
714
487
|
|
|
715
488
|
</details>
|
|
716
489
|
|
|
717
490
|
<details>
|
|
718
|
-
<summary><b
|
|
491
|
+
<summary><b>⏱️ Schedules, and what not to restore</b></summary>
|
|
719
492
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
| DDNS hostnames and their accounts | ✅ | Credentials only open under the same `HHOSTED_DDNS_SECRET`; otherwise re-enter them |
|
|
728
|
-
| Panel password and API token | ⬜ ticked per secret | Leave unticked, or rotate with `home-hosted set-token --generate` |
|
|
729
|
-
| Reverse-proxy routes | ✅ | Automatic HTTPS certificates are reissued on the new host. A pair **you uploaded** for a `tls: "manual"` route is not in the archive — re-upload it |
|
|
730
|
-
| Reverse-proxy engine binary | ❌ | Installed again from *Global settings → Reverse proxy* |
|
|
731
|
-
| Server logs, crash history, nanny state | ❌ | These describe the old box; the new one starts a fresh history |
|
|
732
|
-
| A server's `envFile` | ❌ not archived | It is the machine-local layer by design — copy it yourself, or declare its directory in `backupPaths` |
|
|
733
|
-
| Environment variables the panel runs with | ❌ | `HHOSTED_*`, `HHOSTED_DDNS_SECRET`, and anything a `${ENV}` placeholder needs |
|
|
734
|
-
|
|
735
|
-
</details>
|
|
736
|
-
|
|
737
|
-
<details>
|
|
738
|
-
<summary><b>⚠️ A backup of a running database may not be restorable</b></summary>
|
|
493
|
+
- A schedule writes an `auto-…` archive every N hours with its own retention, and never prunes the
|
|
494
|
+
ones you took by hand.
|
|
495
|
+
- Pick per item: whole workspaces, or one secret, one data directory.
|
|
496
|
+
- **The password and token hashes are secrets too** — restoring them reinstates the old machine's
|
|
497
|
+
credentials. Leave `global:secrets` unticked, or rotate afterwards.
|
|
498
|
+
- **A live database copied file by file can be torn.** Stop it around the backup, or declare
|
|
499
|
+
`dump`/`load` hooks so the engine writes the backup itself.
|
|
739
500
|
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
Fine for files, uploads and most app data. **Not** a consistent snapshot of a live database: SQLite
|
|
744
|
-
mid-transaction, a Postgres data directory, or a WAL mid-write can be captured torn, and the copy will
|
|
745
|
-
look complete while failing to open.
|
|
746
|
-
|
|
747
|
-
For anything with a real database, do one of these first:
|
|
748
|
-
|
|
749
|
-
- **Quiesce it** — stop that entry, take the backup, start it again; or
|
|
750
|
-
- **dump it properly** (`sqlite3 app.db ".backup out.db"`, `pg_dump`, `mysqldump`) into a directory you
|
|
751
|
-
declare in `backupPaths`, so the archive carries the dump rather than the live files.
|
|
752
|
-
|
|
753
|
-
**Restoring** has the mirror-image hazard, and the plan names it: a data path copied over while its
|
|
754
|
-
server is running is replaced under a live process, which keeps its old view and loses what it wrote
|
|
755
|
-
since. The restore reports those entries — `Data was replaced under a running server` — and the fix is
|
|
756
|
-
to stop them before applying, or stop and start each one.
|
|
501
|
+
That is the whole of what you have to decide before ticking a box. What an id selects, how retention
|
|
502
|
+
counts, which paths follow a new host: [BACKUPS.md](./docs/BACKUPS.md).
|
|
757
503
|
|
|
758
504
|
</details>
|
|
759
505
|
|
|
760
|
-
|
|
761
506
|
---
|
|
762
507
|
|
|
763
508
|
## 🎨 Bring your own UI (BYOU)
|
|
764
509
|
|
|
765
|
-
The panel
|
|
766
|
-
|
|
767
|
-
stock
|
|
768
|
-
|
|
769
|
-
Two ship in this repo: `uis/stock`, and `uis/noc-console` for TUI and shortcuts wizards; a release
|
|
770
|
-
attaches both as `home-hosted-ui-<name>.zip`. Yours can be anything that compiles to static files —
|
|
771
|
-
the server never cares what built it.
|
|
772
|
-
|
|
773
|
-
<sub>Install a UI from the CLI: `home-hosted ui-switch --asset noc-console` selects a UI directly, and
|
|
774
|
-
with no flags it lists the official assets to pick from. An official UI is switched to the version
|
|
775
|
-
that matches your panel when you update `home-hosted`. For unofficial UIs, `home-hosted ui-update`
|
|
776
|
-
offers their newer releases — or `--old` for older ones (the author sets up `ui.json` and GitHub
|
|
777
|
-
releases).</sub>
|
|
510
|
+
The panel serves whatever static site is in `$HHOSTED_HOME/.hh/.ui`. **Global settings → Interface**
|
|
511
|
+
takes a zip, `home-hosted ui-switch --asset noc-console` installs the NOC console from a release, and
|
|
512
|
+
`home-hosted ui-revert` brings back the stock UI if yours breaks.
|
|
778
513
|
|
|
779
514
|
<details>
|
|
780
|
-
<summary><b>🤖
|
|
781
|
-
|
|
782
|
-
The whole contract fits in one file, so a coding agent can do this. Point it at this repo and be
|
|
783
|
-
specific:
|
|
515
|
+
<summary><b>🤖 Have an agent build the UI you actually want</b></summary>
|
|
784
516
|
|
|
785
|
-
> Help me build a UI for `home-hosted`: nostalgic game theme,
|
|
517
|
+
> Help me build a UI for `home-hosted`: a nostalgic game theme — servers as a party menu, health as HP
|
|
518
|
+
> bars, logs in a text box. Follow `docs/UI_CREATION.md` and `docs/API.md`.
|
|
786
519
|
|
|
787
|
-
[UI_CREATION.md](./docs/UI_CREATION.md)
|
|
520
|
+
[UI_CREATION.md](./docs/UI_CREATION.md) is the contract: install, `ui.json`, the rules of the road and
|
|
521
|
+
a checklist.
|
|
788
522
|
|
|
789
523
|
</details>
|
|
790
524
|
|
|
@@ -793,110 +527,66 @@ specific:
|
|
|
793
527
|
## ❓ FAQ
|
|
794
528
|
|
|
795
529
|
<details>
|
|
796
|
-
<summary><b>
|
|
797
|
-
|
|
798
|
-
`home-hosted logs` prints the panel's own console output — what it is doing, and anything it could
|
|
799
|
-
not finish:
|
|
530
|
+
<summary><b>Something is wrong — where do I look?</b></summary>
|
|
800
531
|
|
|
801
532
|
```bash
|
|
802
|
-
home-hosted
|
|
803
|
-
home-hosted logs --follow #
|
|
804
|
-
home-hosted logs
|
|
805
|
-
home-hosted
|
|
533
|
+
home-hosted status # the overview
|
|
534
|
+
home-hosted logs --follow # the panel's own console — works even when the panel is wedged
|
|
535
|
+
home-hosted logs web # one server's log (-w <workspace> for another workspace)
|
|
536
|
+
home-hosted usage # what is eating the machine
|
|
806
537
|
```
|
|
807
538
|
|
|
808
|
-
It reads the same file `status` names, and needs no session or API token — a panel answering badly is
|
|
809
|
-
exactly when you cannot get one. `up` prints the tail when the panel fails to start.
|
|
810
|
-
|
|
811
539
|
</details>
|
|
812
540
|
|
|
813
541
|
<details>
|
|
814
|
-
<summary><b>
|
|
542
|
+
<summary><b>What happens to my servers when the panel stops?</b></summary>
|
|
543
|
+
|
|
544
|
+
`down`, `SIGTERM` and `SIGINT` stop every server the panel started. `persistent` entries keep running
|
|
545
|
+
under their **nanny** (the small supervisor described [above](#-features)) and are re-attached by the
|
|
546
|
+
next panel; `down --with-persistent` stops them too.
|
|
815
547
|
|
|
816
|
-
|
|
817
|
-
|
|
548
|
+
Being **killed** is the other case: a panel that dies hard cannot stop anything, so its servers keep
|
|
549
|
+
running and the next panel adopts them — [SERVERS.md](./docs/SERVERS.md#orphaned-processes).
|
|
818
550
|
|
|
819
551
|
</details>
|
|
820
552
|
|
|
821
553
|
<details>
|
|
822
|
-
<summary><b>
|
|
823
|
-
|
|
824
|
-
`home-hosted down` stops them — that is the point of the command. `SIGTERM`/`SIGINT` are handled
|
|
825
|
-
the same way: every supervised process tree is stopped before the panel exits.
|
|
554
|
+
<summary><b>Is it a systemd replacement?</b></summary>
|
|
826
555
|
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
([SERVERS.md](./docs/SERVERS.md#persistent-entries)). Add `--with-persistent` to stop those too —
|
|
830
|
-
with the panel up or after it has already gone, since each nanny's state file is enough.
|
|
556
|
+
No — keep systemd for the panel itself and for system services; use home-hosted for what you run
|
|
557
|
+
yourself.
|
|
831
558
|
|
|
832
559
|
</details>
|
|
833
560
|
|
|
834
561
|
<details>
|
|
835
|
-
<summary><b>
|
|
562
|
+
<summary><b>Which ports does it use?</b></summary>
|
|
836
563
|
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
([SERVERS.md](./docs/SERVERS.md#a-busy-port)). The control port itself is checked before the listener is
|
|
840
|
-
opened.
|
|
564
|
+
The panel: `3999` (`--port` or `control.port`). Your servers: the ports you give them. The reverse
|
|
565
|
+
proxy, only when enabled: `80`/`443`, or `4480`/`4443` unprivileged with your router forwarding.
|
|
841
566
|
|
|
842
567
|
</details>
|
|
843
568
|
|
|
844
569
|
<details>
|
|
845
|
-
<summary><b>
|
|
846
|
-
|
|
847
|
-
`$HHOSTED_HOME/.hh`, default `~/.home-hosted/.hh`. Global files at the top level, one directory per
|
|
848
|
-
workspace:
|
|
849
|
-
|
|
850
|
-
```text
|
|
851
|
-
settings.json panel-wide: listener, auth, TLS policy, host vitals, backups
|
|
852
|
-
workspaces.json the registry: ids and labels, in selector order
|
|
853
|
-
.control-secrets.json password hash + API token hash (mode 0600)
|
|
854
|
-
.tls/ an uploaded PEM pair
|
|
855
|
-
.ui/ an installed custom UI
|
|
856
|
-
.backups/ zip archives
|
|
857
|
-
.logs/ the panel's own console log
|
|
858
|
-
.proxy/ the reverse proxy's engine, its config and state
|
|
859
|
-
run.json the running panel (pid, url, token, mode 0600)
|
|
860
|
-
|
|
861
|
-
<workspace>/settings.json server defaults, log retention, notifications, DDNS
|
|
862
|
-
<workspace>/servers.config.json your servers, plus meta: which release and schema wrote it
|
|
863
|
-
<workspace>/.secrets.json Telegram token + DDNS credentials (mode 0600)
|
|
864
|
-
<workspace>/.logs/ per-server logs: <id>.log, rotated to <id>.log.1 … (newest first)
|
|
865
|
-
<workspace>/.state/ nanny state, the last detached child (<id>.run.json) and ddns.json
|
|
866
|
-
```
|
|
570
|
+
<summary><b>I reach the panel through Cloudflare Tunnel / nginx on a public name and get <code>421</code></b></summary>
|
|
867
571
|
|
|
868
|
-
`
|
|
572
|
+
Add that name to `control.allowedHosts` in `.hh/settings.json` (or **Global settings → Listener**,
|
|
573
|
+
reached by IP). IPs and local names never need it.
|
|
869
574
|
|
|
870
575
|
</details>
|
|
871
576
|
|
|
872
577
|
<details>
|
|
873
|
-
<summary><b>
|
|
874
|
-
|
|
875
|
-
The control panel, `3999` by default. Supervised servers use the ports you give them. The reverse
|
|
876
|
-
proxy is the one panel-wide listener, and only when you switch it on: `80`/`443` for automatic HTTPS,
|
|
877
|
-
or `4480`/`4443` unprivileged with your router forwarding to them
|
|
878
|
-
([REVERSE_PROXY.md](./docs/REVERSE_PROXY.md#ports)).
|
|
578
|
+
<summary><b>Where is my state?</b></summary>
|
|
879
579
|
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
adopts the process that replaced it; an unrelated listener is never signalled
|
|
883
|
-
([SERVERS.md](./docs/SERVERS.md#a-busy-port)).
|
|
580
|
+
`~/.home-hosted/.hh` (or `$HHOSTED_HOME/.hh`) — see [What lives where](#-workspaces). `home-hosted status`
|
|
581
|
+
prints every path.
|
|
884
582
|
|
|
885
583
|
</details>
|
|
886
584
|
|
|
887
585
|
<details>
|
|
888
586
|
<summary><b>Windows support, really?</b></summary>
|
|
889
587
|
|
|
890
|
-
Yes
|
|
891
|
-
|
|
892
|
-
expose them to an unprivileged process. Adopting a self-restarted process works on Windows too, off
|
|
893
|
-
its argv instead of the environment marker; a launcher whose real process is a `.cmd` shim is the one
|
|
894
|
-
case it cannot see through, and `kill` is the answer there.
|
|
895
|
-
|
|
896
|
-
A config edited in Notepad or PowerShell is read as it is: the byte-order mark Notepad's "UTF-8 with
|
|
897
|
-
BOM" adds, and the UTF-16 that `>` and `Out-File` write, are both understood. A `command` naming a
|
|
898
|
-
project dependency resolves to the `.cmd`/`.exe` shim under `node_modules/.bin` rather than the
|
|
899
|
-
`#!/bin/sh` script beside it.
|
|
588
|
+
Yes: process trees from Win32_Process, `taskkill` for stopping, `.cmd` shims resolved in
|
|
589
|
+
`node_modules/.bin`, and configs saved by Notepad or PowerShell (BOM, UTF-16) read as-is.
|
|
900
590
|
|
|
901
591
|
</details>
|
|
902
592
|
|
|
@@ -904,46 +594,47 @@ project dependency resolves to the `.cmd`/`.exe` shim under `node_modules/.bin`
|
|
|
904
594
|
|
|
905
595
|
## 🗂 Working on it
|
|
906
596
|
|
|
907
|
-
```
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
bin/ the published entry point
|
|
913
|
-
docs/branding/ logo, icons and the social preview; the SVGs are the source, `pnpm run brand` renders them
|
|
914
|
-
docs/ topic docs, UI examples and the README's media
|
|
915
|
-
scripts/ builds, typechecks, media capture, release helpers
|
|
916
|
-
test/ the vitest suite
|
|
597
|
+
```bash
|
|
598
|
+
pnpm install
|
|
599
|
+
pnpm dev # panel :6000 + stock UI dev server :6001, state in .dev-state/ (password: dev)
|
|
600
|
+
pnpm run check:fast # while working: lint/types (cached) + only the tests your changes reach
|
|
601
|
+
pnpm run check # before pushing: lint, types, doc links and the full suite with coverage
|
|
917
602
|
```
|
|
918
603
|
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
604
|
+
```text
|
|
605
|
+
src/ the panel. Top level: app.ts (Hono root), cli.ts, index.ts (all wiring),
|
|
606
|
+
client.ts (the published client), openapi.ts + openapi-reference.ts.
|
|
607
|
+
Then one directory per layer:
|
|
608
|
+
cli/ (one module per command) api/ (one route factory per URL group)
|
|
609
|
+
services/ (stateful) providers/ (OS/vendor leaves, plain data)
|
|
610
|
+
config/ (stores, parsing, migrations) middleware/ (host, auth, loopback)
|
|
611
|
+
helpers/ (cross-layer utilities) shared/ (schemas + code the UIs import too;
|
|
612
|
+
no Vue, no node:)
|
|
613
|
+
uis/ stock (ships in the package) and noc-console — Vite + Vue, static output.
|
|
614
|
+
Shared by both: vite.shared.ts (config, aliases, dev proxy) and tap-targets.css
|
|
615
|
+
test/ vitest; one directory per src/ layer, plus support/ (harnesses), fixtures/
|
|
616
|
+
and scripts/ (tests that drive a script in scripts/)
|
|
617
|
+
docs/ user docs, mockups/, media/, branding/, demo/
|
|
618
|
+
scripts/ build, release and check helpers — quickcheck.mjs is the gate
|
|
619
|
+
.agentDocs/ internals docs for agents; not published
|
|
620
|
+
bin/ the published `home-hosted` / `hh` entry point
|
|
621
|
+
```
|
|
926
622
|
|
|
927
623
|
| if you want to… | read |
|
|
928
624
|
| --- | --- |
|
|
929
625
|
| declare a server: every field, placeholders, port conflicts | [SERVERS.md](./docs/SERVERS.md) |
|
|
930
|
-
|
|
|
931
|
-
|
|
|
932
|
-
|
|
|
933
|
-
|
|
|
934
|
-
|
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
- [dsh-home-hosted](https://github.com/NamesMT/dsh-home-hosted) — home-hosted servers management with boot autostart from inside [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
943
|
-
|
|
944
|
-
<sub><i>+ PR to add yours</i></sub>
|
|
945
|
-
|
|
946
|
-
---
|
|
626
|
+
| drive it from code: endpoints, SSE, errors, metrics | [API.md](./docs/API.md) |
|
|
627
|
+
| every CLI command and what `status` means | [CLI.md](./docs/CLI.md) |
|
|
628
|
+
| backups and restores in depth | [BACKUPS.md](./docs/BACKUPS.md) |
|
|
629
|
+
| hostnames and HTTPS | [REVERSE_PROXY.md](./docs/REVERSE_PROXY.md) · [DDNS.md](./docs/DDNS.md) |
|
|
630
|
+
| alerts | [NOTIFICATIONS.md](./docs/NOTIFICATIONS.md) |
|
|
631
|
+
| the security model | [SECURITY.md](./docs/SECURITY.md) |
|
|
632
|
+
| build a UI | [UI_CREATION.md](./docs/UI_CREATION.md) |
|
|
633
|
+
| change the internals | [AGENTS.md](https://github.com/NamesMT/home-hosted/blob/main/AGENTS.md) |
|
|
634
|
+
|
|
635
|
+
**Built on home-hosted:** [dsh-home-hosted](https://github.com/NamesMT/dsh-home-hosted) — server
|
|
636
|
+
management with boot autostart inside [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness).
|
|
637
|
+
<sub>PRs to add yours are welcome.</sub>
|
|
947
638
|
|
|
948
639
|
<div align="center">
|
|
949
640
|
|