@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,665 @@
1
+ # Troubleshooting
2
+
3
+ > Common issues and solutions for Lamaste, organized by symptom.
4
+
5
+ ## Cannot Connect to Panel After Certificate Import
6
+
7
+ **Symptom:** You imported the `.p12` client certificate into your browser, but `https://<ip>:9292` shows a connection error, SSL error, or "This site can't provide a secure connection."
8
+
9
+ **Cause 1: Browser is not presenting the certificate.**
10
+
11
+ Browsers handle client certificates differently. Some require a restart after import.
12
+
13
+ **Fix:**
14
+
15
+ 1. Close all browser windows completely (not just the tab)
16
+ 2. Reopen the browser
17
+ 3. Navigate to `https://<ip>:9292`
18
+ 4. If prompted to select a certificate, choose the Lamaste certificate
19
+ 5. On macOS with Safari/Chrome, open Keychain Access and verify the certificate is in your login keychain and marked as trusted
20
+
21
+ **Cause 2: Wrong certificate password during import.**
22
+
23
+ If the import appeared to succeed but the certificate was not actually imported.
24
+
25
+ **Fix:**
26
+
27
+ 1. Check the password in the installer output, or read it from the server:
28
+
29
+ ```bash
30
+ sudo cat /etc/lamalibre/lamaste/pki/.p12-password
31
+ ```
32
+
33
+ 2. Remove any incorrectly imported certificates from your browser/keychain
34
+ 3. Re-import the `.p12` file with the correct password
35
+
36
+ **Cause 3: nginx is not running.**
37
+
38
+ **Fix:**
39
+
40
+ ```bash
41
+ sudo systemctl status nginx
42
+ # If inactive or failed:
43
+ sudo nginx -t
44
+ sudo systemctl start nginx
45
+ ```
46
+
47
+ **Cause 4: Panel server is not running.**
48
+
49
+ **Fix:**
50
+
51
+ ```bash
52
+ sudo systemctl status lamalibre-lamaste-serverd
53
+ # If inactive or failed:
54
+ sudo journalctl -u lamalibre-lamaste-serverd -n 30
55
+ sudo systemctl restart lamalibre-lamaste-serverd
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Certificate Help Page Appears Instead of Panel
61
+
62
+ **Symptom:** You see a page titled "Certificate Required" or similar help content instead of the Lamaste panel.
63
+
64
+ **Cause:** Your browser is connecting to the server but is not presenting a valid client certificate. nginx returns the help page (HTTP 495/496) when the mTLS handshake fails.
65
+
66
+ **Fix:**
67
+
68
+ 1. Verify you have imported the client certificate (see the help page for instructions)
69
+ 2. Try a different browser — some browsers have better client certificate support
70
+ 3. On Firefox, go to Settings > Privacy & Security > Certificates > View Certificates > Your Certificates, and verify the Lamaste certificate is listed
71
+ 4. On Chrome/macOS, open Keychain Access and verify the certificate is present and trusted
72
+
73
+ ---
74
+
75
+ ## DNS Verification Failing
76
+
77
+ **Symptom:** The onboarding DNS verification step keeps showing "DNS not ready" even after you created the records.
78
+
79
+ **Cause 1: DNS propagation delay.**
80
+
81
+ DNS changes can take up to 48 hours to propagate globally, though most propagate within 5-30 minutes.
82
+
83
+ **Fix:**
84
+
85
+ 1. Wait 15-30 minutes and try again
86
+ 2. Check your DNS records from an external tool:
87
+
88
+ ```bash
89
+ dig example.com +short
90
+ dig test.example.com +short
91
+ ```
92
+
93
+ 3. Both should return your server's IP address (the wildcard record makes any subdomain resolve)
94
+
95
+ **Cause 2: Wrong record type or value.**
96
+
97
+ Lamaste requires two A records pointing to your server IP:
98
+
99
+ | Name | Type | Value |
100
+ | --------------- | ---- | -------------- |
101
+ | `example.com` | A | `203.0.113.42` |
102
+ | `*.example.com` | A | `203.0.113.42` |
103
+
104
+ The base domain A record is needed for the domain itself. The wildcard (`*`) A record allows all subdomains (panel, auth, tunnel, and any tunnel subdomains you create) to resolve to the server without adding individual records.
105
+
106
+ **Fix:**
107
+
108
+ 1. Log into your DNS provider
109
+ 2. Verify you have both an A record for the base domain and a wildcard `*` A record pointing to the exact IP shown in the panel
110
+ 3. Ensure there are no conflicting records (e.g., a CNAME on the same subdomain)
111
+
112
+ **Cause 3: Using a DNS proxy (e.g., Cloudflare).**
113
+
114
+ If you are using Cloudflare with the orange cloud (proxy) enabled, DNS verification may fail because the IP resolves to Cloudflare's servers instead of your droplet.
115
+
116
+ **Fix:**
117
+
118
+ Disable the Cloudflare proxy (grey cloud / DNS only) for your domain and the wildcard record. Lamaste manages its own TLS and does not need a CDN proxy.
119
+
120
+ ---
121
+
122
+ ## Let's Encrypt Certificate Issuance Failure
123
+
124
+ **Symptom:** Provisioning fails at the certificate issuance step with an error from certbot.
125
+
126
+ **Cause 1: DNS not pointing to this server.**
127
+
128
+ The ACME HTTP-01 challenge requires the domain to resolve to the server running certbot.
129
+
130
+ **Fix:**
131
+
132
+ 1. Verify DNS is correct:
133
+
134
+ ```bash
135
+ dig panel.example.com +short
136
+ # Should return this server's IP
137
+ ```
138
+
139
+ 2. If DNS is correct but recently changed, wait a few minutes for propagation
140
+
141
+ **Cause 2: Rate limit exceeded.**
142
+
143
+ Let's Encrypt allows 50 certificates per registered domain per week.
144
+
145
+ **Fix:**
146
+
147
+ 1. Check the error message — it will mention "rate limit" if this is the cause
148
+ 2. Wait until the rate limit window resets (one week)
149
+ 3. If testing, use the Let's Encrypt staging environment (not supported by Lamaste's automated flow — this is a manual workaround)
150
+
151
+ **Cause 3: Port 80 blocked.**
152
+
153
+ certbot's nginx plugin answers the HTTP-01 challenge on port 80, for the first issuance and for every renewal. The installer opens port 80 in UFW and installs a catch-all site (`lamalibre-lamaste-http-redirect`) that redirects plain HTTP to HTTPS; certbot answers its challenges ahead of that redirect, so the redirect is not the problem.
154
+
155
+ **Fix:** Keep port 80 open — closing it makes every renewal fail.
156
+
157
+ ```bash
158
+ sudo ufw status | grep 80
159
+ sudo ufw allow 80/tcp # if missing
160
+ ```
161
+
162
+ Also check any provider-level firewall (e.g. a DigitalOcean cloud firewall) in front of the droplet.
163
+
164
+ **Cause 4: nginx server block not found.**
165
+
166
+ The certbot nginx plugin needs a matching `server_name` block.
167
+
168
+ **Fix:**
169
+
170
+ 1. Check that the vhost files exist:
171
+
172
+ ```bash
173
+ ls -la /etc/nginx/sites-available/lamaste-*
174
+ ```
175
+
176
+ 2. Ensure they are enabled:
177
+
178
+ ```bash
179
+ ls -la /etc/nginx/sites-enabled/lamaste-*
180
+ ```
181
+
182
+ 3. Verify nginx configuration is valid:
183
+
184
+ ```bash
185
+ sudo nginx -t
186
+ ```
187
+
188
+ ---
189
+
190
+ ## Tunnel Client Cannot Connect
191
+
192
+ **Symptom:** You set up an agent (`lamaste-agent setup` or the Desktop App) on your Mac or Linux machine, but the tunnel does not establish. The tunneled app is not accessible through the domain. Start with `lamaste-agent status` and `lamaste-agent logs` on the agent.
193
+
194
+ **Cause 1: Chisel server is not running.**
195
+
196
+ The panel reconciles Chisel on every start and **stops and disables** it when it cannot establish a correct authfile (fail closed); `/etc/lamalibre/lamaste/chisel-failed-closed` exists while that is the case. It then retries on its own, from every 30 seconds up to every 10 minutes, and re-enables and starts Chisel once it succeeds. The panel log says why. Do not just `systemctl enable --now chisel` — fix the cause and let the panel bring it back.
197
+
198
+ **Fix:**
199
+
200
+ ```bash
201
+ sudo systemctl status chisel
202
+ sudo journalctl -u lamalibre-lamaste-serverd -n 50 --no-pager | grep -i chisel
203
+ # A message "Chisel stopped: its authfile could not be brought in line ..."
204
+ # names the failure — commonly a missing lamaste-chisel group or a wrongly owned
205
+ # config directory (re-run the installer in redeploy mode) or a full disk.
206
+ # Once fixed, restart the panel:
207
+ sudo systemctl restart lamalibre-lamaste-serverd
208
+ ```
209
+
210
+ **Cause 2: The agent has not picked up the change yet.**
211
+
212
+ The agent's sync timer applies tunnel changes within about 30 seconds. If that does not happen, the timer is not running or is failing — `lamaste-agent status` shows it on its **Sync** line (`not installed`, `installed but not running`, `last ran <time> — the timer is not running its program` when the last run is over 2 minutes old, or `failing since ...: <error>`), and `~/.lamalibre/lamaste/agents/<label>/logs/sync.log` has the details. The service is generated by `lamaste-agent` and connects to `https://tunnel.example.com:443`; do not edit the plist or systemd unit by hand.
213
+
214
+ **Fix:**
215
+
216
+ ```bash
217
+ lamaste-agent update # apply now and (re)install the sync timer
218
+ ```
219
+
220
+ `update` needs the agent installed globally (`npm install -g @lamalibre/lamaste-agent@4.0.0`); an agent originally set up with `npx` must be installed first.
221
+
222
+ **Cause 3: The agent does not carry the tunnel.**
223
+
224
+ Every tunnel belongs to one agent, and the Chisel server lets each agent bind only the ports of the enabled tunnels it carries. The agent log shows `access denied` for the remote when the tunnel is disabled, deleted, carried by another agent, or `unassigned` (a tunnel from before tunnel ownership on a server with several agents, or a tunnel of an agent whose certificate was revoked). Because Chisel refuses the agent's whole session when one remote is not granted, **all** of that agent's tunnels are down until it stops asking for that port — the sync timer does this within about 30 seconds.
225
+
226
+ **Fix:** Check the tunnel's **Agent** column on the panel's Tunnels page; move it with **Edit** if needed (admin). The agent picks it up by itself; `lamaste-agent update` applies it at once.
227
+
228
+ **Cause 3a: The tunnel is withheld.**
229
+
230
+ A tunnel on a reserved port (3100, 9090, 9091, 9292, 9294), or two tunnels on the same port — only possible in state from before these checks — is granted to no agent and left out of `agent-config`. The panel logs `Tunnels on a reserved port or a port another tunnel also claims are carried by no agent` at startup. **Fix:** delete the tunnel and recreate it on a free port.
231
+
232
+ **Cause 3b: The agent carries no tunnels, or its tunnels were stopped.**
233
+
234
+ An agent with no tunnels keeps its Chisel client stopped (`status`: `no tunnels assigned`) and starts it once a tunnel is assigned. Tunnels stopped from the agent panel or desktop app stay stopped until started there again — the sync timer respects that.
235
+
236
+ **Cause 3c: The panel reports another domain.**
237
+
238
+ The agent only connects to `tunnel.<domain>` for the domain it enrolled with. If the panel's domain changed, sync fails with `The panel reports domain X, but this agent is enrolled with Y`. Re-enroll the agent.
239
+
240
+ **Cause 4: TLS verification fails.**
241
+
242
+ The agent verifies the certificate of `tunnel.example.com` like any HTTPS client (there is no `--tls-skip-verify`). The log shows an x509 / certificate error if that certificate is missing, expired, or for another name, or if the agent's clock is wrong. See Cause 9 below, and check the agent's clock.
243
+
244
+ **Cause 5: Authentication failed.**
245
+
246
+ The agent's Chisel credential was rotated or the agent was re-enrolled. The sync timer fetches a credential rotated by an administrator on its own (the panel's `chiselCredentialIssuedAt` changes); if the timer is not running, or to apply it at once:
247
+
248
+ **Fix:**
249
+
250
+ ```bash
251
+ lamaste-agent chisel refresh-credential
252
+ ```
253
+
254
+ **Cause 6 (Linux): The tunnel stops after reboot.**
255
+
256
+ The Chisel client and the sync timer are systemd user units and only run while the user has a session unless lingering is enabled. `lamaste-agent status` shows `At boot: only while this user is logged in`.
257
+
258
+ **Fix:**
259
+
260
+ ```bash
261
+ sudo loginctl enable-linger "$USER"
262
+ ```
263
+
264
+ **Cause 7: Firewall blocking the connection.**
265
+
266
+ On the client machine, ensure outgoing HTTPS (port 443) is not blocked by a corporate firewall or VPN.
267
+
268
+ **Cause 8: DNS not set up for the tunnel subdomain.**
269
+
270
+ The `tunnel.example.com` A record must point to the server.
271
+
272
+ **Fix:**
273
+
274
+ ```bash
275
+ dig tunnel.example.com +short
276
+ ```
277
+
278
+ **Cause 9: Let's Encrypt certificate not issued for the tunnel subdomain.**
279
+
280
+ If the tunnel vhost references a certificate that does not exist, nginx will fail to start or refuse connections on that vhost.
281
+
282
+ **Fix:**
283
+
284
+ ```bash
285
+ sudo certbot certificates | grep tunnel
286
+ ```
287
+
288
+ If no certificate is listed, re-run provisioning or issue it manually through the panel's wrapper (the same command the panel runs):
289
+
290
+ ```bash
291
+ sudo /usr/local/sbin/lamaste-certbot issue your@email.com tunnel.example.com tunnel.example.com
292
+ ```
293
+
294
+ ---
295
+
296
+ ## Service Fails to Start
297
+
298
+ **Symptom:** One of the Lamaste services shows `failed` status.
299
+
300
+ **General diagnostic steps:**
301
+
302
+ ```bash
303
+ # 1. Check the service status
304
+ sudo systemctl status <service-name>
305
+
306
+ # 2. Read recent journal logs
307
+ sudo journalctl -u <service-name> -n 50 --no-pager
308
+
309
+ # 3. Check if the binary exists (for chisel/authelia)
310
+ ls -la /usr/local/bin/chisel
311
+ ls -la /usr/local/bin/authelia
312
+ ```
313
+
314
+ ### lamalibre-lamaste-serverd fails to start
315
+
316
+ **Common causes:**
317
+
318
+ | Cause | Log Message | Fix |
319
+ | ------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
320
+ | Missing `panel.json` | `Config file not found` | Re-run installer or create the file manually |
321
+ | Invalid JSON in `panel.json` | `contains invalid JSON` | Fix the JSON syntax |
322
+ | Port 3100 in use | `EADDRINUSE` | Find and stop the conflicting process: `sudo ss -tlnp sport = :3100` |
323
+ | Missing Node.js modules | `Cannot find module` | Re-run the installer (`npx @lamalibre/create-lamaste@4.0.0 --yes`); `/opt/lamalibre/lamaste` is root-owned and redeployed as a whole |
324
+ | Permission denied writing state | `EACCES` under `/etc/lamalibre/lamaste` | Re-run the installer; the redeploy re-applies the ownership of the config and PKI directories |
325
+
326
+ ### chisel fails to start
327
+
328
+ **Common causes:**
329
+
330
+ | Cause | Log Message | Fix |
331
+ | -------------------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
332
+ | Binary missing | `exec format error` or `not found` | Re-run the installer (`npx @lamalibre/create-lamaste@4.0.0 --yes`) — it installs the pinned, checksum-verified release for the server's architecture; the panel cannot install binaries |
333
+ | Not the pinned release | (panel log) `The installed chisel is not the pinned release — run create-lamaste ...` | Re-run the installer. Until then the panel restarts Chisel on every authfile change |
334
+ | Authfile or key unreadable | `permission denied` on `chisel-users` or `chisel-server.key` | Both must be `0640 lamaste:lamaste-chisel` and the unit `Group=lamaste-chisel`; restart the panel, which re-applies the authfile's. If the group, the unit or the key's ownership is wrong, re-run the installer in redeploy mode |
335
+ | Stopped by the panel | (panel log) `Chisel stopped: ...`; unit disabled, `chisel-failed-closed` present | Reconciliation failed closed; see [Tunnel Client Cannot Connect](#tunnel-client-cannot-connect), Cause 1 |
336
+ | Port 9090 in use | `bind: address already in use` | `sudo ss -tlnp sport = :9090` to find conflicting process |
337
+
338
+ ### authelia fails to start
339
+
340
+ **Common causes:**
341
+
342
+ | Cause | Log Message | Fix |
343
+ | --------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
344
+ | Invalid `configuration.yml` | `configuration: error` | Check YAML syntax with `authelia validate-configuration --config /etc/authelia/configuration.yml` |
345
+ | Missing `users.yml` | `cannot open file` | Create an initial users file (see [Config Files](config-files.md)) |
346
+ | Binary missing | `not found` | Re-run the installer (`npx @lamalibre/create-lamaste@4.0.0 --yes`); it installs the pinned release |
347
+ | Wrong permissions | `permission denied` | Authelia runs as `lamaste-authelia`: `/etc/authelia` must be `lamaste:lamaste-authelia 2770`, `configuration.yml` `0640`, `users.yml` `0660`, `db.sqlite3` owned by `lamaste-authelia`. Re-run the installer to re-apply (a root-owned `/etc/authelia` from an older version is converted), or see [Config Files](config-files.md#file-permissions-table) |
348
+ | Database newer than binary | storage schema version error at startup | A newer Authelia ran against this database and was replaced by an older one; the installer never downgrades an installed Authelia, so reinstall that newer release by hand |
349
+
350
+ ---
351
+
352
+ ## High Memory Usage
353
+
354
+ **Symptom:** Dashboard shows memory usage above 85%, or the server becomes unresponsive.
355
+
356
+ **Cause 1: Argon2id password hashing.**
357
+
358
+ If Authelia was manually configured to use argon2id instead of bcrypt, each authentication attempt uses ~93 MB of RAM.
359
+
360
+ **Fix:**
361
+
362
+ Verify the password algorithm in `/etc/authelia/configuration.yml`:
363
+
364
+ ```yaml
365
+ authentication_backend:
366
+ file:
367
+ password:
368
+ algorithm: bcrypt # MUST be bcrypt, not argon2id
369
+ bcrypt:
370
+ cost: 12
371
+ ```
372
+
373
+ If it says `argon2id`, change it to `bcrypt` and re-hash user passwords.
374
+
375
+ **Cause 2: Node.js memory leak.**
376
+
377
+ If the panel server's memory grows continuously.
378
+
379
+ **Fix:**
380
+
381
+ ```bash
382
+ sudo systemctl restart lamalibre-lamaste-serverd
383
+ ```
384
+
385
+ If this recurs frequently, check lamalibre-lamaste-serverd logs for errors that might indicate a leak.
386
+
387
+ **Cause 3: Too many simultaneous connections.**
388
+
389
+ On a 512 MB droplet, the system has limited headroom.
390
+
391
+ **Fix:**
392
+
393
+ 1. Check current connections:
394
+
395
+ ```bash
396
+ ss -s
397
+ ```
398
+
399
+ 2. If under attack, check fail2ban:
400
+
401
+ ```bash
402
+ sudo fail2ban-client status
403
+ ```
404
+
405
+ **Cause 4: Swap is not active.**
406
+
407
+ Without swap, the system has no safety net when RAM is exhausted.
408
+
409
+ **Fix:**
410
+
411
+ ```bash
412
+ # Check if swap is active
413
+ swapon --show
414
+
415
+ # If empty, create swap:
416
+ sudo fallocate -l 1G /swapfile
417
+ sudo chmod 600 /swapfile
418
+ sudo mkswap /swapfile
419
+ sudo swapon /swapfile
420
+ echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
421
+ ```
422
+
423
+ ---
424
+
425
+ ## nginx Config Test Failure
426
+
427
+ **Symptom:** `sudo nginx -t` reports an error, or nginx fails to reload/restart.
428
+
429
+ **Common causes:**
430
+
431
+ | Error Message | Cause | Fix |
432
+ | ------------------------------- | ------------------------------------------ | ---------------------------------------------------------- |
433
+ | `ssl_certificate ... not found` | Let's Encrypt cert missing or expired | Re-issue: `sudo certbot certonly --nginx -d <domain>` |
434
+ | `host not found in upstream` | Backend service not resolvable | Check that the upstream is `127.0.0.1`, not a hostname |
435
+ | `duplicate listen` | Two vhosts listening on the same port/name | Check for duplicate vhosts: `ls /etc/nginx/sites-enabled/` |
436
+ | `unknown directive` | nginx version too old for directive | Check version: `nginx -v` |
437
+
438
+ **General fix procedure:**
439
+
440
+ 1. Run the test to see the exact error:
441
+
442
+ ```bash
443
+ sudo nginx -t 2>&1
444
+ ```
445
+
446
+ 2. Fix the identified file
447
+ 3. Test again:
448
+
449
+ ```bash
450
+ sudo nginx -t
451
+ ```
452
+
453
+ 4. Only reload after the test passes:
454
+
455
+ ```bash
456
+ sudo systemctl reload nginx
457
+ ```
458
+
459
+ ---
460
+
461
+ ## TOTP Not Working
462
+
463
+ **Symptom:** Users enter the correct 6-digit code from their authenticator app, but Authelia rejects it.
464
+
465
+ **Cause 1: Server clock drift.**
466
+
467
+ TOTP codes are time-based. If the server's clock is more than 30 seconds off, codes will be rejected.
468
+
469
+ **Fix:**
470
+
471
+ ```bash
472
+ # Check server time
473
+ date
474
+
475
+ # If the time is wrong, sync with NTP:
476
+ sudo timedatectl set-ntp true
477
+ sudo systemctl restart systemd-timesyncd
478
+ timedatectl status
479
+ ```
480
+
481
+ **Cause 2: Wrong TOTP secret enrolled.**
482
+
483
+ The user scanned the QR code incorrectly or the secret was not saved.
484
+
485
+ **Fix:**
486
+
487
+ Reset the user's TOTP from the Users page in the panel UI, or via the API:
488
+
489
+ ```
490
+ POST /api/users/<username>/reset-totp
491
+ ```
492
+
493
+ The user will need to scan a new QR code.
494
+
495
+ **Cause 3: Authenticator app clock drift.**
496
+
497
+ The user's phone clock may be out of sync.
498
+
499
+ **Fix:**
500
+
501
+ - Google Authenticator: Settings > Time correction for codes > Sync now
502
+ - Authy: Ensure the phone's time is set to automatic
503
+
504
+ **Cause 4: Authelia service not running.**
505
+
506
+ If Authelia is down, the forward auth check fails and nginx returns an error.
507
+
508
+ **Fix:**
509
+
510
+ ```bash
511
+ sudo systemctl status authelia
512
+ sudo systemctl restart authelia
513
+ ```
514
+
515
+ ---
516
+
517
+ ## Onboarding Fails: "Chisel is not installed" / "Authelia is not installed"
518
+
519
+ **Symptom:** The **Starting Chisel** or **Configuring Authelia** provisioning task fails with "Chisel is not installed. Run `npx @lamalibre/create-lamaste@4.0.0` on the server to repair the installation." (or the same for Authelia).
520
+
521
+ **Cause:** Onboarding downloads nothing: the installer installs both binaries (pinned releases), their systemd units and the `lamaste-authelia` account. The binary at `/usr/local/bin/chisel` or `/usr/local/bin/authelia` is missing — the installer was interrupted, or the file was removed.
522
+
523
+ **Fix:** Re-run the installer on the server, then start provisioning again from the wizard:
524
+
525
+ ```bash
526
+ npx @lamalibre/create-lamaste@4.0.0 --yes
527
+ ```
528
+
529
+ If provisioning then fails writing Authelia's configuration with `/etc/authelia is not writable by the panel — run create-lamaste to repair the installation`, the directory's ownership is wrong; the same command repairs it.
530
+
531
+ ---
532
+
533
+ ## Tunnel, Site or Panel Change Fails: "nginx site write failed"
534
+
535
+ **Symptom:** Creating or changing a tunnel, static site or agent panel fails with an error like `nginx site write failed for lamalibre-lamaste-app-myapp: lamaste-priv: vhost line 12: directive "access_log" is not allowed in server` (or `arguments of "..." are not allowed`, `site name not allowed for write: ...`).
536
+
537
+ **Cause:** The panel installs vhosts only through the root helper `/usr/local/sbin/lamaste-priv`, which accepts only the panel's own site names and only directives on its allow-list (nginx's master process runs as root, so an unchecked vhost would be root access). The previous vhost is left in place. This happens when the panel generates something the installed helper does not know — typically a panel upgraded without re-running the installer, or a helper left over from an older version — or when a hand-edited generator adds a directive.
538
+
539
+ **Fix:**
540
+
541
+ 1. Re-run the installer so the helper matches the panel: `npx @lamalibre/create-lamaste@4.0.0 --yes`
542
+ 2. If it persists on a current install, it is a bug: the vhost generators (`packages/server/daemon/src/lib/nginx.js`) and the allow-list (`packages/provisioners/server/scripts/lamaste-priv`) must change together — `npm test` checks every generated vhost against the allow-list. Do not work around it by editing files in `/etc/nginx` by hand.
543
+
544
+ `sudo: a password is required` for `lamaste-priv` means the helper or the sudoers file is missing or outdated: re-run the installer.
545
+
546
+ ---
547
+
548
+ ## Panel Update Fails to Start
549
+
550
+ **Symptom:** The panel's **Update** action (`POST /api/system/update`) returns `500` with `Could not start the update: ...`.
551
+
552
+ **Cause:** `sudo lamaste-priv self-update <version>` could not start the transient update unit — for example the helper is missing (an install from before `lamaste-priv`), or `systemd-run` failed.
553
+
554
+ **Fix:** Update from the console instead, which also installs the current helper: `npx @lamalibre/create-lamaste@<version> --yes`. The update unit's own output is in `journalctl -u 'lamalibre-lamaste-update-*'`.
555
+
556
+ ---
557
+
558
+ ## Panel Shows "Service Unavailable" (503)
559
+
560
+ **Symptom:** The panel loads but shows 503 errors for management pages.
561
+
562
+ **Cause:** Onboarding has not been completed. Management API routes return 503 until `onboarding.status` is `COMPLETED`.
563
+
564
+ **Fix:**
565
+
566
+ 1. Check onboarding status:
567
+
568
+ ```bash
569
+ cat /etc/lamalibre/lamaste/panel.json | grep status
570
+ ```
571
+
572
+ 2. If status is not `COMPLETED`, complete the onboarding wizard through the browser
573
+ 3. If onboarding was interrupted during provisioning, you may need to manually set the status:
574
+
575
+ ```bash
576
+ # Only as a last resort — verify all components are actually provisioned first
577
+ sudo sed -i 's/"status": "PROVISIONING"/"status": "COMPLETED"/' /etc/lamalibre/lamaste/panel.json
578
+ sudo systemctl restart lamalibre-lamaste-serverd
579
+ ```
580
+
581
+ ---
582
+
583
+ ## Panel Shows "Gone" (410) for Onboarding
584
+
585
+ **Symptom:** You try to access onboarding endpoints but get 410 Gone.
586
+
587
+ **Cause:** Onboarding has already been completed. Onboarding routes return 410 after `onboarding.status` reaches `COMPLETED`.
588
+
589
+ **Fix:** This is expected behavior. Use the management UI instead.
590
+
591
+ ---
592
+
593
+ ## Static Site Upload Fails
594
+
595
+ **Symptom:** Uploading a static site through the panel fails with an error.
596
+
597
+ **Cause 1: File too large.**
598
+
599
+ The default maximum upload size is 500 MB (configurable via `maxSiteSize` in `panel.json`).
600
+
601
+ **Fix:**
602
+
603
+ Edit `/etc/lamalibre/lamaste/panel.json` and increase `maxSiteSize`:
604
+
605
+ ```json
606
+ {
607
+ "maxSiteSize": 1073741824
608
+ }
609
+ ```
610
+
611
+ Then restart the panel: `sudo systemctl restart lamalibre-lamaste-serverd`
612
+
613
+ **Cause 2: Disk full.**
614
+
615
+ **Fix:**
616
+
617
+ ```bash
618
+ df -h /
619
+ # Free space by removing old backups, logs, or unused sites
620
+ ```
621
+
622
+ **Cause 3: The web root is not writable by the panel (`EACCES`).**
623
+
624
+ The panel writes `/var/www/lamaste` itself: it must be `lamaste:www-data`, directories `2750`, files `0640`. An install from before this layout had it owned by `www-data`. Re-run the installer (`npx @lamalibre/create-lamaste@4.0.0 --yes`); the redeploy converts the tree.
625
+
626
+ ---
627
+
628
+ ## Tunneled App Rejects Uploads (413)
629
+
630
+ **Symptom:** Uploads or large POST requests to a tunneled app fail with `413 Request Entity Too Large` from nginx.
631
+
632
+ **Cause:** The request is larger than the tunnel's body limit. Each tunnel's vhost sets `client_max_body_size` from its `maxBodySizeMb` (default 10 MiB). Tunnels created before the setting existed have no directive, so nginx's built-in 1 MiB applies.
633
+
634
+ **Fix:** On the panel's Tunnels page, click **Edit** on the tunnel and raise **Largest request body (MiB)** (up to 10240), or:
635
+
636
+ ```bash
637
+ curl -s --cert client.p12:password \
638
+ -X PATCH -H "Content-Type: application/json" \
639
+ -d '{"maxBodySizeMb":500}' \
640
+ https://203.0.113.42:9292/api/tunnels/<uuid> | jq
641
+ ```
642
+
643
+ ---
644
+
645
+ ## Quick Reference: Diagnostic Commands
646
+
647
+ | What to Check | Command |
648
+ | -------------------- | ----------------------------------------------------------------------- |
649
+ | All service statuses | `sudo systemctl status nginx chisel authelia lamalibre-lamaste-serverd` |
650
+ | Panel health | `curl -s http://127.0.0.1:3100/api/health` |
651
+ | nginx config test | `sudo nginx -t` |
652
+ | Open ports | `sudo ss -tlnp` |
653
+ | Memory usage | `free -h` |
654
+ | Disk usage | `df -h /` |
655
+ | DNS resolution | `dig panel.example.com +short` |
656
+ | Certificate status | `sudo certbot certificates` |
657
+ | Server time | `timedatectl status` |
658
+ | Swap status | `swapon --show` |
659
+ | fail2ban status | `sudo fail2ban-client status` |
660
+ | Recent panel logs | `journalctl -u lamalibre-lamaste-serverd -n 30` |
661
+ | Recent nginx errors | `tail -20 /var/log/nginx/error.log` |
662
+ | Authelia logs | `journalctl -u authelia -n 30` |
663
+ | Chisel logs | `journalctl -u chisel -n 30` |
664
+ | Onboarding status | `cat /etc/lamalibre/lamaste/panel.json \| grep status` |
665
+ | PKI password | `sudo cat /etc/lamalibre/lamaste/pki/.p12-password` |