home-hosted 0.13.1 → 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-DeAJ3pbO.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-C59ne5aM.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-rewguyXg.js → nanny-BWh7nuvv.js} +21 -14
- package/dist/chunks/nanny-BWh7nuvv.js.map +1 -0
- package/dist/chunks/{nanny-Dnun3hVB.js → nanny-BjF2-1pv.js} +3 -3
- package/dist/chunks/{nanny-Dnun3hVB.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-ClVuNJRo.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-k5VBw8t9.js → port-CnsrxKNR.js} +23 -70
- 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-BYu_E7x5.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-BOBh9MBf.js → src-BnzkVy_M.js} +12547 -10578
- package/dist/chunks/src-BnzkVy_M.js.map +1 -0
- package/dist/chunks/{status-B6f2-qhs.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-DNZuTi2q.js → up-BQSnYxYd.js} +47 -53
- package/dist/chunks/up-BQSnYxYd.js.map +1 -0
- package/dist/chunks/{usage-BrnDARNM.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-DeAJ3pbO.js.map +0 -1
- package/dist/chunks/backups-twva7x2n.js +0 -4691
- package/dist/chunks/backups-twva7x2n.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-CofN9k6Q.js +0 -247
- package/dist/chunks/daemon-CofN9k6Q.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/docker-Cy9Lyvda.js.map +0 -1
- package/dist/chunks/down-C59ne5aM.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-COyCJXj9.js +0 -1172
- package/dist/chunks/nanny-COyCJXj9.js.map +0 -1
- package/dist/chunks/nanny-rewguyXg.js.map +0 -1
- package/dist/chunks/nanny-sweep-ClVuNJRo.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-k5VBw8t9.js.map +0 -1
- package/dist/chunks/restart-BYu_E7x5.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-By-zktjx.js +0 -169
- package/dist/chunks/server-By-zktjx.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-xJkA1IZp.js +0 -78
- package/dist/chunks/set-token-xJkA1IZp.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-BOBh9MBf.js.map +0 -1
- package/dist/chunks/status-B6f2-qhs.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-DNZuTi2q.js.map +0 -1
- package/dist/chunks/usage-BrnDARNM.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/BACKUPS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Backups
|
|
2
2
|
|
|
3
|
-
One `.zip` holds the panel and the workspaces you pick — settings, servers, secrets and the
|
|
4
|
-
each entry declares — and puts it back, on this machine or a blank one. Plain, or AES-256 with a
|
|
3
|
+
One `.zip` holds the panel and the workspaces you pick — settings, servers, **jobs**, secrets and the
|
|
4
|
+
data each entry declares — and puts it back, on this machine or a blank one. Plain, or AES-256 with a
|
|
5
5
|
password. **Global settings → Backups**, or the CLI:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
@@ -10,47 +10,51 @@ home-hosted backup create --all --confirm
|
|
|
10
10
|
home-hosted backup create --all --exclude global:secrets --confirm
|
|
11
11
|
home-hosted backup restore <name> --all --confirm
|
|
12
12
|
home-hosted backup restore --from /media/usb/x.zip --all --confirm
|
|
13
|
+
home-hosted backup create --all --encrypt --confirm # asks for an archive password, without echo
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
An encrypted archive's password comes from `HHOSTED_BACKUP_PASSWORD` (for a script), or a prompt:
|
|
17
|
+
`--encrypt` asks on `create`, and `restore` asks when the archive needs one. `--password <text>` still
|
|
18
|
+
works but warns — it lands in shell history and the process list.
|
|
19
|
+
|
|
20
|
+
The CLI works with the panel **stopped**, which is when you usually need it. Without `--confirm`,
|
|
21
|
+
`create` and `restore` plan first: at a terminal they ask, and without one (cron, CI) they print the
|
|
22
|
+
plan and exit 1, so an unattended job never mistakes a plan for a backup. `--json` without `--confirm`
|
|
23
|
+
prints just the plan. Over the HTTP API, `POST /api/backups` creates at once, and a restore plans
|
|
24
|
+
unless `?confirm=true`.
|
|
25
|
+
|
|
26
|
+
`backup list` shows each archive's time in this machine's zone (`2026-11-17 10:11 +07:00`); the file
|
|
27
|
+
**name** stays UTC, so the two differ by the host's offset.
|
|
21
28
|
|
|
22
29
|
## What an archive holds
|
|
23
30
|
|
|
24
|
-
|
|
31
|
+
Pick whole workspaces, or single pieces of one:
|
|
25
32
|
|
|
26
33
|
| id | what |
|
|
27
34
|
| --- | --- |
|
|
28
|
-
| `global:settings`, `global:secrets`, `global:tls` | panel-wide settings
|
|
29
|
-
| `workspace:<id>:settings` · `:servers` · `:secrets` | a workspace's settings, its `servers.config.json`, its notification
|
|
30
|
-
| `workspace:<id>:secrets:<name>` | one secret
|
|
35
|
+
| `global:settings`, `global:secrets`, `global:tls` | panel-wide settings; account and API-token hashes, plus server and job secret environment values; the TLS pair |
|
|
36
|
+
| `workspace:<id>:settings` · `:servers` · `:jobs` · `:secrets` | a workspace's settings, its `servers.config.json`, its `jobs.config.json`, its secrets (notification and DDNS credentials, secret environment) |
|
|
37
|
+
| `workspace:<id>:secrets:<name>` | one secret on its own; `:serverEnv` is every server's [secret environment](./SERVERS.md#secret-environment) |
|
|
31
38
|
| `workspace:<id>:data:<path>` | one declared data directory |
|
|
32
39
|
|
|
33
|
-
A
|
|
34
|
-
directories inside them (`node_modules`, `dist`, `.next`, caches) are skipped unless the entry sets
|
|
35
|
-
`backupIgnoreGenerated: false`. A symlink that leads **outside** a declared path is not followed —
|
|
36
|
-
declare its target instead — and file permission bits travel (`0600` stays `0600`). A declared path
|
|
37
|
-
that is *itself* a symlink (`data -> /mnt/disk/data`) is the data: its target is captured, and a
|
|
38
|
-
restore writes back into that target. A declared path that ends up holding no files (a mount that
|
|
39
|
-
was not up) is still archived, with a warning in the create result and on the CLI's stderr. Each
|
|
40
|
-
declared path gets its own place in the archive, however alike two names read (`/srv/app-data`,
|
|
41
|
-
`/srv/app/data`); archives written before that still restore.
|
|
40
|
+
A workspace with no `jobs.config.json` has no jobs entry, and a restore never writes an empty one.
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
A data directory is anything an entry declares in `dataEnvs` or `backupPaths`:
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
- Generated directories inside it (`node_modules`, `dist`, `.next`, caches) are skipped unless the entry
|
|
45
|
+
sets `backupIgnoreGenerated: false`.
|
|
46
|
+
- A symlink leading **outside** a declared path is not followed — declare its target instead. A
|
|
47
|
+
declared path that is *itself* a symlink (`data -> /mnt/disk/data`) captures, and restores into, its
|
|
48
|
+
target.
|
|
49
|
+
- Permission bits travel (`0600` stays `0600`).
|
|
50
|
+
- A declared path holding no files (a mount that was not up) is still archived, with a warning.
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
## Automatic backups
|
|
53
|
+
|
|
54
|
+
A schedule writes one archive every N hours, named `auto-…`, with its own retention; `Keep` bounds the
|
|
55
|
+
archives you take by hand, which a scheduled pass never prunes. Only archives the panel wrote are ever
|
|
56
|
+
pruned, and age is read from the name, not the file date. A scheduled pass is skipped while a restore
|
|
57
|
+
runs.
|
|
54
58
|
|
|
55
59
|
| Mode | Carries | CLI spelling |
|
|
56
60
|
| --- | --- | --- |
|
|
@@ -63,17 +67,20 @@ What a schedule captures:
|
|
|
63
67
|
Start a **blank** home-hosted anywhere, upload the archive, restore. Workspaces the target has never
|
|
64
68
|
seen are created, data lands where *this* machine's config says, and `autostart` entries come up.
|
|
65
69
|
|
|
66
|
-
- **Paths match by declaration
|
|
67
|
-
|
|
70
|
+
- **Paths match by declaration**: `{projectDir}`, `{dataRoot}` and `{home}` follow the restoring panel;
|
|
71
|
+
a literal absolute path stays that path.
|
|
68
72
|
- **A restore never writes where no config declares**, and never across workspaces.
|
|
69
|
-
- **Older archives are
|
|
73
|
+
- **Older archives are upgraded** through the same migrations `home-hosted migrate` runs; an archive
|
|
70
74
|
from a *newer* release is refused.
|
|
71
|
-
- **
|
|
72
|
-
|
|
73
|
-
- **
|
|
74
|
-
|
|
75
|
-
- **
|
|
76
|
-
|
|
75
|
+
- **A replaced `jobs.config.json` is kept as `.bak`** beside the new one. Servers and settings are
|
|
76
|
+
replaced in place.
|
|
77
|
+
- **Secrets merge by field** — restoring the Telegram token leaves DDNS credentials alone, and an
|
|
78
|
+
excluded secret keeps its local copy.
|
|
79
|
+
- **Account and API-token hashes are secrets too**: restoring them reinstates the old machine's
|
|
80
|
+
credentials. Leave `global:secrets` unticked, or rotate afterwards (`home-hosted account secret <id>`).
|
|
81
|
+
- **The plaintext first-run secret is never archived**, only its hash. It still signs in, but `up`
|
|
82
|
+
and `status` say "the first-run secret is in use but no longer recorded" until you run
|
|
83
|
+
`home-hosted account reset`.
|
|
77
84
|
- **DDNS credentials are sealed under `HHOSTED_DDNS_SECRET`**, which is not in the archive. Use the
|
|
78
85
|
same value on the new host, or re-enter them.
|
|
79
86
|
|
|
@@ -82,22 +89,22 @@ seen are created, data lands where *this* machine's config says, and `autostart`
|
|
|
82
89
|
| | Restored | Still yours to do |
|
|
83
90
|
| --- | --- | --- |
|
|
84
91
|
| Panel settings, workspaces, servers, defaults | ✅ | restart the panel if the listener or TLS changed (the plan says so) |
|
|
85
|
-
|
|
|
92
|
+
| Jobs — schedules, commands, `secretEnv` names | ✅ | secret **values** come back with the workspace's secrets; schedules fire from the next matching time |
|
|
93
|
+
| Declared data directories | ✅ | see [Databases](#databases) |
|
|
86
94
|
| Notification and DDNS config | ✅ | DDNS credentials need the same `HHOSTED_DDNS_SECRET` |
|
|
87
|
-
|
|
|
95
|
+
| Accounts and API tokens | per secret | leave unticked, or rotate |
|
|
88
96
|
| Reverse-proxy routes | ✅ | certificates are reissued; re-upload a `manual` pair |
|
|
89
97
|
| Reverse-proxy engine | ❌ | reinstall it from Global settings → Reverse proxy |
|
|
90
98
|
| Logs, crash history, nanny state | ❌ | they describe the old box |
|
|
91
|
-
| An entry's `envFile` | ❌ |
|
|
99
|
+
| An entry's `envFile` | ❌ | copy it, declare its directory in `backupPaths`, or move it to `secretEnv` |
|
|
92
100
|
| The panel's own environment (`HHOSTED_*`, `${ENV}` values) | ❌ | set them on the new host |
|
|
93
101
|
|
|
94
102
|
## Worked example
|
|
95
103
|
|
|
96
|
-
[`demo/blank-host-restore.sh`](./demo/blank-host-restore.sh) runs the whole move against real
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
data back — the script then reads the database on host B to prove it.
|
|
104
|
+
[`demo/blank-host-restore.sh`](./demo/blank-host-restore.sh) runs the whole move against real panels in
|
|
105
|
+
throwaway directories (it needs Docker): a MongoDB-backed entry on host A is archived with
|
|
106
|
+
`backup create --all --exclude global:secrets --confirm`, restored onto a blank host B with
|
|
107
|
+
`backup restore --from <archive> --all --confirm`, and the data is read back.
|
|
101
108
|
|
|
102
109
|
```bash
|
|
103
110
|
docs/demo/blank-host-restore.sh # cleans up after itself; touches nothing of yours
|
|
@@ -105,13 +112,11 @@ docs/demo/blank-host-restore.sh # cleans up after itself; touches nothing of y
|
|
|
105
112
|
|
|
106
113
|
## Databases
|
|
107
114
|
|
|
108
|
-
Data directories are copied file by file while servers keep running. That is fine for
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
For a real database, either stop that entry around the backup, or declare `dump`/`load` hooks so
|
|
113
|
-
the engine itself writes the backup ([SERVERS.md](./SERVERS.md#dumping-a-database-for-backups)).
|
|
115
|
+
Data directories are copied file by file while servers keep running. That is fine for most app data,
|
|
116
|
+
but **not a consistent snapshot of a live database** — SQLite mid-transaction or a Postgres data
|
|
117
|
+
directory can be captured torn. Stop that entry around the backup, or declare `dump`/`load` hooks so
|
|
118
|
+
the engine writes the backup itself ([SERVERS.md](./SERVERS.md#dumping-a-database-for-backups)).
|
|
114
119
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
before applying, or restart them after.
|
|
120
|
+
A restore has the mirror-image hazard: data replaced under a **running** server. The plan names those
|
|
121
|
+
entries (`Data was replaced under a running server` in the panel, `! worker is running — …; restart
|
|
122
|
+
it` from the CLI); stop them before applying, or restart them after.
|
package/docs/CLI.md
CHANGED
|
@@ -1,43 +1,158 @@
|
|
|
1
1
|
# The CLI
|
|
2
2
|
|
|
3
|
-
`home-hosted <command>`, or `hh <command>` once installed. `home-hosted
|
|
4
|
-
`home-hosted help <command>`) prints
|
|
5
|
-
the one you meant.
|
|
6
|
-
|
|
3
|
+
`home-hosted <command>`, or `hh <command>` once installed. `home-hosted --help` lists every command and
|
|
4
|
+
flag; `home-hosted <command> --help` (or `home-hosted help <command>`) prints one command's. A
|
|
5
|
+
misspelled command or flag suggests the one you meant. This page is what each command does; the rules
|
|
6
|
+
a script can rely on are at the end, under [For scripts](#for-scripts).
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## The panel and one server
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
10
|
+
- **`up`** starts the panel detached. `--port`/`--host` are saved to `settings.json`, so the next plain
|
|
11
|
+
`up` binds the same way. With a panel already running it says where and exits 0 — unless
|
|
12
|
+
`--port`/`--host` ask for something else, which is refused (exit 1) and points at `restart`.
|
|
13
|
+
`--print-config` prints the effective config and starts nothing; `--foreground` stays in this
|
|
14
|
+
process (systemd, docker).
|
|
15
|
+
- **`down`** stops the panel and every server it started. Persistent entries keep running unless
|
|
16
|
+
`--with-persistent`.
|
|
17
|
+
- **`restart`** with no id is `down` then `up`, taking `up`'s flags; it checks them before stopping
|
|
18
|
+
anything. To move the port or bind without stopping servers, use **Global settings → Listener**.
|
|
19
|
+
**`restart <id>`** restarts one server and leaves the panel up; panel flags are refused there.
|
|
20
|
+
- **`start <id>`** starts one server, bringing up what it `dependsOn` first, and waits for it to be
|
|
21
|
+
ready. `--free-port` frees its port before starting. An entry already running says `already running`
|
|
22
|
+
and exits 0; an unknown id suggests the nearest one (`ls` lists them).
|
|
23
|
+
- **`stop <id>`** stops only that server (`already stopped` if it was). With the panel down it still stops a **persistent** entry
|
|
24
|
+
through its own supervisor.
|
|
25
|
+
- **`free-port <id>`** asks whatever holds that server's port to stop, from a fresh lookup. A process
|
|
26
|
+
the panel supervises is refused.
|
|
18
27
|
|
|
19
|
-
##
|
|
28
|
+
## Accounts and tokens
|
|
20
29
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
```bash
|
|
31
|
+
home-hosted account create admin # a new account; the secret is printed once
|
|
32
|
+
home-hosted account create monitor --scope read # a monitor that cannot start or change anything
|
|
33
|
+
home-hosted account ls # ids, labels, scopes — never a secret
|
|
34
|
+
home-hosted account edit monitor --disable # refuse it without deleting it (--enable undoes it)
|
|
35
|
+
home-hosted account secret admin # prompts, or HHOSTED_SECRET=… for a script
|
|
36
|
+
home-hosted account revoke monitor # immediately; its sessions end too
|
|
37
|
+
home-hosted account reset admin # the recovery path when you are locked out
|
|
38
|
+
home-hosted account disable-auth # the guard off; the accounts are kept
|
|
39
|
+
home-hosted account enable-auth # and back on
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
An **account** is one credential: its id and secret both sign in to the panel and authenticate the API
|
|
43
|
+
as `Authorization: Bearer <id>:<secret>`. Only a hash is stored, so the secret is shown once
|
|
44
|
+
(`HHOSTED_SECRET` sets your own on `create`). `--label` names it for people; `--json` prints the id and
|
|
45
|
+
secret as one document.
|
|
46
|
+
|
|
47
|
+
`--scope` takes a comma-separated subset of `read`, `lifecycle`, `config`, `proxy`, `admin` (default:
|
|
48
|
+
all five), and `-w/--workspace` limits the account to some workspaces — what each scope allows:
|
|
49
|
+
[SECURITY.md](./SECURITY.md#an-account-is-scoped-and-the-scopes-mean-something).
|
|
50
|
+
|
|
51
|
+
`revoke` refuses the last account that can sign in. `reset` is what to run when you cannot sign in at
|
|
52
|
+
all: on the machine that runs the panel, it writes a fresh generated secret and prints it
|
|
53
|
+
(`HHOSTED_SECRET` sets your own, held to the same length rule as `account secret`). With no id it picks
|
|
54
|
+
an `admin` account, never a read-only one, and an account it resets is enabled again. Each subcommand
|
|
55
|
+
takes only its own flags; `--json` on `create`, `ls`, `edit`, `revoke` and `reset` prints one document.
|
|
56
|
+
|
|
57
|
+
A **token** is the API half only: it never signs in to the UI, and it can be minted with no panel
|
|
58
|
+
running. Reach for `account` when a *person* signs in, `token` when a *script* calls the API.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
home-hosted token create --name "Deploy Hook" --scope lifecycle # prints the value once; id: deploy-hook
|
|
62
|
+
home-hosted token ls # ids, names, scopes, last use
|
|
63
|
+
home-hosted token revoke deploy-hook
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`--name` and `--scope` are required; a name with a space needs quotes (an unquoted second word is
|
|
67
|
+
refused). **The id is a slug of the name**, and `revoke` takes the id — `ls` shows both. Either credential is managed only from a signed-in session or this CLI, never with a bearer
|
|
68
|
+
credential, so a leaked one cannot mint another; revoke one that may have leaked.
|
|
69
|
+
|
|
70
|
+
## Declaring servers
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
home-hosted add web --port 4000 -- node server.js # everything after -- is the command
|
|
74
|
+
home-hosted add api --cwd ./api --autostart -- pnpm start # --cwd relative to --project
|
|
75
|
+
home-hosted add db -w media --persistent -- ./start-db.sh
|
|
76
|
+
home-hosted add app --secret-env DATABASE_URL,API_KEY -- node app.js # declares the names only
|
|
77
|
+
home-hosted ls # ID STATUS PORT COMMAND
|
|
78
|
+
home-hosted ls -w media --json
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
With the panel up, `add` and `ls` go through it, with the same validation as **➕ Add server**. With it
|
|
82
|
+
down they read and write the workspace's `servers.config.json` directly; `ls` then shows no status. An
|
|
83
|
+
added entry is **not started**, `autostart` or not — run `start <id>`. An id the workspace already has
|
|
84
|
+
is refused, and `add` never creates a workspace. An id is lowercase letters, digits, `-` and `_`,
|
|
85
|
+
starting with a letter or digit. The command is a program, not a shell line: `-- node server.js`, not
|
|
86
|
+
`-- "node server.js"` (`add` warns about a space in it). `--secret-env NAME` (repeatable, or
|
|
87
|
+
comma-separated) declares a secret's name, so `secret set` works straight after.
|
|
88
|
+
|
|
89
|
+
## Secret environment
|
|
90
|
+
|
|
91
|
+
Only a secret's **name** goes in an entry, in `secretEnv`; the value lives in the workspace's secrets
|
|
92
|
+
file. Declare the name first (`add … --secret-env NAME`, the panel's form, or the config), then:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
home-hosted secret set app DATABASE_URL # prompts without echo
|
|
96
|
+
printf '%s\n' "$DATABASE_URL" | home-hosted secret set app DATABASE_URL --stdin
|
|
97
|
+
home-hosted secret ls app # the names, and which have a value
|
|
98
|
+
home-hosted secret unset app DATABASE_URL
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
- The id can be a server or a **job** ([JOBS.md](./JOBS.md#a-jobs-secret-environment)). It resolves to
|
|
102
|
+
a server first; a server and a job sharing an id keep separate values, and `ls --json` names which
|
|
103
|
+
one answered.
|
|
104
|
+
- `set` refuses an undeclared name **before** it asks for a value, and refuses a blank value (use
|
|
105
|
+
`unset`).
|
|
106
|
+
- **No command prints a value** — not `ls`, not `--json`, not an error.
|
|
107
|
+
- With the panel down the file is written directly, and the next start reads it.
|
|
108
|
+
|
|
109
|
+
## Deploying
|
|
110
|
+
|
|
111
|
+
`deploy` runs an entry's `deploy` steps ([SERVERS.md](./SERVERS.md#deploying)), **waits**, and exits 1
|
|
112
|
+
if a step fails.
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
home-hosted deploy web # every step, then a restart
|
|
116
|
+
home-hosted deploy web --json # { server, ok, failedStep?, error?, durationMs }
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
With the panel down it runs the same steps and says nothing was restarted.
|
|
120
|
+
|
|
121
|
+
## Jobs
|
|
122
|
+
|
|
123
|
+
What a job is and how its schedule behaves: [JOBS.md](./JOBS.md).
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
home-hosted job ls # id, expression, NEXT run, LAST outcome and duration, state
|
|
127
|
+
home-hosted job ls --json # { jobs: [...] } — the same rows as GET /api/jobs
|
|
128
|
+
home-hosted job run nightly-backup # waits; exits 0 only when the run's outcome is ok
|
|
129
|
+
home-hosted job run nightly-backup --json # { job, ok, runId, outcome, exitCode, signal, startedAt, endedAt, … }
|
|
130
|
+
home-hosted job run nightly-backup --detach # starts it and prints the run id
|
|
131
|
+
home-hosted job stop nightly-backup # ends the run in flight
|
|
132
|
+
home-hosted job enable|disable nightly-backup # switches its schedule on or off
|
|
133
|
+
home-hosted job runs nightly-backup # the last runs, newest first
|
|
134
|
+
home-hosted job log nightly-backup # what its runs wrote, newest last
|
|
135
|
+
home-hosted job log nightly-backup --run <id> # one run's lines; --follow keeps printing new ones
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
`job run` prints the outcome rather than streaming output (that goes to the job's log). It is refused
|
|
139
|
+
while a run is already in flight (`JOB_RUNNING`), and every `job` command needs a running panel. `NEXT`
|
|
140
|
+
reads `never` for an expression that cannot come due, and `—` for a disabled or broken job. `log
|
|
141
|
+
--follow --json` prints one `{ job, line }` object per line. `ls` lists services only.
|
|
30
142
|
|
|
31
143
|
## What `status` tells you
|
|
32
144
|
|
|
33
145
|
```text
|
|
34
146
|
home-hosted <version>
|
|
35
147
|
status running
|
|
36
|
-
servers
|
|
148
|
+
servers 2 of 3 up
|
|
149
|
+
worker crashed ← needs attention
|
|
150
|
+
web running
|
|
151
|
+
api running
|
|
37
152
|
pid 4242 · up 2h 14m
|
|
38
153
|
url http://127.0.0.1:3999 (http)
|
|
39
|
-
… project, state, log and per-server log paths
|
|
40
|
-
|
|
154
|
+
… project, state (--home), panel log and per-server log paths, ui
|
|
155
|
+
login default / k7mq-x2pd-9fh (only while the first-run secret is in use)
|
|
41
156
|
```
|
|
42
157
|
|
|
43
158
|
`status --json` always carries `running` and `liveness`:
|
|
@@ -49,47 +164,138 @@ home-hosted <version>
|
|
|
49
164
|
| `gone` | nothing is running |
|
|
50
165
|
| `recycled` | the OS gave the recorded pid to another process; nothing is signalled |
|
|
51
166
|
|
|
52
|
-
- `running: true` with `"answering": false` means the process exists but does not respond
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
167
|
+
- `running: true` with `"answering": false` means the process exists but does not respond.
|
|
168
|
+
- With the panel not running, `exitedCleanly: true` (with `lastStopAt`) means someone ran `down`;
|
|
169
|
+
`false` means it died. A running panel sends no `exitedCleanly`.
|
|
170
|
+
- `answeringWithoutRecord`: `run.json` is missing but this home's panel answers on the configured port;
|
|
171
|
+
`down` refuses rather than guess what to stop. `portTakenByOther`: something else holds the port;
|
|
172
|
+
`down` has nothing to stop, and `up` needs another `--port`.
|
|
173
|
+
- With the panel stopped, persistent entries still running are listed (`persistentRunning`).
|
|
174
|
+
|
|
175
|
+
## Coming from pm2 or compose
|
|
176
|
+
|
|
177
|
+
`import` **prints a plan and writes nothing** until you pass `--confirm` (`--dry-run` never writes).
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
home-hosted import pm2 ecosystem.config.json # the plan
|
|
181
|
+
home-hosted import pm2 ecosystem.config.json --confirm # and write it
|
|
182
|
+
home-hosted import compose docker-compose.yml --id stack --confirm
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**pm2** — each `apps[]` element becomes one entry; `--env <name>` lays each app's `env_<name>` block
|
|
186
|
+
over its `env`, as pm2 does (a name no app declares is refused):
|
|
187
|
+
|
|
188
|
+
| pm2 | becomes |
|
|
189
|
+
| --- | --- |
|
|
190
|
+
| `name` | `id` (slugified; two names that land on one id are refused) |
|
|
191
|
+
| `script`, `interpreter` | `command` (the interpreter, default `node`) and `args[0]` (the script) |
|
|
192
|
+
| `args` | the rest of `args`, split on whitespace — a quoted argument is reported, not guessed |
|
|
193
|
+
| `cwd`, `env` | `cwd`, `env` |
|
|
194
|
+
| `env` whose name reads as a secret (`API_KEY`, `*_TOKEN`, …) | `secretEnv`; the value goes to the workspace's secrets file |
|
|
195
|
+
| `autorestart`, `max_restarts` | `restart.enabled`, `restart.maxRetries` |
|
|
196
|
+
| `max_memory_restart` | `resources.maxRssBytes` (`200M`, `1G`, or bytes) |
|
|
197
|
+
| `watch`, `cron_restart`, cluster `instances` | **not carried** — each is reported by name |
|
|
198
|
+
|
|
199
|
+
A `.js`/`.mjs`/`.cjs` ecosystem is code, so reading it means running it: pass `--allow-js` or export
|
|
200
|
+
JSON.
|
|
201
|
+
|
|
202
|
+
**compose** — one entry per stack, running `docker compose -f <file> up`; `--id` names it (default:
|
|
203
|
+
the file's directory name). A flag that belongs to the other kind (`--env`/`--allow-js` on compose,
|
|
204
|
+
`--id` on pm2) is refused.
|
|
205
|
+
|
|
206
|
+
Nothing is started: `home-hosted start <id>` when you are ready.
|
|
60
207
|
|
|
61
208
|
## Logs and usage
|
|
62
209
|
|
|
63
210
|
```bash
|
|
64
|
-
home-hosted logs # the panel's console
|
|
211
|
+
home-hosted logs # the panel's console
|
|
65
212
|
home-hosted logs --follow # like tail -f
|
|
66
|
-
home-hosted logs web
|
|
213
|
+
home-hosted logs web --lines all # one server's whole log (default: the last 50 lines)
|
|
67
214
|
home-hosted logs api -w staging # a server in another workspace
|
|
68
|
-
home-hosted usage #
|
|
215
|
+
home-hosted usage # CPU and memory per server, loudest first
|
|
69
216
|
```
|
|
70
217
|
|
|
71
218
|
`logs` reads files directly, so it works when the panel is wedged. An id the workspace does not
|
|
72
|
-
declare is refused with a suggestion
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
219
|
+
declare is refused with a suggestion. In `usage`, a stopped server shows a dash, never `0`, and
|
|
220
|
+
`STARTS` counts start events over the history window — a flapping server climbs even while its CPU
|
|
221
|
+
looks idle.
|
|
222
|
+
|
|
223
|
+
## Backups, UIs and temperature
|
|
224
|
+
|
|
225
|
+
- **`backup`** — `list`, `create`, `restore`, all with the panel stopped too:
|
|
226
|
+
[BACKUPS.md](./BACKUPS.md).
|
|
227
|
+
- **`ui-switch`** installs a UI from a release asset (`--repo`, `--tag`, `--asset`, `--list`) or a zip
|
|
228
|
+
(`--file <path|url>`; a plain `http://` URL needs `--insecure`). **`ui-update`** follows the
|
|
229
|
+
installed UI's releases (`--check` only reports); **`ui-revert`** goes back to the stock UI. Both
|
|
230
|
+
read `--token`, `GITHUB_TOKEN` or `GH_TOKEN` for GitHub. Building one:
|
|
231
|
+
[UI_CREATION.md](./UI_CREATION.md).
|
|
232
|
+
- **`setup-temp`** sets up CPU temperature where the OS exposes none (`--wsl` on WSL2, `--clear` to
|
|
233
|
+
stop): [SERVERS.md](./SERVERS.md#cpu-temperature-where-the-os-exposes-none).
|
|
234
|
+
- **`init`** scaffolds a project that keeps its state in the repo (`--dir`, `--name`, `--pm`,
|
|
235
|
+
`--no-install`, `-y`).
|
|
236
|
+
|
|
237
|
+
## Starting at boot
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
home-hosted service install # this account: systemd --user, a LaunchAgent, a logon task
|
|
241
|
+
home-hosted service install --startup # Windows only: a Startup-folder .cmd — needs no administrator
|
|
242
|
+
home-hosted service install --system # the machine, at boot (sudo / an administrator)
|
|
243
|
+
home-hosted service install --print # the unit on stdout, nothing written or run
|
|
244
|
+
home-hosted service status # whether it is installed, and what the manager says
|
|
245
|
+
home-hosted service uninstall # stop it, unregister it, remove the file
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
The unit runs `up --foreground` with absolute paths, this home and project, and the installing shell's
|
|
249
|
+
`PATH`. It is named `home-hosted` for the default home and `home-hosted-<8 hex>` for any other.
|
|
250
|
+
|
|
251
|
+
- **Only the panel is signalled on stop**, so persistent entries keep running, as on `down`.
|
|
252
|
+
- **It restarts only after a failure.** After `down` the panel stays down until the next boot or
|
|
253
|
+
`systemctl start`.
|
|
254
|
+
- **A Linux user service** waits for a login after a reboot; `loginctl enable-linger <you>` removes
|
|
255
|
+
the wait.
|
|
256
|
+
- **On Windows, registering any scheduled task needs an administrator.** Without one, use `--startup`:
|
|
257
|
+
it starts at logon and has **no restart policy**.
|
|
258
|
+
- An install over an existing unit is refused. `status` and `uninstall` act only on a file this
|
|
259
|
+
command wrote; anything else is reported and left alone.
|
|
260
|
+
- **Inside a container, `install` refuses** — a boot entry there is never seen by the host. Use the
|
|
261
|
+
container's restart policy (`--restart unless-stopped`) instead.
|
|
80
262
|
|
|
81
263
|
## Upgrading
|
|
82
264
|
|
|
83
265
|
```bash
|
|
84
266
|
home-hosted migrate --dry-run # what would change, writes nothing
|
|
85
|
-
home-hosted migrate # asks before
|
|
267
|
+
home-hosted migrate # asks once before any schema step, keeps a .bak beside each file
|
|
86
268
|
```
|
|
87
269
|
|
|
88
|
-
|
|
270
|
+
`-y/--yes` (or `HHOSTED_MIGRATE=allow`) applies without asking. A newer release always reads an older
|
|
89
271
|
config, and keys it does not know are kept and reported, never reset. A config it cannot read — a
|
|
90
272
|
wrong value, a duplicate id, a newer schema — stops `up` with the exact problem instead of starting
|
|
91
|
-
with defaults. Per-release notes
|
|
92
|
-
[release notes](https://github.com/NamesMT/home-hosted/releases).
|
|
273
|
+
with defaults. A hand-written `servers.config.json` with no `meta` loads as it is. Per-release notes:
|
|
274
|
+
the [release notes](https://github.com/NamesMT/home-hosted/releases).
|
|
93
275
|
|
|
94
276
|
**Coming from 0.6.x:** install the latest 0.7.x and run it once — it moves the state into `.hh/` —
|
|
95
277
|
then upgrade.
|
|
278
|
+
|
|
279
|
+
## For scripts
|
|
280
|
+
|
|
281
|
+
- A numeric flag must be a whole number (`--port 8000x` is refused, not read as 8000), and a flag a
|
|
282
|
+
command cannot honour is refused rather than ignored.
|
|
283
|
+
- Server commands act in the panel's default workspace; `-w/--workspace <id>` picks another.
|
|
284
|
+
- `--home <dir>` and `--project <dir>` (or `HHOSTED_HOME`/`HHOSTED_PROJECT`) work on every command;
|
|
285
|
+
hints name the command as you ran it, `--home` included, so they can be pasted.
|
|
286
|
+
- Commands that only look — `status`, `logs`, `usage`, `backup list`, a backup plan — never create
|
|
287
|
+
state files.
|
|
288
|
+
|
|
289
|
+
- `--json` prints **one JSON document on stdout, or nothing**; every refusal goes to stderr. Branch
|
|
290
|
+
on the exit code first, then the document. The one exception is a stream: `logs --follow --json`
|
|
291
|
+
prints one `{ path, line }` object per line.
|
|
292
|
+
- Piping into `head` or `grep -q` exits 0, not with a broken-pipe error, so `set -o pipefail` is safe.
|
|
293
|
+
- `start` and `restart <id>` wait until a server with a `port` is **running** (its readiness probe
|
|
294
|
+
passed, bounded by its `health.startTimeoutMs`), so `start web && curl …` works; one without a port
|
|
295
|
+
is watched for a second. A crash on boot, or a probe that never passes, exits 1.
|
|
296
|
+
- Anything that writes on your behalf without a terminal to ask at — `backup create`/`restore`,
|
|
297
|
+
`import` — prints the plan and **exits 1** unless given `--confirm`, so a cron job without it fails
|
|
298
|
+
loudly. `backup … --json` without `--confirm` is a plan request and exits 0.
|
|
299
|
+
- `import` exits **0** when it wrote the plan (`--confirm`) or showed it at a terminal, and **1** when
|
|
300
|
+
any entry is refused or fails to write, or when it ran without a terminal and without `--confirm`.
|
|
301
|
+
With `--json` a plan request exits 0; a refused or failed entry still exits 1.
|