@lamalibre/create-lamaste 4.0.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 (270) hide show
  1. package/LICENSE.md +118 -0
  2. package/README.md +114 -0
  3. package/bin/create-lamaste.js +15 -0
  4. package/package.json +54 -0
  5. package/scripts/bundle-vendor.js +110 -0
  6. package/scripts/lamaste-cert-info +62 -0
  7. package/scripts/lamaste-certbot +96 -0
  8. package/scripts/lamaste-priv +693 -0
  9. package/src/index.js +646 -0
  10. package/src/lib/accounts.js +86 -0
  11. package/src/lib/binaries.js +137 -0
  12. package/src/lib/cert-help-page.js +160 -0
  13. package/src/lib/env.js +132 -0
  14. package/src/lib/http-redirect.js +38 -0
  15. package/src/lib/ownership.js +231 -0
  16. package/src/lib/relay-services.js +103 -0
  17. package/src/lib/secrets.js +19 -0
  18. package/src/lib/service-config.js +311 -0
  19. package/src/lib/summary.js +131 -0
  20. package/src/lib/wrappers.js +63 -0
  21. package/src/tasks/gatekeeper.js +233 -0
  22. package/src/tasks/harden.js +293 -0
  23. package/src/tasks/mtls.js +193 -0
  24. package/src/tasks/nginx.js +265 -0
  25. package/src/tasks/node.js +110 -0
  26. package/src/tasks/panel.js +408 -0
  27. package/src/tasks/redeploy.js +438 -0
  28. package/vendor/docs/00-introduction/how-it-works.md +447 -0
  29. package/vendor/docs/00-introduction/quickstart.md +472 -0
  30. package/vendor/docs/00-introduction/what-is-lamaste.md +112 -0
  31. package/vendor/docs/01-concepts/authentication.md +464 -0
  32. package/vendor/docs/01-concepts/authorization.md +242 -0
  33. package/vendor/docs/01-concepts/certificates.md +452 -0
  34. package/vendor/docs/01-concepts/dns-and-domains.md +343 -0
  35. package/vendor/docs/01-concepts/mtls.md +490 -0
  36. package/vendor/docs/01-concepts/nginx-reverse-proxy.md +540 -0
  37. package/vendor/docs/01-concepts/security-model.md +600 -0
  38. package/vendor/docs/01-concepts/tickets.md +414 -0
  39. package/vendor/docs/01-concepts/tunneling.md +367 -0
  40. package/vendor/docs/02-guides/agent-setup.md +194 -0
  41. package/vendor/docs/02-guides/certificate-management.md +341 -0
  42. package/vendor/docs/02-guides/cloud-provisioning.md +406 -0
  43. package/vendor/docs/02-guides/desktop-app-setup.md +226 -0
  44. package/vendor/docs/02-guides/disaster-recovery.md +464 -0
  45. package/vendor/docs/02-guides/first-tunnel.md +230 -0
  46. package/vendor/docs/02-guides/installation.md +393 -0
  47. package/vendor/docs/02-guides/managing-users.md +255 -0
  48. package/vendor/docs/02-guides/onboarding.md +244 -0
  49. package/vendor/docs/02-guides/standalone-plugin-with-tickets.md +375 -0
  50. package/vendor/docs/02-guides/static-sites.md +364 -0
  51. package/vendor/docs/03-architecture/e2e-three-vm-sequences.md +457 -0
  52. package/vendor/docs/03-architecture/installer-flow.md +151 -0
  53. package/vendor/docs/03-architecture/installer.md +445 -0
  54. package/vendor/docs/03-architecture/management-flow.md +288 -0
  55. package/vendor/docs/03-architecture/nginx-configuration.md +830 -0
  56. package/vendor/docs/03-architecture/onboarding-flow.md +164 -0
  57. package/vendor/docs/03-architecture/overview.md +541 -0
  58. package/vendor/docs/03-architecture/panel-client.md +416 -0
  59. package/vendor/docs/03-architecture/panel-server.md +695 -0
  60. package/vendor/docs/03-architecture/state-management.md +529 -0
  61. package/vendor/docs/03-architecture/system-overview.md +167 -0
  62. package/vendor/docs/04-api-reference/certificates.md +1141 -0
  63. package/vendor/docs/04-api-reference/gatekeeper.md +592 -0
  64. package/vendor/docs/04-api-reference/onboarding.md +473 -0
  65. package/vendor/docs/04-api-reference/overview.md +404 -0
  66. package/vendor/docs/04-api-reference/services.md +267 -0
  67. package/vendor/docs/04-api-reference/settings.md +343 -0
  68. package/vendor/docs/04-api-reference/sites.md +716 -0
  69. package/vendor/docs/04-api-reference/system.md +268 -0
  70. package/vendor/docs/04-api-reference/tickets.md +618 -0
  71. package/vendor/docs/04-api-reference/tunnels.md +417 -0
  72. package/vendor/docs/04-api-reference/users.md +333 -0
  73. package/vendor/docs/05-operations/backup-and-restore.md +342 -0
  74. package/vendor/docs/05-operations/monitoring.md +285 -0
  75. package/vendor/docs/05-operations/uninstalling.md +344 -0
  76. package/vendor/docs/05-operations/upgrades.md +270 -0
  77. package/vendor/docs/06-reference/config-files.md +1080 -0
  78. package/vendor/docs/06-reference/glossary.md +528 -0
  79. package/vendor/docs/06-reference/installer-flags.md +260 -0
  80. package/vendor/docs/06-reference/ports-and-services.md +244 -0
  81. package/vendor/docs/06-reference/troubleshooting.md +665 -0
  82. package/vendor/docs/_index.json +233 -0
  83. package/vendor/docs/gatekeeper-design.md +953 -0
  84. package/vendor/docs/package.json +15 -0
  85. package/vendor/docs/todo/lib-cli-desktop-refactor.md +641 -0
  86. package/vendor/gatekeeper/dist/boot.d.ts +1 -0
  87. package/vendor/gatekeeper/dist/boot.d.ts.map +1 -0
  88. package/vendor/gatekeeper/dist/boot.js +17 -0
  89. package/vendor/gatekeeper/dist/boot.js.map +1 -0
  90. package/vendor/gatekeeper/dist/cli/commands/access.d.ts +2 -0
  91. package/vendor/gatekeeper/dist/cli/commands/access.d.ts.map +1 -0
  92. package/vendor/gatekeeper/dist/cli/commands/access.js +33 -0
  93. package/vendor/gatekeeper/dist/cli/commands/access.js.map +1 -0
  94. package/vendor/gatekeeper/dist/cli/commands/grants.d.ts +2 -0
  95. package/vendor/gatekeeper/dist/cli/commands/grants.d.ts.map +1 -0
  96. package/vendor/gatekeeper/dist/cli/commands/grants.js +110 -0
  97. package/vendor/gatekeeper/dist/cli/commands/grants.js.map +1 -0
  98. package/vendor/gatekeeper/dist/cli/commands/groups.d.ts +2 -0
  99. package/vendor/gatekeeper/dist/cli/commands/groups.d.ts.map +1 -0
  100. package/vendor/gatekeeper/dist/cli/commands/groups.js +98 -0
  101. package/vendor/gatekeeper/dist/cli/commands/groups.js.map +1 -0
  102. package/vendor/gatekeeper/dist/cli/index.d.ts +3 -0
  103. package/vendor/gatekeeper/dist/cli/index.d.ts.map +1 -0
  104. package/vendor/gatekeeper/dist/cli/index.js +45 -0
  105. package/vendor/gatekeeper/dist/cli/index.js.map +1 -0
  106. package/vendor/gatekeeper/dist/index.d.ts +9 -0
  107. package/vendor/gatekeeper/dist/index.d.ts.map +1 -0
  108. package/vendor/gatekeeper/dist/index.js +13 -0
  109. package/vendor/gatekeeper/dist/index.js.map +1 -0
  110. package/vendor/gatekeeper/dist/lib/authz.d.ts +16 -0
  111. package/vendor/gatekeeper/dist/lib/authz.d.ts.map +1 -0
  112. package/vendor/gatekeeper/dist/lib/authz.js +42 -0
  113. package/vendor/gatekeeper/dist/lib/authz.js.map +1 -0
  114. package/vendor/gatekeeper/dist/lib/cache-bust.d.ts +15 -0
  115. package/vendor/gatekeeper/dist/lib/cache-bust.d.ts.map +1 -0
  116. package/vendor/gatekeeper/dist/lib/cache-bust.js +19 -0
  117. package/vendor/gatekeeper/dist/lib/cache-bust.js.map +1 -0
  118. package/vendor/gatekeeper/dist/lib/constants.d.ts +82 -0
  119. package/vendor/gatekeeper/dist/lib/constants.d.ts.map +1 -0
  120. package/vendor/gatekeeper/dist/lib/constants.js +79 -0
  121. package/vendor/gatekeeper/dist/lib/constants.js.map +1 -0
  122. package/vendor/gatekeeper/dist/lib/grants.d.ts +32 -0
  123. package/vendor/gatekeeper/dist/lib/grants.d.ts.map +1 -0
  124. package/vendor/gatekeeper/dist/lib/grants.js +314 -0
  125. package/vendor/gatekeeper/dist/lib/grants.js.map +1 -0
  126. package/vendor/gatekeeper/dist/lib/groups.d.ts +10 -0
  127. package/vendor/gatekeeper/dist/lib/groups.d.ts.map +1 -0
  128. package/vendor/gatekeeper/dist/lib/groups.js +247 -0
  129. package/vendor/gatekeeper/dist/lib/groups.js.map +1 -0
  130. package/vendor/gatekeeper/dist/lib/migration.d.ts +17 -0
  131. package/vendor/gatekeeper/dist/lib/migration.d.ts.map +1 -0
  132. package/vendor/gatekeeper/dist/lib/migration.js +79 -0
  133. package/vendor/gatekeeper/dist/lib/migration.js.map +1 -0
  134. package/vendor/gatekeeper/dist/lib/migrations/gatekeeper/0001_groups.sql +7 -0
  135. package/vendor/gatekeeper/dist/lib/migrations/gatekeeper/0002_access_grants.sql +14 -0
  136. package/vendor/gatekeeper/dist/lib/migrations/gatekeeper/0003_access_request_log.sql +9 -0
  137. package/vendor/gatekeeper/dist/lib/migrations/migrations/gatekeeper/0001_groups.sql +7 -0
  138. package/vendor/gatekeeper/dist/lib/migrations/migrations/gatekeeper/0002_access_grants.sql +14 -0
  139. package/vendor/gatekeeper/dist/lib/migrations/migrations/gatekeeper/0003_access_request_log.sql +9 -0
  140. package/vendor/gatekeeper/dist/lib/state-db.d.ts +16 -0
  141. package/vendor/gatekeeper/dist/lib/state-db.d.ts.map +1 -0
  142. package/vendor/gatekeeper/dist/lib/state-db.js +154 -0
  143. package/vendor/gatekeeper/dist/lib/state-db.js.map +1 -0
  144. package/vendor/gatekeeper/dist/lib/templates.d.ts +21 -0
  145. package/vendor/gatekeeper/dist/lib/templates.d.ts.map +1 -0
  146. package/vendor/gatekeeper/dist/lib/templates.js +151 -0
  147. package/vendor/gatekeeper/dist/lib/templates.js.map +1 -0
  148. package/vendor/gatekeeper/dist/lib/types.d.ts +178 -0
  149. package/vendor/gatekeeper/dist/lib/types.d.ts.map +1 -0
  150. package/vendor/gatekeeper/dist/lib/types.js +2 -0
  151. package/vendor/gatekeeper/dist/lib/types.js.map +1 -0
  152. package/vendor/gatekeeper/dist/server/index.d.ts +15 -0
  153. package/vendor/gatekeeper/dist/server/index.d.ts.map +1 -0
  154. package/vendor/gatekeeper/dist/server/index.js +251 -0
  155. package/vendor/gatekeeper/dist/server/index.js.map +1 -0
  156. package/vendor/gatekeeper/dist/server/routes/access-request.d.ts +7 -0
  157. package/vendor/gatekeeper/dist/server/routes/access-request.d.ts.map +1 -0
  158. package/vendor/gatekeeper/dist/server/routes/access-request.js +17 -0
  159. package/vendor/gatekeeper/dist/server/routes/access-request.js.map +1 -0
  160. package/vendor/gatekeeper/dist/server/routes/authz.d.ts +3 -0
  161. package/vendor/gatekeeper/dist/server/routes/authz.d.ts.map +1 -0
  162. package/vendor/gatekeeper/dist/server/routes/authz.js +279 -0
  163. package/vendor/gatekeeper/dist/server/routes/authz.js.map +1 -0
  164. package/vendor/gatekeeper/dist/server/routes/diagnostic.d.ts +13 -0
  165. package/vendor/gatekeeper/dist/server/routes/diagnostic.d.ts.map +1 -0
  166. package/vendor/gatekeeper/dist/server/routes/diagnostic.js +249 -0
  167. package/vendor/gatekeeper/dist/server/routes/diagnostic.js.map +1 -0
  168. package/vendor/gatekeeper/dist/server/routes/grants.d.ts +3 -0
  169. package/vendor/gatekeeper/dist/server/routes/grants.d.ts.map +1 -0
  170. package/vendor/gatekeeper/dist/server/routes/grants.js +112 -0
  171. package/vendor/gatekeeper/dist/server/routes/grants.js.map +1 -0
  172. package/vendor/gatekeeper/dist/server/routes/groups.d.ts +3 -0
  173. package/vendor/gatekeeper/dist/server/routes/groups.d.ts.map +1 -0
  174. package/vendor/gatekeeper/dist/server/routes/groups.js +139 -0
  175. package/vendor/gatekeeper/dist/server/routes/groups.js.map +1 -0
  176. package/vendor/gatekeeper/package.json +49 -0
  177. package/vendor/server/bin/lamaste-server.js +204 -0
  178. package/vendor/server/package.json +31 -0
  179. package/vendor/server/src/commands/certs.js +224 -0
  180. package/vendor/server/src/commands/chisel.js +132 -0
  181. package/vendor/server/src/commands/logs.js +49 -0
  182. package/vendor/server/src/commands/plugins.js +321 -0
  183. package/vendor/server/src/commands/reset-admin.js +478 -0
  184. package/vendor/server/src/commands/restart.js +94 -0
  185. package/vendor/server/src/commands/sites.js +257 -0
  186. package/vendor/server/src/commands/status.js +158 -0
  187. package/vendor/server/src/commands/tunnels.js +365 -0
  188. package/vendor/server/src/commands/uninstall.js +326 -0
  189. package/vendor/server/src/config.js +38 -0
  190. package/vendor/server/src/exec.js +26 -0
  191. package/vendor/server/src/logger.js +39 -0
  192. package/vendor/server/src/ndjson.js +56 -0
  193. package/vendor/server/src/panel-api.js +85 -0
  194. package/vendor/server/src/state.js +45 -0
  195. package/vendor/server-ui/dist/assets/index-B0nWuUyL.js +257 -0
  196. package/vendor/server-ui/dist/assets/index-BqWWFlTU.css +1 -0
  197. package/vendor/server-ui/dist/index.html +13 -0
  198. package/vendor/serverd/package.json +44 -0
  199. package/vendor/serverd/src/boot.js +13 -0
  200. package/vendor/serverd/src/index.js +191 -0
  201. package/vendor/serverd/src/lib/app-error.js +14 -0
  202. package/vendor/serverd/src/lib/authelia.js +85 -0
  203. package/vendor/serverd/src/lib/certbot.js +74 -0
  204. package/vendor/serverd/src/lib/chisel-args.js +6 -0
  205. package/vendor/serverd/src/lib/chisel-reconcile.js +232 -0
  206. package/vendor/serverd/src/lib/chisel-runtime.js +46 -0
  207. package/vendor/serverd/src/lib/chisel-users.js +109 -0
  208. package/vendor/serverd/src/lib/chisel.js +81 -0
  209. package/vendor/serverd/src/lib/config.js +190 -0
  210. package/vendor/serverd/src/lib/constants.js +8 -0
  211. package/vendor/serverd/src/lib/csr-signing.js +331 -0
  212. package/vendor/serverd/src/lib/enrollment.js +302 -0
  213. package/vendor/serverd/src/lib/files.js +19 -0
  214. package/vendor/serverd/src/lib/gatekeeper-client.js +135 -0
  215. package/vendor/serverd/src/lib/invite-page.js +281 -0
  216. package/vendor/serverd/src/lib/ip-utils.js +79 -0
  217. package/vendor/serverd/src/lib/migrations/state/0001_enrollment_tokens.sql +17 -0
  218. package/vendor/serverd/src/lib/migrations/state/0002_tickets.sql +70 -0
  219. package/vendor/serverd/src/lib/migrations/state/0003_plugins.sql +15 -0
  220. package/vendor/serverd/src/lib/migrations/state/0004_agents.sql +19 -0
  221. package/vendor/serverd/src/lib/mtls.js +795 -0
  222. package/vendor/serverd/src/lib/nginx.js +1090 -0
  223. package/vendor/serverd/src/lib/pki-paths.js +41 -0
  224. package/vendor/serverd/src/lib/pki-sign.js +103 -0
  225. package/vendor/serverd/src/lib/plugins.js +538 -0
  226. package/vendor/serverd/src/lib/push-install.js +390 -0
  227. package/vendor/serverd/src/lib/revocation.js +112 -0
  228. package/vendor/serverd/src/lib/services.js +131 -0
  229. package/vendor/serverd/src/lib/session.js +151 -0
  230. package/vendor/serverd/src/lib/state-db.js +130 -0
  231. package/vendor/serverd/src/lib/state.js +140 -0
  232. package/vendor/serverd/src/lib/storage.js +63 -0
  233. package/vendor/serverd/src/lib/system-stats.js +58 -0
  234. package/vendor/serverd/src/lib/tickets.js +1556 -0
  235. package/vendor/serverd/src/lib/totp.js +76 -0
  236. package/vendor/serverd/src/lib/tunnel-deps.js +41 -0
  237. package/vendor/serverd/src/lib/user-access-session.js +142 -0
  238. package/vendor/serverd/src/lib/user-access.js +52 -0
  239. package/vendor/serverd/src/middleware/errors.js +63 -0
  240. package/vendor/serverd/src/middleware/mtls.js +120 -0
  241. package/vendor/serverd/src/middleware/onboarding-guard.js +30 -0
  242. package/vendor/serverd/src/middleware/role-guard.js +58 -0
  243. package/vendor/serverd/src/middleware/twofa-session.js +65 -0
  244. package/vendor/serverd/src/middleware/user-access-session.js +52 -0
  245. package/vendor/serverd/src/routes/enrollment.js +120 -0
  246. package/vendor/serverd/src/routes/health.js +22 -0
  247. package/vendor/serverd/src/routes/invite.js +163 -0
  248. package/vendor/serverd/src/routes/management/agents.js +182 -0
  249. package/vendor/serverd/src/routes/management/certs.js +911 -0
  250. package/vendor/serverd/src/routes/management/gatekeeper-proxy.js +160 -0
  251. package/vendor/serverd/src/routes/management/identity.js +107 -0
  252. package/vendor/serverd/src/routes/management/invitations.js +166 -0
  253. package/vendor/serverd/src/routes/management/logs.js +218 -0
  254. package/vendor/serverd/src/routes/management/plugins.js +560 -0
  255. package/vendor/serverd/src/routes/management/services.js +63 -0
  256. package/vendor/serverd/src/routes/management/settings.js +325 -0
  257. package/vendor/serverd/src/routes/management/sites.js +522 -0
  258. package/vendor/serverd/src/routes/management/storage.js +192 -0
  259. package/vendor/serverd/src/routes/management/system.js +201 -0
  260. package/vendor/serverd/src/routes/management/tickets.js +457 -0
  261. package/vendor/serverd/src/routes/management/tunnels.js +709 -0
  262. package/vendor/serverd/src/routes/management/users.js +377 -0
  263. package/vendor/serverd/src/routes/management.js +36 -0
  264. package/vendor/serverd/src/routes/onboarding/dns.js +101 -0
  265. package/vendor/serverd/src/routes/onboarding/domain.js +42 -0
  266. package/vendor/serverd/src/routes/onboarding/index.js +18 -0
  267. package/vendor/serverd/src/routes/onboarding/provision.js +327 -0
  268. package/vendor/serverd/src/routes/onboarding/status.js +12 -0
  269. package/vendor/serverd/src/routes/plugin-router.js +79 -0
  270. package/vendor/serverd/src/routes/user-access.js +389 -0
@@ -0,0 +1,528 @@
1
+ # Glossary
2
+
3
+ > A-Z definitions of every term used in Lamaste documentation, each explained at three levels of depth.
4
+
5
+ ## In Plain English
6
+
7
+ This page is a dictionary for Lamaste. Every technical term you encounter in the documentation is defined here. Each entry has three parts:
8
+
9
+ - **Plain English**: A non-technical explanation anyone can understand
10
+ - **Technical**: The precise definition for developers
11
+ - **Where it appears**: Where you encounter this term in Lamaste
12
+
13
+ If you are reading documentation and hit an unfamiliar term, this is the place to look.
14
+
15
+ ---
16
+
17
+ ## Terms
18
+
19
+ ### Agent
20
+
21
+ **Plain English:** A machine you have connected to your Lamaste server — a laptop, a build server, a VM. The agent holds the actual apps; the server only relays visitors to it.
22
+
23
+ **Technical:** A machine enrolled with an agent certificate (`CN=agent:<label>`) that runs the Chisel client as a user-level service (a LaunchAgent on macOS, a systemd user unit on Linux), set up with `lamaste-agent setup` or the Desktop App. Every tunnel belongs to exactly one agent (its `agentLabel`); the agent is told only about its own tunnels, and the Chisel authfile lets its `agent-<label>` user bind only those tunnels' ports.
24
+
25
+ **Where it appears:**
26
+
27
+ - Enrolled from the panel (**Certificates → Enrollment Token**) and `lamaste-agent setup` (installed globally with `npm install -g @lamalibre/lamaste-agent@4.0.0`)
28
+ - Agent registry: `/etc/lamalibre/lamaste/agents.json` on the server; `~/.lamalibre/lamaste/agents/<label>/` on the agent
29
+ - The **Agent** column and field on the panel's Tunnels page
30
+
31
+ ---
32
+
33
+ ### Atomic Write
34
+
35
+ **Plain English:** A way of saving a file that guarantees it is either fully saved or not saved at all — never half-written.
36
+
37
+ **Technical:** A write pattern where data is first written to a temporary file (`.tmp`), flushed to disk (`fsync`), and then renamed over the target file. The `rename` system call is atomic on POSIX filesystems, so readers never see a partially written file. This prevents corruption if the process crashes mid-write.
38
+
39
+ **Where it appears:** Lamaste uses atomic writes for `panel.json`, `tunnels.json`, and Authelia's `users.yml`. This is critical because Authelia reads `users.yml` on every authentication request — a half-written file would break login.
40
+
41
+ ---
42
+
43
+ ### Authelia
44
+
45
+ **Plain English:** The bouncer at the door of your tunneled apps. When someone visits your app through the tunnel, Authelia asks for a username and a time-based code from their phone before letting them in.
46
+
47
+ **Technical:** Authelia is a lightweight open-source authentication server written in Go. It implements forward authentication — nginx delegates auth decisions to Authelia before proxying requests to the backend. Lamaste uses Authelia's file-based user store (`users.yml`) with bcrypt password hashing and TOTP (Time-based One-Time Password) for two-factor authentication. It runs as a systemd service under its own unprivileged account (`lamaste-authelia`), binding `127.0.0.1:9091`, and uses approximately 25MB of RAM. The installer installs a pinned release (4.39.28, SHA-256 verified); onboarding writes its configuration and starts it.
48
+
49
+ **Where it appears:**
50
+
51
+ - Installed during the onboarding provisioning step
52
+ - Manages user authentication for all tunneled apps on port 443
53
+ - Users are created and managed through the panel's Users page
54
+ - Configuration lives at `/etc/authelia/configuration.yml`
55
+ - User database lives at `/etc/authelia/users.yml`
56
+
57
+ ---
58
+
59
+ ### bcrypt
60
+
61
+ **Plain English:** A way of scrambling passwords so that even if someone steals the password file, they cannot figure out the original passwords.
62
+
63
+ **Technical:** A password hashing function based on the Blowfish cipher. It is intentionally slow (configurable cost factor) to resist brute-force attacks. Each hash uses approximately 4KB of RAM. Lamaste mandates bcrypt over argon2id because argon2id uses ~93MB per hash, which causes out-of-memory kills on the 512MB droplet.
64
+
65
+ **Where it appears:**
66
+
67
+ - Authelia's `users.yml` stores bcrypt-hashed passwords
68
+ - The panel server generates bcrypt hashes when creating or updating users
69
+ - This is a hard constraint — argon2id must never be used on the 512MB droplet
70
+
71
+ ---
72
+
73
+ ### CA (Certificate Authority)
74
+
75
+ **Plain English:** A trusted stamp-maker. The CA creates a master stamp, and any certificate it stamps is considered trustworthy. In Lamaste, the CA is self-created and exists only on your droplet.
76
+
77
+ **Technical:** A Certificate Authority issues and signs digital certificates. Lamaste generates a self-signed CA during installation (4096-bit RSA key, 10-year validity) stored at `/etc/lamalibre/lamaste/pki/ca.key` and `/etc/lamalibre/lamaste/pki/ca.crt`. This CA signs client certificates for mTLS admin authentication. nginx is configured to trust only certificates signed by this CA. The CA is distinct from Let's Encrypt, which is used for public-facing TLS.
78
+
79
+ **Where it appears:**
80
+
81
+ - Generated by the installer's mTLS certificate task
82
+ - Referenced in `/etc/nginx/snippets/lamalibre-lamaste-mtls.conf` as `ssl_client_certificate`
83
+ - Used to sign client certificates for admin panel access
84
+ - Can issue additional client certificates through the panel's Certificates page
85
+
86
+ ---
87
+
88
+ ### certbot
89
+
90
+ **Plain English:** A robot that automatically gets and renews free HTTPS certificates from Let's Encrypt, so your domain shows the padlock icon in browsers.
91
+
92
+ **Technical:** The official ACME client for Let's Encrypt. Lamaste uses certbot with the nginx plugin (`python3-certbot-nginx`) to obtain and auto-renew TLS certificates for the configured domain and its wildcard subdomains. Certificates are stored in `/etc/letsencrypt/`. A systemd timer (`certbot.timer`) runs renewal checks twice daily.
93
+
94
+ **Where it appears:**
95
+
96
+ - Installed by the installer as a system package
97
+ - Runs during onboarding provisioning to issue the first certificate
98
+ - Auto-renews via `certbot.timer` systemd timer
99
+ - Monitored on the panel's Certificates page
100
+
101
+ ---
102
+
103
+ ### Chisel
104
+
105
+ **Plain English:** A program that creates a secret tunnel between your machine and the droplet. Web traffic goes through this tunnel disguised as normal HTTPS traffic, so firewalls and ISP filters do not block it.
106
+
107
+ **Technical:** Chisel is an open-source tunneling tool written in Go that creates TCP tunnels over WebSocket connections. In Lamaste, the Chisel server runs on the droplet (binding `127.0.0.1:9090`) and the Chisel client runs on your machine (macOS or Linux). The tunnel is established as a WebSocket upgrade inside a standard HTTPS connection, making it indistinguishable from normal web traffic to deep packet inspection (DPI) systems. The server uses approximately 20MB of RAM.
108
+
109
+ **Where it appears:**
110
+
111
+ - Server binary: `/usr/local/bin/chisel`; agent binary: `~/.lamalibre/lamaste/bin/chisel`
112
+ - Pinned to Chisel 1.12.0 on server and agents, verified against a pinned SHA-256; any other version is replaced (on the server by the installer, on agents by their sync)
113
+ - Server systemd unit: `chisel.service` (`User=nobody`, `Group=lamaste-chisel`)
114
+ - Installed on the server by `create-lamaste`; started during onboarding provisioning
115
+ - Client runs on each agent (launchd on macOS, a systemd user unit on Linux) and verifies the server's TLS certificate
116
+ - Authfile `/etc/lamalibre/lamaste/chisel-users` grants each agent only the ports of the tunnels it carries
117
+ - Re-rendered when tunnels or agents change; Chisel reloads it for additions and is restarted for revocations
118
+
119
+ ---
120
+
121
+ ### Client Certificate
122
+
123
+ **Plain English:** A digital ID card that lives in your browser. When you visit the admin panel, your browser shows this ID card to prove you are the admin. No username or password needed — the ID card is the proof.
124
+
125
+ **Technical:** An X.509 certificate installed in the browser's certificate store. During TLS handshake, the server requests the client's certificate (`ssl_verify_client on`), and the browser presents it. If the certificate is signed by the trusted CA, the connection proceeds. If not, the TLS handshake fails before any HTTP traffic occurs. Lamaste generates a PKCS12 (`.p12`) bundle containing the client certificate, private key, and CA certificate for easy browser import.
126
+
127
+ **Where it appears:**
128
+
129
+ - Generated during installation as `/etc/lamalibre/lamaste/pki/client.p12`
130
+ - Imported into the admin's browser during setup
131
+ - Verified by nginx on every request to port 9292
132
+ - Rotated on the server with `sudo lamaste-server reset-admin` (the panel does not issue admin certificates)
133
+
134
+ See also: [mTLS](#mtls-mutual-tls), [CA](#ca-certificate-authority), [PKCS12](#pkcs12)
135
+
136
+ ---
137
+
138
+ ### DNS (Domain Name System)
139
+
140
+ **Plain English:** The internet's phone book. When you type `example.com` in your browser, DNS looks up the phone number (IP address) of the server that hosts that domain.
141
+
142
+ **Technical:** A hierarchical naming system that translates human-readable domain names to IP addresses. Lamaste requires two DNS records: an `A` record for the base domain and a wildcard `A` record (`*.example.com`) pointing to the droplet's IP. The wildcard allows creating tunnels like `app.example.com` without adding individual DNS records for each subdomain.
143
+
144
+ **Where it appears:**
145
+
146
+ - Configured during the onboarding DNS verification step
147
+ - The panel verifies DNS resolution before proceeding with provisioning
148
+ - Required records: `A example.com → <droplet-ip>` and `A *.example.com → <droplet-ip>`
149
+
150
+ ---
151
+
152
+ ### Droplet
153
+
154
+ **Plain English:** DigitalOcean's name for a virtual server in the cloud. Lamaste uses the cheapest one available as a relay point.
155
+
156
+ **Technical:** A virtual machine instance on DigitalOcean's infrastructure. Lamaste requires the $4/month tier (512MB RAM, 1 vCPU, 10GB SSD) running Ubuntu 24.04 LTS. While DigitalOcean is the reference platform, Lamaste works on any VPS provider with a public IP and Ubuntu 24.04.
157
+
158
+ **Where it appears:**
159
+
160
+ - Created by the user as the first step of setup
161
+ - Hosts all Lamaste server-side components
162
+ - Referenced throughout documentation as "the droplet" or "the VPS"
163
+
164
+ ---
165
+
166
+ ### execa
167
+
168
+ **Plain English:** A helper library that lets Node.js run system commands (like `nginx -t` or `systemctl restart`) in a safe, reliable way.
169
+
170
+ **Technical:** A Node.js library for executing external processes. It replaces `child_process.exec/spawn` with a promise-based API, proper error handling, and array-based argument passing (preventing shell injection). Lamaste uses execa exclusively for all system command execution — `child_process` is never used directly.
171
+
172
+ **Where it appears:**
173
+
174
+ - Used throughout `create-lamaste` installer tasks
175
+ - Used in `lamalibre-lamaste-serverd` business logic (`lib/`) for nginx, certbot, systemctl operations
176
+ - Always called with array arguments: `execa('nginx', ['-t'])`, never string interpolation
177
+
178
+ ---
179
+
180
+ ### fail2ban
181
+
182
+ **Plain English:** A security guard that watches log files. If someone tries to guess passwords too many times, fail2ban blocks their IP address for an hour.
183
+
184
+ **Technical:** An intrusion prevention framework that monitors log files for patterns indicating brute-force attacks and temporarily bans offending IP addresses using firewall rules. Lamaste configures two jails: `sshd` (monitors `/var/log/auth.log`) and `nginx-http-auth` (monitors `/var/log/nginx/error.log`). Both jails ban IPs for 3600 seconds (1 hour) after 5 failed attempts. Uses approximately 35MB of RAM.
185
+
186
+ **Where it appears:**
187
+
188
+ - Installed and configured during the installer's hardening step
189
+ - Configuration: `/etc/fail2ban/jail.d/lamaste.conf`
190
+ - Runs as a systemd service: `fail2ban.service`
191
+
192
+ ---
193
+
194
+ ### Fastify
195
+
196
+ **Plain English:** The engine that powers the Lamaste admin panel's backend. It receives requests from your browser and responds with data, like a restaurant kitchen receiving orders and sending out dishes.
197
+
198
+ **Technical:** A high-performance Node.js web framework. Lamaste uses Fastify for the panel server REST API because it provides built-in schema validation (used with Zod), native WebSocket support (for live log streaming), and a structured plugin system. The panel server binds to `127.0.0.1:3100` and is accessed only through the nginx reverse proxy. Routes handle HTTP concerns only; business logic lives in `lib/` modules.
199
+
200
+ **Where it appears:**
201
+
202
+ - Panel server entry point: `packages/lamaste-serverd/src/index.js`
203
+ - Routes: `packages/lamaste-serverd/src/routes/`
204
+ - Business logic: `packages/lamaste-serverd/src/lib/`
205
+ - Runs as the `lamalibre-lamaste-serverd` systemd service
206
+
207
+ ---
208
+
209
+ ### Forward Auth
210
+
211
+ **Plain English:** A security checkpoint. Before nginx lets a visitor reach your app, it first asks Authelia: "Is this person allowed in?" If Authelia says no, the visitor sees a login page instead of your app.
212
+
213
+ **Technical:** An authentication pattern where the reverse proxy (nginx) makes a subrequest to an authentication service before proxying the original request. If the auth service returns a success status code (2xx), nginx proceeds with the proxy. If it returns a 401/403, nginx redirects the client to a login page. nginx implements this with the `auth_request` directive pointing to Authelia's `/api/verify` endpoint.
214
+
215
+ **Where it appears:**
216
+
217
+ - Configured in nginx vhost files for tunneled apps (port 443)
218
+ - Authelia handles the verification at `127.0.0.1:9091`
219
+ - Not used for the admin panel (which uses mTLS instead)
220
+
221
+ ---
222
+
223
+ ### FQDN (Fully Qualified Domain Name)
224
+
225
+ **Plain English:** The complete address of a website, including all its parts. Like a full postal address compared to just a street name.
226
+
227
+ **Technical:** A domain name that specifies its exact location in the DNS hierarchy, including all labels up to the root. For example, `myapp.example.com.` is an FQDN (the trailing dot is the root, often omitted). In Lamaste, each tunnel gets an FQDN like `myapp.example.com` that resolves to the droplet's IP through the wildcard DNS record.
228
+
229
+ **Where it appears:**
230
+
231
+ - Each tunnel creates a subdomain FQDN (e.g., `myapp.example.com`)
232
+ - Used in nginx vhost `server_name` directives
233
+ - Used in Let's Encrypt certificate Subject Alternative Names
234
+
235
+ ---
236
+
237
+ ### launchd
238
+
239
+ **Plain English:** The macOS system that automatically starts programs when your Mac boots up and restarts them if they crash. Lamaste uses it to keep the tunnel client running permanently.
240
+
241
+ **Technical:** The macOS init system and service manager (equivalent to systemd on Linux). `lamaste-agent setup` (or the Desktop App) writes a per-agent LaunchAgent property list (`.plist`) for the Chisel client that starts it at login, restarts it on failure, and runs it in the background. The plist carries the agent's Chisel credential in `EnvironmentVariables`, so it is written with mode 0600.
242
+
243
+ **Where it appears:**
244
+
245
+ - Generated by `lamaste-agent setup` / `update` (implementation in `@lamalibre/lamaste@4.0.0/agent`)
246
+ - Installed to `~/Library/LaunchAgents/com.lamalibre.lamaste.chisel-<label>.plist` on the agent
247
+ - Manages the Chisel client process lifecycle
248
+
249
+ ---
250
+
251
+ ### Let's Encrypt
252
+
253
+ **Plain English:** A free service that gives your domain an official HTTPS certificate, so browsers show the padlock icon and trust your site. Certificates renew automatically every 90 days.
254
+
255
+ **Technical:** A nonprofit Certificate Authority providing free, automated TLS certificates via the ACME protocol. Lamaste uses Let's Encrypt through certbot to issue certificates for the configured domain and wildcard subdomains. Certificates have a 90-day validity period and are auto-renewed by the `certbot.timer` systemd timer. Let's Encrypt certificates are used for public-facing port 443 traffic; the admin panel on port 9292 uses a self-signed certificate instead.
256
+
257
+ **Where it appears:**
258
+
259
+ - Certificates issued during onboarding provisioning
260
+ - Stored in `/etc/letsencrypt/live/<domain>/`
261
+ - Referenced in nginx vhost configurations for port 443
262
+ - Monitored on the Certificates management page
263
+ - Auto-renewed by `certbot.timer`
264
+
265
+ ---
266
+
267
+ ### Listr2
268
+
269
+ **Plain English:** A library that shows progress bars and checkmarks in the terminal while the installer runs, so you can see what is happening at each step.
270
+
271
+ **Technical:** A Node.js library for building terminal task lists with nested subtasks, progress indicators, and concurrent execution support. The Lamaste installer uses Listr2 to orchestrate all installation tasks in a visually structured pipeline. Each task can have skip guards (for idempotency) and persistent output messages.
272
+
273
+ **Where it appears:**
274
+
275
+ - Used exclusively in `create-lamaste` (`packages/create-lamaste/src/index.js`)
276
+ - Each installer phase is a Listr2 task with nested subtasks
277
+ - Task files in `packages/create-lamaste/src/tasks/` return Listr2 subtask arrays
278
+
279
+ ---
280
+
281
+ ### mTLS (Mutual TLS)
282
+
283
+ **Plain English:** A two-way ID check. Normally, only the website proves its identity to your browser (one-way TLS). With mTLS, your browser also proves its identity to the website using a client certificate. It is like both people showing ID at a door, not just the person entering.
284
+
285
+ **Technical:** Mutual Transport Layer Security extends standard TLS by requiring both parties to present certificates during the handshake. In Lamaste, nginx on port 9292 is configured with `ssl_verify_client on`, meaning the TLS handshake fails before any HTTP traffic if the client does not present a valid certificate signed by the Lamaste CA. This provides authentication at the transport layer — there is no login form to brute-force, no session cookies to steal, and no credentials transmitted over the wire.
286
+
287
+ **Where it appears:**
288
+
289
+ - Configured in `/etc/nginx/snippets/lamalibre-lamaste-mtls.conf`
290
+ - Enforced on the admin panel vhost (port 9292)
291
+ - Client certificates generated during installation and importable as `.p12` files
292
+ - LXD (the Linux container manager) uses the same pattern, which inspired Lamaste's approach
293
+
294
+ See also: [Client Certificate](#client-certificate), [CA](#ca-certificate-authority)
295
+
296
+ ---
297
+
298
+ ### nginx
299
+
300
+ **Plain English:** The traffic director. nginx sits at the front door of the droplet and decides where each request goes — admin panel requests go to the panel server, app requests go through the tunnel, and everything else gets blocked.
301
+
302
+ **Technical:** A high-performance HTTP reverse proxy, load balancer, and web server. In Lamaste, nginx is the only process binding to public ports. It handles TLS termination (both Let's Encrypt and self-signed), mTLS client certificate verification, forward authentication with Authelia, WebSocket upgrades for Chisel and the panel API, and static file serving. It uses approximately 15MB of RAM.
303
+
304
+ **Where it appears:**
305
+
306
+ - Installed by the installer as a system package
307
+ - Listens on port 443 (tunnel vhosts) and port 9292 (admin panel)
308
+ - Vhost files: `/etc/nginx/sites-available/lamaste-*`
309
+ - mTLS snippet: `/etc/nginx/snippets/lamalibre-lamaste-mtls.conf`
310
+ - Always validated with `nginx -t` before reloading
311
+
312
+ ---
313
+
314
+ ### Onboarding
315
+
316
+ **Plain English:** The setup wizard that runs the first time you open the admin panel. It walks you through connecting your domain and installing the remaining components.
317
+
318
+ **Technical:** A multi-step wizard in the panel UI that transitions the system from `FRESH` state to `COMPLETED` state. The onboarding flow is: domain input, DNS verification, stack provisioning (starting Chisel, configuring Authelia — both installed beforehand by `create-lamaste` — certbot, nginx vhosts). Onboarding API endpoints are guarded by an onboarding middleware — they return `410 Gone` after completion, while management endpoints return `503 Service Unavailable` before completion.
319
+
320
+ **Where it appears:**
321
+
322
+ - Panel client: `packages/lamaste-server-ui/src/pages/onboarding/`
323
+ - Panel server routes: `packages/lamaste-serverd/src/routes/onboarding/`
324
+ - State tracked in `panel.json` under `onboarding.status`
325
+ - States: `FRESH` → `DOMAIN_SET` → `DNS_READY` → `PROVISIONING` → `COMPLETED`
326
+
327
+ ---
328
+
329
+ ### PKCS12
330
+
331
+ **Plain English:** A file format (ending in `.p12`) that bundles a certificate and its private key together in one password-protected file. It is the format browsers understand for importing client certificates.
332
+
333
+ **Technical:** A binary archive format (also known as PFX) defined by RFC 7292 for storing a private key, certificate, and optionally the CA certificate chain, all encrypted with a password. Lamaste generates the `.p12` bundle using OpenSSL with legacy-compatible encryption (`PBE-SHA1-3DES`) and MAC algorithm (`sha1`) to ensure compatibility with macOS Keychain, which does not support newer encryption modes for PKCS12 import.
334
+
335
+ **Where it appears:**
336
+
337
+ - Generated during installation at `/etc/lamalibre/lamaste/pki/client.p12`
338
+ - Password stored at `/etc/lamalibre/lamaste/pki/.p12-password` (mode 0600)
339
+ - Downloaded by the admin via SCP after installation
340
+ - Imported into the browser for mTLS authentication
341
+
342
+ ---
343
+
344
+ ### Panel (Panel Server / Panel Client)
345
+
346
+ **Plain English:** The admin control center. The panel server is the backend brain that manages everything, and the panel client is the visual interface you see in your browser.
347
+
348
+ **Technical:** The panel consists of two packages. The **panel server** is a Fastify REST API running as the `lamalibre-lamaste-serverd` systemd service, binding `127.0.0.1:3100`. It handles all business logic: nginx vhost management, Chisel tunnel configuration, Authelia user management, certbot operations, and system monitoring. The **panel client** is a React 18 SPA built with Vite and Tailwind CSS, served as static files from `/opt/lamalibre/lamaste/lamaste-server-ui/dist/`. It communicates with the panel server via `/api/*` routes proxied through nginx.
349
+
350
+ **Where it appears:**
351
+
352
+ - Server: `packages/lamaste-serverd/`, deployed to `/opt/lamalibre/lamaste/lamaste-serverd/`
353
+ - Client: `packages/lamaste-server-ui/`, built to `/opt/lamalibre/lamaste/lamaste-server-ui/dist/`
354
+ - Accessible at `https://<ip>:9292` (through nginx mTLS proxy)
355
+
356
+ ---
357
+
358
+ ### TOTP (Time-based One-Time Password)
359
+
360
+ **Plain English:** The six-digit code that changes every 30 seconds on your phone (in apps like Google Authenticator or Authy). It is the second factor in two-factor authentication — even if someone knows your password, they also need your phone.
361
+
362
+ **Technical:** An algorithm defined in RFC 6238 that generates short-lived codes from a shared secret and the current time. The server and the client (authenticator app) independently compute the same code because they share the same secret and clock. Lamaste uses TOTP through Authelia for all tunneled app authentication. The shared secret is provisioned via QR code during user creation.
363
+
364
+ **Where it appears:**
365
+
366
+ - Authelia manages TOTP enrollment and verification
367
+ - QR codes shown during onboarding completion and user creation in the panel
368
+ - Used for logging into tunneled apps (not the admin panel, which uses mTLS)
369
+
370
+ ---
371
+
372
+ ### Sync Timer
373
+
374
+ **Plain English:** A small scheduled job on every agent that checks with the panel every 30 seconds and adjusts the tunnel client when the agent's tunnels changed — so tunnels created, disabled or moved in the panel reach the agent without anyone running a command on it.
375
+
376
+ **Technical:** Runs `lamaste-agent sync --label <label>`, which fetches `GET /api/tunnels/agent-config` and converges the agent's Chisel client with it (relay URL, credential, pinned binary, granted remotes, running or stopped). It exists because Chisel rejects a client's whole session when one requested remote is not granted: an agent must drop a revoked tunnel promptly or all its other tunnels go dark. Requires a global install of `@lamalibre/lamaste-agent@4.0.0`.
377
+
378
+ **Where it appears:**
379
+
380
+ - Linux: systemd user service + timer `lamalibre-lamaste-sync-<label>`
381
+ - macOS: LaunchAgent `com.lamalibre.lamaste.sync-<label>` (`StartInterval` 30)
382
+ - Log `~/.lamalibre/lamaste/agents/<label>/logs/sync.log`, state `sync-state.json`, the **Sync** line of `lamaste-agent status`
383
+ - Installed by `lamaste-agent setup` and `update`
384
+
385
+ ---
386
+
387
+ ### Tunnel
388
+
389
+ **Plain English:** A private passage between your machine and the droplet. Web traffic travels through this passage so your local app is accessible from the internet, even though your machine is behind a firewall.
390
+
391
+ **Technical:** A reverse TCP tunnel established by the Chisel client connecting outbound from your machine to the Chisel server on the droplet via a WebSocket-over-HTTPS connection. The "reverse" means the server-side port is forwarded to the client-side port. Each tunnel maps a subdomain (e.g., `myapp.example.com`) to a port on one agent's loopback (e.g., `127.0.0.1:8001`) and is carried by exactly that agent. The tunnel is persistent — the Chisel client automatically reconnects on network interruptions.
392
+
393
+ **Where it appears:**
394
+
395
+ - Created and managed through the panel's Tunnels page
396
+ - Definitions stored in `/etc/lamalibre/lamaste/tunnels.json`
397
+ - Each tunnel gets an nginx vhost (with its own `client_max_body_size`) and a Chisel port grant for its agent
398
+ - Client-side managed by the carrying agent's Chisel client (launchd on macOS, systemd user unit on Linux)
399
+
400
+ ---
401
+
402
+ ### UFW (Uncomplicated Firewall)
403
+
404
+ **Plain English:** A lock on the droplet's doors. UFW closes all doors except the three Lamaste needs: SSH (port 22), web traffic (port 443), and the admin panel (port 9292). Everything else is blocked.
405
+
406
+ **Technical:** A frontend for Linux's iptables/nftables firewall. Lamaste configures UFW to deny all incoming traffic by default and allow only four ports: 22/tcp (SSH), 80/tcp (Let's Encrypt HTTP-01 challenges; every other request is redirected to HTTPS), 443/tcp (HTTPS for tunneled apps), and 9292/tcp (admin panel). Outgoing traffic is unrestricted (needed for package updates, Let's Encrypt validation, etc.).
407
+
408
+ **Where it appears:**
409
+
410
+ - Configured during the installer's hardening step
411
+ - Rules: `ufw allow 22/tcp`, `ufw allow 443/tcp`, `ufw allow 9292/tcp`
412
+ - Status viewable with `ufw status`
413
+
414
+ ---
415
+
416
+ ### Vhost (Virtual Host)
417
+
418
+ **Plain English:** A way for nginx to serve different websites from the same server. Each tunnel gets its own vhost, so `blog.example.com` and `app.example.com` are handled differently even though they share the same IP address.
419
+
420
+ **Technical:** An nginx `server` block that matches requests by `server_name` (the `Host` header). Lamaste creates one vhost per tunnel at `/etc/nginx/sites-available/lamalibre-lamaste-app-<subdomain>` and symlinks it to `/etc/nginx/sites-enabled/`. The admin panel also has its own vhost at `/etc/nginx/sites-available/lamalibre-lamaste-panel-ip`. After any vhost change, the panel server runs `nginx -t` to validate the configuration before reloading — if validation fails, the change is rolled back.
421
+
422
+ **Where it appears:**
423
+
424
+ - Created automatically when tunnels are added through the panel
425
+ - Files: `/etc/nginx/sites-available/lamaste-*`
426
+ - Enabled via symlinks in `/etc/nginx/sites-enabled/`
427
+ - Always validated with `nginx -t` before activation
428
+
429
+ ---
430
+
431
+ ### WebSocket
432
+
433
+ **Plain English:** A persistent two-way communication channel between a browser (or program) and a server. Unlike normal web requests where you ask and get a response, a WebSocket stays open so both sides can send messages at any time.
434
+
435
+ **Technical:** A protocol defined in RFC 6455 that provides full-duplex communication over a single TCP connection, initiated via an HTTP upgrade handshake. Lamaste uses WebSockets in two places: (1) Chisel tunnels use WebSocket-over-HTTPS to carry TCP traffic between the local client and the droplet server, and (2) the panel server uses WebSockets for real-time features like live log streaming and provisioning progress. The key advantage of WebSocket-over-HTTPS for tunneling is that it is indistinguishable from normal web traffic, bypassing DPI and corporate firewalls.
436
+
437
+ **Where it appears:**
438
+
439
+ - Chisel client-server communication (tunnel data transport)
440
+ - Panel server API (live log streaming, provisioning progress)
441
+ - nginx is configured with `proxy_http_version 1.1` and `Upgrade` headers to support WebSocket proxying
442
+
443
+ ---
444
+
445
+ ### Zod
446
+
447
+ **Plain English:** A validation library that checks whether incoming data has the right shape and type before the server processes it. Like a form that rejects submissions with missing fields.
448
+
449
+ **Technical:** A TypeScript-first schema validation library. Lamaste uses Zod at the Fastify route level to validate all incoming API request bodies, query parameters, and URL parameters. Schemas are defined inline in route files and used with Fastify's schema-first validation hooks. This ensures that business logic in `lib/` modules receives well-typed, validated data.
450
+
451
+ **Where it appears:**
452
+
453
+ - Used in `packages/lamaste-serverd/src/routes/` for request validation
454
+ - Every API endpoint validates inputs before processing
455
+ - Error responses follow a consistent `{ error: string }` format for validation failures
456
+
457
+ ---
458
+
459
+ ## Quick Reference
460
+
461
+ ### Alphabetical Index
462
+
463
+ | Term | One-Line Summary |
464
+ | ------------------------------------------------------------ | ------------------------------------------------------------- |
465
+ | [Agent](#agent) | Enrolled machine that carries its own tunnels |
466
+ | [Atomic Write](#atomic-write) | Write to temp file, then rename — never half-written |
467
+ | [Authelia](#authelia) | TOTP 2FA authentication server for tunneled apps |
468
+ | [bcrypt](#bcrypt) | Password hashing algorithm (~4KB RAM per hash) |
469
+ | [CA](#ca-certificate-authority) | Self-signed certificate authority for mTLS |
470
+ | [certbot](#certbot) | ACME client for free Let's Encrypt certificates |
471
+ | [Chisel](#chisel) | WebSocket-over-HTTPS tunnel (Go binary) |
472
+ | [Client Certificate](#client-certificate) | Browser-based digital ID for admin panel access |
473
+ | [DNS](#dns-domain-name-system) | Maps domain names to IP addresses |
474
+ | [Droplet](#droplet) | DigitalOcean virtual machine ($4/mo minimum) |
475
+ | [execa](#execa) | Node.js library for safe shell command execution |
476
+ | [fail2ban](#fail2ban) | Brute-force protection (bans IPs after failed attempts) |
477
+ | [Fastify](#fastify) | Node.js web framework powering the panel API |
478
+ | [Forward Auth](#forward-auth) | nginx delegates auth checks to Authelia |
479
+ | [FQDN](#fqdn-fully-qualified-domain-name) | Complete domain name (e.g., `myapp.example.com`) |
480
+ | [launchd](#launchd) | macOS service manager for Chisel client |
481
+ | [Let's Encrypt](#lets-encrypt) | Free TLS certificate authority (auto-renewing) |
482
+ | [Listr2](#listr2) | Terminal task runner for the installer |
483
+ | [mTLS](#mtls-mutual-tls) | Two-way TLS — both server and client prove identity |
484
+ | [nginx](#nginx) | Reverse proxy, TLS termination, sole public-facing service |
485
+ | [Onboarding](#onboarding) | First-run wizard: domain, DNS, provisioning |
486
+ | [PKCS12](#pkcs12) | `.p12` file format for client certificate + key bundle |
487
+ | [Panel](#panel-lamalibre-lamaste-serverd--lamaste-server-ui) | Admin UI (React SPA) + REST API (Fastify) |
488
+ | [Sync Timer](#sync-timer) | Agent job applying tunnel changes every 30 s |
489
+ | [TOTP](#totp-time-based-one-time-password) | Six-digit codes from authenticator apps |
490
+ | [Tunnel](#tunnel) | Reverse TCP tunnel from an agent to the droplet via WebSocket |
491
+ | [UFW](#ufw-uncomplicated-firewall) | Firewall allowing only ports 22, 80, 443, 9292 |
492
+ | [Vhost](#vhost-virtual-host) | nginx server block routing by domain name |
493
+ | [WebSocket](#websocket) | Full-duplex communication protocol (RFC 6455) |
494
+ | [Zod](#zod) | Schema validation for API inputs |
495
+
496
+ ### Port Quick Reference
497
+
498
+ | Port | Service | Auth Method |
499
+ | ---- | ------------- | ------------------------------- |
500
+ | 22 | SSH | Key-based (fail2ban protected) |
501
+ | 80 | HTTP redirect | None (`301` to HTTPS) |
502
+ | 443 | Tunneled apps | Authelia (username + TOTP) |
503
+ | 9292 | Admin panel | mTLS (client certificate) |
504
+ | 3100 | Panel server | Localhost only (no auth needed) |
505
+ | 9090 | Chisel server | Localhost only |
506
+ | 9091 | Authelia | Localhost only |
507
+
508
+ ### Key File Paths
509
+
510
+ | Path | Contents |
511
+ | -------------------------------------- | ------------------------------- |
512
+ | `/etc/lamalibre/lamaste/panel.json` | Main configuration |
513
+ | `/etc/lamalibre/lamaste/tunnels.json` | Tunnel definitions |
514
+ | `/etc/lamalibre/lamaste/pki/` | All certificates and keys |
515
+ | `/opt/lamalibre/lamaste/` | Panel server + client |
516
+ | `/var/www/lamaste/` | Static site files |
517
+ | `/etc/nginx/sites-available/lamaste-*` | nginx vhosts |
518
+ | `/etc/authelia/` | Authelia config + user database |
519
+
520
+ ### Related Documentation
521
+
522
+ - [What is Lamaste?](../00-introduction/what-is-lamaste.md) — project overview
523
+ - [How It Works](../00-introduction/how-it-works.md) — architecture and data flow
524
+ - [Quick Start](../00-introduction/quickstart.md) — from zero to first tunnel
525
+ - [Tunneling](../01-concepts/tunneling.md) — deep dive on Chisel tunnels
526
+ - [mTLS](../01-concepts/mtls.md) — client certificate authentication
527
+ - [Authentication](../01-concepts/authentication.md) — Authelia and TOTP
528
+ - [Security Model](../01-concepts/security-model.md) — defense-in-depth layers