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.
Files changed (485) hide show
  1. package/README.md +117 -322
  2. package/bin/home-hosted.mjs +41 -0
  3. package/dist/chunks/account-DiLrSyww.js +359 -0
  4. package/dist/chunks/account-DiLrSyww.js.map +1 -0
  5. package/dist/chunks/add-DEIYVkNK.js +183 -0
  6. package/dist/chunks/add-DEIYVkNK.js.map +1 -0
  7. package/dist/chunks/{archive-DP-XQR8X.js → archive-DFi3qK1c.js} +25 -73
  8. package/dist/chunks/archive-DFi3qK1c.js.map +1 -0
  9. package/dist/chunks/{atomic-C1PfJpE7.js → atomic-SZUwDtGD.js} +3 -6
  10. package/dist/chunks/atomic-SZUwDtGD.js.map +1 -0
  11. package/dist/chunks/{backup-CZcVca2a.js → backup-DnyxIzw0.js} +110 -190
  12. package/dist/chunks/backup-DnyxIzw0.js.map +1 -0
  13. package/dist/chunks/backups-BrrN6cwW.js +2203 -0
  14. package/dist/chunks/backups-BrrN6cwW.js.map +1 -0
  15. package/dist/chunks/bind-DIxrnUst.js +43 -0
  16. package/dist/chunks/bind-DIxrnUst.js.map +1 -0
  17. package/dist/chunks/config-text-DxMOQQnk.js +34 -0
  18. package/dist/chunks/config-text-DxMOQQnk.js.map +1 -0
  19. package/dist/chunks/{contracts-CMBD1TF9.js → contracts-CxZ7u1L3.js} +1239 -1454
  20. package/dist/chunks/contracts-CxZ7u1L3.js.map +1 -0
  21. package/dist/chunks/daemon-BAAYUYQC.js +211 -0
  22. package/dist/chunks/daemon-BAAYUYQC.js.map +1 -0
  23. package/dist/chunks/daemon-log-Ccu-69vB.js +179 -0
  24. package/dist/chunks/daemon-log-Ccu-69vB.js.map +1 -0
  25. package/dist/chunks/deploy-CggSOEkq.js +144 -0
  26. package/dist/chunks/deploy-CggSOEkq.js.map +1 -0
  27. package/dist/chunks/{docker-Cy9Lyvda.js → docker--Un0uLfF.js} +32 -68
  28. package/dist/chunks/docker--Un0uLfF.js.map +1 -0
  29. package/dist/chunks/{down-pKbGCW9d.js → down-CpIN7LEQ.js} +34 -94
  30. package/dist/chunks/down-CpIN7LEQ.js.map +1 -0
  31. package/dist/chunks/exposure-CDJNvOCK.js +229 -0
  32. package/dist/chunks/exposure-CDJNvOCK.js.map +1 -0
  33. package/dist/chunks/import-Bd4VZH0f.js +205 -0
  34. package/dist/chunks/import-Bd4VZH0f.js.map +1 -0
  35. package/dist/chunks/import-plan--fDS_l5r.js +147 -0
  36. package/dist/chunks/import-plan--fDS_l5r.js.map +1 -0
  37. package/dist/chunks/import-write-BTfbeV26.js +42 -0
  38. package/dist/chunks/import-write-BTfbeV26.js.map +1 -0
  39. package/dist/chunks/{init-BZ7hK9Vf.js → init-Bv3oH65x.js} +14 -50
  40. package/dist/chunks/init-Bv3oH65x.js.map +1 -0
  41. package/dist/chunks/job-CYOdN6Ub.js +341 -0
  42. package/dist/chunks/job-CYOdN6Ub.js.map +1 -0
  43. package/dist/chunks/jobs-BX4ahcfh.js +489 -0
  44. package/dist/chunks/jobs-BX4ahcfh.js.map +1 -0
  45. package/dist/chunks/last-stop-DD3lHwo_.js +42 -0
  46. package/dist/chunks/last-stop-DD3lHwo_.js.map +1 -0
  47. package/dist/chunks/layout-D0ysDNav.js +18 -0
  48. package/dist/chunks/layout-D0ysDNav.js.map +1 -0
  49. package/dist/chunks/lazy-kfcBNeqj.js +48 -0
  50. package/dist/chunks/lazy-kfcBNeqj.js.map +1 -0
  51. package/dist/chunks/log-buffer-B7jmn7ts.js +110 -0
  52. package/dist/chunks/log-buffer-B7jmn7ts.js.map +1 -0
  53. package/dist/chunks/log-files-CZL2UhuE.js +488 -0
  54. package/dist/chunks/log-files-CZL2UhuE.js.map +1 -0
  55. package/dist/chunks/{logger-B5U4GD3j.js → logger-BnrKTBHQ.js} +2 -6
  56. package/dist/chunks/logger-BnrKTBHQ.js.map +1 -0
  57. package/dist/chunks/{logs---TI_bxM.js → logs-DxKI6OW2.js} +23 -73
  58. package/dist/chunks/logs-DxKI6OW2.js.map +1 -0
  59. package/dist/chunks/ls-BseUHy_m.js +128 -0
  60. package/dist/chunks/ls-BseUHy_m.js.map +1 -0
  61. package/dist/chunks/migrate-D4w_dXDm.js +268 -0
  62. package/dist/chunks/migrate-D4w_dXDm.js.map +1 -0
  63. package/dist/chunks/{nanny-B-Eu0sFW.js → nanny-BWh7nuvv.js} +21 -14
  64. package/dist/chunks/nanny-BWh7nuvv.js.map +1 -0
  65. package/dist/chunks/{nanny-ChMtq1Zl.js → nanny-BjF2-1pv.js} +3 -3
  66. package/dist/chunks/{nanny-ChMtq1Zl.js.map → nanny-BjF2-1pv.js.map} +1 -1
  67. package/dist/chunks/nanny-DGTXVq5d.js +806 -0
  68. package/dist/chunks/nanny-DGTXVq5d.js.map +1 -0
  69. package/dist/chunks/{nanny-sweep-DErnlPY1.js → nanny-sweep-hjmZ_p7S.js} +14 -24
  70. package/dist/chunks/nanny-sweep-hjmZ_p7S.js.map +1 -0
  71. package/dist/chunks/{nearest-6KgQEDUe.js → nearest-DOx4jySJ.js} +2 -10
  72. package/dist/chunks/nearest-DOx4jySJ.js.map +1 -0
  73. package/dist/chunks/{parse-DhmG26fI.js → parse-DVMPLUDe.js} +47 -72
  74. package/dist/chunks/parse-DVMPLUDe.js.map +1 -0
  75. package/dist/chunks/password-policy-Clq6PGE-.js +9 -0
  76. package/dist/chunks/password-policy-Clq6PGE-.js.map +1 -0
  77. package/dist/chunks/{paths-CGlGDrOU.js → paths-C34-TJLh.js} +32 -56
  78. package/dist/chunks/paths-C34-TJLh.js.map +1 -0
  79. package/dist/chunks/{port-B8WBTRMk.js → port-CnsrxKNR.js} +27 -71
  80. package/dist/chunks/port-CnsrxKNR.js.map +1 -0
  81. package/dist/chunks/process-CboOFPU_.js +192 -0
  82. package/dist/chunks/process-CboOFPU_.js.map +1 -0
  83. package/dist/chunks/{restart-Des4DrAN.js → restart-C0J8dZ2L.js} +11 -29
  84. package/dist/chunks/restart-C0J8dZ2L.js.map +1 -0
  85. package/dist/chunks/run-deploy-DoNDvwT4.js +91 -0
  86. package/dist/chunks/run-deploy-DoNDvwT4.js.map +1 -0
  87. package/dist/chunks/{schema-B240VXcV.js → schema-CZ6f-PHD.js} +7 -20
  88. package/dist/chunks/schema-CZ6f-PHD.js.map +1 -0
  89. package/dist/chunks/secret-MY397r90.js +219 -0
  90. package/dist/chunks/secret-MY397r90.js.map +1 -0
  91. package/dist/chunks/secrets-CG5N4lwY.js +1061 -0
  92. package/dist/chunks/secrets-CG5N4lwY.js.map +1 -0
  93. package/dist/chunks/server-Dm_dXfTW.js +255 -0
  94. package/dist/chunks/server-Dm_dXfTW.js.map +1 -0
  95. package/dist/chunks/server-attention-UQwYXqKe.js +10 -0
  96. package/dist/chunks/server-attention-UQwYXqKe.js.map +1 -0
  97. package/dist/chunks/server-create-D7nvhgBd.js +96 -0
  98. package/dist/chunks/server-create-D7nvhgBd.js.map +1 -0
  99. package/dist/chunks/server-ids-BEQD2rFz.js +23 -0
  100. package/dist/chunks/server-ids-BEQD2rFz.js.map +1 -0
  101. package/dist/chunks/server-vars-DMYmHutL.js +27 -0
  102. package/dist/chunks/server-vars-DMYmHutL.js.map +1 -0
  103. package/dist/chunks/service-C8l-ewNA.js +585 -0
  104. package/dist/chunks/service-C8l-ewNA.js.map +1 -0
  105. package/dist/chunks/{settings-xu-XTfWg.js → settings-CtYDs5PX.js} +62 -78
  106. package/dist/chunks/settings-CtYDs5PX.js.map +1 -0
  107. package/dist/chunks/{setup-temp-CAN4_bA-.js → setup-temp-TAtDmMMU.js} +43 -37
  108. package/dist/chunks/setup-temp-TAtDmMMU.js.map +1 -0
  109. package/dist/chunks/shape-CDGeYl_J.js +9 -0
  110. package/dist/chunks/shape-CDGeYl_J.js.map +1 -0
  111. package/dist/chunks/{src-BtWMFmzZ.js → src-BnzkVy_M.js} +12548 -10576
  112. package/dist/chunks/src-BnzkVy_M.js.map +1 -0
  113. package/dist/chunks/{status-DT1EsA-B.js → status-efbbfYZQ.js} +53 -26
  114. package/dist/chunks/status-efbbfYZQ.js.map +1 -0
  115. package/dist/chunks/store-Bs_Lljjm.js +2082 -0
  116. package/dist/chunks/store-Bs_Lljjm.js.map +1 -0
  117. package/dist/chunks/template-xan58bJh.js +28 -0
  118. package/dist/chunks/template-xan58bJh.js.map +1 -0
  119. package/dist/chunks/token-DDeWfZA4.js +142 -0
  120. package/dist/chunks/token-DDeWfZA4.js.map +1 -0
  121. package/dist/chunks/{ui-D562aqw5.js → ui-BcIAtyxE.js} +68 -79
  122. package/dist/chunks/ui-BcIAtyxE.js.map +1 -0
  123. package/dist/chunks/{ui-dir-CsU3uLNV.js → ui-dir-ClCzVRc3.js} +3 -7
  124. package/dist/chunks/ui-dir-ClCzVRc3.js.map +1 -0
  125. package/dist/chunks/ui-format-CDvvqOoi.js +53 -0
  126. package/dist/chunks/ui-format-CDvvqOoi.js.map +1 -0
  127. package/dist/chunks/{ui-release-DKzVvlLd.js → ui-release-XbJ85pYI.js} +36 -38
  128. package/dist/chunks/ui-release-XbJ85pYI.js.map +1 -0
  129. package/dist/chunks/{ui-revert-EkBBwRTt.js → ui-revert-Dgawq7ze.js} +4 -4
  130. package/dist/chunks/ui-revert-Dgawq7ze.js.map +1 -0
  131. package/dist/chunks/{ui-switch-BnZTdMDd.js → ui-switch-CfQMbZ0g.js} +31 -38
  132. package/dist/chunks/ui-switch-CfQMbZ0g.js.map +1 -0
  133. package/dist/chunks/{ui-update-_xryLYxw.js → ui-update-B3PPivUm.js} +30 -48
  134. package/dist/chunks/ui-update-B3PPivUm.js.map +1 -0
  135. package/dist/chunks/ui-update-CAiH2tFb.js +109 -0
  136. package/dist/chunks/ui-update-CAiH2tFb.js.map +1 -0
  137. package/dist/chunks/{up-Pdz-l6IH.js → up-BQSnYxYd.js} +47 -53
  138. package/dist/chunks/up-BQSnYxYd.js.map +1 -0
  139. package/dist/chunks/{usage-DFrCVXpT.js → usage-KG8TeOio.js} +7 -20
  140. package/dist/chunks/usage-KG8TeOio.js.map +1 -0
  141. package/dist/chunks/{workspaces-DYcfvKV_.js → workspaces-D9akpzU8.js} +80 -68
  142. package/dist/chunks/workspaces-D9akpzU8.js.map +1 -0
  143. package/dist/chunks/{wsl-temperature-BiCI4iK6.js → wsl-temperature-D-_d4Yk1.js} +47 -42
  144. package/dist/chunks/wsl-temperature-D-_d4Yk1.js.map +1 -0
  145. package/dist/cli.js +306 -238
  146. package/dist/cli.js.map +1 -1
  147. package/dist/client.js +76 -29
  148. package/dist/client.js.map +1 -1
  149. package/dist/types/api/acme.d.ts +3 -7
  150. package/dist/types/api/auth/$.routes.d.ts +107 -16
  151. package/dist/types/api/backups.d.ts +5 -5
  152. package/dist/types/api/control.d.ts +747 -38
  153. package/dist/types/api/ddns.d.ts +13 -18
  154. package/dist/types/api/events.d.ts +9 -3
  155. package/dist/types/api/health.d.ts +2 -4
  156. package/dist/types/api/jobs.d.ts +438 -0
  157. package/dist/types/api/logs.d.ts +20 -0
  158. package/dist/types/api/metrics.d.ts +2 -5
  159. package/dist/types/api/notifications.d.ts +3 -6
  160. package/dist/types/api/proxy.d.ts +63 -23
  161. package/dist/types/api/server-ops.d.ts +17 -0
  162. package/dist/types/api/servers/$.routes.d.ts +418 -186
  163. package/dist/types/api/session-required.d.ts +16 -0
  164. package/dist/types/api/settings.d.ts +7 -7
  165. package/dist/types/api/state.d.ts +100 -10
  166. package/dist/types/api/static.d.ts +2 -2
  167. package/dist/types/api/tls.d.ts +2 -5
  168. package/dist/types/api/workspaces/$.routes.d.ts +186 -12
  169. package/dist/types/api/wsl-temperature.d.ts +4 -10
  170. package/dist/types/app.d.ts +4511 -2778
  171. package/dist/types/cli/account.d.ts +23 -0
  172. package/dist/types/cli/add.d.ts +96 -0
  173. package/dist/types/cli/args.d.ts +24 -35
  174. package/dist/types/cli/backup-offline.d.ts +2 -8
  175. package/dist/types/cli/backup.d.ts +12 -21
  176. package/dist/types/cli/down.d.ts +15 -41
  177. package/dist/types/cli/import-plan.d.ts +55 -0
  178. package/dist/types/cli/import-write.d.ts +5 -0
  179. package/dist/types/cli/import.d.ts +86 -0
  180. package/dist/types/cli/io.d.ts +26 -35
  181. package/dist/types/cli/job.d.ts +99 -0
  182. package/dist/types/cli/logs.d.ts +1 -10
  183. package/dist/types/cli/ls.d.ts +57 -0
  184. package/dist/types/cli/migrate.d.ts +31 -8
  185. package/dist/types/cli/nearest.d.ts +1 -9
  186. package/dist/types/cli/run-deploy.d.ts +36 -0
  187. package/dist/types/cli/secret.d.ts +90 -0
  188. package/dist/types/cli/server.d.ts +6 -15
  189. package/dist/types/cli/service.d.ts +135 -0
  190. package/dist/types/cli/setup-temp.d.ts +17 -13
  191. package/dist/types/cli/status.d.ts +7 -1
  192. package/dist/types/cli/token.d.ts +6 -0
  193. package/dist/types/cli/ui-switch.d.ts +3 -14
  194. package/dist/types/cli/ui-update.d.ts +3 -16
  195. package/dist/types/cli/up.d.ts +9 -22
  196. package/dist/types/cli/usage.d.ts +2 -6
  197. package/dist/types/cli.d.ts +1 -10
  198. package/dist/types/client.d.ts +4099 -1142
  199. package/dist/types/config/accounts.d.ts +16 -0
  200. package/dist/types/config/jobs.d.ts +68 -0
  201. package/dist/types/config/layout.d.ts +2 -8
  202. package/dist/types/config/migrations.d.ts +9 -41
  203. package/dist/types/config/parse.d.ts +8 -13
  204. package/dist/types/config/patch.d.ts +1 -6
  205. package/dist/types/config/schema.d.ts +16 -18
  206. package/dist/types/config/secret-parts.d.ts +6 -27
  207. package/dist/types/config/secrets.d.ts +167 -88
  208. package/dist/types/config/seed.d.ts +1 -6
  209. package/dist/types/config/server-ids.d.ts +2 -11
  210. package/dist/types/config/settings.d.ts +13 -49
  211. package/dist/types/config/store.d.ts +17 -54
  212. package/dist/types/config/workspaces.d.ts +24 -56
  213. package/dist/types/helpers/action-result.d.ts +18 -32
  214. package/dist/types/helpers/atomic.d.ts +1 -4
  215. package/dist/types/helpers/backoff.d.ts +0 -1
  216. package/dist/types/helpers/bind.d.ts +3 -11
  217. package/dist/types/helpers/config-text.d.ts +4 -19
  218. package/dist/types/helpers/cookies.d.ts +2 -7
  219. package/dist/types/helpers/copy-tree.d.ts +4 -12
  220. package/dist/types/helpers/daemon-log.d.ts +8 -33
  221. package/dist/types/helpers/daemon.d.ts +20 -70
  222. package/dist/types/helpers/deferred.d.ts +2 -4
  223. package/dist/types/helpers/env-file.d.ts +2 -7
  224. package/dist/types/helpers/error.d.ts +3 -14
  225. package/dist/types/helpers/event-stream.d.ts +18 -10
  226. package/dist/types/helpers/factory.d.ts +2 -3
  227. package/dist/types/helpers/last-stop.d.ts +5 -12
  228. package/dist/types/helpers/logger.d.ts +1 -5
  229. package/dist/types/helpers/open.d.ts +0 -1
  230. package/dist/types/helpers/openapi.d.ts +19 -5
  231. package/dist/types/helpers/paths.d.ts +18 -53
  232. package/dist/types/helpers/restore-lock.d.ts +2 -17
  233. package/dist/types/helpers/runtime.d.ts +3 -13
  234. package/dist/types/helpers/secret-compare.d.ts +2 -10
  235. package/dist/types/helpers/server-create.d.ts +15 -0
  236. package/dist/types/helpers/shell.d.ts +2 -16
  237. package/dist/types/helpers/sse.d.ts +8 -6
  238. package/dist/types/helpers/ui-dir.d.ts +1 -5
  239. package/dist/types/helpers/utf8-chunks.d.ts +2 -8
  240. package/dist/types/helpers/validate.d.ts +2 -4
  241. package/dist/types/helpers/validator.d.ts +8 -4
  242. package/dist/types/helpers/version.d.ts +1 -6
  243. package/dist/types/helpers/workspace.d.ts +24 -16
  244. package/dist/types/index.d.ts +2 -3
  245. package/dist/types/middleware/auth.d.ts +8 -27
  246. package/dist/types/middleware/body-limit.d.ts +10 -0
  247. package/dist/types/middleware/host.d.ts +4 -23
  248. package/dist/types/middleware/loopback.d.ts +1 -8
  249. package/dist/types/middleware/token-scope.d.ts +34 -0
  250. package/dist/types/node-compat.d.ts +43 -0
  251. package/dist/types/openapi-reference.d.ts +4 -19
  252. package/dist/types/openapi.d.ts +5 -8
  253. package/dist/types/providers/archive.d.ts +8 -25
  254. package/dist/types/providers/backup-hook.d.ts +4 -19
  255. package/dist/types/providers/ddns/dyndns2.d.ts +0 -3
  256. package/dist/types/providers/ddns/index.d.ts +2 -3
  257. package/dist/types/providers/ddns/ip.d.ts +2 -12
  258. package/dist/types/providers/ddns/namecheap-api.d.ts +3 -2
  259. package/dist/types/providers/ddns/types.d.ts +6 -32
  260. package/dist/types/providers/ddns/zone.d.ts +1 -4
  261. package/dist/types/providers/docker.d.ts +18 -45
  262. package/dist/types/providers/entry-state.d.ts +4 -9
  263. package/dist/types/providers/health-check.d.ts +1 -5
  264. package/dist/types/providers/host.d.ts +33 -108
  265. package/dist/types/providers/identity.d.ts +9 -34
  266. package/dist/types/providers/log-tail.d.ts +14 -24
  267. package/dist/types/providers/nanny-sweep.d.ts +8 -25
  268. package/dist/types/providers/nanny.d.ts +16 -58
  269. package/dist/types/providers/port.d.ts +28 -83
  270. package/dist/types/providers/proc.d.ts +22 -80
  271. package/dist/types/providers/process.d.ts +12 -36
  272. package/dist/types/providers/proxy/admin.d.ts +11 -0
  273. package/dist/types/providers/proxy/types.d.ts +4 -16
  274. package/dist/types/providers/telegram.d.ts +1 -17
  275. package/dist/types/providers/ui-release.d.ts +15 -25
  276. package/dist/types/providers/webhook.d.ts +8 -29
  277. package/dist/types/providers/wsl-temperature.d.ts +13 -22
  278. package/dist/types/services/acme-challenge.d.ts +2 -16
  279. package/dist/types/services/auth.d.ts +65 -80
  280. package/dist/types/services/backups/archive-safety.d.ts +30 -0
  281. package/dist/types/services/backups/paths.d.ts +31 -0
  282. package/dist/types/services/backups.d.ts +61 -271
  283. package/dist/types/services/config-watch.d.ts +3 -15
  284. package/dist/types/services/control-server.d.ts +6 -10
  285. package/dist/types/services/ddns.d.ts +12 -13
  286. package/dist/types/services/dependencies.d.ts +3 -14
  287. package/dist/types/services/deploy.d.ts +34 -0
  288. package/dist/types/services/events.d.ts +15 -9
  289. package/dist/types/services/exposure.d.ts +13 -63
  290. package/dist/types/services/history.d.ts +5 -14
  291. package/dist/types/services/host-monitor.d.ts +6 -11
  292. package/dist/types/services/init.d.ts +5 -35
  293. package/dist/types/services/job-ledger.d.ts +27 -0
  294. package/dist/types/services/jobs.d.ts +113 -0
  295. package/dist/types/services/log-buffer.d.ts +7 -8
  296. package/dist/types/services/log-files.d.ts +12 -42
  297. package/dist/types/services/log-relay.d.ts +3 -13
  298. package/dist/types/services/nanny.d.ts +3 -10
  299. package/dist/types/services/notifications.d.ts +31 -61
  300. package/dist/types/services/panel.d.ts +32 -78
  301. package/dist/types/services/proxy-certificates/certificates.d.ts +31 -69
  302. package/dist/types/services/proxy-config.d.ts +15 -36
  303. package/dist/types/services/proxy-dns01.d.ts +14 -0
  304. package/dist/types/services/proxy.d.ts +73 -254
  305. package/dist/types/services/scheduler.d.ts +46 -0
  306. package/dist/types/services/state.d.ts +17 -8
  307. package/dist/types/services/supervisor/compose.d.ts +2 -6
  308. package/dist/types/services/supervisor/entry.d.ts +29 -32
  309. package/dist/types/services/supervisor/health.d.ts +8 -31
  310. package/dist/types/services/supervisor/job-run.d.ts +36 -0
  311. package/dist/types/services/supervisor/output.d.ts +13 -77
  312. package/dist/types/services/supervisor/persistent.d.ts +5 -11
  313. package/dist/types/services/supervisor/port-preflight.d.ts +4 -10
  314. package/dist/types/services/supervisor/records.d.ts +27 -60
  315. package/dist/types/services/supervisor/restart-required.d.ts +13 -0
  316. package/dist/types/services/supervisor/spawn.d.ts +3 -5
  317. package/dist/types/services/supervisor/view.d.ts +3 -1
  318. package/dist/types/services/supervisor.d.ts +31 -43
  319. package/dist/types/services/tls.d.ts +6 -17
  320. package/dist/types/services/ui-update.d.ts +19 -17
  321. package/dist/types/services/ui.d.ts +10 -19
  322. package/dist/types/shared/action-outcome.d.ts +2 -7
  323. package/dist/types/shared/api-client.d.ts +133 -177
  324. package/dist/types/shared/api-scopes.d.ts +17 -0
  325. package/dist/types/shared/backup-scope.d.ts +16 -90
  326. package/dist/types/shared/clone.d.ts +2 -11
  327. package/dist/types/shared/contracts/accounts.d.ts +99 -0
  328. package/dist/types/shared/contracts/backups.d.ts +219 -0
  329. package/dist/types/shared/contracts/ddns.d.ts +208 -0
  330. package/dist/types/shared/contracts/frames.d.ts +1395 -0
  331. package/dist/types/shared/contracts/index.d.ts +3 -0
  332. package/dist/types/shared/contracts/logs.d.ts +107 -0
  333. package/dist/types/shared/contracts/proxy.d.ts +303 -0
  334. package/dist/types/shared/contracts.d.ts +852 -1982
  335. package/dist/types/shared/cpu-scale.d.ts +3 -19
  336. package/dist/types/shared/crash-cause.d.ts +8 -0
  337. package/dist/types/shared/cron.d.ts +70 -0
  338. package/dist/types/shared/ddns-form.d.ts +9 -43
  339. package/dist/types/shared/endpoint.d.ts +1 -7
  340. package/dist/types/shared/error-codes.d.ts +438 -0
  341. package/dist/types/shared/error-message.d.ts +1 -7
  342. package/dist/types/shared/fields.d.ts +7 -17
  343. package/dist/types/shared/form-repair.d.ts +1 -5
  344. package/dist/types/shared/generated.d.ts +3 -19
  345. package/dist/types/shared/host-readings.d.ts +25 -128
  346. package/dist/types/shared/lazy.d.ts +1 -1
  347. package/dist/types/shared/live-frames.d.ts +2 -8
  348. package/dist/types/shared/live-series.d.ts +2 -8
  349. package/dist/types/shared/live-store.d.ts +4 -8
  350. package/dist/types/shared/log-download.d.ts +6 -0
  351. package/dist/types/shared/meta.d.ts +6 -0
  352. package/dist/types/shared/password-policy.d.ts +10 -0
  353. package/dist/types/shared/patch-diff.d.ts +13 -72
  354. package/dist/types/shared/port-reading.d.ts +18 -0
  355. package/dist/types/shared/probe-latency.d.ts +3 -21
  356. package/dist/types/shared/proxy-form.d.ts +33 -74
  357. package/dist/types/shared/proxy-validate.d.ts +11 -0
  358. package/dist/types/shared/query-params.d.ts +8 -0
  359. package/dist/types/shared/server-attention.d.ts +2 -27
  360. package/dist/types/shared/server-form.d.ts +15 -54
  361. package/dist/types/shared/server-key.d.ts +1 -12
  362. package/dist/types/shared/server-readings.d.ts +7 -32
  363. package/dist/types/shared/server-url.d.ts +9 -31
  364. package/dist/types/shared/shape.d.ts +1 -16
  365. package/dist/types/shared/stream-access.d.ts +2 -8
  366. package/dist/types/shared/ui-format.d.ts +25 -65
  367. package/docs/API.md +315 -107
  368. package/docs/BACKUPS.md +61 -56
  369. package/docs/CLI.md +255 -49
  370. package/docs/DDNS.md +35 -49
  371. package/docs/JOBS.md +129 -0
  372. package/docs/NOTIFICATIONS.md +58 -90
  373. package/docs/REVERSE_PROXY.md +116 -188
  374. package/docs/SECURITY.md +126 -44
  375. package/docs/SERVERS.md +282 -409
  376. package/docs/UI_CREATION.md +90 -47
  377. package/docs/demo/blank-host-restore.sh +31 -7
  378. package/package.json +15 -6
  379. package/scripts/prepare.mjs +47 -0
  380. package/uis/stock/dist/assets/CopyButton-8mliL0xi.js +1 -0
  381. package/uis/stock/dist/assets/GlobalSettingsView-BINXY77E.js +1 -0
  382. package/uis/stock/dist/assets/LogViewer-kiSnTwdY.js +1 -0
  383. package/uis/stock/dist/assets/LogsView-DDXf_ONs.js +1 -0
  384. package/uis/stock/dist/assets/Modal-lrUuViF2.js +39 -0
  385. package/uis/stock/dist/assets/ProxyView-uXMaJdSQ.js +1 -0
  386. package/uis/stock/dist/assets/ServerDetailView-CW0Vb_c0.js +4 -0
  387. package/uis/stock/dist/assets/SettingsShell-B135xWjJ.js +1 -0
  388. package/uis/stock/dist/assets/SettingsView-BLtWxVkl.js +2 -0
  389. package/uis/stock/dist/assets/de-BIoTrHBQ.js +1 -0
  390. package/uis/stock/dist/assets/es-x4-ih8lH.js +1 -0
  391. package/uis/stock/dist/assets/fr-DatqBBkO.js +1 -0
  392. package/uis/stock/dist/assets/index-CnojaKcA.css +2 -0
  393. package/uis/stock/dist/assets/index-D-CiZReu.js +16 -0
  394. package/uis/stock/dist/assets/ja-CW1703Gw.js +1 -0
  395. package/uis/stock/dist/assets/ko-wFbT4XtK.js +1 -0
  396. package/uis/stock/dist/assets/ru-C1p5C4VN.js +1 -0
  397. package/uis/stock/dist/assets/useUnsavedGuard-BcsXsfCC.js +9 -0
  398. package/uis/stock/dist/assets/vi-CDqr0uie.js +1 -0
  399. package/uis/stock/dist/assets/zh-CN-BJ7iit-X.js +1 -0
  400. package/uis/stock/dist/index.html +4 -3
  401. package/uis/stock/dist/ui.json +3 -3
  402. package/dist/chunks/archive-DP-XQR8X.js.map +0 -1
  403. package/dist/chunks/atomic-C1PfJpE7.js.map +0 -1
  404. package/dist/chunks/backup-CZcVca2a.js.map +0 -1
  405. package/dist/chunks/backups-CFRaWe_m.js +0 -4691
  406. package/dist/chunks/backups-CFRaWe_m.js.map +0 -1
  407. package/dist/chunks/config-text-DifCHhnz.js +0 -50
  408. package/dist/chunks/config-text-DifCHhnz.js.map +0 -1
  409. package/dist/chunks/contracts-CMBD1TF9.js.map +0 -1
  410. package/dist/chunks/daemon-log-BVj8cDEo.js +0 -241
  411. package/dist/chunks/daemon-log-BVj8cDEo.js.map +0 -1
  412. package/dist/chunks/daemon-qKVECISl.js +0 -247
  413. package/dist/chunks/daemon-qKVECISl.js.map +0 -1
  414. package/dist/chunks/docker-Cy9Lyvda.js.map +0 -1
  415. package/dist/chunks/down-pKbGCW9d.js.map +0 -1
  416. package/dist/chunks/init-BZ7hK9Vf.js.map +0 -1
  417. package/dist/chunks/last-stop-C-BXz_XI.js +0 -53
  418. package/dist/chunks/last-stop-C-BXz_XI.js.map +0 -1
  419. package/dist/chunks/layout-DwTtmund.js +0 -24
  420. package/dist/chunks/layout-DwTtmund.js.map +0 -1
  421. package/dist/chunks/lazy-Ce5zEAq1.js +0 -66
  422. package/dist/chunks/lazy-Ce5zEAq1.js.map +0 -1
  423. package/dist/chunks/log-buffer-Dy9HHDMD.js +0 -414
  424. package/dist/chunks/log-buffer-Dy9HHDMD.js.map +0 -1
  425. package/dist/chunks/logger-B5U4GD3j.js.map +0 -1
  426. package/dist/chunks/logs---TI_bxM.js.map +0 -1
  427. package/dist/chunks/migrate-Cfoq-Vgh.js +0 -155
  428. package/dist/chunks/migrate-Cfoq-Vgh.js.map +0 -1
  429. package/dist/chunks/nanny-B-Eu0sFW.js.map +0 -1
  430. package/dist/chunks/nanny-BtWfy0QH.js +0 -1167
  431. package/dist/chunks/nanny-BtWfy0QH.js.map +0 -1
  432. package/dist/chunks/nanny-sweep-DErnlPY1.js.map +0 -1
  433. package/dist/chunks/nearest-6KgQEDUe.js.map +0 -1
  434. package/dist/chunks/parse-DhmG26fI.js.map +0 -1
  435. package/dist/chunks/paths-CGlGDrOU.js.map +0 -1
  436. package/dist/chunks/port-B8WBTRMk.js.map +0 -1
  437. package/dist/chunks/restart-Des4DrAN.js.map +0 -1
  438. package/dist/chunks/schema-B240VXcV.js.map +0 -1
  439. package/dist/chunks/secrets-BieELnZh.js +0 -562
  440. package/dist/chunks/secrets-BieELnZh.js.map +0 -1
  441. package/dist/chunks/server-Bge2r2qQ.js +0 -169
  442. package/dist/chunks/server-Bge2r2qQ.js.map +0 -1
  443. package/dist/chunks/server-ids-DRuNLVCV.js +0 -32
  444. package/dist/chunks/server-ids-DRuNLVCV.js.map +0 -1
  445. package/dist/chunks/set-password-D5vZqqSX.js +0 -43
  446. package/dist/chunks/set-password-D5vZqqSX.js.map +0 -1
  447. package/dist/chunks/set-token-obPiEJYk.js +0 -78
  448. package/dist/chunks/set-token-obPiEJYk.js.map +0 -1
  449. package/dist/chunks/settings-xu-XTfWg.js.map +0 -1
  450. package/dist/chunks/setup-temp-CAN4_bA-.js.map +0 -1
  451. package/dist/chunks/shape-DnTKzjQ2.js +0 -24
  452. package/dist/chunks/shape-DnTKzjQ2.js.map +0 -1
  453. package/dist/chunks/src-BtWMFmzZ.js.map +0 -1
  454. package/dist/chunks/status-DT1EsA-B.js.map +0 -1
  455. package/dist/chunks/ui-D562aqw5.js.map +0 -1
  456. package/dist/chunks/ui-dir-CsU3uLNV.js.map +0 -1
  457. package/dist/chunks/ui-release-DKzVvlLd.js.map +0 -1
  458. package/dist/chunks/ui-revert-EkBBwRTt.js.map +0 -1
  459. package/dist/chunks/ui-switch-BnZTdMDd.js.map +0 -1
  460. package/dist/chunks/ui-update-_xryLYxw.js.map +0 -1
  461. package/dist/chunks/up-Pdz-l6IH.js.map +0 -1
  462. package/dist/chunks/usage-DFrCVXpT.js.map +0 -1
  463. package/dist/chunks/workspaces-DYcfvKV_.js.map +0 -1
  464. package/dist/chunks/wsl-temperature-BiCI4iK6.js.map +0 -1
  465. package/dist/types/cli/set-password.d.ts +0 -14
  466. package/dist/types/cli/set-token.d.ts +0 -21
  467. package/uis/stock/dist/assets/CopyButton-BUBKRJyY.js +0 -1
  468. package/uis/stock/dist/assets/GlobalSettingsView-yYMcRWvt.js +0 -1
  469. package/uis/stock/dist/assets/LogViewer-DIliXy62.js +0 -1
  470. package/uis/stock/dist/assets/LogsView-B7Z-7RNg.js +0 -1
  471. package/uis/stock/dist/assets/Modal-DmKa5Qpp.js +0 -39
  472. package/uis/stock/dist/assets/ProxyView-DvZiNkwb.js +0 -1
  473. package/uis/stock/dist/assets/ServerDetailView-6idGT_EX.js +0 -2
  474. package/uis/stock/dist/assets/SettingsShell-CeGtleYI.js +0 -1
  475. package/uis/stock/dist/assets/SettingsView-BrhJIrmk.js +0 -2
  476. package/uis/stock/dist/assets/de-BRITeb0H.js +0 -1
  477. package/uis/stock/dist/assets/es-B2zIEssV.js +0 -1
  478. package/uis/stock/dist/assets/fr-s0ZOBEqh.js +0 -1
  479. package/uis/stock/dist/assets/index-C1MehbKy.css +0 -2
  480. package/uis/stock/dist/assets/index-CnBN54wF.js +0 -15
  481. package/uis/stock/dist/assets/ja-CU7MR85V.js +0 -1
  482. package/uis/stock/dist/assets/ko-tL5Me6d-.js +0 -1
  483. package/uis/stock/dist/assets/ru-92yrvkNJ.js +0 -1
  484. package/uis/stock/dist/assets/vi-CzvY16k2.js +0 -1
  485. package/uis/stock/dist/assets/zh-CN-DDwFW_uW.js +0 -1
@@ -4,19 +4,18 @@ Expose the whole stack through one engine with automatic HTTPS: `git.example.com
4
4
  your Gitea entry, `media.example.com` → Jellyfin, `panel.example.com` → this panel.
5
5
 
6
6
  The engine is **Caddy**, downloaded and supervised by the panel. You never edit its
7
- configuration — the panel generates it from the route table and applies it through
8
- Caddy's admin API, which is atomic: a configuration that does not load leaves the
9
- running one in place.
7
+ configuration — the panel generates it from the route table and applies it atomically: a
8
+ configuration that does not load leaves the running one in place.
10
9
 
11
10
  Setup is **Others → Reverse Proxy** in the sidebar.
12
11
 
13
12
  ## Quick start
14
13
 
15
- 1. **Install the engine** — one button, the current Caddy release (~46 MB) into
14
+ 1. **Install the engine** — one button, the current Caddy release, into
16
15
  `$HHOSTED_HOME/.hh/.proxy/bin/`. The version the binary reports is shown afterwards.
17
16
  2. **Set the ports** — `80` and `443` by default, plus the ACME account e-mail.
18
17
  3. **Add a route** — a hostname and a target.
19
- 4. Point the hostname's DNS at this machine (Dynamic DNS can do that) and switch the
18
+ 4. Point the hostname's DNS at this machine ([Dynamic DNS](./DDNS.md) can do that) and switch the
20
19
  proxy on.
21
20
 
22
21
  ```json
@@ -41,164 +40,106 @@ That block lives in `$HHOSTED_HOME/.hh/settings.json` — the panel writes it fo
41
40
 
42
41
  ## Ports
43
42
 
44
- `80` and `443` are what automatic HTTPS wants: a certificate is issued over an ACME
45
- challenge on one of them, and anything else needs the router to forward them anyway.
46
-
47
- Binding below 1024 needs a privilege. On Linux:
43
+ `80` and `443` are what automatic HTTPS wants: a certificate is issued over an ACME challenge on
44
+ one of them. Binding below 1024 needs a privilege. On Linux:
48
45
 
49
46
  ```sh
50
47
  sudo setcap 'cap_net_bind_service=+ep' "$HHOSTED_HOME/.hh/.proxy/bin/hh-caddy"
51
48
  ```
52
49
 
53
- Otherwise use **4480/4443** — one click in the page, or `httpPort`/`httpsPort` — and
54
- forward `80 → 4480` and `443 → 4443` on your router.
55
-
56
- A port a *stranger* holds is refused before anything is started, and no listener the panel did not
57
- start is ever killed. The ports the engine actually bound are not a conflict: once it is running, a
58
- settings edit re-applies to the engine already listening on them. A configured port it did **not**
59
- bind — a `tls: "off"`-only route table binds no HTTPS listener — is not claimed on its behalf.
50
+ Otherwise use **4480/4443** — one click in the page, or `httpPort`/`httpsPort` — and forward
51
+ `80 → 4480` and `443 → 4443` on your router.
60
52
 
61
- One limit worth knowing: a process carrying a file capability (the `setcap` above) is
62
- **non-dumpable**, so the panel cannot see the socket it holds — `lsof` and the OS report nothing.
63
- The panel identifies its own engine from the records it wrote — the ports the applied configuration
64
- actually listens on, plus the engine's live nanny state — rather than from the process table, and
65
- says so when it refuses a port it cannot attribute. A stranger holding a capped process's ports is
66
- reported without a pid.
53
+ A port a stranger holds is refused before anything is started, and no listener the panel did not
54
+ start is ever killed. A process carrying a file capability (the `setcap` above) hides its sockets
55
+ from `lsof` and the OS, so the panel recognises its own engine from the configuration it applied and
56
+ the engine's nanny state; a stranger holding a capped process's ports is reported without a pid.
67
57
 
68
58
  ## Routes
69
59
 
70
60
  | Field | Notes |
71
61
  | --- | --- |
72
62
  | `id` | Stable name, `[a-z0-9_-]`. |
73
- | `host` | The public hostname. A local-only name (`gitea.lan`, `box`, an IP) gets the engine's own CA instead of a public certificate. |
63
+ | `host` | The public hostname, matched without regard to case. A local-only name (`gitea.lan`, `box`, an IP) gets the engine's own CA instead of a public certificate. |
74
64
  | `enabled` | A disabled route stays configured but is not served. |
75
65
  | `target` | `server` (a supervised entry), `panel` (this control panel), `external` (any `host:port`). |
76
- | `workspace` + `server` | For `target: "server"` — an id is only unique inside its workspace. The upstream address is resolved live; a stopped entry leaves the hostname dark and the page says so, and the engine is re-applied when the entry comes up or goes down. |
77
- | `url` | For `target: "external"`, e.g. `http://10.0.0.5:8080`. The port is optional: without one the scheme's own default is used (`:80` for `http:`, `:443` for `https:`). An `https://` upstream is dialled with TLS, and **its certificate is not verified** — a homelab upstream behind a self-signed certificate works, and so does an impostor. |
78
- | `path` | Optional prefix, so one hostname can serve several apps. The longest matching prefix wins, whatever order the routes are listed in; a route with no path takes what is left. |
79
- | `tls` | `auto` (default), `off`, `manual`. |
80
- | `dnsAccount` | Optional `workspace/account` for a DNS-01 challenge, referencing a DNS account from Settings. Empty picks the workspace's only account that can write TXT records, so a single-account setup needs nothing here. |
81
-
82
- The list's hostname is a link to where the route answers — `https://host:<https port>`, or
83
- the plain port for `tls: "off"`, path included. A route that is switched off is plain text.
84
-
85
- A route pointing at the panel is exposure, and answers to the same rule as binding the
86
- listener beyond loopback: authentication on and a non-default password, or the save is
87
- refused. `tls` does not change that bar — it is about who can reach the panel, not whether
88
- the hop is encrypted, and `tls: "off"` is if anything the worse case. The engine upstreams a
89
- panel route to `127.0.0.1`, which the panel's own guard reads as a local request, so a
90
- plain-HTTP route with no password set would serve the panel to anyone who reached that
91
- hostname.
92
-
93
- An `external` route whose upstream is the panel's own listener (`http://127.0.0.1:<panel port>`,
94
- `localhost`, `[::1]`, `0.0.0.0`) is a panel route by another name, and is held to the same rule.
95
- A restore is held to it too. If a running engine's panel routes stop meeting it (say a restore
96
- removed the password), the engine keeps serving every other route and drops those, with the
97
- reason shown as the proxy's error, until the rule is met again.
66
+ | `workspace` + `server` | For `target: "server"` — an id is only unique inside its workspace. The upstream address is resolved live; a stopped entry leaves the hostname dark and the page says so. |
67
+ | `url` | For `target: "external"`, e.g. `http://10.0.0.5:8080`. Without a port the scheme's default is used. A host and port only: an upstream with a path, query or credentials is refused. An `https://` upstream's certificate is verified against the system trust store. |
68
+ | `path` | Optional prefix, so one hostname can serve several apps. `app`, `/app`, `/app/` and `/App` are the same prefix, so two routes spelling it differently on one host are refused as a clash. The longest matching prefix wins; a route with no path takes what is left. |
69
+ | `tls` | `auto` (default), `off`, `manual` — see [HTTPS](#https). |
70
+ | `upstreamSkipVerify` | Optional, off by default. On, an `https://` upstream's certificate is not verified — for a homelab upstream with a self-signed certificate, at the cost of accepting an impostor too. |
71
+ | `dnsAccount` | Optional `workspace/account` for a DNS-01 challenge (see [DNS-01](#dns-01)). |
72
+
73
+ A route that cannot be served — its server was removed, its upstream is unusable, or a `manual`
74
+ route has no valid pair — is left out of the engine and the page says why on that row; every other
75
+ route keeps serving. A save that adds or changes such a route while the proxy is on is refused
76
+ instead.
77
+
78
+ **A route pointing at the panel is exposure.** It is held to the same rule as binding the listener
79
+ beyond loopback — authentication on and your own secret of at least 12 characters, not the first-run
80
+ one ([SECURITY.md](./SECURITY.md)) — or the save is refused, whatever its `tls`. An `external` route
81
+ whose upstream is the panel's own listener (`127.0.0.1`, `localhost`, `[::1]` or `0.0.0.0` on the
82
+ panel's port) counts too, and so does a restore. If a running engine's panel routes stop meeting the
83
+ rule, the engine drops those and keeps serving the rest, with the reason shown as the proxy's error.
98
84
 
99
85
  ## HTTPS
100
86
 
101
87
  | `tls` | What it means |
102
88
  | --- | --- |
103
- | `auto` | The engine decides. A public name gets a Let's Encrypt certificate (HTTP-01 or TLS-ALPN-01, with renewal in the background). A local-only name gets the engine's own locally-trusted CA, and the public CA is never asked for it. |
89
+ | `auto` | A public name gets a Let's Encrypt certificate (HTTP-01 or TLS-ALPN-01, renewed in the background). A local-only name gets the engine's own locally-trusted CA, and the public CA is never asked. |
104
90
  | `off` | Plain HTTP on the http port, no certificate. |
105
- | `manual` | One of the uploaded pairs, whichever covers the hostname (the engine picks by SNI). A route set to this with no pair covering it is refused, rather than quietly given a certificate from somewhere else. |
106
-
107
- `email` is required as soon as a route uses a public hostname, and it is the contact
108
- address the ACME account is registered with. `staging` points that account at the ACME
109
- staging endpoint while you test: the certificates are untrusted, and it is the way to
110
- avoid burning a rate limit. Both reach the engine as one automation policy covering the
111
- **public** names only, so a local-only name keeps the engine's own CA. The engine page
112
- shows the soonest expiry among the publicly-issued certificates. Issuance is Let's
113
- Encrypt; ZeroSSL is not offered as a second issuer because it needs an EAB key the panel
114
- does not collect.
115
-
116
- The challenge is the part that catches people out: with the proxy on 4480/4443, **80 has
117
- to reach 4480 and 443 has to reach 4443**, or the CA never sees the challenge and the name
118
- never gets its certificate.
119
-
120
- A name the CA will not issue for falls back to the engine's own CA. The route reads
121
- **Fell back to Local CA**: the name answers, but with an untrusted certificate, and the
122
- engine keeps trying on its own. The next attempt is about **8 hours** away — no restart,
123
- no downtime. The panel derives that wait from the certificate: certmagic renews once a
124
- third of the lifetime is left, so two thirds of it is the wait, and the engine's own CA
125
- issues 12 hours by default. The interval is read, never configured, so there is no knob to
126
- shorten it.
127
-
128
- A **local-only** name (`.lan`, an IP, `localhost`) is a different case: the public CA is
129
- never asked, because it could only answer `rejectedIdentifier`. The engine signs it from
130
- its own CA, and the route reads **local — signed by the engine's own CA** once that leaf
131
- exists. The root is added to this machine's trust store when the engine first starts
132
- (which is why the first start may ask for a password), so a browser on it accepts the
133
- name without a warning. Until the leaf is there the route reads **waiting for the CA**,
134
- and the panel reports the engine's own reason if it refuses.
135
-
136
- **Force retry certificate** appears on that row only, and asks the CA again immediately.
137
- The engine is **not** restarted: a certificate the engine holds cannot be cleared by
138
- deleting the file or by reloading the configuration, but it *is* released when the name
139
- leaves the configuration — so the panel reloads without that one route, drops the stored
140
- pair while it is out, and puts the route back. Every other route keeps serving; the name
141
- itself has no certificate until the CA answers. It is not offered while a name is still
142
- *pending*, because there the engine is already mid-ACME. It is refused when removing that
143
- route would leave **nothing served** — it is the only working route, or every other one is
144
- disabled or has no upstream — because a configuration with no listeners takes the site
145
- dark. Add another working route first.
146
-
147
- A **removed** route has its stored certificate dropped on the next apply, so adding it
148
- back asks the CA instead of serving the old pair. A **disabled** route keeps its
149
- certificate: it is still configured, and switching it back on should not cost a new
150
- issuance.
151
-
152
- A hostname **no route claims** gets a page saying so, on both ports — not a redirect into
153
- a handshake that cannot finish. A visitor with no hostname at all (a bare IP on the HTTPS
154
- port) is answered by the engine's own CA under `hh-fallback.invalid`, so the page appears
155
- after the browser's warning. A hostname that is neither routed nor covered by a
156
- certificate still fails its handshake: there is nothing to present a certificate for.
157
-
158
- **A name with no certificate yet is still reachable.** The engine's own CA is the last
159
- issuer in the policy, so the handshake completes with an untrusted certificate — the
160
- browser offers to continue instead of failing with `ERR_SSL_PROTOCOL_ERROR` — and over
161
- plain HTTP the same name answers with a page saying so, naming the ports to forward,
162
- rather than redirecting into a handshake that cannot finish. The panel re-applies the
163
- configuration when the certificate arrives, and the route table shows where each name
164
- stands: *issued* · *pending* · *failed* (with the engine's own reason) · *local* (the
165
- engine CA) · *uploaded*.
91
+ | `manual` | One of the [uploaded pairs](#uploaded-certificates), whichever covers the hostname. With no pair covering it, the route is not served (and refused at save). |
92
+
93
+ `email` is required as soon as a route uses a public hostname; it registers the ACME account.
94
+ `staging` uses the ACME staging endpoint while you test: the certificates are untrusted, but no rate
95
+ limit is burnt. ZeroSSL is not offered (it needs an EAB key the panel does not collect).
96
+
97
+ With the proxy on 4480/4443, **80 has to reach 4480 and 443 has to reach 4443**, or the CA never
98
+ sees the challenge and the name never gets its certificate.
99
+
100
+ The route table shows where each name stands: *issued* · *pending* · *failed* (with the engine's
101
+ reason) · *local* (the engine CA) · *uploaded*.
102
+
103
+ - **A name with no certificate yet is still reachable**: the handshake completes with an untrusted
104
+ certificate from the engine's own CA, and plain HTTP answers with a page naming the ports to forward.
105
+ The panel re-applies the configuration when the certificate arrives.
106
+ - **A name the CA will not issue for** reads **Fell back to Local CA** and is served with an untrusted
107
+ certificate while the engine keeps trying on its own — next attempt about **8 hours** later, with
108
+ no restart.
109
+ - **A local-only name** (`.lan`, an IP, `localhost`) is signed by the engine's own CA and reads
110
+ **local — signed by the engine's own CA** once that exists (**waiting for the CA** until then).
111
+ - **Force retry certificate** (on a fell-back row) asks the CA again at once without restarting the
112
+ engine: the panel briefly reloads without that hostname, drops its stored certificate and puts the
113
+ routes back. It is refused when removing that hostname would leave nothing served — add another
114
+ working route first.
115
+ - A **removed** route's certificate is dropped on the next apply; a **disabled** route keeps its own.
116
+ - A hostname **no route claims** gets a page saying so on both ports. A visitor with no hostname (a
117
+ bare IP on the HTTPS port) gets that page after a certificate warning.
118
+
119
+ ### The engine's root certificate
120
+
121
+ For its own CA the engine — not the panel — adds a root to this machine's **trust store**
122
+ (`/etc/ssl/certs` on Linux, the login keychain on macOS, `certutil` on Windows); that is why a browser
123
+ here trusts a `.lan` name. On Linux the first start needs `sudo` once, and the engine logs
124
+ `installing root certificate (you might be prompted for password)`. It is one root per engine data
125
+ directory, so **a second home-hosted home on one machine installs a second one**, and deleting a
126
+ home's `.hh` does not remove it.
166
127
 
167
128
  ## Uploaded certificates
168
129
 
169
- *Manual certificate* takes as many PEM pairs as you have names: add one per hostname,
170
- label it, and the engine serves each to the name it covers. A route set to `manual` is
171
- refused while no uploaded pair covers its hostname, and a pair cannot be removed while a
172
- route still serves it — so the two can never disagree.
173
-
174
- Certificates are read, never edited: the panel reports each pair's subject, issuer,
175
- expiry and the hostnames it covers (from its SANs, wildcards included), and marks a pair
176
- no route would be served from. A pair outside its validity window — expired, or not valid
177
- yet — is never served, and the route that asks for it is refused with the reason; a pair
178
- whose key does not match its certificate is refused the same way. An uploaded pair is
179
- re-read as soon as its file changes, so editing or replacing one outside the panel is
180
- picked up on the next look; the engine's
181
- own certificate store (the issued certificates) is read at most every 15 seconds.
182
-
183
- Certificates are managed by the engine, inside `.hh/.proxy/engine/`: the generated
184
- configuration pins its storage root, and the panel passes the engine no `$HOME` of its
185
- own to write into.
186
-
187
- One thing outside it is touched, by the engine and not by the panel: for its own CA it
188
- adds the root to this machine's **trust store** (`/etc/ssl/certs` on Linux, the login
189
- keychain on macOS, `certutil` on Windows) — a `.lan` name is only trusted by a browser
190
- because of that. On Linux the directory is root-owned, so the install needs `sudo` once;
191
- the engine logs `installing root certificate (you might be prompted for password)` and
192
- then `certificate installed properly in linux trusts`. It is one root per engine data
193
- directory, so **a second home-hosted home on one machine installs a second one**, and a
194
- root is not removed when that home's `.hh` is deleted. The engine has a knob for it —
195
- `apps.pki.certificate_authorities.local.install_trust: false` — which the panel does not
196
- set, because a browser would then warn on every local name.
197
-
198
- **DNS-01** is the way round a router that will not forward 80 and 443. A route is one
199
- hostname, so there is no wildcard to issue; what DNS-01 buys is a certificate with
200
- **no inbound port at all** — behind CGNAT, or on a host only reachable over VPN.
201
- Turn it on in the page and point each route at a DNS account:
130
+ *Manual certificate* takes as many PEM pairs as you have names: add one per hostname, label it, and
131
+ the engine serves each to the name it covers. A pair cannot be removed while a route still serves it.
132
+
133
+ The panel shows each pair's subject, issuer, expiry and the hostnames it covers (SANs, wildcards
134
+ included), and marks a pair no route uses. A pair that is expired, not yet valid, or whose key does
135
+ not match its certificate is never served, and a route asking for it is refused with the reason. A
136
+ pair edited on disk is re-read on the next look; **Apply** reloads the engine with it.
137
+
138
+ ## DNS-01
139
+
140
+ DNS-01 is the way round a router that will not forward 80 and 443: a certificate with **no inbound
141
+ port at all** — behind CGNAT, or on a host only reachable over VPN. (A route is one hostname, so it
142
+ issues no wildcards.) Turn it on in the page and point routes at a DNS account:
202
143
 
203
144
  ```json
204
145
  {
@@ -211,75 +152,62 @@ Turn it on in the page and point each route at a DNS account:
211
152
  }
212
153
  ```
213
154
 
214
- The account is the one from **Workspace Settings → Dynamic DNS** — same credentials,
215
- same workspace, same notification routing. It does not need the hostname in its
216
- hostname list: the account names the zone, the route names the subject. A route may
217
- name a different account from its neighbour, so names in two zones at two registrars
218
- each get the right one; the panel gives each account a policy of its own.
219
-
220
- Leave a route on **Automatic** and it uses the only account that can answer a
221
- challenge. With more than one account, Automatic cannot choose: pick one per route, or
222
- those names keep using the port challenges. A local-only name (`.lan`, an IP) is never
223
- challenged — it is signed by the engine's own CA.
224
-
225
- The account is checked when you save, not when the certificate is due: unknown, an
226
- account whose provider cannot write a `TXT` record (the router-style Dynamic DNS
227
- password providers), or one with no credentials stored yet is refused there.
228
-
229
- Which accounts can answer: any whose provider writes a `TXT` record. Today that is
230
- Cloudflare and **Namecheap (API)** — the latter is a separate provider from Namecheap's
231
- Dynamic DNS entry, because its credentials differ (API user, key and a whitelisted
232
- client IP) and it rewrites the whole zone per write. Namecheap's Dynamic DNS password
233
- cannot write a TXT record at all, so that account is refused with the reason.
234
-
235
- The engine holds no DNS credentials. It asks the panel over the ACMEProxy protocol on
236
- loopback, with credentials the panel generated for it, and the panel writes the
237
- `_acme-challenge` record through that account. `resolvers` overrides the nameservers
238
- the engine checks the record against, which is what split-horizon DNS needs.
239
-
240
- Setting it up needs no inbound port, but the record has to be **published** before the
241
- CA looks: the panel writes it, the CA reads it, and the panel removes it again. A
242
- provider that can only write a whole record set — Namecheap's XML API is the one —
243
- is read-modify-write, so the panel rewrites records it did not create, and refuses
244
- rather than adding a 151st record to a zone already at the limit.
155
+ The account is one from **Workspace Settings → Dynamic DNS** ([DDNS.md](./DDNS.md)), with the same
156
+ credentials. It does not need the hostname in its own list: the account names the zone, the route
157
+ names the subject. Routes may name different accounts, so names in two zones at two registrars each
158
+ get the right one.
159
+
160
+ Leave a route on **Automatic** and it uses the only account that can answer a challenge, for a name
161
+ inside that account's zones (those of its Dynamic DNS hostnames, and of any route naming it
162
+ explicitly). A name outside them, or any name when more than one account could answer, keeps the port
163
+ challenges — pick the account on the route instead. Local-only names are never challenged.
164
+
165
+ Only a provider that can write a `TXT` record can answer: today **Cloudflare** and **Namecheap
166
+ (API)** — a separate provider from Namecheap's Dynamic DNS password, which cannot write TXT records.
167
+ An unknown account, one whose provider cannot write TXT, or one with no credentials stored is refused
168
+ when you save. Namecheap's API rewrites the whole zone per write, so the panel refuses rather than
169
+ add a record to a zone already at its limit.
170
+
171
+ The engine holds no DNS credentials: it asks the panel over loopback, with credentials the panel
172
+ generated, and the panel writes and later removes the `_acme-challenge` record. So DNS-01 needs the
173
+ panel bound to `local` or `lan` (a panel bound to one address is dialled there). `resolvers`
174
+ overrides the nameservers the engine checks the record against — what split-horizon DNS needs.
245
175
 
246
176
  ## The engine
247
177
 
248
178
  | | |
249
179
  | --- | --- |
250
- | Comes from | Caddy's own build service (`caddyserver.com/api/download`), at **its current release** — the panel pins no version, so **Update engine** is how a security fix reaches you. |
251
- | Verified against | **Caddy 2.11.6.** That is the release this build was tested with; a newer one is installed anyway, and the panel reports the version that actually arrived. A release that changes the JSON schema may need a panel update first. |
252
- | Carries | The `acmeproxy` DNS provider, compiled in for every install so the binary does not depend on a setting. `DNS-01` is offered because of it; an engine installed by an older release is refused with *update the engine* rather than failing inside Caddy. |
253
- | Installed at | `.hh/.proxy/bin/hh-caddy` + `engine.json` (version, URL, size, when). |
254
- | Replaceable | Drop any `hh-caddy` build at that path and the panel runs it: it reports *a path configured by hand* and probes no version. Installing or updating is refused while the engine is up — **Stop** it first, because the binary is replaced on disk. A download that does not report a version is discarded and the installed binary kept. |
255
- | Runs as | A child of the panel's own nanny, exactly like a `persistent: true` entry. |
256
- | Supervised by | The panel. The admin API is opened on the panel side only: a unix socket in a `0700` directory (loopback TCP plus Caddy's origin check on Windows). |
257
- | Reloaded by | `POST /load` — atomic, and the revision that applied is kept on disk so a change can be reverted in one click (the first one has nothing to go back to). A reload onto a port a stranger holds is refused before the engine is touched, naming the pid when the OS will tell it and saying so when it will not, and the panel keeps reporting the ports the engine is really on. |
258
- | Stops with | **Stop** in the page, switching the proxy off, or `POST /api/proxy/stop`. It never stops itself, and `down` leaves it serving — the socket facing the internet is not something a panel restart should drop. It is never restarted automatically either: a configuration the engine refuses needs a person, not a retry loop. |
259
-
260
- Because it runs under a nanny, a panel restart does not drop the socket that faces the
261
- internet: the engine keeps serving, and the panel reattaches to it on the next boot.
180
+ | Comes from | Caddy's own build service (`caddyserver.com/api/download`), at **its current release** — the panel pins no version, so **Update engine** is how a security fix reaches you. A release that changes Caddy's JSON schema may need a panel update first. |
181
+ | Carries | The `acmeproxy` DNS provider, which DNS-01 needs. An engine installed by an older release is refused with *update the engine*. |
182
+ | Installed at | `.hh/.proxy/bin/hh-caddy` + `engine.json` (version, URL, size, date, sha256). A download redirected off https or off `caddyserver.com` is refused. |
183
+ | Replaceable | Drop any `hh-caddy` build at that path **and delete `engine.json`**, and the panel runs it as *a path configured by hand*. A downloaded engine is checked against its recorded sha256 before every start. Installing or updating is refused while the engine runs — **Stop** it first. |
184
+ | Runs as | A child of the panel's nanny, like a `persistent: true` entry: a panel restart or `down` leaves it serving, and the panel reattaches on the next boot. |
185
+ | Admin API | Opened to the panel only: a unix socket in a `0700` directory (loopback TCP on Windows). |
186
+ | Reloads | Atomic. The previous applied revision is kept, so **Revert** goes back one change; it passes the same exposure and port checks as an apply. |
187
+ | Stops with | **Stop** in the page, switching the proxy off (in the page, `settings.json`, or a restore), or `POST /api/proxy/stop`. It never stops or restarts itself — a configuration the engine refuses needs a person, not a retry loop. |
262
188
 
263
189
  ## API
264
190
 
265
191
  | Route | What it does |
266
192
  | --- | --- |
267
193
  | `GET /api/proxy` | Policy, engine, live state and every route with its resolved upstream. |
268
- | `PATCH /api/proxy` | Change the settings or replace the route list, then apply. |
194
+ | `PATCH /api/proxy` | Change the settings or replace the route list, then apply. A `200` means saved; `applyError` in the answer says the engine did not apply it. |
269
195
  | `POST /api/proxy/engine` | Install or update the engine (`{ "version": "" }` = the current release). |
270
196
  | `PUT` \| `DELETE /api/proxy/certificates/:id` | Store or remove one uploaded pair (`{ label, certificate, privateKey }`). |
271
197
  | `POST /api/proxy/start` \| `stop` \| `apply` \| `revert` | Engine lifecycle and configuration. |
272
198
  | `POST /api/proxy/routes/:id/retry-certificate` | Ask the CA again for one route, without restarting the engine. |
273
- | `POST /_acme/present` \| `cleanup` | The engine's DNS-01 channel: loopback only, and behind credentials the panel generated. Not part of `/api`, so it needs no session. |
199
+ | `POST /_acme/present` \| `cleanup` | The engine's DNS-01 channel: loopback only, behind credentials the panel generated. |
274
200
 
201
+ These need the `proxy` scope for writes; see [API.md](./API.md) for the conventions.
275
202
 
276
203
  ## Files
277
204
 
278
205
  | Path | What |
279
206
  | --- | --- |
280
207
  | `.hh/.proxy/bin/` | The engine binary and the record of what was installed. |
281
- | `.hh/.proxy/engine/current.json` | The generated configuration; `previous.json` is the revision before it. Both are `0600`: with DNS-01 on they carry the challenge credentials the engine authenticates with. |
208
+ | `.hh/.proxy/engine/current.json` | The generated configuration; `previous.json` is the revision before it. Both `0600`: with DNS-01 on they carry the challenge credentials. |
209
+ | `.hh/.proxy/engine/` | Also the engine's certificate storage, pinned away from `$HOME`. |
282
210
  | `.hh/.proxy/state/` | The nanny's spec and state, and `admin.json` (how to reach a running engine). |
283
- | `.hh/.proxy/state/challenge.json` | The credentials the engine presents to `/_acme`, `0600`; written only when DNS-01 is on. |
211
+ | `.hh/.proxy/state/challenge.json` | The credentials the engine presents to `/_acme`, `0600`; only with DNS-01 on. |
284
212
  | `.hh/.proxy/tls/<id>.crt.pem` \| `<id>.key.pem` | One uploaded pair per entry (the key is `0600`). |
285
- | `.hh/.logs/proxy.log` | The engine's own JSON output, as the nanny captures it. |
213
+ | `.hh/.logs/proxy.log` | The engine's own JSON output. |