@rocket.chat/houston 0.27.0-next.2 → 2.1.8

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 (291) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +108 -15
  3. package/bin/houston +62 -0
  4. package/data/docs/ARCHITECTURE.md +387 -0
  5. package/data/docs/automation.md +107 -0
  6. package/data/docs/e2ee.md +76 -0
  7. package/data/docs/eks.md +258 -0
  8. package/data/docs/gui.md +282 -0
  9. package/data/docs/guide.md +669 -0
  10. package/data/docs/kubernetes.md +138 -0
  11. package/data/docs/troubleshooting.md +193 -0
  12. package/data/docs/upgrading.md +84 -0
  13. package/data/docs/voice.md +253 -0
  14. package/data/iam/engineer-policy.json +11 -0
  15. package/data/iam/engineer-rbac.yaml +42 -0
  16. package/data/iam/operator-policy.json +211 -0
  17. package/data/loadtest/badbot.js +22 -0
  18. package/data/loadtest/common.js +168 -0
  19. package/data/loadtest/custom.js +20 -0
  20. package/data/loadtest/journey.js +58 -0
  21. package/data/loadtest/login.js +18 -0
  22. package/data/loadtest/messages.js +13 -0
  23. package/data/loadtest/mixed.js +39 -0
  24. package/data/loadtest/read.js +12 -0
  25. package/data/loadtest/webhook.js +20 -0
  26. package/data/monitoring/houston-logs.json +98 -0
  27. package/data/monitoring/k6-loadtest.json +610 -0
  28. package/data/monitoring/mongodb-exporter.json +3007 -0
  29. package/data/monitoring/node-exporter-full.json +16114 -0
  30. package/data/monitoring/rocketchat-metrics.json +6471 -0
  31. package/data/presets/airgapped.yaml +16 -0
  32. package/data/presets/default.yaml +9 -0
  33. package/data/seed/avatar-0.png +0 -0
  34. package/data/seed/avatar-1.png +0 -0
  35. package/data/seed/avatar-2.png +0 -0
  36. package/data/seed/avatar-3.png +0 -0
  37. package/data/seed/avatar-4.png +0 -0
  38. package/data/seed/avatar-5.png +0 -0
  39. package/data/seed/avatar-6.png +0 -0
  40. package/data/seed/avatar-7.png +0 -0
  41. package/data/seed/seed-metrics.csv +3 -0
  42. package/data/seed/seed-preview.png +0 -0
  43. package/data/seed/seed-report.pdf +32 -0
  44. package/data/seed/seed-runbook.txt +3 -0
  45. package/data/skill/SKILL.md +399 -0
  46. package/data/versions.yaml +55 -0
  47. package/data/voice/freeswitch/drachtio.xml +52 -0
  48. package/data/voice/freeswitch/public.xml +87 -0
  49. package/data/webui/app.css +2003 -0
  50. package/data/webui/index.html +678 -0
  51. package/data/webui/js/api.js +561 -0
  52. package/data/webui/js/boot.js +44 -0
  53. package/data/webui/js/clusters-tail.js +1377 -0
  54. package/data/webui/js/clusters.js +896 -0
  55. package/data/webui/js/create.js +276 -0
  56. package/data/webui/js/detail.js +507 -0
  57. package/data/webui/js/jobs.js +636 -0
  58. package/data/webui/js/logs.js +634 -0
  59. package/data/webui/js/main.js +14 -0
  60. package/data/webui/js/options.js +408 -0
  61. package/data/webui/js/people.js +438 -0
  62. package/data/webui/js/perf.js +303 -0
  63. package/data/webui/js/render.js +438 -0
  64. package/data/webui/js/shared.js +3 -0
  65. package/data/webui/js/state.js +583 -0
  66. package/data/webui/js/theme.js +123 -0
  67. package/data/webui/js/util.js +584 -0
  68. package/dist/cli/app.js +593 -0
  69. package/dist/cli/capabilities.js +76 -0
  70. package/dist/cli/cell-widths.js +495 -0
  71. package/dist/cli/entry.js +10 -0
  72. package/dist/cli/error-panel.js +492 -0
  73. package/dist/cli/handlers/actor.js +84 -0
  74. package/dist/cli/handlers/https.js +614 -0
  75. package/dist/cli/handlers/prompt.js +299 -0
  76. package/dist/cli/handlers/users.js +226 -0
  77. package/dist/cli/handlers.js +3678 -0
  78. package/dist/cli/help.js +183 -0
  79. package/dist/cli/index.js +15 -0
  80. package/dist/cli/perf.js +810 -0
  81. package/dist/cli/render.js +254 -0
  82. package/dist/cli/serve.js +858 -0
  83. package/dist/cli/spec-data.js +2593 -0
  84. package/dist/cli/spec-types.js +8 -0
  85. package/dist/cli/usage-error.js +520 -0
  86. package/dist/cli/wire.js +70 -0
  87. package/dist/core/audit.js +346 -0
  88. package/dist/core/backup-compat.js +85 -0
  89. package/dist/core/backup.js +1639 -0
  90. package/dist/core/cluster.js +1398 -0
  91. package/dist/core/configimport.js +344 -0
  92. package/dist/core/data.js +267 -0
  93. package/dist/core/database-of.js +82 -0
  94. package/dist/core/diagnose.js +159 -0
  95. package/dist/core/doctor.js +1518 -0
  96. package/dist/core/edge/acme.js +338 -0
  97. package/dist/core/edge/engine.js +500 -0
  98. package/dist/core/edge/networks.js +174 -0
  99. package/dist/core/edge/paths.js +107 -0
  100. package/dist/core/edge/routes.js +251 -0
  101. package/dist/core/edge/routeyml.js +195 -0
  102. package/dist/core/edge/runtime.js +493 -0
  103. package/dist/core/edge/spec.js +305 -0
  104. package/dist/core/edge/types.js +202 -0
  105. package/dist/core/eks-docs.js +135 -0
  106. package/dist/core/eks.js +2240 -0
  107. package/dist/core/envvars.js +562 -0
  108. package/dist/core/eventlog.js +541 -0
  109. package/dist/core/firstrun.js +153 -0
  110. package/dist/core/journal.js +691 -0
  111. package/dist/core/kube/ask.js +231 -0
  112. package/dist/core/kube/capabilities.js +269 -0
  113. package/dist/core/kube/certmanager.js +452 -0
  114. package/dist/core/kube/chart.js +413 -0
  115. package/dist/core/kube/cluster.js +196 -0
  116. package/dist/core/kube/context.js +545 -0
  117. package/dist/core/kube/endpoints.js +448 -0
  118. package/dist/core/kube/exec.js +195 -0
  119. package/dist/core/kube/forward.js +732 -0
  120. package/dist/core/kube/grafana-ingress.js +110 -0
  121. package/dist/core/kube/ingress.js +218 -0
  122. package/dist/core/kube/manifests.js +361 -0
  123. package/dist/core/kube/monitoring.js +768 -0
  124. package/dist/core/kube/names.js +237 -0
  125. package/dist/core/kube/namespace.js +678 -0
  126. package/dist/core/kube/operator.js +941 -0
  127. package/dist/core/kube/probe.js +202 -0
  128. package/dist/core/kube/reachability.js +163 -0
  129. package/dist/core/kube/release.js +439 -0
  130. package/dist/core/kube/replicaset.js +180 -0
  131. package/dist/core/kube/scale.js +398 -0
  132. package/dist/core/kube/status.js +633 -0
  133. package/dist/core/kube/tools.js +238 -0
  134. package/dist/core/kube/transfer.js +173 -0
  135. package/dist/core/kube/workspace.js +423 -0
  136. package/dist/core/lifecycle/admin.js +64 -0
  137. package/dist/core/lifecycle/create-docker.js +1533 -0
  138. package/dist/core/lifecycle/create-k8s.js +939 -0
  139. package/dist/core/lifecycle/destroy.js +339 -0
  140. package/dist/core/lifecycle/inspect.js +635 -0
  141. package/dist/core/lifecycle/naming.js +298 -0
  142. package/dist/core/lifecycle/notes.js +726 -0
  143. package/dist/core/lifecycle/ownership.js +313 -0
  144. package/dist/core/lifecycle/payload.js +401 -0
  145. package/dist/core/lifecycle/ports.js +388 -0
  146. package/dist/core/lifecycle/preconditions.js +367 -0
  147. package/dist/core/lifecycle/pruning.js +551 -0
  148. package/dist/core/lifecycle/ready.js +753 -0
  149. package/dist/core/lifecycle/request.js +525 -0
  150. package/dist/core/lifecycle/seeding.js +281 -0
  151. package/dist/core/lifecycle/sizing.js +392 -0
  152. package/dist/core/lifecycle/state.js +286 -0
  153. package/dist/core/lifecycle/tlsplan.js +704 -0
  154. package/dist/core/lifecycle/types.js +232 -0
  155. package/dist/core/loadtest.js +995 -0
  156. package/dist/core/migrate.js +612 -0
  157. package/dist/core/monitor.js +494 -0
  158. package/dist/core/postready.js +969 -0
  159. package/dist/core/promote.js +804 -0
  160. package/dist/core/rcapi.js +1285 -0
  161. package/dist/core/recovery.js +75 -0
  162. package/dist/core/runner/engine.js +394 -0
  163. package/dist/core/runner/host.js +298 -0
  164. package/dist/core/runner/locks.js +129 -0
  165. package/dist/core/runner/paths.js +173 -0
  166. package/dist/core/runner/ports.js +172 -0
  167. package/dist/core/runner/queries.js +612 -0
  168. package/dist/core/runner/record.js +563 -0
  169. package/dist/core/scaleseed.js +271 -0
  170. package/dist/core/seed-db.js +208 -0
  171. package/dist/core/sessions.js +472 -0
  172. package/dist/core/skill.js +326 -0
  173. package/dist/core/sso-identities.js +172 -0
  174. package/dist/core/sso.js +703 -0
  175. package/dist/core/tls-local.js +311 -0
  176. package/dist/core/tls.js +878 -0
  177. package/dist/core/topology.js +482 -0
  178. package/dist/core/upgrade.js +868 -0
  179. package/dist/core/users.js +739 -0
  180. package/dist/lib/audit.js +100 -0
  181. package/dist/lib/close-matches.js +238 -0
  182. package/dist/lib/compose.js +672 -0
  183. package/dist/lib/config.js +1398 -0
  184. package/dist/lib/context.js +18 -0
  185. package/dist/lib/errors.js +305 -0
  186. package/dist/lib/events.js +208 -0
  187. package/dist/lib/float-text.js +126 -0
  188. package/dist/lib/format.js +1320 -0
  189. package/dist/lib/home.js +325 -0
  190. package/dist/lib/journal.js +122 -0
  191. package/dist/lib/json-text.js +733 -0
  192. package/dist/lib/jsonout.js +382 -0
  193. package/dist/lib/lock.js +516 -0
  194. package/dist/lib/login-name.js +202 -0
  195. package/dist/lib/map-limit.js +29 -0
  196. package/dist/lib/mkdir-parents.js +90 -0
  197. package/dist/lib/mongo-kernel.js +67 -0
  198. package/dist/lib/monitoring.js +492 -0
  199. package/dist/lib/platform-name.js +59 -0
  200. package/dist/lib/presets/common.js +390 -0
  201. package/dist/lib/presets/composite.js +326 -0
  202. package/dist/lib/presets/e2ee.js +143 -0
  203. package/dist/lib/presets/email.js +172 -0
  204. package/dist/lib/presets/guides.js +27 -0
  205. package/dist/lib/presets/index.js +490 -0
  206. package/dist/lib/presets/keycloak.js +369 -0
  207. package/dist/lib/presets/ldap.js +1285 -0
  208. package/dist/lib/presets/livechat.js +220 -0
  209. package/dist/lib/presets/multi-instance.js +124 -0
  210. package/dist/lib/presets/oidc.js +161 -0
  211. package/dist/lib/presets/public.js +496 -0
  212. package/dist/lib/presets/registry.js +64 -0
  213. package/dist/lib/presets/s3-minio.js +300 -0
  214. package/dist/lib/presets/saml.js +149 -0
  215. package/dist/lib/presets/scenario.js +51 -0
  216. package/dist/lib/presets/types.js +86 -0
  217. package/dist/lib/presets/voice-pbx.js +320 -0
  218. package/dist/lib/presets/voice.js +345 -0
  219. package/dist/lib/presets/webhooks.js +182 -0
  220. package/dist/lib/redact.js +106 -0
  221. package/dist/lib/seed-options.js +68 -0
  222. package/dist/lib/seed-profiles.js +59 -0
  223. package/dist/lib/targz.js +1383 -0
  224. package/dist/lib/teammode.js +25 -0
  225. package/dist/lib/tempdir.js +162 -0
  226. package/dist/lib/unicode-tables.js +2335 -0
  227. package/dist/lib/version-spec.js +357 -0
  228. package/dist/lib/versions.js +463 -0
  229. package/dist/lib/yaml-dump.js +1361 -0
  230. package/dist/perf/baseline.js +168 -0
  231. package/dist/perf/constrain.js +296 -0
  232. package/dist/perf/k6.js +235 -0
  233. package/dist/perf/mongoprof.js +171 -0
  234. package/dist/perf/rcmetrics.js +178 -0
  235. package/dist/perf/report.js +386 -0
  236. package/dist/perf/resources.js +224 -0
  237. package/dist/perf/slo.js +111 -0
  238. package/dist/perf/timeline.js +187 -0
  239. package/dist/perf/timings.js +85 -0
  240. package/dist/perf/verdict.js +201 -0
  241. package/dist/seams/aws-cli.js +126 -0
  242. package/dist/seams/docker-cli.js +280 -0
  243. package/dist/seams/exec.js +861 -0
  244. package/dist/seams/fs/lock.js +528 -0
  245. package/dist/seams/kubectl.js +83 -0
  246. package/dist/seams/rc-http.js +921 -0
  247. package/dist/seed/apply.js +190 -0
  248. package/dist/seed/assets.js +76 -0
  249. package/dist/seed/check.js +391 -0
  250. package/dist/seed/client.js +172 -0
  251. package/dist/seed/executor.js +726 -0
  252. package/dist/seed/history.js +281 -0
  253. package/dist/seed/kinds.js +91 -0
  254. package/dist/seed/plan.js +432 -0
  255. package/dist/seed/receipt.js +339 -0
  256. package/dist/seed/repairs.js +75 -0
  257. package/dist/seed/verification.js +363 -0
  258. package/dist/seed/wording.js +248 -0
  259. package/dist/web/app.js +326 -0
  260. package/dist/web/jobs.js +510 -0
  261. package/dist/web/route-deps.js +211 -0
  262. package/dist/web/route-table.js +213 -0
  263. package/dist/web/routes/backup.js +244 -0
  264. package/dist/web/routes/clusters.js +303 -0
  265. package/dist/web/routes/data.js +187 -0
  266. package/dist/web/routes/edge.js +82 -0
  267. package/dist/web/routes/index.js +63 -0
  268. package/dist/web/routes/jobs.js +95 -0
  269. package/dist/web/routes/logs.js +297 -0
  270. package/dist/web/routes/meta.js +191 -0
  271. package/dist/web/routes/people.js +151 -0
  272. package/dist/web/routes/perf.js +95 -0
  273. package/dist/web/routes/repros.js +550 -0
  274. package/dist/web/routes/session.js +361 -0
  275. package/dist/web/routes/spa.js +198 -0
  276. package/dist/web/security.js +475 -0
  277. package/dist/web/signin.js +246 -0
  278. package/package.json +67 -32
  279. package/.eslintrc +0 -94
  280. package/.swcrc +0 -18
  281. package/dist/bin.js +0 -3
  282. package/dist/cli.js +0 -184
  283. package/dist/commands/createBranch.js +0 -192
  284. package/src/bin.js +0 -4
  285. package/src/cli.ts +0 -25
  286. package/src/commands/createBranch.ts +0 -25
  287. package/src-old/logs.js +0 -323
  288. package/src-old/md.js +0 -191
  289. package/src-old/release-table.js +0 -60
  290. package/src-old/set-version.js +0 -614
  291. package/src-old/utils.js +0 -15
@@ -0,0 +1,669 @@
1
+ # houston user guide
2
+
3
+ This guide covers what comes after your first workspace. For installing houston and
4
+ starting one, read the [README](../../README.md) first.
5
+
6
+ Every command also explains itself: `houston <command> --help`.
7
+
8
+ **Contents:** [Commands at a glance](#commands-at-a-glance) ·
9
+ [Everyday lifecycle](#everyday-lifecycle) · [Presets](#presets) ·
10
+ [Sample data](#sample-data) · [A customer's settings](#a-customers-settings) ·
11
+ [Settings and environment variables](#settings-and-environment-variables) ·
12
+ [Backup, restore, upgrade](#backup-restore-upgrade) · [HTTPS](#https) ·
13
+ [Monitoring](#monitoring) · [Load testing](#load-testing-and-capacity) ·
14
+ [REST API](#rest-api) · [Versions and MongoDB](#versions-and-mongodb) ·
15
+ [Where state lives](#where-state-lives)
16
+
17
+ ---
18
+
19
+ ## Commands at a glance
20
+
21
+ | Group | Commands |
22
+ |---|---|
23
+ | lifecycle | `up` `start` `stop` `restart` `down` `prune` |
24
+ | inspect | `list` `info` `logs` `ready` `stats` |
25
+ | settings | `use` `config` `env` |
26
+ | data | `seed` `config-import` `backup` `backups` `restore` `upgrade` |
27
+ | performance (Docker only) | `loadtest` `capacity` |
28
+ | REST | `token` `api` `pat` |
29
+ | web GUI and accounts | `serve` `users` `audit` `chown` |
30
+ | HTTPS | `edge` `trust-ca` `tls-status` |
31
+ | cloud clusters | `cluster` (`cluster overview` for what exists and what it costs; see [EKS](eks.md)) |
32
+ | other | `monitor` `presets` `versions` `doctor` `capabilities` `skill` |
33
+
34
+ ---
35
+
36
+ ## Everyday lifecycle
37
+
38
+ ```bash
39
+ houston list # every workspace: version, MongoDB, runtime, port, state, URL
40
+ houston info --name ticket-1234 # URL, login, links, notes
41
+ houston logs --name ticket-1234 -f # follow the logs (Ctrl-C to stop)
42
+ houston ready --name ticket-1234 # wait until Rocket.Chat is serving
43
+ ```
44
+
45
+ A workspace can live as long as the ticket does. Pause and resume it instead of
46
+ creating it again:
47
+
48
+ | Command | What it does |
49
+ |---|---|
50
+ | `up` | creates a workspace, or brings a stopped one back with its data |
51
+ | `stop` / `start` | pauses and resumes it in seconds |
52
+ | `restart` | restarts Rocket.Chat |
53
+ | `down` | removes the containers but **keeps** the data and the record |
54
+ | `down --volumes` | deletes the data too, after asking |
55
+ | `prune` | **deletes** every workspace that is `down`, with its data and record, except pinned ones; stopped ones are not touched. An admin's prune covers everyone's |
56
+
57
+ The commands that delete data ask first, and `prune` lists what it will remove. Add
58
+ `--yes` to skip the question in a script.
59
+
60
+ **`up` on an existing name reuses that workspace exactly as it was.** What you asked for
61
+ differently (version, preset, monitoring, port, bind address, `--set`, root URL, image,
62
+ MongoDB, HTTPS name, `--replicas`, `--env`, licence, registration token) is named in a warning
63
+ and ignored. To try
64
+ another version, use `houston upgrade` or pick a new name. `--force` rebuilds the
65
+ workspace, and `--fresh` also wipes its data. A rebuild keeps what you leave out: its
66
+ deployment, instance count, cluster, admin password, monitoring, `--root-url`, pin and port
67
+ (a new port only when something else has taken the old one).
68
+
69
+ **One workspace you use every day:** create it once with `--pin`, then `stop` and
70
+ `start` it. A command without `--name` acts on the pinned workspace, or on the one
71
+ `houston use <name>` chose last. That default belongs to the houston home, so on a shared
72
+ server it is the same for everyone using it: give `--name` there.
73
+
74
+ ```bash
75
+ houston up --version 8.5.1 --name main --pin
76
+ houston use ticket-1234 # later commands without --name act on ticket-1234
77
+ ```
78
+
79
+ **Remove workspaces you are done with.** Each one uses about 1.1 GB of memory, `up`
80
+ refuses when the machine does not have room, and too many at once can run a machine
81
+ out of memory.
82
+
83
+ ---
84
+
85
+ ## Presets
86
+
87
+ A preset adds the service a ticket is about, wires Rocket.Chat to it, and turns the
88
+ feature on, so it is ready when you sign in.
89
+
90
+ ```bash
91
+ houston presets # what exists
92
+ houston up --version 8.5.1 --name ticket-1234 --preset ldap --wait
93
+ ```
94
+
95
+ | Preset | Starts | Use it for |
96
+ |---|---|---|
97
+ | `default` | Rocket.Chat and MongoDB | anything |
98
+ | `airgapped` | no route to Rocket.Chat Cloud | offline or disconnected workspaces |
99
+ | `ldap` | OpenLDAP with users and a group | LDAP login and sync |
100
+ | `saml` | a Keycloak identity provider (SAML) | SAML single sign-on |
101
+ | `oidc` | a Keycloak identity provider (OpenID Connect) | OIDC / OAuth single sign-on |
102
+ | `email` | Mailpit, catching every mail Rocket.Chat sends | invites, password resets, verification, 2FA codes |
103
+ | `s3_minio` | MinIO as the file-upload store | uploads, previews, presigned URLs |
104
+ | `livechat` | Omnichannel, an agent and a demo page with the widget | the widget, CORS, routing |
105
+ | `e2ee` | end-to-end encryption switched on, and three test users | encrypted DMs, rooms and files ([guide](e2ee.md)) |
106
+ | `voice` | two test users for Voice calls; `sip_integration=on` adds Drachtio and FreeSWITCH; `pbx=on` a lab PBX | calls between users, the SIP integration, PBX calls ([guide](voice.md)) |
107
+ | `webhooks` | a web inbox (webhook-tester) every outgoing integration call and Omnichannel webhook lands in, and two sample integrations | integrations, webhooks and their scripts; a customer dump's real endpoints (`--set capture=all`) ([below](#webhooks)) |
108
+
109
+ For `ldap`, `saml` and `oidc`, sign in as **`user1` / `user1`**. `houston info` lists
110
+ each preset's consoles and logins.
111
+
112
+ Those consoles prefer these ports on this machine: phpLDAPadmin 8082, Mailpit 8025,
113
+ Keycloak 8081 or 8085, MinIO 9000 and 9001, the livechat demo 8090, the webhook inbox
114
+ 8086. The first workspace
115
+ with a preset gets them. Another workspace with the same preset, yours or a colleague's,
116
+ gets the next free port, and keeps it through stop, start, `up --force` and upgrade. If
117
+ something else took that port while the workspace was stopped, `up --force` moves it to a
118
+ free one and says so. `houston info` and the GUI give each workspace's own addresses.
119
+ Monitoring turned off and on again takes whichever pair is free then. A workspace that is only
120
+ `down` still holds its ports, because it comes back on them. Voice is the exception: its
121
+ call ports are dialled by number, so one machine runs one voice workspace.
122
+
123
+ Two consoles on `localhost` with different ports share the browser's cookies, so signing in
124
+ to one workspace's Keycloak or Grafana can sign you out of another's. Use a private window
125
+ for the second, as you would for two Rocket.Chat workspaces.
126
+
127
+ Presets take parameters with `--set key=value`. `houston presets` prints each one's
128
+ parameters and defaults:
129
+
130
+ ```bash
131
+ houston up --version 8.5.1 --name big-ldap --preset ldap --set users=130000 # a large directory
132
+ houston up --version 8.5.1 --name groups --preset ldap --set groups=on # group-restricted login, role and channel sync
133
+ houston up --version 8.5.1 --name svc --preset ldap --set bind=service # a read-only bind, limited to 500 entries
134
+ houston up --version 8.5.1 --name tls --preset ldap --set tls=ldaps # LDAPS, houston's CA trusted
135
+ houston up --version 8.5.1 --name bad --preset ldap --set tls=ldaps --set trust=none # the certificate error
136
+ houston up --version 8.5.1 --name ad --preset ldap --set directory=ad --set groups=on # Active Directory (Samba): sAMAccountName, objectGUID, nested groups
137
+ houston up --version 8.5.1 --name sso --preset ldap --set idp=saml --set mfa=on # SSO through Keycloak, backed by the same directory, with a one-time code
138
+ houston up --version 8.5.1 --name mail --preset email --seed --wait # users with mail
139
+ houston up --version 8.5.1 --name s3 --preset s3_minio --set presigned=true
140
+ ```
141
+
142
+ Things to know:
143
+
144
+ - **Presets combine.** Give `--preset` more than once:
145
+
146
+ ```bash
147
+ houston up --version 8.5.1 --name ticket-1234 --preset ldap --preset email --wait
148
+ ```
149
+
150
+ Directory users then get email two-factor codes in Mailpit. Order does not matter: the
151
+ workspace is recorded as `email+ldap`. When two presets set the same thing, a default
152
+ gives way: `ldap` turns email 2FA off only because there is no mail server, and `email`
153
+ turns it on. Two values neither presets treat as a default are refused until you choose
154
+ one with `--setting` or `--env`. `saml` and `oidc` each run their own Keycloak and cannot
155
+ be combined yet.
156
+ - **Parameters of combined presets** take the preset's name, `--set ldap.users=500`; a
157
+ single preset accepts that spelling too. A plain `--set users=500` works when only one
158
+ of the presets takes `users`.
159
+ - **A directory and an SSO preset are two user stores.** With `ldap` and `saml` (or `oidc`),
160
+ directory users are `user1..N` and Keycloak users are `sso-user1..N`
161
+ (`sso-user1@example.com`), so neither login lands in the other's account.
162
+ - **`up --force` with no `--preset`** keeps a combined workspace's presets, and on
163
+ Kubernetes any workspace's preset. To change them on Kubernetes, `down --volumes` first.
164
+ - **`oidc` needs a hosts entry:** add `127.0.0.1 keycloak` to `/etc/hosts`. Your
165
+ browser and Rocket.Chat must resolve the login URL the same way. `up` and `info`
166
+ print this reminder.
167
+ - **Several Rocket.Chat instances is a deployment, not a preset.** Use
168
+ `--deployment multi-instance --replicas 3` on Docker. It starts the instances behind
169
+ a load balancer, with NATS and one MongoDB. The old spelling, `--preset
170
+ multi-instance`, still works and prints a hint. A preset combines with it: every
171
+ instance gets the preset's settings. Messages reach the other instances live only
172
+ with an Enterprise license, Rocket.Chat's scalability module; without one they show
173
+ after a reload.
174
+
175
+ ### Webhooks
176
+
177
+ `--preset webhooks` starts a web inbox for HTTP requests (webhook-tester) and wires
178
+ Rocket.Chat to it: a `houston-outgoing` integration posts every public-channel message
179
+ there, a `houston-incoming` integration takes POSTs into `#general` (`houston info` prints
180
+ its URL and a curl to paste), and the Omnichannel webhook points at it with the token
181
+ `houston`, so with `--preset livechat` every chat event lands there too. Post a message,
182
+ open the inbox, read the request. The inbox answers 200 with `{"captured": true}`, which
183
+ Rocket.Chat reads as success; for a failing or slow endpoint click `New URL` in its UI, set
184
+ a 500 or a delay, untick `Destroy current session` (or houston's inbox goes with it) and
185
+ paste the new URL into the integration with the host replaced by `webhooks:8080` (the inbox
186
+ UI says `localhost`; Rocket.Chat reaches it inside the workspace network). Admin →
187
+ Workspace → Integrations →
188
+ History shows each call Rocket.Chat made and what came back, from any machine.
189
+
190
+ The inbox UI is on the machine running houston only (`http://localhost:8086/s/…`): it is a
191
+ single-page app with absolute paths that would collide with Rocket.Chat's, so it is not
192
+ served under the HTTPS name. From elsewhere, `ssh -L 8086:127.0.0.1:8086 <host>`, or
193
+ `--bind`. It keeps the last 128 requests on disk: stop, start, restart, upgrade and
194
+ `up --force` keep them; `down --volumes` removes them. An inbox idle for 31 days loses its
195
+ session; `houston ready` makes a new one.
196
+
197
+ A restored customer backup keeps posting to the customer's real services. `--set
198
+ capture=all` repoints every outgoing integration, and the Omnichannel webhook, at the
199
+ inbox and lists the original URLs under Webhooks in `houston info`; each repointed URL
200
+ keeps the original in its `?from=` query, so the inbox shows where a call was bound. From
201
+ Rocket.Chat 9.0.0 integration scripts run as written (strict mode): one saved earlier keeps
202
+ working until it is edited and saved again, which a repoint is; the docs' Script
203
+ compatibility section says what to change.
204
+
205
+ ### Your own presets
206
+
207
+ Put a YAML file at `~/.houston/presets/<name>.yaml`. It replaces a built-in preset of
208
+ the same name. `--preset` always takes a name, never a path.
209
+
210
+ ```yaml
211
+ name: my-scenario
212
+ description: What this reproduces.
213
+ env:
214
+ OVERWRITE_SETTING_Some_Setting: "true"
215
+ services:
216
+ my-sidecar: { image: some/image:tag }
217
+ depends_on: [my-sidecar]
218
+ ```
219
+
220
+ **Treat preset files like code.** They can start any container and mount files.
221
+
222
+ ### Enterprise licences
223
+
224
+ Pass a Rocket.Chat Cloud registration token. The workspace registers itself on first
225
+ boot and Cloud sends the licence down.
226
+
227
+ ```bash
228
+ houston up --version 8.5.1 --name ee --reg-token <token> --wait
229
+ ```
230
+
231
+ To stop typing it, put `reg_token:` in `~/.houston/config.yaml` or export
232
+ `HOUSTON_REG_TOKEN`. **A registration token is a real licence.** Never paste one into a
233
+ support case.
234
+
235
+ Or hand it the licence itself, from a file or from stdin, never on the command line:
236
+
237
+ ```bash
238
+ houston up --version 8.5.1 --name ee --license ./licence.txt --wait
239
+ pbpaste | houston up --version 8.5.1 --name ee --license - --wait
240
+ ```
241
+
242
+ On Docker it goes into `.license.env` in the workspace (mode 0600), which the compose file
243
+ names and never holds; on Kubernetes into a Secret the pod reads it from. `env`, the GUI and
244
+ `houston.log` never show it; backups leave it out, and `up --force` keeps it.
245
+
246
+ Rocket.Chat 8.8 and 8.9 announce that LDAP, SAML and Custom OAuth login will need a Premium
247
+ plan from 9.0. On Rocket.Chat 9 and later, `up` warns when an `ldap`, `saml` or `oidc`
248
+ workspace has neither `--license` nor `--reg-token`.
249
+
250
+ ---
251
+
252
+ ## Sample data
253
+
254
+ `--seed` adds realistic conversations through Rocket.Chat's REST API, then reads the
255
+ latest batch back by identity. Both CLI and GUI use the same plans and executor.
256
+
257
+ ```bash
258
+ houston up --version 8.5.1 --name ticket-1234 --seed --seed-profile standard --verify-seed
259
+ houston seed --name ticket-1234 --profile large --verify-seed
260
+ houston seed --name ticket-1234 --users 30 --channels 10 --messages 40
261
+ houston seed --name ticket-1234 --profile small --scenario room-states --scenario permissions --history-days 180 --verify-seed
262
+ ```
263
+
264
+ | Profile | Users | Rooms | Main messages | Thread replies | Files | Total content |
265
+ |---|---|---|---|---|---|---|
266
+ | `small` (default) | 5 | 12 | 38 | 24 | 4 | 68 |
267
+ | `standard` | 20 | 25 | 253 | 162 | 12 | 431 |
268
+ | `large` | 100 | 60 | 2620 | 2620 | 24 | 5270 |
269
+
270
+ Total content includes file messages and the opening messages of newly created
271
+ discussions. The existing `messages` summary counts main messages plus thread
272
+ replies; `threads` counts replies. On a repeat, existing discussions gain no new
273
+ opening messages: ordinary totals are 66, 427 and 5264. Users, rooms and custom
274
+ assets are reused; each completed invocation appends a fresh conversation batch.
275
+ `--messages` overrides the number per public channel, including General. Derived
276
+ room kinds retain their minima. Zero users explicitly uses the administrator for
277
+ content; reduced participant sets omit conversations that need more people.
278
+
279
+ All profiles include public/private channels, teams and their child channels,
280
+ discussions, DMs and group DMs. Conversations include markdown, code, Unicode and
281
+ predictable `INC-4821` search text, varied replies, reactions by other participants,
282
+ pins, personal stars, mentions, edited messages and custom emoji. Bundled PNG,
283
+ text, CSV and PDF files can be previewed or downloaded. New sample users receive
284
+ names, avatars and bios; passwords are their usernames (`alice`, `bob`, and so on).
285
+ Existing profile values and nonempty room metadata are preserved.
286
+ Objects from an older seed can be adopted only when a successful saved seed result
287
+ and their actual authorship establish provenance. An unrelated name collision is
288
+ reported instead of changing that object.
289
+
290
+ `--scenario room-states` adds readonly, broadcast and archived channels.
291
+ `--scenario permissions` adds a private room with Alice as owner, Bob as moderator,
292
+ Carol muted and Dave outside; it needs at least four sample users. Both scenarios
293
+ add four rooms, 20 main messages and four pins. Repeat `--scenario` to combine them.
294
+ On creation, use `--seed-scenario` and `--seed-history-days` alongside `--seed`.
295
+ These options cannot be combined with `--scale` or `--clear-scale`.
296
+
297
+ `--history-days 180` spreads this batch over the preceding 180 days with one saved
298
+ UTC reference. History is optional (1–36500 days); omitting it retains current
299
+ timestamps. Parent/reply order, copied discussion dates, file dates, thread activity
300
+ and room latest-message summaries are reconciled, including copied dates in new
301
+ pin notifications. Pin and edit action dates remain current. Existing message dates are never
302
+ changed. Reused discussion anchors remain intact and may narrow that room's range;
303
+ the result reports those constraints. Dates are synthetic: REST notifications and
304
+ hooks still run now. Refresh or sign in with a fresh client to read the adjusted dates.
305
+ Native date search uses `after:DD/MM/YYYY before:DD/MM/YYYY`.
306
+
307
+ History needs writable access to the workspace's managed MongoDB on Docker or
308
+ Kubernetes. Houston checks all live Rocket.Chat instances' `MONGO_URL` values and
309
+ refuses an external, inaccessible or ambiguous target before creating content.
310
+ SCRAM credentials and custom database names are read from the live configuration;
311
+ credentials are never put in command arguments or seed receipts.
312
+
313
+ A durable receipt records exact identities before and after writes. If interrupted,
314
+ repeat the same options or run `houston ready --name ticket-1234`; the original run
315
+ and historical reference are resumed. An unidentified upload or an ambiguous media
316
+ confirmation is refused rather than creating duplicates. Keep the receipt to
317
+ investigate that refusal; do not delete it and replay the batch.
318
+ Historical adjustment starts only after API creation completes. Its saved timeline
319
+ must cover every captured content record and related notice; an incomplete saved
320
+ timeline is a failure, and its selected dates are never silently expanded or replaced.
321
+ Results show planned and read feature counts, the effective date range, and room
322
+ locations with the accounts whose personal Stars panels contain the examples.
323
+
324
+ Email 2FA and the REST rate limiter are restored to their original values on exit.
325
+ Only newly created sample accounts have personal email 2FA disabled for their fixed
326
+ sample login. Existing accounts' security settings are preserved. Fresh workspaces
327
+ use the safe API query default required by the custom-emoji client; an existing
328
+ workspace that explicitly enables unsafe query parameters retains that setting and
329
+ may need its configuration corrected for native custom emoji to load.
330
+
331
+ **Check the result.** `verification.ok` is true only after complete readback, false
332
+ for a confirmed mismatch and null when a check is unreadable. `--verify-seed` accepts
333
+ only true. `seed` has no `--json`; its exit code is the strict gate, and
334
+ `houston info --name ticket-1234 --json` exposes the saved result at `data.seed.ok`.
335
+
336
+ ### Large volumes
337
+
338
+ For "50k users" or "a room with 800k messages will not load", `--scale` writes
339
+ straight into MongoDB:
340
+
341
+ ```bash
342
+ houston seed --name ticket-1234 --scale users=50000,messages=800000@general
343
+ houston seed --name ticket-1234 --clear-scale # removes exactly what --scale added
344
+ ```
345
+
346
+ These rows skip Rocket.Chat's own hooks: scale users cannot log in and scale messages
347
+ send no notifications. Use `--scale` for how Rocket.Chat behaves at volume, and the
348
+ normal seed for how a feature behaves. `--scale` works on Docker workspaces only.
349
+
350
+ ---
351
+
352
+ ## A customer's settings
353
+
354
+ Load the settings export from a customer's support dump:
355
+
356
+ ```bash
357
+ houston config-import ./8.5.0-settings.json --name ticket-1234 --dry-run # see what would change
358
+ houston config-import ./8.5.0-settings.json --name ticket-1234 --only Livechat,LDAP
359
+ ```
360
+
361
+ It skips redacted secrets and lists them, so you can set them by hand. It also skips
362
+ settings that would break a local workspace, such as `Site_Url`,
363
+ `Enterprise_License`, `Assets_*` and the cloud registration.
364
+
365
+ ---
366
+
367
+ ## Settings and environment variables
368
+
369
+ ```bash
370
+ houston env --name ticket-1234 # the effective environment, secrets masked
371
+ houston env --name ticket-1234 --setting Message_AllowEditing=false # a Rocket.Chat setting
372
+ houston env --name ticket-1234 --set MY_FLAG=true # a plain environment variable
373
+ houston env --name ticket-1234 --unset MY_FLAG
374
+ ```
375
+
376
+ Most Rocket.Chat configuration is a **setting**, the thing you change in the admin
377
+ UI. From the environment, a setting only takes effect with the `OVERWRITE_SETTING_`
378
+ prefix, and without it Rocket.Chat ignores the variable silently:
379
+
380
+ | Environment variable | Effect on `Accounts_ShowFormLogin` |
381
+ |---|---|
382
+ | `Accounts_ShowFormLogin=false` | none |
383
+ | `OVERWRITE_SETTING_Accounts_ShowFormLogin=false` | applied |
384
+
385
+ `--setting Id=value` adds the prefix for you. `--set` is for real environment
386
+ variables; give it a setting's name and houston points you to the prefixed form.
387
+
388
+ - An `OVERWRITE_SETTING_` value is applied at every boot. The admin UI can still change
389
+ it while Rocket.Chat runs, and the next restart puts it back.
390
+ - A change recreates only the Rocket.Chat container. MongoDB keeps running.
391
+ `--no-restart` saves the change without applying it; re-run the same `houston env`
392
+ without it to apply it.
393
+ - Your overrides are kept with the workspace and win over the preset's.
394
+ - You may override `MONGO_URL`, `PORT`, `ROOT_URL` or `TRANSPORTER` to reproduce a
395
+ broken configuration. houston warns what each one will break.
396
+
397
+ Changing the environment works on Docker workspaces. On Kubernetes, `env` only reads;
398
+ see the [Kubernetes guide](kubernetes.md#what-kubernetes-refuses).
399
+
400
+ ---
401
+
402
+ ## Backup, restore, upgrade
403
+
404
+ ```bash
405
+ houston backup --name ticket-1234 --label "before upgrade" # writes ~/.houston/backups/<file>.rcbak
406
+ houston backups # list the backups
407
+ houston restore <bundle> --new # rebuild the whole workspace from one file
408
+ houston upgrade --name ticket-1234 --to 8.6.1 # backs up first
409
+ houston upgrade --name ticket-1234 --rollback
410
+ ```
411
+
412
+ - **A backup is a bundle:** the database plus the version, preset and parameters that
413
+ produced it. One file rebuilds the workspace, on your machine or a colleague's.
414
+ - Rocket.Chat is stopped while a backup is taken, so the dump is consistent. `--live`
415
+ skips the stop.
416
+ - A restore replaces the target database completely. `--new` restores into a new
417
+ workspace instead. The copy comes up on this machine (loopback), without the source's
418
+ HTTPS name and without its registration token, which a bundle never carries; give it
419
+ `--domain` or `--https` again if it needs one.
420
+ - Restoring newer data into an older version is refused. Older into newer needs
421
+ `--allow-upgrade`.
422
+ - A backup does not include the side services' data: MinIO files, Keycloak realms,
423
+ LDAP entries or Mailpit mail.
424
+ - `upgrade` needs the workspace running, because Rocket.Chat migrates its database when
425
+ it starts. `--dry-run` shows the plan without changing anything.
426
+ - An upgrade keeps the workspace's MongoDB when the new Rocket.Chat still runs on it, as
427
+ 7.13 runs on 7.0. One that needs a new major MongoDB version is refused: MongoDB majors
428
+ have to be upgraded one step at a time. To carry the data across, `houston backup`, then
429
+ `houston up` the new version under a new name, then `houston restore <bundle> --name
430
+ <new name> --allow-upgrade`. `upgrade --force` moves Rocket.Chat only.
431
+
432
+ ---
433
+
434
+ ## HTTPS
435
+
436
+ This section is about Docker workspaces. For Kubernetes, see
437
+ [HTTPS on a cluster](kubernetes.md#https-on-a-cluster).
438
+
439
+ On Docker, one shared Traefik proxy, the **edge**, holds ports 80 and 443 and serves
440
+ every HTTPS name on the machine. It starts with the first workspace that needs it.
441
+
442
+ ```bash
443
+ # A real name, with a Let's Encrypt certificate. The name must point at this machine; under
444
+ # a wildcard DNS record (*.example.com) that already does, any name works with no DNS change.
445
+ houston up --version 8.5.1 --name ticket-1234 --domain t1234.example.com --email you@example.com
446
+
447
+ # No domain and no internet: houston's own certificate authority, for a browser on this machine.
448
+ houston trust-ca # once per machine
449
+ houston up --version 8.5.1 --name ticket-1234 --https # https://ticket-1234.houston.localhost
450
+ ```
451
+
452
+ The email is remembered (`houston config set acme.email <address>`). It is the contact for
453
+ the `--domain` certificate, so `--email` without a name is refused; `--https` needs none.
454
+ Rocket.Chat's
455
+ `ROOT_URL` becomes the HTTPS URL, which is what OAuth and SAML redirects need.
456
+
457
+ A preset's own pages are served on the same name and certificate, on both runtimes, so
458
+ they work from any browser, not only on this machine:
459
+
460
+ | Path | What |
461
+ |---|---|
462
+ | `/mailpit/` | Mailpit, every email Rocket.Chat sends (`email`) |
463
+ | `/keycloak/` | Keycloak, for sign-in and its admin console (`saml`, `oidc`, ldap's `idp`). SSO needs no `idp_host` and no hosts entry. |
464
+ | `/livechat-demo/` | the livechat demo page. It is the same origin as Rocket.Chat there, so cross-origin problems (CORS, framing) show only on its own port. |
465
+ | `/minio/` | the MinIO console, to watch uploads land in the bucket (`s3_minio`) |
466
+ | `/phpldapadmin/` | phpLDAPadmin, to browse and edit the directory (`ldap`, OpenLDAP and AD) |
467
+
468
+ `houston info` and the GUI link to them. Grafana is at `/grafana/` (see [Monitoring](#monitoring)).
469
+ The `webhooks` inbox has no path here: it answers only on its own port on the machine
470
+ running houston (see [Webhooks](#webhooks)).
471
+
472
+ ```bash
473
+ houston edge status # is it running, which names, can it reach each one
474
+ houston edge stop # frees ports 80 and 443: every HTTPS workspace goes offline
475
+ houston tls-status --name ticket-1234
476
+ ```
477
+
478
+ While the edge is stopped, every HTTPS name on the machine is unreachable, so `doctor`
479
+ reports a stopped edge as a failure when a workspace or the GUI's name uses it (and as
480
+ fine when nothing does). A route the edge cannot reach answers **502**, and
481
+ `edge status` shows which.
482
+
483
+ **Wildcard certificates (dns-01):** put your DNS provider's credentials in
484
+ `~/.houston/acme/dns.env` and houston uses the dns-01 challenge automatically:
485
+
486
+ ```bash
487
+ mkdir -p ~/.houston/acme && chmod 700 ~/.houston/acme
488
+ printf 'CF_DNS_API_TOKEN=%s\n' "$TOKEN" > ~/.houston/acme/dns.env
489
+ chmod 600 ~/.houston/acme/dns.env
490
+ ```
491
+
492
+ A `--domain` workspace can be reached by anyone who can reach that name, so houston
493
+ gives it a generated admin password instead of `admin123`, as it does for a workspace
494
+ bound beyond this machine (`--bind 0.0.0.0`). `houston info` shows it. A workspace made
495
+ on this machine alone and brought back public keeps `admin123`, because Rocket.Chat sets
496
+ the password only on an empty database; `up` says so.
497
+
498
+ ---
499
+
500
+ ## Monitoring
501
+
502
+ Prometheus, Grafana and Loki on top of any workspace:
503
+
504
+ ```bash
505
+ houston up --version 8.5.1 --name ticket-1234 --monitor
506
+ houston monitor --name ticket-1234 # or add it later, without restarting Rocket.Chat
507
+ houston monitor --name ticket-1234 --off
508
+ ```
509
+
510
+ - **Grafana** on a Docker loopback workspace is at `http://localhost:5050` (`admin` / `admin`, anonymous Viewer on),
511
+ with the Rocket.Chat, MongoDB and Node Exporter dashboards.
512
+ - **Prometheus** is at `http://localhost:9090`.
513
+ - Another monitored workspace gets the next free pair, such as 5051 and 9091. `houston info`
514
+ and the GUI give each workspace's own Grafana.
515
+ - Container logs go to **Loki**, readable in the *Rocket.Chat Logs* dashboard.
516
+
517
+ On Docker, log collection covers only that workspace. On Kubernetes, one shared stack
518
+ runs in the `houston-system` namespace, and `--off` leaves it running while another
519
+ workspace still uses it.
520
+
521
+ With houston-served HTTPS (`--domain` or `--https`), both runtimes serve Grafana at
522
+ `https://<workspace-host>/grafana/`. `info` and the GUI report that URL, including
523
+ the Logs link and the live load-test dashboard. The login remains `admin/admin`
524
+ on this public name; anonymous users can view dashboards.
525
+
526
+ Kubernetes loopback forwards serve `http://localhost:5050/grafana/`, and the next free port
527
+ for each further monitored workspace. That Grafana is one per cluster, and it builds its
528
+ own absolute links (sign-in redirects, share links) on 5050. Every monitored
529
+ HTTPS workspace has its own Ingress into the shared stack. Under ACME this requests
530
+ an extra certificate per workspace. Absolute Grafana links name the first public
531
+ host configured for the stack; other workspace hosts serve the same relative paths.
532
+ Upgrading an older stack to this path restarts Grafana; anyone using an existing
533
+ port-forward must run `houston monitor --name <name>` again on their own box.
534
+
535
+ A bare `--root-url` uses the local Grafana URL; a customer proxy must route `/grafana` to Grafana and configure its sub-path.
536
+
537
+ ---
538
+
539
+ ## Load testing and capacity
540
+
541
+ **Docker workspaces only.** On Kubernetes the traffic would go through one
542
+ `kubectl port-forward`, which saturates long before Rocket.Chat does, so the numbers
543
+ would measure the forward.
544
+
545
+ ```bash
546
+ houston loadtest --name ticket-1234 --scenario journey --vus 50 --duration 60s
547
+ houston loadtest --name ticket-1234 --scenario custom --endpoint "GET /api/v1/channels.list?count=100"
548
+ houston loadtest --name ticket-1234 --scenario journey --save before-fix
549
+ houston loadtest --name ticket-1234 --scenario journey --compare before-fix
550
+ houston capacity --name ticket-1234 --slo "p95=300ms,error=2%"
551
+ ```
552
+
553
+ The load comes from [k6](https://k6.io), run as a temporary container on the
554
+ workspace's own network.
555
+
556
+ - **Scenarios:** `journey` (a whole session, each step timed), `messages`, `login`,
557
+ `read`, `mixed`, `webhook`, `badbot` and `custom`.
558
+ - **Shapes:** a constant `--vus`, `--ramp 10:200`, or `--spike 10:100`, which reports
559
+ how long p95 took to recover. `--stats` on a long run reports memory growth per
560
+ hour, the sign of a leak.
561
+ - **The customer's hardware:** `--constrain "rc=2cpu/2g,mongo=1cpu/1g"` limits the
562
+ services for the run and puts back what they had afterwards. Docker cannot clear a limit, so
563
+ a service that had none is given this machine's whole capacity, which is the same thing. A
564
+ memory cap below what a service already uses is refused: the kernel would restart it as the
565
+ test began, and the run would measure the restart.
566
+ - **`--slo p95=300ms,error=1%`** makes the command fail when the target is missed, so it
567
+ fits in CI.
568
+ - **Diagnosis is on by default:** Rocket.Chat's event-loop lag, MongoDB's slow queries
569
+ with their plans (it flags `COLLSCAN`), and when errors started, ending in a
570
+ plain-language verdict.
571
+
572
+ `capacity` doubles the load until the target breaks, narrows down where, and says why.
573
+
574
+ **VUs are k6 workers, not Rocket.Chat accounts.** Write scenarios leave real messages
575
+ in `#general`; `read` and `login` add nothing.
576
+
577
+ ---
578
+
579
+ ## REST API
580
+
581
+ ```bash
582
+ houston token --name ticket-1234 # auth headers for curl
583
+ houston api --name ticket-1234 GET /api/v1/me
584
+ houston api --name ticket-1234 --pat POST /api/v1/users.update -d '{"userId":"ID","data":{"name":"X"}}'
585
+ houston api --name ticket-1234 --2fa POST /api/v1/settings/Message_AllowEditing -d '{"value":false}'
586
+ houston pat --name ticket-1234 # create a Personal Access Token
587
+ ```
588
+
589
+ `--pat` calls the API the way a customer's Personal Access Token would (with "Ignore
590
+ 2FA"). `--2fa` gets past an admin endpoint that asks for two-factor authentication.
591
+ The web GUI has the same console.
592
+
593
+ ---
594
+
595
+ ## Versions and MongoDB
596
+
597
+ `houston up --version X` asks `releases.rocket.chat/<version>/info`, Rocket.Chat's own
598
+ compatibility data, and picks the newest supported MongoDB. When that is unreachable,
599
+ or for a release older than that data, it uses the list shipped with houston.
600
+ `--offline` always uses the shipped list.
601
+
602
+ ```bash
603
+ houston versions 8.5.1 # which MongoDB houston would pair with 8.5.1, and why
604
+ ```
605
+
606
+ Give full versions such as `8.5.1`. MongoDB 8 and newer runs the
607
+ `mongodb/mongodb-community-server` image; older MongoDB runs `bitnamilegacy/mongodb`.
608
+
609
+ ### Unreleased builds
610
+
611
+ `--version` also takes a CI build of Rocket.Chat, pulled from `ghcr.io/rocketchat/rocket.chat`:
612
+ `develop`, `pr-<number>`, either with `-fips` or `-cov`, and `-gha-run-<id>` for one run's
613
+ build rather than the latest.
614
+
615
+ ```bash
616
+ houston versions pr-42617 # its version and MongoDB pairing
617
+ houston up --version pr-42617 --name pr-42617 --wait # the pull request's build
618
+ houston up --version develop-fips --name fips --wait # FIPS: amd64 only
619
+ ```
620
+
621
+ The build's version comes from that branch's `apps/meteor/package.json` on GitHub, so this
622
+ needs the network. It is recorded as `8.10.0.dev0` for `8.10.0-develop`, which sorts below
623
+ the release, and MongoDB is paired as for that release. Moving to the release later is an
624
+ `upgrade`. Offline, or for a build GitHub does not know, `up` stops and names the way round:
625
+ `--rc-image ghcr.io/rocketchat/rocket.chat:<tag> --version <x.y.z>`. On a shared GUI a build
626
+ version is limited to admins under `gui.create_policy admin`, as `rc_image` is.
627
+
628
+ ---
629
+
630
+ ## Where state lives
631
+
632
+ Everything houston keeps is under `~/.houston`. Set `HOUSTON_HOME` to use another
633
+ directory.
634
+
635
+ ```
636
+ ~/.houston/
637
+ ├── IMPLEMENTATION # which houston versions may use this directory
638
+ ├── config.yaml # your defaults: bind_host, reg_token, acme.email, GUI policies
639
+ ├── users sessions # web GUI accounts and sign-ins (mode 0600)
640
+ ├── sso.env # the Okta client secret (mode 0600), if Okta sign-in is on
641
+ ├── sso-identities.json # which houston account each Okta person signs in as
642
+ ├── first-run # the web GUI's one-time setup key, until the first account exists
643
+ ├── audit.log # who did what
644
+ ├── logs/houston.log # one start and one end line for every command
645
+ ├── locks/ journal/ # houston's own bookkeeping; leave them alone
646
+ ├── presets/ # your own presets
647
+ ├── backups/ # backup bundles
648
+ ├── reports/ loadtests/ # load-test reports and saved runs
649
+ ├── acme/ edge/ # HTTPS: certificate state, the edge and its routes
650
+ ├── clients/kubernetes/ # houston's own kubeconfig, never your ~/.kube/config
651
+ ├── clusters/<name>/ # a cloud cluster houston built, and its kubeconfig
652
+ └── repros/<name>/
653
+ ├── docker-compose.yml # generated: run `up` again instead of editing it
654
+ ├── repro.json # the workspace record: version, runtime, ports, seed result, notes
655
+ └── seed-receipts/ # durable seed manifests and write-ahead logs
656
+ ```
657
+
658
+ **Every command writes to `logs/houston.log`**, even `--help` and `--version`. When you
659
+ experiment or script against houston, point it at a throwaway directory first:
660
+
661
+ ```bash
662
+ export HOUSTON_HOME=$(mktemp -d)
663
+ ```
664
+
665
+ Settings can also come from the environment, which wins over `config.yaml`:
666
+ `HOUSTON_HOME`, `HOUSTON_REG_TOKEN`, `HOUSTON_RC_IMAGE`, `HOUSTON_BIND_HOST` (the
667
+ `--bind` flag wins over both) and `HOUSTON_KUBE_CONTEXT`. `HOUSTON_SSO_CLIENT_SECRET` is
668
+ the Okta client secret, and wins over `sso.env`; see
669
+ [Sign in with Okta](gui.md#sign-in-with-okta).