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/DDNS.md
CHANGED
|
@@ -1,24 +1,13 @@
|
|
|
1
1
|
# Dynamic DNS
|
|
2
2
|
|
|
3
3
|
Keep a list of hostnames pointed at this machine's public IP. The panel checks the address on an
|
|
4
|
-
interval and calls a provider only when it
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
confirmed, so the next pass writes its hostnames again. Editing a hostname's `proxied`, `ttl` or
|
|
8
|
-
`zone` counts as a change too: the next pass sends it even though the address is the same. Each
|
|
9
|
-
provider call has its own 30 s deadline, so one slow hostname cannot time out the rest of a long list.
|
|
10
|
-
|
|
11
|
-
A refusal retrying cannot fix — bad credentials, a hostname the provider does not know, an abuse
|
|
12
|
-
block — **stops** that hostname instead of retrying it every interval: its row stays an error marked
|
|
13
|
-
*stopped* until its hostname, account or credentials change, the settings are saved, or you run a
|
|
14
|
-
check. Detection only accepts a public address: private, CGNAT, documentation, benchmarking and
|
|
15
|
-
multicast ranges are refused, and each detector gets 10 seconds.
|
|
4
|
+
interval and calls a provider only when it changed. The last confirmed address per hostname is kept in
|
|
5
|
+
`.hh/<workspace>/.state/ddns.cache.json`, so a restart does not cause a write. Saving an account's
|
|
6
|
+
credentials, or editing a hostname's `proxied`, `ttl` or `zone`, makes the next pass write again.
|
|
16
7
|
|
|
17
8
|
**Workspace Settings → Dynamic DNS** is the whole setup: add an account, paste its credentials, add
|
|
18
|
-
hostnames. The
|
|
19
|
-
|
|
20
|
-
`servers.config.json`. The pending-changes summary counts only the fields you touched, though the
|
|
21
|
-
save writes the block whole.
|
|
9
|
+
hostnames. The section is saved by the page's **Save settings**; the credentials button saves on its
|
|
10
|
+
own, being a secret.
|
|
22
11
|
|
|
23
12
|
```json
|
|
24
13
|
{
|
|
@@ -29,7 +18,7 @@ save writes the block whole.
|
|
|
29
18
|
"ipv6": { "enabled": false, "url": "" },
|
|
30
19
|
"ttl": 1,
|
|
31
20
|
"accounts": [
|
|
32
|
-
{ "id": "cf", "provider": "cloudflare"
|
|
21
|
+
{ "id": "cf", "provider": "cloudflare" }
|
|
33
22
|
],
|
|
34
23
|
"domains": [
|
|
35
24
|
{ "host": "home.example.com", "account": "cf", "types": ["A"] },
|
|
@@ -39,64 +28,61 @@ save writes the block whole.
|
|
|
39
28
|
}
|
|
40
29
|
```
|
|
41
30
|
|
|
42
|
-
Credentials live in the workspace's `.secrets.json` (0600), keyed by the account `id` and sealed with
|
|
43
|
-
AES-256-GCM under `HHOSTED_DDNS_SECRET` — set your own, or the default `hh` only stops a casual read.
|
|
44
|
-
The panel logs a warning when it seals credentials under that default, so a copied state directory is
|
|
45
|
-
not the first time you hear about it. Both files sit beside that workspace's `servers.config.json`.
|
|
46
|
-
The account does not have to be saved first, and the provider is stored with the entry, so an id that
|
|
47
|
-
later changes provider does not silently keep the old secret. Removing an account drops its
|
|
48
|
-
credentials on the next save.
|
|
49
|
-
|
|
50
|
-
Header fields:
|
|
51
|
-
|
|
52
31
|
| Field | Default | Notes |
|
|
53
32
|
| --- | --- | --- |
|
|
54
33
|
| `enabled` | `false` | Nothing runs until this is on. |
|
|
55
|
-
| `intervalMs` | `300000` | How often the public address is re-checked
|
|
34
|
+
| `intervalMs` | `300000` | How often the public address is re-checked; at least `60000`. The settings box edits it in **seconds**. |
|
|
56
35
|
| `ipv4` / `ipv6` | on / off | Which families to detect. A family must be on for its record types. |
|
|
57
|
-
| `ipv4.url` / `ipv6.url` | `""` |
|
|
36
|
+
| `ipv4.url` / `ipv6.url` | `""` | Use this one endpoint instead of the built-in detectors. |
|
|
58
37
|
| `ttl` | `1` | Default record TTL; `1` is automatic where supported. |
|
|
59
|
-
| `accounts[]` | — | `id` (
|
|
60
|
-
| `domains[]` | — | `host`, `account`, `types` (`A`/`AAAA`, default `A`), `proxied` (default off; Cloudflare only), optional `ttl`, `zone`, `enabled
|
|
38
|
+
| `accounts[]` | — | `id` (lowercase, digits, `-`, `_`; keys the credentials) and `provider`. A `label` from an earlier release is still accepted, and not shown. |
|
|
39
|
+
| `domains[]` | — | `host`, `account`, `types` (`A`/`AAAA`, default `A`), `proxied` (default off; Cloudflare only), and optional `ttl`, `zone`, `enabled` (default on). |
|
|
40
|
+
|
|
41
|
+
`zone` pins the registered domain, for a provider that must be told the apex when the guess is wrong
|
|
42
|
+
(`home.example.co.uk` is handled; an unusual suffix may not be). It must contain the host — a typo is
|
|
43
|
+
refused on save rather than writing to a domain that is not yours.
|
|
44
|
+
|
|
45
|
+
**Credentials** live in the workspace's `.secrets.json` (0600), keyed by account `id`, never in a
|
|
46
|
+
config file. They are sealed with AES-256-GCM under `HHOSTED_DDNS_SECRET` — set your own; the built-in
|
|
47
|
+
default only stops a casual read, and the panel logs a warning when it uses it. An account changed to a
|
|
48
|
+
different provider does not keep the old secret, and removing an account drops its credentials on the
|
|
49
|
+
next save.
|
|
61
50
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
**Failures.** Each provider call has a 30 s deadline, and each address detector 10 s. Detection only
|
|
52
|
+
accepts a public address (private, CGNAT, documentation, benchmarking and multicast ranges are
|
|
53
|
+
refused). A refusal that retrying cannot fix — bad credentials, an unknown hostname, an abuse block —
|
|
54
|
+
**stops** that hostname: its row stays an error marked *stopped* until its hostname, account or
|
|
55
|
+
credentials change, the settings are saved, or you run a check.
|
|
66
56
|
|
|
67
57
|
## Providers
|
|
68
58
|
|
|
69
59
|
| Provider | Record types | Credentials | Notes |
|
|
70
60
|
| --- | --- | --- | --- |
|
|
71
61
|
| **Cloudflare** | A, AAAA | API token (`Zone → DNS → Edit`); or legacy email + global key | Zones and record ids are discovered, then cached. Updates use `PATCH`, so comments survive. |
|
|
72
|
-
| **Namecheap** | A | Dynamic DNS password | Router-style Dynamic DNS, not the XML API. The password is under Advanced DNS → Dynamic DNS — not the account password.
|
|
73
|
-
| **Spaceship** | A, AAAA | API key + secret |
|
|
62
|
+
| **Namecheap** | A | Dynamic DNS password | Router-style Dynamic DNS, not the XML API. The password is under Advanced DNS → Dynamic DNS — not the account password. |
|
|
63
|
+
| **Spaceship** | A, AAAA | API key + secret | Uses the DNS API's record-set upsert. |
|
|
74
64
|
| **Porkbun** | A, AAAA | API key + secret key | Read-then-upsert by name and type. |
|
|
75
|
-
| **GoDaddy** | A, AAAA | API key + secret | Optional `baseUrl` points at the OTE test environment.
|
|
65
|
+
| **GoDaddy** | A, AAAA | API key + secret | Optional `baseUrl` points at the OTE test environment. A 403 means the account is not eligible for the API. |
|
|
76
66
|
| **Gandi** | A, AAAA | Personal access token (`pat_…`) | LiveDNS RRset update. |
|
|
77
|
-
| **DigitalOcean** | A, AAAA | API token |
|
|
67
|
+
| **DigitalOcean** | A, AAAA | API token | Lists records, then updates the one it found. |
|
|
78
68
|
| **deSEC** | A, AAAA | API token | `update.dedyn.io`, HTTP Basic with the hostname. |
|
|
79
69
|
| **DuckDNS** | A, AAAA | Account token | One token covers every subdomain. |
|
|
80
70
|
| **No-IP** | A, AAAA | Email + password | Sends a recognised `User-Agent`; override it if yours is registered. |
|
|
81
71
|
| **Dynu** | A, AAAA | Username + password | `password` may be the SHA-256 hash. |
|
|
82
72
|
| **Hurricane Electric** | A, AAAA | Per-host DDNS key | `dyn.dns.he.net`. |
|
|
83
73
|
| **FreeDNS (afraid.org)** | A, AAAA | The per-record "Direct URL" | Paste the whole URL or just its hash. |
|
|
84
|
-
| **Namecheap (API)** | — | API user + key + whitelisted IP | For **DNS-01 only**: it answers a challenge
|
|
74
|
+
| **Namecheap (API)** | — | API user + key + whitelisted IP | For **DNS-01 only**: it answers a certificate challenge and updates no addresses. The IP must be whitelisted under Profile → Tools → Namecheap API Access; error `1017105` means it is not. |
|
|
85
75
|
|
|
86
|
-
Not supported: **Route 53**
|
|
87
|
-
public DNS API).
|
|
76
|
+
Not supported: **Route 53** and **DreamHost** (no public DNS API).
|
|
88
77
|
|
|
89
78
|
## Notifications
|
|
90
79
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
failures* (`notifications.defaults.onDdns`, or a destination's own when it carries its own
|
|
94
|
-
settings). There is no second switch in this section.
|
|
80
|
+
One message per pass that changed a record, and one per failed pass, under the
|
|
81
|
+
*Dynamic DNS changes and failures* switch (`onDdns`) — see [NOTIFICATIONS.md](./NOTIFICATIONS.md).
|
|
95
82
|
|
|
96
83
|
## Adding a provider
|
|
97
84
|
|
|
98
85
|
`src/providers/ddns/<name>.ts` exports one `DdnsProvider`: its credential fields, the families it can
|
|
99
86
|
manage, and an `update()` that makes one HTTP call and returns `{ ok, changed, message }`. Register it
|
|
100
|
-
in `src/providers/ddns/index.ts`; the settings
|
|
101
|
-
|
|
102
|
-
skip a write when a record is already current.
|
|
87
|
+
in `src/providers/ddns/index.ts`; the settings form and validation follow from that metadata. Return
|
|
88
|
+
`changed: false` when the record was already current, so the panel can skip the write.
|
package/docs/JOBS.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Jobs
|
|
2
|
+
|
|
3
|
+
A **job** is a command that runs on a schedule, does its work and exits — a nightly backup, an
|
|
4
|
+
hourly cleanup. **Its exit code is the outcome**: `0` succeeded, anything else failed. Unlike a
|
|
5
|
+
[server](./SERVERS.md) there is nothing to keep up: no port, health probe or restart.
|
|
6
|
+
|
|
7
|
+
Create one from the **Jobs** page (cron presets, a live preview of the next three runs), or write it
|
|
8
|
+
into the workspace's `jobs.config.json`:
|
|
9
|
+
|
|
10
|
+
```json
|
|
11
|
+
{
|
|
12
|
+
"jobs": [
|
|
13
|
+
{
|
|
14
|
+
"id": "nightly-backup",
|
|
15
|
+
"schedule": "0 3 * * *",
|
|
16
|
+
"command": "./scripts/backup.sh",
|
|
17
|
+
"args": ["--full"]
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The Jobs page updates live: what is running now, when each job runs next, and how its last run ended
|
|
24
|
+
(**ok**, **failed**, **timed out**, **stopped**, **did not start**). **Run now** starts a run at once;
|
|
25
|
+
**Stop** ends one. **Runs** lists a job's last 50 runs and shows what the one you pick wrote.
|
|
26
|
+
|
|
27
|
+
A failed, timed-out or unstartable run **notifies like a crash** ([NOTIFICATIONS.md](./NOTIFICATIONS.md)).
|
|
28
|
+
|
|
29
|
+
## The fields
|
|
30
|
+
|
|
31
|
+
| field | default | what it is |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `id` | required | names the job, its log and its run history. Lowercase, digits, `-` and `_` |
|
|
34
|
+
| `label` | the id | what a page shows beside the id |
|
|
35
|
+
| `description` | — | free text for your own notes |
|
|
36
|
+
| `enabled` | `true` | off means it does not run on its schedule; a run in flight still finishes |
|
|
37
|
+
| `command` | required | resolved against the **panel's** `PATH`, like a server's |
|
|
38
|
+
| `args` | `[]` | one array entry per argument — no shell parsing |
|
|
39
|
+
| `cwd` | `.` | relative to the project the panel was started from |
|
|
40
|
+
| `env` | `{}` | extra environment for the run |
|
|
41
|
+
| `secretEnv` | `[]` | the **names** of secrets to export; the values live in the workspace secrets file |
|
|
42
|
+
| `schedule` | required | 5-field cron, host local time |
|
|
43
|
+
| `timeoutSeconds` | `3600` | how long one run may take before the panel ends it: 1 second to a day |
|
|
44
|
+
| `catchUp` | `true` | when the panel starts after missing an occurrence, run it once (see below) |
|
|
45
|
+
|
|
46
|
+
`{id}`, `{label}`, `{cwd}`, `{projectDir}`, `{dataRoot}` and `{home}` expand in `args` and `env`, as on
|
|
47
|
+
a server.
|
|
48
|
+
|
|
49
|
+
A job the panel cannot read — a cron typo, an unknown field — is shown on the Jobs page with what is
|
|
50
|
+
wrong and does not run; the other jobs in the file still do. A file that is not valid JSON stops every
|
|
51
|
+
job in it until it is fixed, and the page says so.
|
|
52
|
+
|
|
53
|
+
<details>
|
|
54
|
+
<summary>The expression</summary>
|
|
55
|
+
|
|
56
|
+
`minute hour day-of-month month day-of-week`, in the **host's local time**. Each field takes `*`, a
|
|
57
|
+
number, a range `1-5`, a list `1,15`, a step `*/15` or `0-30/10`; month and weekday also take names
|
|
58
|
+
(`jan`, `mon`). `0` and `7` are both Sunday. When both day fields are restricted, a day matching
|
|
59
|
+
**either** runs (classic cron). No seconds field and no `@daily`-style macros.
|
|
60
|
+
|
|
61
|
+
| expression | runs |
|
|
62
|
+
| --- | --- |
|
|
63
|
+
| `*/15 * * * *` | every 15 minutes |
|
|
64
|
+
| `0 * * * *` | every hour |
|
|
65
|
+
| `0 3 * * *` | every day at 03:00 |
|
|
66
|
+
| `0 3 * * 1` | every Monday at 03:00 |
|
|
67
|
+
| `0 3 1 * *` | on the 1st of every month at 03:00 |
|
|
68
|
+
|
|
69
|
+
A wall-clock time that happens twice when the clocks go back runs once.
|
|
70
|
+
|
|
71
|
+
</details>
|
|
72
|
+
|
|
73
|
+
### When a run happens
|
|
74
|
+
|
|
75
|
+
- **One run per occurrence.** A run still going when the next occurrence comes due makes that
|
|
76
|
+
occurrence **skip** (the job's log says so); runs never queue.
|
|
77
|
+
- **A new or changed schedule waits for its next occurrence.** Creating a job, enabling it again, or
|
|
78
|
+
editing its schedule never runs a time that already passed.
|
|
79
|
+
- **Catch-up at start only.** When the panel starts and a job's most recent occurrence passed while it
|
|
80
|
+
was down, a job with `catchUp` on runs that one occurrence once — not one per missed day. A job that
|
|
81
|
+
has never run is not caught up. Turn `catchUp` off for work that must only happen on time.
|
|
82
|
+
|
|
83
|
+
### A job's secret environment
|
|
84
|
+
|
|
85
|
+
`secretEnv` names variables whose **values** are kept in the workspace secrets file (0600) instead of
|
|
86
|
+
in `jobs.config.json`, where every backup and every `git diff` would show them. Declare the name, save,
|
|
87
|
+
then set the value on the Jobs page or with the CLI:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
home-hosted secret set nightly-backup BACKUP_TOKEN # prompts without echo; --stdin reads a piped line
|
|
91
|
+
home-hosted secret ls nightly-backup # the names, and which have a value
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
A value for an undeclared name is refused, and a run receives values only for names the job declares.
|
|
95
|
+
|
|
96
|
+
## From the command line
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
home-hosted job ls # schedule, next run, last outcome
|
|
100
|
+
home-hosted job run nightly-backup # waits; exits 0 only when the run succeeded
|
|
101
|
+
home-hosted job run nightly-backup --detach # starts it and returns
|
|
102
|
+
home-hosted job stop nightly-backup
|
|
103
|
+
home-hosted job disable nightly-backup # and `enable`
|
|
104
|
+
home-hosted job runs nightly-backup # the last runs, newest first
|
|
105
|
+
home-hosted job log nightly-backup --run <runId> --follow
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Every `job` command talks to the running panel. More in [CLI.md](./CLI.md#jobs).
|
|
109
|
+
|
|
110
|
+
<details>
|
|
111
|
+
<summary>Where a run's output and history go</summary>
|
|
112
|
+
|
|
113
|
+
- **Output** goes to the job's own log, `<workspace>/.logs/jobs/<id>.log`, which rotates by the
|
|
114
|
+
workspace's log size settings and is kept even when `logs.persist` is off. Each run writes a line
|
|
115
|
+
when it starts and one when it ends, naming its run id.
|
|
116
|
+
- **Run history** is `<workspace>/.state/jobs/<id>.runs.jsonl`, the last 50 runs. It survives a
|
|
117
|
+
restart: it is how the panel knows a job already ran. A run the panel was watching when it stopped
|
|
118
|
+
is recorded as **interrupted**.
|
|
119
|
+
- **Removing a job** stops a run in flight, then deletes its run history, its log and its stored
|
|
120
|
+
secret values, so a job declared again under the same id starts clean.
|
|
121
|
+
- Over the API: `GET /api/jobs/:id/runs` and `GET /api/jobs/:id/runs/:runId` ([API.md](./API.md)).
|
|
122
|
+
|
|
123
|
+
</details>
|
|
124
|
+
|
|
125
|
+
## Coming from earlier versions
|
|
126
|
+
|
|
127
|
+
`home-hosted migrate` moves jobs that a `servers.config.json` still declares into `jobs.config.json`,
|
|
128
|
+
and renames `timeoutMs` to `timeoutSeconds` (rounded up). The panel reads an old `timeoutMs` either
|
|
129
|
+
way, and writes the new name the next time it saves the job.
|
package/docs/NOTIFICATIONS.md
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
# Notifications
|
|
2
2
|
|
|
3
|
-
home-hosted pushes supervision events to any number of **destinations
|
|
4
|
-
|
|
5
|
-
several of either.
|
|
3
|
+
home-hosted pushes supervision events to any number of **destinations** — Telegram chats and
|
|
4
|
+
webhooks, in one list. Settings are per workspace, in **Workspace Settings → Notifications**:
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
- **General** — which events fire, and the throttle. Set once.
|
|
7
|
+
- **Destinations** — where they go. Each has an on/off switch and an **Own settings** toggle: off (the
|
|
8
|
+
default for a new one) follows the general block; on gives it its own toggles and throttle.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
- **Destinations** — where they go. Each one has an on/off switch and an **Own settings** toggle:
|
|
11
|
-
off (the default for a new one) means it follows the general block entirely; on means it carries
|
|
12
|
-
its own toggles and throttle.
|
|
13
|
-
|
|
14
|
-
So "tell me about crashes and host thresholds, throttled every two minutes, to my phone and the
|
|
15
|
-
group chat" is configured once and pointed at two places. A send never blocks supervision: a failure
|
|
16
|
-
is logged and recorded against that destination alone, and the others still go out.
|
|
10
|
+
A send never blocks supervision, and one destination failing does not stop the others.
|
|
17
11
|
|
|
18
12
|
## Setup
|
|
19
13
|
|
|
20
14
|
1. Talk to [@BotFather](https://t.me/BotFather), run `/newbot`, and copy the token it prints.
|
|
21
|
-
2. In
|
|
22
|
-
3. Paste the token
|
|
23
|
-
4. Send your bot a message from the chat you want
|
|
24
|
-
|
|
25
|
-
5. Press **Send a test**: the chat gets a message, and the panel shows the result
|
|
26
|
-
6. Leave **Own settings** off to follow the general block, or turn it on to give this chat its own.
|
|
15
|
+
2. In **Workspace Settings → Notifications → Destinations**, press **Add Telegram**.
|
|
16
|
+
3. Paste the token, press **Save token**, then **Detect chats**.
|
|
17
|
+
4. Send your bot a message from the chat you want alerts in (a bot cannot start a conversation), then
|
|
18
|
+
pick that chat from the list or paste its id.
|
|
19
|
+
5. Press **Send a test**: the chat gets a message, and the panel shows the result.
|
|
27
20
|
|
|
28
|
-
A second chat is another **Add Telegram
|
|
21
|
+
A second chat is another **Add Telegram**, with its own bot token.
|
|
29
22
|
|
|
30
23
|
<details>
|
|
31
24
|
<summary><b>Doing it without the UI</b></summary>
|
|
@@ -48,9 +41,9 @@ curl -X POST "http://127.0.0.1:3999/api/notifications/destinations/alerts/test$W
|
|
|
48
41
|
-d '{"chatId":"123456789"}'
|
|
49
42
|
```
|
|
50
43
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
Each route names a destination id (`alerts` here), and the token is stored under it. `detect-chats`
|
|
45
|
+
accepts a token, so one can be tried before it is saved; `DELETE …/destinations/alerts/token` removes
|
|
46
|
+
it.
|
|
54
47
|
|
|
55
48
|
</details>
|
|
56
49
|
|
|
@@ -60,102 +53,77 @@ can be tried before it is saved; `DELETE /api/notifications/destinations/alerts/
|
|
|
60
53
|
| --- | --- | --- |
|
|
61
54
|
| a server gave up restarting | `onCrash` | ✅ |
|
|
62
55
|
| a server exceeded its memory limit | `onCrash` | ✅ |
|
|
56
|
+
| a deploy failed | `onCrash` | ✅ |
|
|
57
|
+
| a [job](./JOBS.md) run failed, timed out or did not start | `onCrash` | ✅ |
|
|
63
58
|
| a health check is failing | `onUnhealthy` | ✅ |
|
|
64
59
|
| a server was force-restarted (health timeout) | `onForcedRestart` | ✅ |
|
|
65
60
|
| a force-restarted server is serving again | `onForcedRestart` | ✅ |
|
|
66
61
|
| a server recovered | `onRecovered` | ⬜ |
|
|
67
62
|
| host thresholds breached, and recovered | `onHost` | ✅ |
|
|
68
|
-
| a dynamic DNS record changed, or a pass failed | `onDdns` | ✅ |
|
|
69
|
-
|
|
70
|
-
A **forced restart** is two messages, not one: the restart is announced, and then its outcome is —
|
|
71
|
-
the entry is serving again, or it did not come back (in which case its crash is the second message).
|
|
72
|
-
That is what makes "restarted and fine" distinguishable from "restarted and still broken" without
|
|
73
|
-
reading the panel.
|
|
63
|
+
| a [dynamic DNS](./DDNS.md) record changed, or a pass failed | `onDdns` | ✅ |
|
|
74
64
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
65
|
+
A job that succeeded or that a person stopped sends nothing. A **forced restart** is two messages: the
|
|
66
|
+
restart, then its outcome (serving again, or a crash). Host thresholds — disk, memory, swap, load,
|
|
67
|
+
temperature — are set in **Global settings → Host vitals**.
|
|
78
68
|
|
|
79
69
|
## Webhooks
|
|
80
70
|
|
|
81
|
-
A webhook is a URL, a method, a body format and a set of headers
|
|
82
|
-
|
|
83
|
-
in the shape of the request:
|
|
71
|
+
A webhook destination is a URL, a method (`POST` or `PUT`), a body format and a set of headers. It
|
|
72
|
+
covers every service other than Telegram:
|
|
84
73
|
|
|
85
74
|
| | URL | Body | Headers |
|
|
86
75
|
| --- | --- | --- | --- |
|
|
87
|
-
| **ntfy** | `https://ntfy.sh/<topic>` | `plain text` | `Title: home-hosted
|
|
76
|
+
| **ntfy** | `https://ntfy.sh/<topic>` | `plain text` | `Title: home-hosted`, `Priority: default`, and `Authorization: Bearer <token>` when the topic needs one |
|
|
88
77
|
| **Discord** | your webhook URL | `JSON` | none — the payload fills `content` |
|
|
89
78
|
| **Slack** | your webhook URL | `JSON` | none — the payload fills `text` |
|
|
90
79
|
| **anything else** | your URL | either | whatever it needs |
|
|
91
80
|
|
|
92
|
-
The JSON body carries the
|
|
93
|
-
`
|
|
94
|
-
|
|
95
|
-
|
|
81
|
+
The JSON body carries the event under several names (`text`, `content`, `title`, `message`, `reason`,
|
|
82
|
+
`server`, `label`, `at`), so a receiver reads whichever it knows. `workspaceId` names the workspace the
|
|
83
|
+
server or job belongs to (absent on a test send). With more than one workspace, the message names the
|
|
84
|
+
server as `workspace/server`. `format: text` sends the message
|
|
85
|
+
alone, which is what ntfy expects.
|
|
96
86
|
|
|
97
|
-
Headers are `Name: value` per line,
|
|
98
|
-
|
|
99
|
-
— so a token stays out of `settings.json` entirely:
|
|
87
|
+
Headers are `Name: value` per line, split on the **first** colon. `${ENV}` expands in the URL and the
|
|
88
|
+
values, so a token can stay out of `settings.json`:
|
|
100
89
|
|
|
101
90
|
```json
|
|
102
91
|
{ "headers": "Authorization: Bearer ${HH_WEBHOOK_TOKEN}" }
|
|
103
92
|
```
|
|
104
93
|
|
|
105
|
-
A literal token
|
|
106
|
-
|
|
107
|
-
Prefer the placeholder above (the variable is read from the panel's environment, so set it where the
|
|
108
|
-
panel starts), and treat that file as sensitive if you do use a literal.
|
|
109
|
-
|
|
110
|
-
A redirect from the receiver is **not followed**: following one would hand the headers above to
|
|
111
|
-
whatever address the receiver names, and could drop https for http. The send fails with the
|
|
112
|
-
`Location` it was pointed at — set the URL to that final address.
|
|
94
|
+
The variable is read from the panel's environment. A literal token works too, but then it sits in the
|
|
95
|
+
workspace's `settings.json`, is shown on the settings page, and is carried by every backup.
|
|
113
96
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
97
|
+
- **A redirect is not followed**, since it would hand your headers to another address. The send fails
|
|
98
|
+
naming the `Location`; set the URL to that address.
|
|
99
|
+
- **Header values are bytes up to `0xFF`**: Latin-1 (`Serveur arrêté`) is fine, but an emoji or a name
|
|
100
|
+
with a space is refused. For such a title, use `format: json` and let the receiver read `title`, or
|
|
101
|
+
ntfy's encoded form, `Title: =?UTF-8?B?8J+UtA==?=`.
|
|
102
|
+
- A header named `Content-Type` (any case) **replaces** the default rather than being sent beside it.
|
|
103
|
+
- **Send a test** uses the values *in the form*, saved or not.
|
|
104
|
+
- Two destinations cannot share an `id`, and a webhook with a missing or non-http(s) URL is refused on
|
|
105
|
+
save.
|
|
118
106
|
|
|
119
|
-
**
|
|
120
|
-
|
|
107
|
+
**The panel will send to any address you give it, including one on your own network** — no
|
|
108
|
+
allow-list, because alerting a LAN service is a normal home setup. This is no escalation: a credential
|
|
109
|
+
that can save a webhook (`config` scope) can already declare a server that runs any command
|
|
110
|
+
([SECURITY.md](./SECURITY.md)). Still, **do not paste a URL you did not write yourself.**
|
|
121
111
|
|
|
122
112
|
## Where the token lives
|
|
123
113
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
`.hh/.control-secrets.json`. The token is never written into `servers.config.json`, so committing or
|
|
127
|
-
sharing a config cannot leak it — and `GET /api/settings/workspace` reports `tokenSet: true|false`,
|
|
128
|
-
never the token itself.
|
|
129
|
-
|
|
130
|
-
## Delivery failures
|
|
131
|
-
|
|
132
|
-
Sends are fire-and-forget: supervision never waits on a chat or webhook API. A failure is logged, and
|
|
133
|
-
the last outcome is recorded per destination and shown on its row, so a wrong chat id or an
|
|
134
|
-
unreachable URL is visible there instead of silently swallowing alerts.
|
|
135
|
-
|
|
136
|
-
A failed send does **not** start the throttle window: a window is for a message that arrived, so a
|
|
137
|
-
receiver that was down for one alert still hears the next one. Otherwise the alert that would have
|
|
138
|
-
reached a receiver which came back up is the one the outage took.
|
|
139
|
-
|
|
140
|
-
## Throttling
|
|
141
|
-
|
|
142
|
-
`cooldownMs` (default two minutes) is per **destination, server and reason**, so a flapping process
|
|
143
|
-
cannot flood any one destination — and one destination inside its window never silences another. It
|
|
144
|
-
lives in the general block, or on a destination that has **Own settings** on, and its box edits
|
|
145
|
-
**seconds** (`0` turns the throttle off). Clearing the box keeps the value it held, so retyping it
|
|
146
|
-
cannot switch the throttle off by accident.
|
|
147
|
-
|
|
148
|
-
## Header limits
|
|
114
|
+
In the workspace's `.hh/<workspace>/.secrets.json` (mode `0600`), keyed by destination id — never in a
|
|
115
|
+
config file. `GET /api/settings/workspace` reports only `tokenSet: true|false`.
|
|
149
116
|
|
|
150
|
-
|
|
151
|
-
above `0xFF`: `Title: 🔴 server down` is refused with the line named rather than sent, and the same
|
|
152
|
-
goes for a name holding a space or a non-ASCII letter. Two ways around it for a title that needs one:
|
|
117
|
+
## Delivery failures and throttling
|
|
153
118
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
UTF-8 header value.
|
|
119
|
+
A failure is logged and its result shown on that destination's row, so a wrong chat id or an
|
|
120
|
+
unreachable URL is visible rather than silently swallowing alerts.
|
|
157
121
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
122
|
+
`cooldownMs` (default two minutes) throttles per **destination, server and reason**, so a flapping
|
|
123
|
+
process cannot flood one destination and one destination's window never silences another. Its box
|
|
124
|
+
edits **seconds**; `0` turns the throttle off.
|
|
161
125
|
|
|
126
|
+
- A failed send does not start the window, so the next alert still goes out.
|
|
127
|
+
- A state change inside the window is not lost: if a server goes unhealthy, recovers and goes unhealthy
|
|
128
|
+
again, the state it ends in is sent when the window closes. A flap that ends where it began stays
|
|
129
|
+
one message.
|