home-hosted 0.13.0 → 0.20.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 +117 -322
- package/bin/home-hosted.mjs +41 -0
- package/dist/chunks/account-DiLrSyww.js +359 -0
- package/dist/chunks/account-DiLrSyww.js.map +1 -0
- package/dist/chunks/add-DEIYVkNK.js +183 -0
- package/dist/chunks/add-DEIYVkNK.js.map +1 -0
- package/dist/chunks/{archive-DP-XQR8X.js → archive-DFi3qK1c.js} +25 -73
- package/dist/chunks/archive-DFi3qK1c.js.map +1 -0
- package/dist/chunks/{atomic-C1PfJpE7.js → atomic-SZUwDtGD.js} +3 -6
- package/dist/chunks/atomic-SZUwDtGD.js.map +1 -0
- package/dist/chunks/{backup-CZcVca2a.js → backup-DnyxIzw0.js} +110 -190
- package/dist/chunks/backup-DnyxIzw0.js.map +1 -0
- package/dist/chunks/backups-BrrN6cwW.js +2203 -0
- package/dist/chunks/backups-BrrN6cwW.js.map +1 -0
- package/dist/chunks/bind-DIxrnUst.js +43 -0
- package/dist/chunks/bind-DIxrnUst.js.map +1 -0
- package/dist/chunks/config-text-DxMOQQnk.js +34 -0
- package/dist/chunks/config-text-DxMOQQnk.js.map +1 -0
- package/dist/chunks/{contracts-CMBD1TF9.js → contracts-CxZ7u1L3.js} +1239 -1454
- package/dist/chunks/contracts-CxZ7u1L3.js.map +1 -0
- package/dist/chunks/daemon-BAAYUYQC.js +211 -0
- package/dist/chunks/daemon-BAAYUYQC.js.map +1 -0
- package/dist/chunks/daemon-log-Ccu-69vB.js +179 -0
- package/dist/chunks/daemon-log-Ccu-69vB.js.map +1 -0
- package/dist/chunks/deploy-CggSOEkq.js +144 -0
- package/dist/chunks/deploy-CggSOEkq.js.map +1 -0
- package/dist/chunks/{docker-Cy9Lyvda.js → docker--Un0uLfF.js} +32 -68
- package/dist/chunks/docker--Un0uLfF.js.map +1 -0
- package/dist/chunks/{down-pKbGCW9d.js → down-CpIN7LEQ.js} +34 -94
- package/dist/chunks/down-CpIN7LEQ.js.map +1 -0
- package/dist/chunks/exposure-CDJNvOCK.js +229 -0
- package/dist/chunks/exposure-CDJNvOCK.js.map +1 -0
- package/dist/chunks/import-Bd4VZH0f.js +205 -0
- package/dist/chunks/import-Bd4VZH0f.js.map +1 -0
- package/dist/chunks/import-plan--fDS_l5r.js +147 -0
- package/dist/chunks/import-plan--fDS_l5r.js.map +1 -0
- package/dist/chunks/import-write-BTfbeV26.js +42 -0
- package/dist/chunks/import-write-BTfbeV26.js.map +1 -0
- package/dist/chunks/{init-BZ7hK9Vf.js → init-Bv3oH65x.js} +14 -50
- package/dist/chunks/init-Bv3oH65x.js.map +1 -0
- package/dist/chunks/job-CYOdN6Ub.js +341 -0
- package/dist/chunks/job-CYOdN6Ub.js.map +1 -0
- package/dist/chunks/jobs-BX4ahcfh.js +489 -0
- package/dist/chunks/jobs-BX4ahcfh.js.map +1 -0
- package/dist/chunks/last-stop-DD3lHwo_.js +42 -0
- package/dist/chunks/last-stop-DD3lHwo_.js.map +1 -0
- package/dist/chunks/layout-D0ysDNav.js +18 -0
- package/dist/chunks/layout-D0ysDNav.js.map +1 -0
- package/dist/chunks/lazy-kfcBNeqj.js +48 -0
- package/dist/chunks/lazy-kfcBNeqj.js.map +1 -0
- package/dist/chunks/log-buffer-B7jmn7ts.js +110 -0
- package/dist/chunks/log-buffer-B7jmn7ts.js.map +1 -0
- package/dist/chunks/log-files-CZL2UhuE.js +488 -0
- package/dist/chunks/log-files-CZL2UhuE.js.map +1 -0
- package/dist/chunks/{logger-B5U4GD3j.js → logger-BnrKTBHQ.js} +2 -6
- package/dist/chunks/logger-BnrKTBHQ.js.map +1 -0
- package/dist/chunks/{logs---TI_bxM.js → logs-DxKI6OW2.js} +23 -73
- package/dist/chunks/logs-DxKI6OW2.js.map +1 -0
- package/dist/chunks/ls-BseUHy_m.js +128 -0
- package/dist/chunks/ls-BseUHy_m.js.map +1 -0
- package/dist/chunks/migrate-D4w_dXDm.js +268 -0
- package/dist/chunks/migrate-D4w_dXDm.js.map +1 -0
- package/dist/chunks/{nanny-B-Eu0sFW.js → nanny-BWh7nuvv.js} +21 -14
- package/dist/chunks/nanny-BWh7nuvv.js.map +1 -0
- package/dist/chunks/{nanny-ChMtq1Zl.js → nanny-BjF2-1pv.js} +3 -3
- package/dist/chunks/{nanny-ChMtq1Zl.js.map → nanny-BjF2-1pv.js.map} +1 -1
- package/dist/chunks/nanny-DGTXVq5d.js +806 -0
- package/dist/chunks/nanny-DGTXVq5d.js.map +1 -0
- package/dist/chunks/{nanny-sweep-DErnlPY1.js → nanny-sweep-hjmZ_p7S.js} +14 -24
- package/dist/chunks/nanny-sweep-hjmZ_p7S.js.map +1 -0
- package/dist/chunks/{nearest-6KgQEDUe.js → nearest-DOx4jySJ.js} +2 -10
- package/dist/chunks/nearest-DOx4jySJ.js.map +1 -0
- package/dist/chunks/{parse-DhmG26fI.js → parse-DVMPLUDe.js} +47 -72
- package/dist/chunks/parse-DVMPLUDe.js.map +1 -0
- package/dist/chunks/password-policy-Clq6PGE-.js +9 -0
- package/dist/chunks/password-policy-Clq6PGE-.js.map +1 -0
- package/dist/chunks/{paths-CGlGDrOU.js → paths-C34-TJLh.js} +32 -56
- package/dist/chunks/paths-C34-TJLh.js.map +1 -0
- package/dist/chunks/{port-B8WBTRMk.js → port-CnsrxKNR.js} +27 -71
- package/dist/chunks/port-CnsrxKNR.js.map +1 -0
- package/dist/chunks/process-CboOFPU_.js +192 -0
- package/dist/chunks/process-CboOFPU_.js.map +1 -0
- package/dist/chunks/{restart-Des4DrAN.js → restart-C0J8dZ2L.js} +11 -29
- package/dist/chunks/restart-C0J8dZ2L.js.map +1 -0
- package/dist/chunks/run-deploy-DoNDvwT4.js +91 -0
- package/dist/chunks/run-deploy-DoNDvwT4.js.map +1 -0
- package/dist/chunks/{schema-B240VXcV.js → schema-CZ6f-PHD.js} +7 -20
- package/dist/chunks/schema-CZ6f-PHD.js.map +1 -0
- package/dist/chunks/secret-MY397r90.js +219 -0
- package/dist/chunks/secret-MY397r90.js.map +1 -0
- package/dist/chunks/secrets-CG5N4lwY.js +1061 -0
- package/dist/chunks/secrets-CG5N4lwY.js.map +1 -0
- package/dist/chunks/server-Dm_dXfTW.js +255 -0
- package/dist/chunks/server-Dm_dXfTW.js.map +1 -0
- package/dist/chunks/server-attention-UQwYXqKe.js +10 -0
- package/dist/chunks/server-attention-UQwYXqKe.js.map +1 -0
- package/dist/chunks/server-create-D7nvhgBd.js +96 -0
- package/dist/chunks/server-create-D7nvhgBd.js.map +1 -0
- package/dist/chunks/server-ids-BEQD2rFz.js +23 -0
- package/dist/chunks/server-ids-BEQD2rFz.js.map +1 -0
- package/dist/chunks/server-vars-DMYmHutL.js +27 -0
- package/dist/chunks/server-vars-DMYmHutL.js.map +1 -0
- package/dist/chunks/service-C8l-ewNA.js +585 -0
- package/dist/chunks/service-C8l-ewNA.js.map +1 -0
- package/dist/chunks/{settings-xu-XTfWg.js → settings-CtYDs5PX.js} +62 -78
- package/dist/chunks/settings-CtYDs5PX.js.map +1 -0
- package/dist/chunks/{setup-temp-CAN4_bA-.js → setup-temp-TAtDmMMU.js} +43 -37
- package/dist/chunks/setup-temp-TAtDmMMU.js.map +1 -0
- package/dist/chunks/shape-CDGeYl_J.js +9 -0
- package/dist/chunks/shape-CDGeYl_J.js.map +1 -0
- package/dist/chunks/{src-BtWMFmzZ.js → src-BnzkVy_M.js} +12548 -10576
- package/dist/chunks/src-BnzkVy_M.js.map +1 -0
- package/dist/chunks/{status-DT1EsA-B.js → status-efbbfYZQ.js} +53 -26
- package/dist/chunks/status-efbbfYZQ.js.map +1 -0
- package/dist/chunks/store-Bs_Lljjm.js +2082 -0
- package/dist/chunks/store-Bs_Lljjm.js.map +1 -0
- package/dist/chunks/template-xan58bJh.js +28 -0
- package/dist/chunks/template-xan58bJh.js.map +1 -0
- package/dist/chunks/token-DDeWfZA4.js +142 -0
- package/dist/chunks/token-DDeWfZA4.js.map +1 -0
- package/dist/chunks/{ui-D562aqw5.js → ui-BcIAtyxE.js} +68 -79
- package/dist/chunks/ui-BcIAtyxE.js.map +1 -0
- package/dist/chunks/{ui-dir-CsU3uLNV.js → ui-dir-ClCzVRc3.js} +3 -7
- package/dist/chunks/ui-dir-ClCzVRc3.js.map +1 -0
- package/dist/chunks/ui-format-CDvvqOoi.js +53 -0
- package/dist/chunks/ui-format-CDvvqOoi.js.map +1 -0
- package/dist/chunks/{ui-release-DKzVvlLd.js → ui-release-XbJ85pYI.js} +36 -38
- package/dist/chunks/ui-release-XbJ85pYI.js.map +1 -0
- package/dist/chunks/{ui-revert-EkBBwRTt.js → ui-revert-Dgawq7ze.js} +4 -4
- package/dist/chunks/ui-revert-Dgawq7ze.js.map +1 -0
- package/dist/chunks/{ui-switch-BnZTdMDd.js → ui-switch-CfQMbZ0g.js} +31 -38
- package/dist/chunks/ui-switch-CfQMbZ0g.js.map +1 -0
- package/dist/chunks/{ui-update-_xryLYxw.js → ui-update-B3PPivUm.js} +30 -48
- package/dist/chunks/ui-update-B3PPivUm.js.map +1 -0
- package/dist/chunks/ui-update-CAiH2tFb.js +109 -0
- package/dist/chunks/ui-update-CAiH2tFb.js.map +1 -0
- package/dist/chunks/{up-Pdz-l6IH.js → up-BQSnYxYd.js} +47 -53
- package/dist/chunks/up-BQSnYxYd.js.map +1 -0
- package/dist/chunks/{usage-DFrCVXpT.js → usage-KG8TeOio.js} +7 -20
- package/dist/chunks/usage-KG8TeOio.js.map +1 -0
- package/dist/chunks/{workspaces-DYcfvKV_.js → workspaces-D9akpzU8.js} +80 -68
- package/dist/chunks/workspaces-D9akpzU8.js.map +1 -0
- package/dist/chunks/{wsl-temperature-BiCI4iK6.js → wsl-temperature-D-_d4Yk1.js} +47 -42
- package/dist/chunks/wsl-temperature-D-_d4Yk1.js.map +1 -0
- package/dist/cli.js +306 -238
- package/dist/cli.js.map +1 -1
- package/dist/client.js +76 -29
- package/dist/client.js.map +1 -1
- package/dist/types/api/acme.d.ts +3 -7
- package/dist/types/api/auth/$.routes.d.ts +107 -16
- package/dist/types/api/backups.d.ts +5 -5
- package/dist/types/api/control.d.ts +747 -38
- package/dist/types/api/ddns.d.ts +13 -18
- package/dist/types/api/events.d.ts +9 -3
- package/dist/types/api/health.d.ts +2 -4
- package/dist/types/api/jobs.d.ts +438 -0
- package/dist/types/api/logs.d.ts +20 -0
- package/dist/types/api/metrics.d.ts +2 -5
- package/dist/types/api/notifications.d.ts +3 -6
- package/dist/types/api/proxy.d.ts +63 -23
- package/dist/types/api/server-ops.d.ts +17 -0
- package/dist/types/api/servers/$.routes.d.ts +418 -186
- package/dist/types/api/session-required.d.ts +16 -0
- package/dist/types/api/settings.d.ts +7 -7
- package/dist/types/api/state.d.ts +100 -10
- package/dist/types/api/static.d.ts +2 -2
- package/dist/types/api/tls.d.ts +2 -5
- package/dist/types/api/workspaces/$.routes.d.ts +186 -12
- package/dist/types/api/wsl-temperature.d.ts +4 -10
- package/dist/types/app.d.ts +4511 -2778
- package/dist/types/cli/account.d.ts +23 -0
- package/dist/types/cli/add.d.ts +96 -0
- package/dist/types/cli/args.d.ts +24 -35
- package/dist/types/cli/backup-offline.d.ts +2 -8
- package/dist/types/cli/backup.d.ts +12 -21
- package/dist/types/cli/down.d.ts +15 -41
- package/dist/types/cli/import-plan.d.ts +55 -0
- package/dist/types/cli/import-write.d.ts +5 -0
- package/dist/types/cli/import.d.ts +86 -0
- package/dist/types/cli/io.d.ts +26 -35
- package/dist/types/cli/job.d.ts +99 -0
- package/dist/types/cli/logs.d.ts +1 -10
- package/dist/types/cli/ls.d.ts +57 -0
- package/dist/types/cli/migrate.d.ts +31 -8
- package/dist/types/cli/nearest.d.ts +1 -9
- package/dist/types/cli/run-deploy.d.ts +36 -0
- package/dist/types/cli/secret.d.ts +90 -0
- package/dist/types/cli/server.d.ts +6 -15
- package/dist/types/cli/service.d.ts +135 -0
- package/dist/types/cli/setup-temp.d.ts +17 -13
- package/dist/types/cli/status.d.ts +7 -1
- package/dist/types/cli/token.d.ts +6 -0
- package/dist/types/cli/ui-switch.d.ts +3 -14
- package/dist/types/cli/ui-update.d.ts +3 -16
- package/dist/types/cli/up.d.ts +9 -22
- package/dist/types/cli/usage.d.ts +2 -6
- package/dist/types/cli.d.ts +1 -10
- package/dist/types/client.d.ts +4099 -1142
- package/dist/types/config/accounts.d.ts +16 -0
- package/dist/types/config/jobs.d.ts +68 -0
- package/dist/types/config/layout.d.ts +2 -8
- package/dist/types/config/migrations.d.ts +9 -41
- package/dist/types/config/parse.d.ts +8 -13
- package/dist/types/config/patch.d.ts +1 -6
- package/dist/types/config/schema.d.ts +16 -18
- package/dist/types/config/secret-parts.d.ts +6 -27
- package/dist/types/config/secrets.d.ts +167 -88
- package/dist/types/config/seed.d.ts +1 -6
- package/dist/types/config/server-ids.d.ts +2 -11
- package/dist/types/config/settings.d.ts +13 -49
- package/dist/types/config/store.d.ts +17 -54
- package/dist/types/config/workspaces.d.ts +24 -56
- package/dist/types/helpers/action-result.d.ts +18 -32
- package/dist/types/helpers/atomic.d.ts +1 -4
- package/dist/types/helpers/backoff.d.ts +0 -1
- package/dist/types/helpers/bind.d.ts +3 -11
- package/dist/types/helpers/config-text.d.ts +4 -19
- package/dist/types/helpers/cookies.d.ts +2 -7
- package/dist/types/helpers/copy-tree.d.ts +4 -12
- package/dist/types/helpers/daemon-log.d.ts +8 -33
- package/dist/types/helpers/daemon.d.ts +20 -70
- package/dist/types/helpers/deferred.d.ts +2 -4
- package/dist/types/helpers/env-file.d.ts +2 -7
- package/dist/types/helpers/error.d.ts +3 -14
- package/dist/types/helpers/event-stream.d.ts +18 -10
- package/dist/types/helpers/factory.d.ts +2 -3
- package/dist/types/helpers/last-stop.d.ts +5 -12
- package/dist/types/helpers/logger.d.ts +1 -5
- package/dist/types/helpers/open.d.ts +0 -1
- package/dist/types/helpers/openapi.d.ts +19 -5
- package/dist/types/helpers/paths.d.ts +18 -53
- package/dist/types/helpers/restore-lock.d.ts +2 -17
- package/dist/types/helpers/runtime.d.ts +3 -13
- package/dist/types/helpers/secret-compare.d.ts +2 -10
- package/dist/types/helpers/server-create.d.ts +15 -0
- package/dist/types/helpers/shell.d.ts +2 -16
- package/dist/types/helpers/sse.d.ts +8 -6
- package/dist/types/helpers/ui-dir.d.ts +1 -5
- package/dist/types/helpers/utf8-chunks.d.ts +2 -8
- package/dist/types/helpers/validate.d.ts +2 -4
- package/dist/types/helpers/validator.d.ts +8 -4
- package/dist/types/helpers/version.d.ts +1 -6
- package/dist/types/helpers/workspace.d.ts +24 -16
- package/dist/types/index.d.ts +2 -3
- package/dist/types/middleware/auth.d.ts +8 -27
- package/dist/types/middleware/body-limit.d.ts +10 -0
- package/dist/types/middleware/host.d.ts +4 -23
- package/dist/types/middleware/loopback.d.ts +1 -8
- package/dist/types/middleware/token-scope.d.ts +34 -0
- package/dist/types/node-compat.d.ts +43 -0
- package/dist/types/openapi-reference.d.ts +4 -19
- package/dist/types/openapi.d.ts +5 -8
- package/dist/types/providers/archive.d.ts +8 -25
- package/dist/types/providers/backup-hook.d.ts +4 -19
- package/dist/types/providers/ddns/dyndns2.d.ts +0 -3
- package/dist/types/providers/ddns/index.d.ts +2 -3
- package/dist/types/providers/ddns/ip.d.ts +2 -12
- package/dist/types/providers/ddns/namecheap-api.d.ts +3 -2
- package/dist/types/providers/ddns/types.d.ts +6 -32
- package/dist/types/providers/ddns/zone.d.ts +1 -4
- package/dist/types/providers/docker.d.ts +18 -45
- package/dist/types/providers/entry-state.d.ts +4 -9
- package/dist/types/providers/health-check.d.ts +1 -5
- package/dist/types/providers/host.d.ts +33 -108
- package/dist/types/providers/identity.d.ts +9 -34
- package/dist/types/providers/log-tail.d.ts +14 -24
- package/dist/types/providers/nanny-sweep.d.ts +8 -25
- package/dist/types/providers/nanny.d.ts +16 -58
- package/dist/types/providers/port.d.ts +28 -83
- package/dist/types/providers/proc.d.ts +22 -80
- package/dist/types/providers/process.d.ts +12 -36
- package/dist/types/providers/proxy/admin.d.ts +11 -0
- package/dist/types/providers/proxy/types.d.ts +4 -16
- package/dist/types/providers/telegram.d.ts +1 -17
- package/dist/types/providers/ui-release.d.ts +15 -25
- package/dist/types/providers/webhook.d.ts +8 -29
- package/dist/types/providers/wsl-temperature.d.ts +13 -22
- package/dist/types/services/acme-challenge.d.ts +2 -16
- package/dist/types/services/auth.d.ts +65 -80
- package/dist/types/services/backups/archive-safety.d.ts +30 -0
- package/dist/types/services/backups/paths.d.ts +31 -0
- package/dist/types/services/backups.d.ts +61 -271
- package/dist/types/services/config-watch.d.ts +3 -15
- package/dist/types/services/control-server.d.ts +6 -10
- package/dist/types/services/ddns.d.ts +12 -13
- package/dist/types/services/dependencies.d.ts +3 -14
- package/dist/types/services/deploy.d.ts +34 -0
- package/dist/types/services/events.d.ts +15 -9
- package/dist/types/services/exposure.d.ts +13 -63
- package/dist/types/services/history.d.ts +5 -14
- package/dist/types/services/host-monitor.d.ts +6 -11
- package/dist/types/services/init.d.ts +5 -35
- package/dist/types/services/job-ledger.d.ts +27 -0
- package/dist/types/services/jobs.d.ts +113 -0
- package/dist/types/services/log-buffer.d.ts +7 -8
- package/dist/types/services/log-files.d.ts +12 -42
- package/dist/types/services/log-relay.d.ts +3 -13
- package/dist/types/services/nanny.d.ts +3 -10
- package/dist/types/services/notifications.d.ts +31 -61
- package/dist/types/services/panel.d.ts +32 -78
- package/dist/types/services/proxy-certificates/certificates.d.ts +31 -69
- package/dist/types/services/proxy-config.d.ts +15 -36
- package/dist/types/services/proxy-dns01.d.ts +14 -0
- package/dist/types/services/proxy.d.ts +73 -254
- package/dist/types/services/scheduler.d.ts +46 -0
- package/dist/types/services/state.d.ts +17 -8
- package/dist/types/services/supervisor/compose.d.ts +2 -6
- package/dist/types/services/supervisor/entry.d.ts +29 -32
- package/dist/types/services/supervisor/health.d.ts +8 -31
- package/dist/types/services/supervisor/job-run.d.ts +36 -0
- package/dist/types/services/supervisor/output.d.ts +13 -77
- package/dist/types/services/supervisor/persistent.d.ts +5 -11
- package/dist/types/services/supervisor/port-preflight.d.ts +4 -10
- package/dist/types/services/supervisor/records.d.ts +27 -60
- package/dist/types/services/supervisor/restart-required.d.ts +13 -0
- package/dist/types/services/supervisor/spawn.d.ts +3 -5
- package/dist/types/services/supervisor/view.d.ts +3 -1
- package/dist/types/services/supervisor.d.ts +31 -43
- package/dist/types/services/tls.d.ts +6 -17
- package/dist/types/services/ui-update.d.ts +19 -17
- package/dist/types/services/ui.d.ts +10 -19
- package/dist/types/shared/action-outcome.d.ts +2 -7
- package/dist/types/shared/api-client.d.ts +133 -177
- package/dist/types/shared/api-scopes.d.ts +17 -0
- package/dist/types/shared/backup-scope.d.ts +16 -90
- package/dist/types/shared/clone.d.ts +2 -11
- package/dist/types/shared/contracts/accounts.d.ts +99 -0
- package/dist/types/shared/contracts/backups.d.ts +219 -0
- package/dist/types/shared/contracts/ddns.d.ts +208 -0
- package/dist/types/shared/contracts/frames.d.ts +1395 -0
- package/dist/types/shared/contracts/index.d.ts +3 -0
- package/dist/types/shared/contracts/logs.d.ts +107 -0
- package/dist/types/shared/contracts/proxy.d.ts +303 -0
- package/dist/types/shared/contracts.d.ts +852 -1982
- package/dist/types/shared/cpu-scale.d.ts +3 -19
- package/dist/types/shared/crash-cause.d.ts +8 -0
- package/dist/types/shared/cron.d.ts +70 -0
- package/dist/types/shared/ddns-form.d.ts +9 -43
- package/dist/types/shared/endpoint.d.ts +1 -7
- package/dist/types/shared/error-codes.d.ts +438 -0
- package/dist/types/shared/error-message.d.ts +1 -7
- package/dist/types/shared/fields.d.ts +7 -17
- package/dist/types/shared/form-repair.d.ts +1 -5
- package/dist/types/shared/generated.d.ts +3 -19
- package/dist/types/shared/host-readings.d.ts +25 -128
- package/dist/types/shared/lazy.d.ts +1 -1
- package/dist/types/shared/live-frames.d.ts +2 -8
- package/dist/types/shared/live-series.d.ts +2 -8
- package/dist/types/shared/live-store.d.ts +4 -8
- package/dist/types/shared/log-download.d.ts +6 -0
- package/dist/types/shared/meta.d.ts +6 -0
- package/dist/types/shared/password-policy.d.ts +10 -0
- package/dist/types/shared/patch-diff.d.ts +13 -72
- package/dist/types/shared/port-reading.d.ts +18 -0
- package/dist/types/shared/probe-latency.d.ts +3 -21
- package/dist/types/shared/proxy-form.d.ts +33 -74
- package/dist/types/shared/proxy-validate.d.ts +11 -0
- package/dist/types/shared/query-params.d.ts +8 -0
- package/dist/types/shared/server-attention.d.ts +2 -27
- package/dist/types/shared/server-form.d.ts +15 -54
- package/dist/types/shared/server-key.d.ts +1 -12
- package/dist/types/shared/server-readings.d.ts +7 -32
- package/dist/types/shared/server-url.d.ts +9 -31
- package/dist/types/shared/shape.d.ts +1 -16
- package/dist/types/shared/stream-access.d.ts +2 -8
- package/dist/types/shared/ui-format.d.ts +25 -65
- package/docs/API.md +315 -107
- package/docs/BACKUPS.md +61 -56
- package/docs/CLI.md +255 -49
- package/docs/DDNS.md +35 -49
- package/docs/JOBS.md +129 -0
- package/docs/NOTIFICATIONS.md +58 -90
- package/docs/REVERSE_PROXY.md +116 -188
- package/docs/SECURITY.md +126 -44
- package/docs/SERVERS.md +282 -409
- package/docs/UI_CREATION.md +90 -47
- package/docs/demo/blank-host-restore.sh +31 -7
- package/package.json +15 -6
- package/scripts/prepare.mjs +47 -0
- package/uis/stock/dist/assets/CopyButton-8mliL0xi.js +1 -0
- package/uis/stock/dist/assets/GlobalSettingsView-BINXY77E.js +1 -0
- package/uis/stock/dist/assets/LogViewer-kiSnTwdY.js +1 -0
- package/uis/stock/dist/assets/LogsView-DDXf_ONs.js +1 -0
- package/uis/stock/dist/assets/Modal-lrUuViF2.js +39 -0
- package/uis/stock/dist/assets/ProxyView-uXMaJdSQ.js +1 -0
- package/uis/stock/dist/assets/ServerDetailView-CW0Vb_c0.js +4 -0
- package/uis/stock/dist/assets/SettingsShell-B135xWjJ.js +1 -0
- package/uis/stock/dist/assets/SettingsView-BLtWxVkl.js +2 -0
- package/uis/stock/dist/assets/de-BIoTrHBQ.js +1 -0
- package/uis/stock/dist/assets/es-x4-ih8lH.js +1 -0
- package/uis/stock/dist/assets/fr-DatqBBkO.js +1 -0
- package/uis/stock/dist/assets/index-CnojaKcA.css +2 -0
- package/uis/stock/dist/assets/index-D-CiZReu.js +16 -0
- package/uis/stock/dist/assets/ja-CW1703Gw.js +1 -0
- package/uis/stock/dist/assets/ko-wFbT4XtK.js +1 -0
- package/uis/stock/dist/assets/ru-C1p5C4VN.js +1 -0
- package/uis/stock/dist/assets/useUnsavedGuard-BcsXsfCC.js +9 -0
- package/uis/stock/dist/assets/vi-CDqr0uie.js +1 -0
- package/uis/stock/dist/assets/zh-CN-BJ7iit-X.js +1 -0
- package/uis/stock/dist/index.html +4 -3
- package/uis/stock/dist/ui.json +3 -3
- package/dist/chunks/archive-DP-XQR8X.js.map +0 -1
- package/dist/chunks/atomic-C1PfJpE7.js.map +0 -1
- package/dist/chunks/backup-CZcVca2a.js.map +0 -1
- package/dist/chunks/backups-CFRaWe_m.js +0 -4691
- package/dist/chunks/backups-CFRaWe_m.js.map +0 -1
- package/dist/chunks/config-text-DifCHhnz.js +0 -50
- package/dist/chunks/config-text-DifCHhnz.js.map +0 -1
- package/dist/chunks/contracts-CMBD1TF9.js.map +0 -1
- package/dist/chunks/daemon-log-BVj8cDEo.js +0 -241
- package/dist/chunks/daemon-log-BVj8cDEo.js.map +0 -1
- package/dist/chunks/daemon-qKVECISl.js +0 -247
- package/dist/chunks/daemon-qKVECISl.js.map +0 -1
- package/dist/chunks/docker-Cy9Lyvda.js.map +0 -1
- package/dist/chunks/down-pKbGCW9d.js.map +0 -1
- package/dist/chunks/init-BZ7hK9Vf.js.map +0 -1
- package/dist/chunks/last-stop-C-BXz_XI.js +0 -53
- package/dist/chunks/last-stop-C-BXz_XI.js.map +0 -1
- package/dist/chunks/layout-DwTtmund.js +0 -24
- package/dist/chunks/layout-DwTtmund.js.map +0 -1
- package/dist/chunks/lazy-Ce5zEAq1.js +0 -66
- package/dist/chunks/lazy-Ce5zEAq1.js.map +0 -1
- package/dist/chunks/log-buffer-Dy9HHDMD.js +0 -414
- package/dist/chunks/log-buffer-Dy9HHDMD.js.map +0 -1
- package/dist/chunks/logger-B5U4GD3j.js.map +0 -1
- package/dist/chunks/logs---TI_bxM.js.map +0 -1
- package/dist/chunks/migrate-Cfoq-Vgh.js +0 -155
- package/dist/chunks/migrate-Cfoq-Vgh.js.map +0 -1
- package/dist/chunks/nanny-B-Eu0sFW.js.map +0 -1
- package/dist/chunks/nanny-BtWfy0QH.js +0 -1167
- package/dist/chunks/nanny-BtWfy0QH.js.map +0 -1
- package/dist/chunks/nanny-sweep-DErnlPY1.js.map +0 -1
- package/dist/chunks/nearest-6KgQEDUe.js.map +0 -1
- package/dist/chunks/parse-DhmG26fI.js.map +0 -1
- package/dist/chunks/paths-CGlGDrOU.js.map +0 -1
- package/dist/chunks/port-B8WBTRMk.js.map +0 -1
- package/dist/chunks/restart-Des4DrAN.js.map +0 -1
- package/dist/chunks/schema-B240VXcV.js.map +0 -1
- package/dist/chunks/secrets-BieELnZh.js +0 -562
- package/dist/chunks/secrets-BieELnZh.js.map +0 -1
- package/dist/chunks/server-Bge2r2qQ.js +0 -169
- package/dist/chunks/server-Bge2r2qQ.js.map +0 -1
- package/dist/chunks/server-ids-DRuNLVCV.js +0 -32
- package/dist/chunks/server-ids-DRuNLVCV.js.map +0 -1
- package/dist/chunks/set-password-D5vZqqSX.js +0 -43
- package/dist/chunks/set-password-D5vZqqSX.js.map +0 -1
- package/dist/chunks/set-token-obPiEJYk.js +0 -78
- package/dist/chunks/set-token-obPiEJYk.js.map +0 -1
- package/dist/chunks/settings-xu-XTfWg.js.map +0 -1
- package/dist/chunks/setup-temp-CAN4_bA-.js.map +0 -1
- package/dist/chunks/shape-DnTKzjQ2.js +0 -24
- package/dist/chunks/shape-DnTKzjQ2.js.map +0 -1
- package/dist/chunks/src-BtWMFmzZ.js.map +0 -1
- package/dist/chunks/status-DT1EsA-B.js.map +0 -1
- package/dist/chunks/ui-D562aqw5.js.map +0 -1
- package/dist/chunks/ui-dir-CsU3uLNV.js.map +0 -1
- package/dist/chunks/ui-release-DKzVvlLd.js.map +0 -1
- package/dist/chunks/ui-revert-EkBBwRTt.js.map +0 -1
- package/dist/chunks/ui-switch-BnZTdMDd.js.map +0 -1
- package/dist/chunks/ui-update-_xryLYxw.js.map +0 -1
- package/dist/chunks/up-Pdz-l6IH.js.map +0 -1
- package/dist/chunks/usage-DFrCVXpT.js.map +0 -1
- package/dist/chunks/workspaces-DYcfvKV_.js.map +0 -1
- package/dist/chunks/wsl-temperature-BiCI4iK6.js.map +0 -1
- package/dist/types/cli/set-password.d.ts +0 -14
- package/dist/types/cli/set-token.d.ts +0 -21
- package/uis/stock/dist/assets/CopyButton-BUBKRJyY.js +0 -1
- package/uis/stock/dist/assets/GlobalSettingsView-yYMcRWvt.js +0 -1
- package/uis/stock/dist/assets/LogViewer-DIliXy62.js +0 -1
- package/uis/stock/dist/assets/LogsView-B7Z-7RNg.js +0 -1
- package/uis/stock/dist/assets/Modal-DmKa5Qpp.js +0 -39
- package/uis/stock/dist/assets/ProxyView-DvZiNkwb.js +0 -1
- package/uis/stock/dist/assets/ServerDetailView-6idGT_EX.js +0 -2
- package/uis/stock/dist/assets/SettingsShell-CeGtleYI.js +0 -1
- package/uis/stock/dist/assets/SettingsView-BrhJIrmk.js +0 -2
- package/uis/stock/dist/assets/de-BRITeb0H.js +0 -1
- package/uis/stock/dist/assets/es-B2zIEssV.js +0 -1
- package/uis/stock/dist/assets/fr-s0ZOBEqh.js +0 -1
- package/uis/stock/dist/assets/index-C1MehbKy.css +0 -2
- package/uis/stock/dist/assets/index-CnBN54wF.js +0 -15
- package/uis/stock/dist/assets/ja-CU7MR85V.js +0 -1
- package/uis/stock/dist/assets/ko-tL5Me6d-.js +0 -1
- package/uis/stock/dist/assets/ru-92yrvkNJ.js +0 -1
- package/uis/stock/dist/assets/vi-CzvY16k2.js +0 -1
- package/uis/stock/dist/assets/zh-CN-DDwFW_uW.js +0 -1
package/docs/SERVERS.md
CHANGED
|
@@ -4,12 +4,9 @@ Every supervised process is one entry in a **workspace**'s `servers.config.json`
|
|
|
4
4
|
`$HHOSTED_HOME/.hh/<workspace-id>/servers.config.json`, default `~/.home-hosted/.hh/default/…`.
|
|
5
5
|
Add it with **➕ Add server** in the panel, or write it by hand — the panel writes the same file.
|
|
6
6
|
|
|
7
|
-
<sub>A workspace
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Pick one in the header; the workspace's server defaults and log retention sit in
|
|
11
|
-
**Workspace Settings**. Panel-wide things (listener, auth, TLS, host vitals, backups, UI) stay in
|
|
12
|
-
**Global settings**.</sub>
|
|
7
|
+
<sub>A workspace owns its servers, secrets, logs and nanny state. Pick one in the header; its server
|
|
8
|
+
defaults and log retention are in **Workspace Settings**. Panel-wide things (listener, auth, TLS, host
|
|
9
|
+
vitals, backups, UI) are in **Global settings**.</sub>
|
|
13
10
|
|
|
14
11
|
```json
|
|
15
12
|
{
|
|
@@ -26,134 +23,59 @@ Pick one in the header; the workspace's server defaults and log retention sit in
|
|
|
26
23
|
|
|
27
24
|
Relative paths resolve against the directory you ran `home-hosted` from, so a project can keep its
|
|
28
25
|
servers and its state together. **A service manager starts you somewhere else:** systemd uses `/`
|
|
29
|
-
unless the unit sets `WorkingDirectory=`, and `docker run`
|
|
30
|
-
`
|
|
31
|
-
|
|
26
|
+
unless the unit sets `WorkingDirectory=`, and so does `docker run` without `-w` — every relative `cwd`,
|
|
27
|
+
`{projectDir}` and `dataEnvs` then points under `/`. Pin the base with `--project`, `$HHOSTED_PROJECT`,
|
|
28
|
+
or the unit's `WorkingDirectory=`.
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
afterwards, and no preset is required to add a server.
|
|
38
|
-
|
|
39
|
-
A preset is only a starting point, so two things to check:
|
|
40
|
-
|
|
41
|
-
- **The port is what the panel probes, not always what the program binds.** Node, Python, Gitea and
|
|
42
|
-
MongoDB take the form's port (`{port}`, in `args` or `env`). Three cannot: Minecraft reads
|
|
43
|
-
`server-port` from `server.properties`, Jellyfin reads `network.xml`, and a compose stack publishes
|
|
44
|
-
what its file says — for those the port only moves the probe, so set it to the port the program
|
|
45
|
-
actually uses. The bot has no port at all, so it has no probe.
|
|
46
|
-
- **The working directory matters.** Python's `http.server` serves the working directory; Minecraft
|
|
47
|
-
needs it set to the folder holding `server.jar`. The preset description names what to point it at.
|
|
48
|
-
|
|
49
|
-
## Orphaned processes
|
|
50
|
-
|
|
51
|
-
**A supervised server outlives the panel.** The child runs in its own process group, so nothing here
|
|
52
|
-
signals it when the panel dies, and its output goes to a **file the child holds open and the panel
|
|
53
|
-
reads back afterwards** rather than down a pipe the panel owns. That second half is what makes the
|
|
54
|
-
survival real: a pipe's read end *is* the panel, so killing the panel closes it and the child's next
|
|
55
|
-
write would fail and take the process with it. A file the child owns cannot be closed by anyone else,
|
|
56
|
-
so a server that keeps writing keeps running.
|
|
57
|
-
|
|
58
|
-
The panel keeps a handle per entry — `.hh/<workspace>/.state/<id>.run.json`, keyed by the id the
|
|
59
|
-
child was started under — and uses it to **adopt** that child on the next boot, with its pid, start
|
|
60
|
-
time and process-group identity intact. Surviving a panel death is therefore normal and handled, not
|
|
61
|
-
a defect.
|
|
62
|
-
|
|
63
|
-
An **orphan** is the case that handle cannot cover: an entry **renamed** or **removed** while its
|
|
64
|
-
process is still running, with the panel **not running** at the time, leaves that process with no
|
|
65
|
-
entry to own it. It keeps running, holding its port and its resources, and nothing else in the panel
|
|
66
|
-
lists it. (Edit the config while the panel *is* up and it handles the change directly — it stops that
|
|
67
|
-
entry and reclaims its state, rather than orphaning it.)
|
|
68
|
-
|
|
69
|
-
**Servers** shows those: a warning above the list names each id, its pid and when it started, with a
|
|
70
|
-
**Stop it** button. The state file is kept until the process is actually gone, so a survivor of
|
|
71
|
-
`SIGKILL` — of the panel or of the server — is still findable on the next boot. There is no automatic
|
|
72
|
-
kill: a pid whose identity the platform cannot confirm is exactly what the rest of this file refuses
|
|
73
|
-
to signal on a guess.
|
|
74
|
-
|
|
75
|
-
## Where a server's output goes
|
|
76
|
-
|
|
77
|
-
Two files per entry, in the workspace's state directory: `.hh/<workspace>/.state/<id>.out` and
|
|
78
|
-
`<id>.err`, one per stream. The child writes to them itself; the panel reads the bytes back, splits
|
|
79
|
-
them into lines and feeds the log, the Logs page and SSE from there — so a server's output reaches
|
|
80
|
-
you exactly as before, whichever of the two wrote it.
|
|
81
|
-
|
|
82
|
-
They are **transport, not history**, and are treated as such: not served to a browser, not counted
|
|
83
|
-
against `logs.keep`, not included in a backup, and deleted with the entry. Do not put them in a
|
|
84
|
-
backup path or expect them to survive a restore — `.logs/<id>.log` is the file to keep.
|
|
30
|
+
A scheduled command is a [job](./JOBS.md), not a server: an entry carrying `kind` or `schedule` is
|
|
31
|
+
refused. To bring in a pm2 or compose setup, use `home-hosted import`
|
|
32
|
+
([CLI.md](./CLI.md#coming-from-pm2-or-compose)); what it cannot carry (pm2's `watch`, `cron_restart`,
|
|
33
|
+
cluster mode) is reported by name, and a compose stack becomes one entry.
|
|
85
34
|
|
|
86
|
-
|
|
87
|
-
the child's pipes and writes the log directly. That is safe because the nanny's lifetime is the
|
|
88
|
-
entry's, not the panel's.</sub>
|
|
89
|
-
|
|
90
|
-
### A server that outruns the reader
|
|
91
|
-
|
|
92
|
-
A file never slows a writer down the way a pipe does, so a server can write faster than the panel
|
|
93
|
-
reads. It is bounded, and the bounds are worth knowing before you see them:
|
|
94
|
-
|
|
95
|
-
- **An 8 MB file is emptied once it has been fully read.** Nothing is lost — every byte was already
|
|
96
|
-
delivered to the log before the file is truncated, and a half-written line continues into the
|
|
97
|
-
child's next write. This is invisible in normal use.
|
|
98
|
-
- **A writer faster than the reader can drain is throttled by dropping.** Past a backlog of
|
|
99
|
-
`max(8 MB, 256 KiB)` the oldest unread bytes go, the cut is moved forward to the next **line
|
|
100
|
-
boundary** so the gap is whole lines rather than a torn one, and the entry's own log says so: `the
|
|
101
|
-
server wrote faster than the panel could read it — N KiB of its output was dropped`. That line is
|
|
102
|
-
the point — a silent drop is the failure this exists to avoid — but it does mean a genuinely
|
|
103
|
-
firehose-level server can show those lines in its log instead of every line it wrote. A line the
|
|
104
|
-
server had not finished writing when the gap began is discarded rather than completed, so a
|
|
105
|
-
fragment is never spliced onto the first surviving line.
|
|
106
|
-
- **One rare write window.** A byte written in the instant between the panel measuring the file and
|
|
107
|
-
emptying it is lost unread. It is one small window per 8 MB of output, and only for a child writing
|
|
108
|
-
at that exact moment.
|
|
109
|
-
|
|
110
|
-
The panel reads at most 256 KiB per stream per pass, four times a second — roughly 1 MB/s each for
|
|
111
|
-
stdout and stderr — while the drop path needs an 8 MB backlog, so a server has to sustain output near
|
|
112
|
-
that rate to reach it. That is far more than a normal home service writes. If the lines do appear on
|
|
113
|
-
a server that is not meant to be that loud, read them as a symptom: something is in a log loop.
|
|
114
|
-
|
|
115
|
-
## `PATH`, and the program an entry runs
|
|
35
|
+
## Field reference
|
|
116
36
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
37
|
+
| field | what it does |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `id`, `label` | `id` is lowercase letters, digits, `-` and `_`, unique within the workspace; `label` is the display name (defaults to the id) |
|
|
40
|
+
| `command`, `args`, `cwd` | what to run. **`command` is a program, not a command line** — it is spawned with no shell, so write `"command": "node", "args": ["server.js"]`, not `"node server.js"`. `cwd` defaults to `.`. [Placeholders](#placeholders) expand in `args`, `env`, `dataEnvs`, `backupPaths` and the hook args; `command`, `cwd` and `envFile` are literal, so `cwd: "~/app"` is not your home directory |
|
|
41
|
+
| `enabled` | `true` (default). `false` keeps the entry but refuses to start it, stops it if running, and leaves a disabled `persistent` entry unattached at boot |
|
|
42
|
+
| `autostart` | `false` (default). `true` starts it when the panel comes `up` |
|
|
43
|
+
| `env`, `envFile`, `dataEnvs` | environment. `envFile` is a `KEY=value` file (relative to `cwd`) that keeps secrets out of the config; a BOM or UTF-16 from a Windows editor is fine. `dataEnvs` is `NAME: path` — exported to the process **and** backed up, so a data directory is declared once. Precedence, lowest first: `env` < `envFile` < `dataEnvs` < `secretEnv` |
|
|
44
|
+
| `secretEnv` | the **names** of secret variables; the values live in the workspace's `.secrets.json` (0600) — see [Secret environment](#secret-environment) |
|
|
45
|
+
| `port`, `bind` | `port` enables the readiness wait, health checks and the conflict preflight. With no port the entry reads `running` once its process exists, and a command that cannot start shows `crashed` with the reason. `bind` is `local` (`127.0.0.1`, default), `lan` (`0.0.0.0`) or one IPv4 address of this machine, exposed to the program as `{host}` |
|
|
46
|
+
| `onPortConflict` | `block` (default), `warn`, `follow`, `reclaim` or `kill` — see [A busy port](#a-busy-port) |
|
|
47
|
+
| `persistent` | `false` (default). Run it under its own nanny so it survives the panel — see [Persistent entries](#persistent-entries) |
|
|
48
|
+
| `health.enabled`, `health.mode` | on by default; `port` (TCP connect, default) or `http`. `intervalMs` 5000, `timeoutMs` 1500, `startTimeoutMs` 20000 (the readiness wait after spawn) |
|
|
49
|
+
| `health.http.*` | `path` (`/`), `method` (`GET` or `HEAD` — a `HEAD` has no body, so a body check is skipped with a warning), `expectStatus` (exact, 100–599) or `expectStatusBelow` (default 400), `expectBody` (a substring), `scheme` (`http` or `https` for a backend serving TLS itself) and `allowInvalidCert` (accept a self-signed certificate; off by default) |
|
|
50
|
+
| `health.unhealthyThreshold`, `health.forceRestartAfterMs` | failed probes in a row before the card warns (default 3), and how long unhealthy before a forced restart — default `0`, which **never** fires. Forced restarts are bounded by `restart.maxRetries`, after which the entry is stopped with the reason on its card. A start that never answers within `startTimeoutMs` counts as a full failed streak |
|
|
51
|
+
| `restart.*` | `enabled` (true), `maxRetries` (3), `baseDelayMs` (1000), `factor` (2), `maxDelayMs` (30000), `resetAfterMs` (60000: alive this long resets the counter). The spent budget is kept on disk, so a crash loop cannot outlast `maxRetries` by outliving the panel |
|
|
52
|
+
| `stop.*` | `signal` (`SIGTERM`, `SIGINT` or `SIGKILL`; default `SIGTERM`), `killGroup` (true), `graceMs` (5000, before SIGKILL), `killPortHolders` (false; sweep a leftover listener) |
|
|
53
|
+
| `dependsOn` | ids that must be healthy first. `stop-all`/`down` stop dependents before their dependencies; stopping **one** server does not cascade (the log names any dependent left running). In a cycle neither waits |
|
|
54
|
+
| `logBufferLines` | lines of live output kept in memory for the Logs page (50–100000, default 500). The file on disk is bounded by the workspace's `logs.maxBytes` / `logs.keep`; lowering `keep` deletes rotations above it |
|
|
55
|
+
| `resources.maxRssBytes` | restart when the process tree — or a compose stack's containers, summed — grows past this (`0`, the default, disables). It also acts on an adopted process |
|
|
56
|
+
| `bootstrap` | one command run before the first start (migrations, warmups): `command`, `args`, `env`, `timeoutMs` (120000), `runOnce` (true: once per `up`) |
|
|
57
|
+
| `deploy` | what "update this service" means — see [Deploying](#deploying) |
|
|
58
|
+
| `dump`, `load` | database hooks around a backup — see [Dumping a database for backups](#dumping-a-database-for-backups) |
|
|
59
|
+
| `backupPaths`, `backupIgnoreGenerated` | extra paths this entry owns, included in backups; the flag (on by default) skips `node_modules`, `dist`, `.next` and framework caches inside them. A symlink inside a declared path that leads outside it is not followed — declare the target instead |
|
|
60
|
+
|
|
61
|
+
### Secret environment
|
|
62
|
+
|
|
63
|
+
An `envFile` beside the code is **not** in a backup, so a move to a new machine silently loses it.
|
|
64
|
+
`secretEnv` puts the **names** in the config and the **values** in the workspace's `.secrets.json`
|
|
65
|
+
(0600), which a backup's secrets carry:
|
|
120
66
|
|
|
121
|
-
```
|
|
122
|
-
|
|
67
|
+
```json
|
|
68
|
+
{ "id": "app", "command": "node", "args": ["server.js"], "secretEnv": ["DATABASE_URL", "SESSION_KEY"] }
|
|
123
69
|
```
|
|
124
70
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
- **Point `command` at an absolute path** — `/usr/bin/node`, or a version manager's shim. The most
|
|
129
|
-
portable answer, and the one that survives a unit file you did not write.
|
|
130
|
-
- **Set `PATH` in `env`** for the entries that need it — that entry's scope, which is usually honest.
|
|
131
|
-
- **Fix the unit or container** — systemd takes `Environment=PATH=…`, docker takes `ENV PATH=…`. The
|
|
132
|
-
right fix when *everything* fails, because the next entry will hit it too.
|
|
71
|
+
Set a value with `home-hosted secret set app DATABASE_URL` ([CLI.md](./CLI.md#secret-environment)) or
|
|
72
|
+
in the entry's config page. A name is `^[A-Za-z_][A-Za-z0-9_]*$` and may not repeat.
|
|
133
73
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
| field | what it does |
|
|
140
|
-
| --- | --- |
|
|
141
|
-
| `command`, `args`, `cwd` | what to run. `{placeholders}` resolve in `args` only (`env`, `dataEnvs`, `backupPaths` and `bootstrap.args` too); `command`, `cwd` and `envFile` are used literally, so `cwd: "~/app"` is not a home directory. **`command` is a program, not a command line** — it is spawned with no shell, so `"node server.js"` asks for a program of that name; write `"command": "node", "args": ["server.js"]` |
|
|
142
|
-
| `env`, `dataEnvs`, `envFile` | environment; `dataEnvs` also marks data directories for backups, `envFile` keeps secrets out of the config. The env file is yours to write — `KEY=value`, one per line — and it is read whatever a Windows editor saved: a byte-order mark or UTF-16 is decoded, not refused |
|
|
143
|
-
| `enabled` | `true` (default) starts it; `false` keeps the entry in the config but refuses to start it, stops it if it is running, and leaves a disabled `persistent` entry unattached at boot |
|
|
144
|
-
| `port`, `bind` | `port` enables the readiness wait, health checks and the conflict preflight. `bind` is `local` (`127.0.0.1`, the default), `lan` (`0.0.0.0`, every interface) or one IPv4 address of this machine — a Wi-Fi or VPN address, say — exposed to the program as `{host}` |
|
|
145
|
-
| `onPortConflict` | `block` (default), `warn`, `follow`, `reclaim`, or `kill` — see below |
|
|
146
|
-
| `persistent` | run it under its own nanny so it survives the panel — see below |
|
|
147
|
-
| `health.mode` | `port` (TCP connect) or `http` (path, expected status, expected body — a `HEAD` carries no body, so it is warned about and the body check is skipped) |
|
|
148
|
-
| `health.http.scheme`, `health.http.allowInvalidCert` | `http` (default) or `https` for a backend that serves TLS itself; the second accepts a self-signed certificate, which is the usual case on a home network. A certificate is verified unless you say otherwise |
|
|
149
|
-
| `health.unhealthyThreshold`, `forceRestartAfterMs` | how many consecutive failed probes (default 3) before the card warns, and when to restart anyway — `forceRestartAfterMs` defaults to `0`, which **never** fires, so a forced restart is opt-in. When set, it is bounded by `restart.maxRetries`, after which the entry is stopped rather than restarted forever, with the reason left on its card |
|
|
150
|
-
| `restart.*` | backoff: `maxRetries`, `baseDelayMs`, `factor`, `maxDelayMs`, `resetAfterMs` — the spent budget is remembered on disk, so a crash loop cannot outlast `maxRetries` by outliving the panel |
|
|
151
|
-
| `stop.*` | `signal`, `killGroup`, `graceMs`, and `killPortHolders` to sweep a leftover listener |
|
|
152
|
-
| `dependsOn` | ids that must be healthy first. `stop-all`/`down` stop dependents before their dependencies; stopping **one** server does not cascade — the log names any dependent it left running. In a cycle (`a` → `b` → `a`) neither waits on the other |
|
|
153
|
-
| `logBufferLines` | how many lines of live output the panel keeps in memory per entry (50–100000, default 500). The file on disk is separate: this is the buffer the Logs page streams from. The disk side is the **workspace's** `logs.maxBytes` / `logs.keep` in Workspace Settings — `keep` is a hard bound on `.hh/<workspace>/.logs`: it is how many rotations stay beside `<id>.log`, the Logs page reads all of them, and lowering it deletes the ones above the new ceiling. The raw transport files a child writes to first are separate again — [Where a server's output goes](#where-a-servers-output-goes) |
|
|
154
|
-
| `resources.maxRssBytes` | restart when the process tree — or, for a compose entry, the summed containers — grows past a limit. It acts on an adopted process too (`follow`, or a persistent entry reattached to its nanny), not only on one the panel spawned |
|
|
155
|
-
| `bootstrap` | one command to run once before the first start (migrations, warmups) |
|
|
156
|
-
| `backupPaths`, `backupIgnoreGenerated` | extra paths this entry owns, included in backups; the flag (on by default) skips the known build and dependency directories inside them — `node_modules`, `dist`, `.next`, framework caches. A symlink inside a declared path that resolves outside it is not followed — declare the target as its own path instead |
|
|
74
|
+
- The secret wins over every other layer for its variable.
|
|
75
|
+
- **Only declared names are passed**, so a removed entry's leftover values never reach a process.
|
|
76
|
+
- Values never appear in the config, a log, history or an error
|
|
77
|
+
([SECURITY.md](./SECURITY.md#a-servers-secret-environment-never-enters-its-config)).
|
|
78
|
+
- Changing `secretEnv` needs a restart; the view says so through `restartRequired`.
|
|
157
79
|
|
|
158
80
|
### Placeholders
|
|
159
81
|
|
|
@@ -163,22 +85,20 @@ asks for a program of that name, because `command` is spawned with no shell.
|
|
|
163
85
|
| `{port}` | its configured port, empty when it has none |
|
|
164
86
|
| `{bind}` `{host}` `{displayHost}` | `local`/`lan`/an address; the address it binds (`127.0.0.1`, `0.0.0.0`); the address to *show* (`127.0.0.1`, the LAN IP) |
|
|
165
87
|
| `{lanIp}` | this machine's LAN address, or `127.0.0.1` |
|
|
166
|
-
| `{cwd}` | the entry's working directory
|
|
88
|
+
| `{cwd}` | the entry's resolved working directory |
|
|
167
89
|
| `{projectDir}` | where you ran `home-hosted` (or `--project`) — `$HHOSTED_PROJECT` |
|
|
168
90
|
| `{dataRoot}` | the state directory — `$HHOSTED_HOME`, default `~/.home-hosted` |
|
|
169
91
|
| `{home}` | the current user's home directory |
|
|
92
|
+
| `{dumpDir}` | in `dump`/`load` only: the directory the backup carries |
|
|
170
93
|
|
|
171
|
-
|
|
172
|
-
environment (including `envFile`). Every
|
|
173
|
-
`HHOSTED_CONTROL_PORT`, so a service
|
|
174
|
-
|
|
175
|
-
`dataEnvs` is the one that pays for itself twice: the value is exported to the process *and* the path
|
|
176
|
-
is picked up by Backups, so a data directory is declared once.
|
|
94
|
+
An unknown placeholder stays visible rather than becoming empty, and `${VAR}` reads from the panel's
|
|
95
|
+
environment (including `envFile`). Every process also gets `HHOSTED_SERVER_ID` and
|
|
96
|
+
`HHOSTED_CONTROL_PORT`, so a service knows which entry it is and how to reach the panel.
|
|
177
97
|
|
|
178
98
|
### Dumping a database for backups
|
|
179
99
|
|
|
180
|
-
Copying a database's data directory
|
|
181
|
-
|
|
100
|
+
Copying a running database's data directory gives a torn copy. Declare `dump` and `load` so the engine
|
|
101
|
+
writes the backup itself:
|
|
182
102
|
|
|
183
103
|
```json
|
|
184
104
|
{
|
|
@@ -190,16 +110,13 @@ declare `dump` and `load` so the backup is taken by the engine itself:
|
|
|
190
110
|
}
|
|
191
111
|
```
|
|
192
112
|
|
|
193
|
-
`{dumpDir}` is
|
|
194
|
-
|
|
195
|
-
|
|
113
|
+
`{dumpDir}` is created by the panel and carried by the archive; both hooks see the same path. Each hook
|
|
114
|
+
is one program plus `args` (never a shell string), with optional `env` and `timeoutMs` (default 10
|
|
115
|
+
minutes).
|
|
196
116
|
|
|
197
|
-
- **A failed `dump` refuses the backup
|
|
198
|
-
- `load` runs after the files are restored,
|
|
199
|
-
|
|
200
|
-
config page, with the timeout in seconds.
|
|
201
|
-
|
|
202
|
-
Verified pairs, one per engine:
|
|
117
|
+
- **A failed `dump` refuses the backup** — an archive that looks complete is worse than none.
|
|
118
|
+
- `load` runs after the files are restored, once the entry answers on its port. An entry with no port
|
|
119
|
+
waits `waitMs` (default 2 s) instead — raise it for a slow database.
|
|
203
120
|
|
|
204
121
|
| engine | `dump` | `load` |
|
|
205
122
|
| --- | --- | --- |
|
|
@@ -209,121 +126,145 @@ Verified pairs, one per engine:
|
|
|
209
126
|
| Redis | `redis-cli --rdb {dumpDir}/dump.rdb` | `command: "cp"`, `args: ["{dumpDir}/dump.rdb", "<dir>/dump.rdb"]`, with Redis stopped |
|
|
210
127
|
| SQLite | `sqlite3 {dbPath} ".backup '{dumpDir}/db.sqlite'"` | `cp {dumpDir}/db.sqlite {dbPath}` |
|
|
211
128
|
|
|
212
|
-
Redis and SQLite
|
|
213
|
-
|
|
214
|
-
login you keep in `env`.
|
|
129
|
+
For Redis and SQLite a plain file copy with the server stopped is usually simpler; the hooks earn their
|
|
130
|
+
place for a database you cannot stop.
|
|
215
131
|
|
|
216
132
|
### The "open server" link
|
|
217
133
|
|
|
218
|
-
An entry with a `port` gets a link in the UI
|
|
219
|
-
|
|
220
|
-
address
|
|
221
|
-
|
|
222
|
-
|
|
134
|
+
An entry with a `port` gets a link in the UI. For a `lan` entry the link uses **the hostname you are
|
|
135
|
+
reading the panel at**, so `http://box.example:4999` links to `http://box.example:4991` rather than an
|
|
136
|
+
unreachable LAN address. The port and the `http` scheme are always the entry's own. A `local` or
|
|
137
|
+
specific-IP entry keeps its reported address.
|
|
138
|
+
|
|
139
|
+
## Presets
|
|
140
|
+
|
|
141
|
+
The add-server panel offers a gallery — Minecraft, Jellyfin, a Node app, a Python file server, Gitea,
|
|
142
|
+
MongoDB, Docker Compose, a chat bot. A preset only **fills the form**. Two things to check:
|
|
143
|
+
|
|
144
|
+
- **The port is what the panel probes, not always what the program binds.** Node, Python, Gitea and
|
|
145
|
+
MongoDB take the form's port (`{port}`). Minecraft reads `server.properties`, Jellyfin reads
|
|
146
|
+
`network.xml`, and a compose stack publishes what its file says — set the port to what the program
|
|
147
|
+
actually uses. The bot has no port, so no probe.
|
|
148
|
+
- **The working directory matters.** Python's `http.server` serves it; Minecraft needs the folder
|
|
149
|
+
holding `server.jar`.
|
|
150
|
+
|
|
151
|
+
## Deploying
|
|
152
|
+
|
|
153
|
+
A `deploy` block is an ordered list of steps, run in the entry's working directory with its
|
|
154
|
+
environment, then a restart:
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"id": "web",
|
|
159
|
+
"command": "node",
|
|
160
|
+
"args": ["server.js"],
|
|
161
|
+
"deploy": {
|
|
162
|
+
"steps": [
|
|
163
|
+
{ "command": "git", "args": ["pull"] },
|
|
164
|
+
{ "command": "pnpm", "args": ["install"] },
|
|
165
|
+
{ "command": "pnpm", "args": ["build"] }
|
|
166
|
+
],
|
|
167
|
+
"restart": true
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Run it with `home-hosted deploy <id>`, **Deploy** on the card, or `POST /api/servers/:id/deploy`; all
|
|
173
|
+
three wait for the outcome.
|
|
174
|
+
|
|
175
|
+
- **A failed step stops the sequence** and **leaves the running process alone** — the card says it is
|
|
176
|
+
still the previous version, and the failure is recorded and notified like a crash.
|
|
177
|
+
- **One at a time.** A second call answers `409 DEPLOY_RUNNING`. Stopping the server cancels a deploy
|
|
178
|
+
(the step's process group is killed).
|
|
179
|
+
- A step's `cwd` resolves against the entry's own. Its `timeoutMs` (default 5 minutes) kills a hung
|
|
180
|
+
step. `restart` defaults to `true`.
|
|
223
181
|
|
|
224
|
-
The
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
182
|
+
The editor shows one step per line (`command arg arg`) and keeps a step's `cwd` and `timeoutMs` for a
|
|
183
|
+
line you did not change.
|
|
184
|
+
|
|
185
|
+
## `PATH`, and the program an entry runs
|
|
186
|
+
|
|
187
|
+
`command` resolves against the environment the **panel** was started with. Under systemd, a container
|
|
188
|
+
or a `sudo` that reset the environment, that `PATH` is often shorter than your shell's, and every entry
|
|
189
|
+
fails with:
|
|
190
|
+
|
|
191
|
+
```text
|
|
192
|
+
`node` was not found — is it installed, and is it on PATH for the user running the panel?
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Fixes, best first: use an **absolute path** in `command` (`/usr/bin/node`); set `PATH` in the entry's
|
|
196
|
+
`env`; or fix the unit/container (`Environment=PATH=…`, `ENV PATH=…`) when everything fails.
|
|
228
197
|
|
|
229
198
|
## A busy port
|
|
230
199
|
|
|
231
|
-
|
|
200
|
+
A preflight runs before every start, so two servers cannot silently fight over one port.
|
|
232
201
|
|
|
233
|
-
| `onPortConflict` |
|
|
202
|
+
| `onPortConflict` | when something already listens |
|
|
234
203
|
| --- | --- |
|
|
235
|
-
| `block` *(default)* | the entry goes to **conflict**
|
|
236
|
-
| `warn` | it starts anyway
|
|
237
|
-
| `follow` |
|
|
238
|
-
| `reclaim` |
|
|
239
|
-
| `kill` | stops **whatever holds the port
|
|
204
|
+
| `block` *(default)* | the entry goes to **conflict** (`port 4000 is already in use (pid 4242)`) and does not start |
|
|
205
|
+
| `warn` | it starts anyway |
|
|
206
|
+
| `follow` | adopts a **detached restart of this same entry**; anything else blocks |
|
|
207
|
+
| `reclaim` | stops such a restart and starts a supervised process of its own; anything else blocks |
|
|
208
|
+
| `kill` | stops **whatever holds the port**, then starts — see [The `kill` policy](#the-kill-policy) |
|
|
209
|
+
|
|
210
|
+
**A port held by a server this panel supervises is never adopted or killed**, in any workspace. The
|
|
211
|
+
refusal names the workspace and entry to stop:
|
|
212
|
+
|
|
213
|
+
```text
|
|
214
|
+
port 7021 is held by pid 2505354, which this panel supervises on media-box/photos —
|
|
215
|
+
stop that server instead
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
The same rule applies to **Free port**, `free-port` and `stop.killPortHolders`.
|
|
240
219
|
|
|
241
220
|
### Docker and compose
|
|
242
221
|
|
|
243
|
-
A compose stack is
|
|
244
|
-
`
|
|
245
|
-
|
|
246
|
-
published port is the health probe.
|
|
222
|
+
A compose stack is one entry: `command: docker`, `args: ["compose","up"]`, `cwd` the directory holding
|
|
223
|
+
`compose.yml`, and `port` the published port (that is the health probe). The foreground form streams
|
|
224
|
+
every container's log, and a stop takes the stack down.
|
|
247
225
|
|
|
248
226
|
```json
|
|
249
227
|
{ "id": "blog", "command": "docker", "args": ["compose", "up"], "cwd": "./blog", "port": 8080 }
|
|
250
228
|
```
|
|
251
229
|
|
|
252
|
-
`docker compose up -d`
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
the
|
|
258
|
-
|
|
259
|
-
**
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
**CPU and RSS are the containers', summed.** A compose entry is measured through `docker stats` over
|
|
269
|
-
the project's own containers, so a busy stack reads busy and `resources.maxRssBytes` acts on the
|
|
270
|
-
memory the containers actually use. Containers are attributed by compose's own labels — the project
|
|
271
|
-
name, else the compose file the containers recorded — never by "every container on the machine".
|
|
272
|
-
|
|
273
|
-
- Only when `command` **is** docker (with `compose`, or `docker-compose`). A shell that starts docker
|
|
274
|
-
keeps the process-tree reading of that shell.
|
|
275
|
-
- When docker cannot be asked — daemon down, or nothing of the project running — the entry falls back
|
|
276
|
-
to the wrapper's reading. A stack with no reading shows as no reading, never `0`.
|
|
277
|
-
|
|
278
|
-
A published port belongs to a root-owned `docker-proxy`, so it has no pid this process may signal.
|
|
279
|
-
The panel asks docker instead and names the container. Both ways of freeing a port — the **Free
|
|
280
|
-
port** button and `onPortConflict: kill` — then stop that container through docker, needing no
|
|
281
|
-
privileges beyond the socket you already have. Under `block` the entry is reported and the message
|
|
282
|
-
names the stack to stop.
|
|
283
|
-
|
|
284
|
-
From a shell it is `home-hosted free-port <id>` (or `start <id> --free-port` to free and start in one
|
|
285
|
-
go); a script driving the HTTP API calls `POST /api/servers/:id/free-port?workspace=<id>` with the
|
|
286
|
-
API token, which is the route the button itself uses.
|
|
230
|
+
- **Drop `-d`.** `docker compose up -d` exits at once, leaving nothing to supervise.
|
|
231
|
+
- **Stop and `down` end the containers**, then list them again: one still up makes the entry report a
|
|
232
|
+
**conflict** naming it. Containers are attributed by compose's labels (the project, else the compose
|
|
233
|
+
file), so another stack is never touched.
|
|
234
|
+
- **A stack already up** at boot (`restart: unless-stopped`, a manual `up -d`) cannot be adopted. Under
|
|
235
|
+
`block` the page names the container and leaves it; `warn` starts the entry so the panel supervises
|
|
236
|
+
it from then on.
|
|
237
|
+
- **CPU and RSS are the containers', summed**, via `docker stats`, and `resources.maxRssBytes` acts on
|
|
238
|
+
that — only when `command` is docker (`compose` or `docker-compose`). With docker unreachable the
|
|
239
|
+
wrapper's reading is used; no reading shows as absent, never `0`.
|
|
240
|
+
- **A published port** belongs to a root-owned `docker-proxy`, so the panel asks docker and names the
|
|
241
|
+
container. **Free port** and `kill` stop that container through docker.
|
|
242
|
+
|
|
243
|
+
From a shell: `home-hosted free-port <id>`, or `start <id> --free-port`; over HTTP,
|
|
244
|
+
`POST /api/servers/:id/free-port?workspace=<id>`.
|
|
287
245
|
|
|
288
246
|
### When a program restarts itself
|
|
289
247
|
|
|
290
|
-
Some programs restart
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
can tell a successor from a stranger — read from `/proc` on Linux and `ps -E` on macOS. **Windows
|
|
296
|
-
cannot read another process's environment**, so there the entry's own argv answers instead: a process
|
|
297
|
-
holding the port is the successor when its image and its arguments are both the entry's own. That
|
|
298
|
-
fallback also covers a Linux or macOS program that restarted itself in a way that dropped the marker.
|
|
299
|
-
Two policies act on the result:
|
|
248
|
+
Some programs restart by launching a detached successor and exiting (a self-update, a re-exec on
|
|
249
|
+
config change). Every process gets `HHOSTED_SERVER_ID`, which a successor inherits, so the preflight
|
|
250
|
+
can tell it from a stranger (read from `/proc` on Linux, `ps -E` on macOS). **Windows cannot read
|
|
251
|
+
another process's environment**, so there — and as a fallback elsewhere — a holder is the successor
|
|
252
|
+
when its image and its arguments both match the entry's own, literally.
|
|
300
253
|
|
|
301
254
|
| policy | what it does | trade-off |
|
|
302
255
|
| --- | --- | --- |
|
|
303
|
-
| `follow` | adopts the successor: pid, health probe, CPU/RSS, stop, and
|
|
304
|
-
| `reclaim` | stops the successor
|
|
305
|
-
|
|
306
|
-
Identification is deliberately strict, because `reclaim` kills what it identifies: the image has to be
|
|
307
|
-
the entry's resolved command **and** the arguments have to be the entry's own, compared literally — an
|
|
308
|
-
argument sharing a basename with another program's is not a match. When **more than one** holder
|
|
309
|
-
matches, the panel refuses to guess and blocks, naming the pids. These are the cases that still block
|
|
310
|
-
rather than being identified:
|
|
311
|
-
|
|
312
|
-
- a successor that re-execs under a **different image**, or rewrites its own arguments;
|
|
313
|
-
- an argument read back ambiguously — on macOS `ps` joins argv with spaces, so an argument that itself
|
|
314
|
-
contains a space cannot be told from two arguments;
|
|
315
|
-
- a Windows entry launched through an `npm`/`pnpm` **`.cmd` shim**: the shim runs under `cmd.exe`, so
|
|
316
|
-
the process actually holding the port is `node.exe` and its argv never mentions the shim;
|
|
317
|
-
- a Windows entry whose `CommandLine` PowerShell cannot read.
|
|
256
|
+
| `follow` | adopts the successor: pid, health probe, CPU/RSS, stop, and a fresh start when it exits | keeps what the program set up, but its **output is not captured** |
|
|
257
|
+
| `reclaim` | stops the successor and starts a supervised process | full logs and stop semantics, at the cost of one restart |
|
|
318
258
|
|
|
319
|
-
|
|
259
|
+
Both show the entry as **detached** while adopted. These still block rather than being identified:
|
|
320
260
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
261
|
+
- more than one matching holder (the pids are named);
|
|
262
|
+
- a successor under a **different image**, or one that rewrites its arguments;
|
|
263
|
+
- on macOS, an argument containing a space (`ps` joins argv with spaces);
|
|
264
|
+
- on Windows, an `npm`/`pnpm` **`.cmd` shim** (the port holder is `node.exe`), or a `CommandLine`
|
|
265
|
+
PowerShell cannot read.
|
|
324
266
|
|
|
325
|
-
|
|
326
|
-
is discovered:
|
|
267
|
+
`kill` covers those. When the holder is your own restart under another policy, the message says so:
|
|
327
268
|
|
|
328
269
|
```text
|
|
329
270
|
port 4374 is already in use (pid 912) — pid 912 is a detached restart of this entry:
|
|
@@ -331,213 +272,145 @@ set onPortConflict to "follow" to adopt it, "reclaim" to replace it with a super
|
|
|
331
272
|
or "kill" to stop whatever holds the port
|
|
332
273
|
```
|
|
333
274
|
|
|
334
|
-
|
|
335
|
-
workspace — a server id is only unique inside its workspace, but the process is the panel's, so the
|
|
336
|
-
panel checks every workspace before it treats a listener as a stranger — and any entry in your own. The
|
|
337
|
-
refusal names the workspace and entry to go and stop, because a pid alone does not say which row to
|
|
338
|
-
click, and another workspace's server is not on the page you are looking at:
|
|
275
|
+
### An entry with no port that outlived the panel
|
|
339
276
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
stop that server instead
|
|
343
|
-
```
|
|
277
|
+
With no port there is nothing to preflight, so every spawn also records the child's pid and start
|
|
278
|
+
time, checked before the next spawn:
|
|
344
279
|
|
|
345
|
-
|
|
346
|
-
|
|
280
|
+
- alive, born when the record says, and carrying `HHOSTED_SERVER_ID` → adopted;
|
|
281
|
+
- **gone** → the run is reported as ended (at boot, as a crash with the reason), then the start
|
|
282
|
+
proceeds;
|
|
283
|
+
- alive but its identity cannot be confirmed → refused with the pid named, rather than duplicated.
|
|
284
|
+
Stop that pid, or use `persistent: true`.
|
|
347
285
|
|
|
348
|
-
###
|
|
286
|
+
### The `kill` policy
|
|
349
287
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
of a server that was already running. For a worker that consumes a queue, a duplicate is the
|
|
354
|
-
dangerous kind of failure.
|
|
288
|
+
1. SIGTERM every listener on the port, escalating to SIGKILL after `stop.graceMs`.
|
|
289
|
+
2. Wait for the port to be free, then start.
|
|
290
|
+
3. If it is still held, go to **conflict** with the pids it tried — no retry loop.
|
|
355
291
|
|
|
356
|
-
|
|
292
|
+
It is the one policy that stops a **stranger**, so the log names each pid. It never touches the panel
|
|
293
|
+
or a process the panel supervises. To inspect a leftover first, use **Free port** on the card.
|
|
357
294
|
|
|
358
|
-
|
|
359
|
-
→ adopted, exactly like a successor above;
|
|
360
|
-
- **gone** → the record is consumed and the run is **reported as ended**: an exit always, and — at
|
|
361
|
-
boot — a crash with the reason. An entry that was running when the panel died and is not there now
|
|
362
|
-
is the end of a run nobody was watching, not a clean stop, and it is also not something to start
|
|
363
|
-
over silently. The start then proceeds;
|
|
364
|
-
- alive but the platform **cannot confirm whose it is** → refused with the pid named, rather than
|
|
365
|
-
duplicated. Stop that pid, or use `persistent: true`, which is the supported way to own a portless
|
|
366
|
-
process across a panel restart.
|
|
295
|
+
## Persistent entries
|
|
367
296
|
|
|
368
|
-
|
|
297
|
+
`"persistent": true` keeps the entry running whatever happens to the panel — `down`, a restart, or a
|
|
298
|
+
kill. It is off by default and set per entry.
|
|
299
|
+
|
|
300
|
+
The panel runs the entry under a **nanny** (the same CLI in a hidden mode) that owns its pipes and
|
|
301
|
+
writes its log. The panel reattaches to the nanny on the next boot through
|
|
302
|
+
`.hh/<workspace>/.state/<id>.json`.
|
|
303
|
+
|
|
304
|
+
- **`down`, `restart` and `stop-all` leave it running** and say so. An explicit **Stop**, or removing or
|
|
305
|
+
disabling the entry, ends it. The panel's **Stop all** asks (**Ignore** / **With persistent**);
|
|
306
|
+
the API takes `POST /api/servers/stop-all?withPersistent=true`.
|
|
307
|
+
- **`down --with-persistent` / `restart --with-persistent` stop them too**, through the panel when it
|
|
308
|
+
is up, or by signalling each nanny from its state file when it is not. `restart --with-persistent`
|
|
309
|
+
starts them again afterwards, `autostart: false` included.
|
|
310
|
+
- **It is reattached, not restarted** — even with `--no-autostart`.
|
|
311
|
+
- **Logs keep flowing** while the panel is down. A log file is always written for it, even with
|
|
312
|
+
`logs.persist: false` (the Logs page still hides it).
|
|
313
|
+
- **A crash while the panel is away is reported, not restarted**: it shows **crashed** on the next boot
|
|
314
|
+
with the exit code explained (`code 137 (SIGKILL — which the kernel sends when memory runs out)`).
|
|
315
|
+
- **`onPortConflict` applies only when the state file is gone.** A program that restarts itself wants
|
|
316
|
+
`reclaim`, not `follow`: the nanny exits with its child, so `follow` would adopt a successor with no
|
|
317
|
+
log capture.
|
|
369
318
|
|
|
370
|
-
###
|
|
319
|
+
### What still ends one
|
|
371
320
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
321
|
+
- **systemd** with the default `KillMode=control-group` kills the whole cgroup, nanny included. Use
|
|
322
|
+
`KillMode=process` to let the panel decide.
|
|
323
|
+
- **A container** stops everything in it, so persistence lasts as long as the container.
|
|
375
324
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
3. If the port is somehow still held, the entry goes to **conflict** with the pids it tried —
|
|
379
|
-
it does **not** retry in a loop.
|
|
325
|
+
`down` forces the panel only after the slowest configured stop has had its time (between 20 s and 10
|
|
326
|
+
minutes), and even then ends only the panel's own pid — so a persistent entry survives that too.
|
|
380
327
|
|
|
381
|
-
|
|
382
|
-
which pids it stopped and why. It will not touch the panel itself or any process the panel
|
|
383
|
-
supervises: a port held by a sibling entry is a config mistake and still blocks, exactly as it does
|
|
384
|
-
under `block`. If it is a stray leftover you would rather inspect first, the **Free port** button on
|
|
385
|
-
the server card does the same thing on demand.
|
|
328
|
+
## Orphaned processes
|
|
386
329
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
330
|
+
**Any supervised server outlives the panel being killed.** The child runs in its own process group and
|
|
331
|
+
writes its output to files it holds open, so nothing breaks when the panel dies. The panel keeps a
|
|
332
|
+
handle per entry (`.hh/<workspace>/.state/<id>.run.json`) and **adopts** the child on the next boot.
|
|
333
|
+
What `persistent` adds is surviving the panel's *deliberate* stops.
|
|
391
334
|
|
|
392
|
-
|
|
335
|
+
An **orphan** is a process whose entry was **renamed or removed while the panel was not running**: it
|
|
336
|
+
keeps running and holding its port with nothing to own it. (Edit the config while the panel is up and
|
|
337
|
+
it stops the old entry itself.) **Servers** shows a warning naming each orphan's id, pid and start time,
|
|
338
|
+
with a **Stop it** button. There is no automatic kill.
|
|
339
|
+
|
|
340
|
+
## Where a server's output goes
|
|
393
341
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
the panel can go away: `down`, a restart, or being killed outright.
|
|
397
|
-
|
|
398
|
-
<sub>Ordinary entries already survive being *killed* — see [Orphaned processes](#orphaned-processes).
|
|
399
|
-
What `persistent` adds is surviving the panel's **deliberate** stops, `down` and `restart` included,
|
|
400
|
-
with its output still being captured and its restart policy still the panel's job.</sub>
|
|
401
|
-
|
|
402
|
-
How it works: the panel does not run the entry directly. It spawns a **nanny** — the same CLI, hidden
|
|
403
|
-
`__nanny` mode — which starts the entry, owns its pipes and writes its output to the entry's own log
|
|
404
|
-
file. The nanny is what survives; the panel reattaches to it on the next boot through
|
|
405
|
-
`.hh/<workspace>/.state/<id>.json`, and a stale file is how it learns how a child ended while nobody
|
|
406
|
-
was watching.
|
|
407
|
-
|
|
408
|
-
What that changes:
|
|
409
|
-
|
|
410
|
-
- **`down`, `restart` and `stop-all` leave it running** and say so (`2 persistent server(s) left
|
|
411
|
-
running: …`). Only an explicit **Stop** on that entry — or removing/disabling it — ends it.
|
|
412
|
-
`POST /api/servers/stop-all?withPersistent=true` is the same choice from the API, and the panel's
|
|
413
|
-
**Stop all** asks it in a popover — **Ignore** leaves them running, **With persistent** ends them.
|
|
414
|
-
- **`down --with-persistent` (and `restart --with-persistent`) stop them as well.** That is the
|
|
415
|
-
flag's whole job, and it works in both situations: with the panel up the stop goes through it, so
|
|
416
|
-
the entry gets its log line, history and health recorded like a click in the UI; with the panel
|
|
417
|
-
already gone each nanny is signalled directly from its `.state` record, which is what makes the
|
|
418
|
-
flag usable after a crash. `restart --with-persistent` starts them back afterwards, including
|
|
419
|
-
entries marked `autostart: false` that `up` alone would leave stopped.
|
|
420
|
-
- **It is reattached, not restarted.** `--no-autostart` still starts nothing, but a persistent entry
|
|
421
|
-
that is already running is adopted, because leaving it unmanaged would make the panel treat its own
|
|
422
|
-
server as a stranger on the port.
|
|
423
|
-
- **Logs keep flowing.** The panel tails the nanny's file, so history survives the panel being down;
|
|
424
|
-
`logs.persist: false` still keeps it out of the Logs page — but a file has to exist in the
|
|
425
|
-
workspace's `.logs/`, because there is no pipe to carry the output.
|
|
426
|
-
- **A crash while the panel is away is reported, not restarted.** Retries and backoff remain the
|
|
427
|
-
panel's job, so an entry that dies with nobody watching shows up as **crashed** on the next boot
|
|
428
|
-
with the reason in its log — the exit code, explained when it has a conventional meaning
|
|
429
|
-
(`code 137 (SIGKILL — which the kernel sends when memory runs out)`), because that is the one an
|
|
430
|
-
operator would otherwise have to look up. `home-hosted status` prints the directory those files
|
|
431
|
-
live in, and names the `<id>.log` convention once there is one to read.
|
|
432
|
-
- **Port policies still apply, as a fallback.** A persistent entry reattaches from its state file
|
|
433
|
-
before any preflight runs, so `onPortConflict` matters only when that state is gone — and `follow`
|
|
434
|
-
is then the policy that adopts instead of blocking.
|
|
435
|
-
- **A program that restarts itself wants `reclaim`, not `follow`.** The nanny lives exactly as long
|
|
436
|
-
as the child it owns: when that child exits to hand over to a successor, the nanny exits too, and
|
|
437
|
-
nothing is left writing the entry's log — `follow` would adopt the successor with no capture at
|
|
438
|
-
all. `reclaim` stops it and starts a fresh nanny, which is both the log and the persistence back.
|
|
342
|
+
When an entry crashes or is backing off, its card and detail page quote the last lines the failed run
|
|
343
|
+
wrote to stderr under the crash summary, with a link to the full output.
|
|
439
344
|
|
|
440
|
-
|
|
345
|
+
Two files per entry, `.hh/<workspace>/.state/<id>.out` and `<id>.err`. The child writes them; the panel
|
|
346
|
+
reads them back into the log, the Logs page and SSE. They are **transport, not history**: not served,
|
|
347
|
+
not counted by `logs.keep`, not backed up, and deleted with the entry. The file to keep is
|
|
348
|
+
`.logs/<id>.log`. A `persistent` entry skips them — its nanny writes the log directly.
|
|
349
|
+
|
|
350
|
+
### A server that outruns the reader
|
|
351
|
+
|
|
352
|
+
The panel reads up to 256 KiB per stream four times a second (about 1 MB/s), and empties a file once it
|
|
353
|
+
has reached 8 MB and been fully read. A server that sustains more than that falls behind; past an 8 MB
|
|
354
|
+
backlog the oldest unread whole lines are dropped, with a line in the entry's log:
|
|
355
|
+
`the server wrote faster than the panel could read it — N KiB of its output was dropped`. A home
|
|
356
|
+
service seeing that is usually stuck in a log loop.
|
|
357
|
+
|
|
358
|
+
## Editing fields
|
|
359
|
+
|
|
360
|
+
A save from the panel is validated, atomic, and sends only the fields you changed. A cleared number box
|
|
361
|
+
keeps its value rather than becoming `0`. If the entry changed elsewhere while you were editing, the
|
|
362
|
+
page keeps your edits and saves only them.
|
|
441
363
|
|
|
442
|
-
|
|
443
|
-
|
|
364
|
+
Hand edits to the file (an editor, `git checkout`, config management) are picked up within a couple of
|
|
365
|
+
seconds:
|
|
444
366
|
|
|
445
|
-
- **
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
367
|
+
- **A changed definition** takes effect on that entry's next start; a running process is not restarted.
|
|
368
|
+
- **An added entry** appears, but nothing starts it until the next `up` (if `autostart`) — the same
|
|
369
|
+
for the panel, the API and `home-hosted add` ([CLI.md](./CLI.md#declaring-servers)). A duplicate id
|
|
370
|
+
is refused (`409 SERVER_EXISTS`). **A removed entry** is stopped and forgotten.
|
|
371
|
+
- **A file that does not parse or fails the schema** is reported with its path, and the running config
|
|
372
|
+
is kept until you fix it.
|
|
373
|
+
- **A lowered `logs.keep`** deletes rotations above it, as it would from the panel.
|
|
374
|
+
- **The panel-wide `.hh/settings.json`** is watched too. A new `control.host` or `port` waits for a
|
|
375
|
+
restart; a revision that does not parse, or would newly expose the panel without a secret, is
|
|
376
|
+
logged and not applied.
|
|
450
377
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
`--with-persistent` stops each nanny by pid, so it ends them on either path — and
|
|
455
|
-
`restart --with-persistent` has to stop them for real, because `up` reattaches to a nanny that is
|
|
456
|
-
still alive.
|
|
378
|
+
A panel save never overwrites an edit it has not read: if the file changed on disk, the save is refused
|
|
379
|
+
(`409 CONFIG_CHANGED_ON_DISK`), the panel reloads, and you save again. While the file is unusable,
|
|
380
|
+
every save is refused the same way. A UTF-8 BOM or UTF-16LE (common from Windows tools) is read fine.
|
|
457
381
|
|
|
458
382
|
## CPU temperature where the OS exposes none
|
|
459
383
|
|
|
460
|
-
The Host vitals tile reads **n/a** when the machine offers no sensor
|
|
461
|
-
|
|
462
|
-
the Windows-side ACPI zone answers a constant 20 °C whatever the load — so there is nothing honest to
|
|
463
|
-
report. macOS and plain Windows behave the same way.
|
|
384
|
+
The Host vitals tile reads **n/a** when the machine offers no sensor — typical on WSL2 (no
|
|
385
|
+
`thermal_zone*`, empty `/sys/class/hwmon`), macOS and plain Windows.
|
|
464
386
|
|
|
465
|
-
If your hardware
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
(default 5000) kills a helper that hangs.
|
|
387
|
+
If your hardware has a sensor, give the panel a command that prints it: **Global settings → Host →
|
|
388
|
+
Temperature command** (`host.tempCommand` in `settings.json`). It runs on every sample and takes the
|
|
389
|
+
first plausible °C number from stdout; empty uses the built-in probe, which you should keep wherever it
|
|
390
|
+
works. `tempCommandTimeoutMs` (default 5000) kills a helper that hangs.
|
|
469
391
|
|
|
470
392
|
### WSL2
|
|
471
393
|
|
|
472
|
-
|
|
473
|
-
[LibreHardwareMonitor](https://github.com/LibreHardwareMonitor/LibreHardwareMonitor)
|
|
474
|
-
does the setup:
|
|
394
|
+
The Windows host can read the sensor through
|
|
395
|
+
[LibreHardwareMonitor](https://github.com/LibreHardwareMonitor/LibreHardwareMonitor):
|
|
475
396
|
|
|
476
397
|
```bash
|
|
477
398
|
home-hosted setup-temp --wsl
|
|
478
399
|
```
|
|
479
400
|
|
|
480
|
-
It writes a PowerShell helper, offers the ~6 MB download, points `host.tempCommand` at the helper
|
|
481
|
-
|
|
482
|
-
**Global settings → Host vitals**, shown only on WSL.
|
|
401
|
+
It writes a PowerShell helper, offers the ~6 MB download, and points `host.tempCommand` at the helper
|
|
402
|
+
only once it answers. **Global settings → Host vitals** has the same button on WSL.
|
|
483
403
|
|
|
484
404
|
| flag | what it does |
|
|
485
405
|
| --- | --- |
|
|
486
406
|
| *(none)* | reports whether a source is set, and lists the options |
|
|
487
407
|
| `--wsl` | writes the helper and offers the download |
|
|
488
|
-
| `--wsl --download` / `--wsl --no-download` | install without asking / never install |
|
|
489
|
-
| `--clear` | stop using it and delete the helper |
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
ask for elevation.
|
|
498
|
-
|
|
499
|
-
The PowerShell call costs a few hundred milliseconds per sample, so raise `host.intervalMs` to 15–30 s.
|
|
500
|
-
The value is the host's CPU, which the guest shares — measured 63.9 °C idle and 75.2 °C under load on a
|
|
501
|
-
NucBox EVO-X1, where every built-in path returned a constant 20 °C.
|
|
502
|
-
|
|
503
|
-
> [!NOTE]
|
|
504
|
-
> Where the panel *can* read a sensor, leave `Temperature command` empty — it overrides the probe.
|
|
505
|
-
|
|
506
|
-
## Editing fields
|
|
507
|
-
|
|
508
|
-
Changes from the panel are atomic and validated before they are written, and a save sends only the
|
|
509
|
-
fields you changed. If the entry changes elsewhere while its config page holds unsaved edits, the
|
|
510
|
-
page keeps your edits and says so; saving then writes only them, never back over the other change.
|
|
511
|
-
A number box you clear keeps its current value rather than becoming `0`.
|
|
512
|
-
|
|
513
|
-
Editing the file by hand —
|
|
514
|
-
an editor, a `git checkout`, a config-management tool — is picked up within a couple of seconds, no
|
|
515
|
-
restart needed:
|
|
516
|
-
|
|
517
|
-
- **A definition you changed** takes effect on that entry's next start; a running process is not
|
|
518
|
-
restarted under you.
|
|
519
|
-
- **A definition you added** appears (and starts itself if it is `autostart`); **one you removed** is
|
|
520
|
-
stopped and forgotten.
|
|
521
|
-
- **A file the schema rejects, or one that cannot be parsed**, is reported in the panel with the
|
|
522
|
-
exact path and the running config is left alone. Fix it and it reloads on its own — a typo never
|
|
523
|
-
stops a server.
|
|
524
|
-
|
|
525
|
-
- **A lowered `logs.keep`** deletes the rotations above it on the next reload, the same as saving it
|
|
526
|
-
in the panel. Both edit one file, so both mean the same thing.
|
|
527
|
-
- **The panel-wide `.hh/settings.json`** (listener, host vitals, backups, proxy — what
|
|
528
|
-
`home-hosted setup-temp` writes) is watched the same way. A new `control.host` or `port` waits for a
|
|
529
|
-
restart, as it does when saved in the panel. A revision that cannot be parsed, or one that would
|
|
530
|
-
newly expose the panel without a password, is not applied: the panel logs why and keeps the
|
|
531
|
-
settings it was running.
|
|
532
|
-
|
|
533
|
-
A save from the panel never overwrites an edit it has not read yet: if the file changed on disk since
|
|
534
|
-
the panel last loaded it, the save is refused (`409 CONFIG_CHANGED_ON_DISK`), the panel reloads the
|
|
535
|
-
file, and saving again applies your change on top of the edit. While the file on disk is one the
|
|
536
|
-
panel could not use — it does not parse, fails the schema, or was refused for exposing the panel —
|
|
537
|
-
every save from the panel is refused the same way, naming the problem, so your edit is never
|
|
538
|
-
replaced: fix or revert it, and the next save builds on it.
|
|
539
|
-
|
|
540
|
-
Whatever encoding your editor puts on the file is fine. A UTF-8 **byte-order mark** (Notepad's
|
|
541
|
-
"UTF-8 with BOM", PowerShell 5.1's `Set-Content -Encoding UTF8`) and the **UTF-16LE** that
|
|
542
|
-
`Out-File` and `>` write on Windows are both read as the JSON they hold, so the panel only ever
|
|
543
|
-
complains about the JSON itself.
|
|
408
|
+
| `--wsl --download` / `--wsl --no-download` | install without asking / never install (either without `--wsl` is refused) |
|
|
409
|
+
| `--clear` | stop using it, and delete the helper when this home's command runs it (refused beside the others) |
|
|
410
|
+
|
|
411
|
+
- It installs into `%ProgramData%\home-hosted`, which may ask for elevation.
|
|
412
|
+
- **The panel must run elevated (Administrator) for CPU temperature**: otherwise the sensor reads `0`,
|
|
413
|
+
which the panel reports as "LibreHardwareMonitor needs administrator rights".
|
|
414
|
+
- Each sample costs a few hundred milliseconds, so raise `host.intervalMs` to 15–30 s.
|
|
415
|
+
- A helper left by an earlier setup under another Windows account may be undeletable from WSL; the
|
|
416
|
+
error names the elevated `Remove-Item` command to run.
|