@trigger.dev/sdk 4.5.0-rc.6 → 4.5.0-rc.7

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 (191) hide show
  1. package/dist/commonjs/v3/ai.d.ts +171 -5
  2. package/dist/commonjs/v3/ai.js +309 -22
  3. package/dist/commonjs/v3/ai.js.map +1 -1
  4. package/dist/commonjs/v3/chat-server.d.ts +8 -0
  5. package/dist/commonjs/v3/chat-server.js +32 -10
  6. package/dist/commonjs/v3/chat-server.js.map +1 -1
  7. package/dist/commonjs/v3/chat-server.test.js +51 -0
  8. package/dist/commonjs/v3/chat-server.test.js.map +1 -1
  9. package/dist/commonjs/v3/createStartSessionAction.test.js +30 -0
  10. package/dist/commonjs/v3/createStartSessionAction.test.js.map +1 -1
  11. package/dist/commonjs/v3/sessions.d.ts +3 -2
  12. package/dist/commonjs/v3/sessions.js +3 -2
  13. package/dist/commonjs/v3/sessions.js.map +1 -1
  14. package/dist/commonjs/version.js +1 -1
  15. package/dist/esm/v3/ai.d.ts +171 -5
  16. package/dist/esm/v3/ai.js +309 -22
  17. package/dist/esm/v3/ai.js.map +1 -1
  18. package/dist/esm/v3/chat-server.d.ts +8 -0
  19. package/dist/esm/v3/chat-server.js +32 -10
  20. package/dist/esm/v3/chat-server.js.map +1 -1
  21. package/dist/esm/v3/chat-server.test.js +51 -0
  22. package/dist/esm/v3/chat-server.test.js.map +1 -1
  23. package/dist/esm/v3/createStartSessionAction.test.js +30 -0
  24. package/dist/esm/v3/createStartSessionAction.test.js.map +1 -1
  25. package/dist/esm/v3/sessions.d.ts +3 -2
  26. package/dist/esm/v3/sessions.js +3 -2
  27. package/dist/esm/v3/sessions.js.map +1 -1
  28. package/dist/esm/version.js +1 -1
  29. package/docs/ai/prompts.mdx +430 -0
  30. package/docs/ai-chat/actions.mdx +115 -0
  31. package/docs/ai-chat/anatomy.mdx +71 -0
  32. package/docs/ai-chat/backend.mdx +817 -0
  33. package/docs/ai-chat/background-injection.mdx +221 -0
  34. package/docs/ai-chat/changelog.mdx +850 -0
  35. package/docs/ai-chat/chat-local.mdx +174 -0
  36. package/docs/ai-chat/client-protocol.mdx +1081 -0
  37. package/docs/ai-chat/compaction.mdx +411 -0
  38. package/docs/ai-chat/custom-agents.mdx +364 -0
  39. package/docs/ai-chat/error-handling.mdx +415 -0
  40. package/docs/ai-chat/fast-starts.mdx +672 -0
  41. package/docs/ai-chat/frontend.mdx +580 -0
  42. package/docs/ai-chat/how-it-works.mdx +230 -0
  43. package/docs/ai-chat/lifecycle-hooks.mdx +530 -0
  44. package/docs/ai-chat/mcp.mdx +101 -0
  45. package/docs/ai-chat/overview.mdx +90 -0
  46. package/docs/ai-chat/patterns/branching-conversations.mdx +284 -0
  47. package/docs/ai-chat/patterns/code-sandbox.mdx +126 -0
  48. package/docs/ai-chat/patterns/database-persistence.mdx +414 -0
  49. package/docs/ai-chat/patterns/human-in-the-loop.mdx +275 -0
  50. package/docs/ai-chat/patterns/large-payloads.mdx +169 -0
  51. package/docs/ai-chat/patterns/oom-resilience.mdx +120 -0
  52. package/docs/ai-chat/patterns/persistence-and-replay.mdx +211 -0
  53. package/docs/ai-chat/patterns/recovery-boot.mdx +230 -0
  54. package/docs/ai-chat/patterns/skills.mdx +221 -0
  55. package/docs/ai-chat/patterns/sub-agents.mdx +383 -0
  56. package/docs/ai-chat/patterns/tool-result-auditing.mdx +148 -0
  57. package/docs/ai-chat/patterns/trusted-edge-signals.mdx +337 -0
  58. package/docs/ai-chat/patterns/version-upgrades.mdx +172 -0
  59. package/docs/ai-chat/pending-messages.mdx +343 -0
  60. package/docs/ai-chat/prompt-caching.mdx +206 -0
  61. package/docs/ai-chat/quick-start.mdx +161 -0
  62. package/docs/ai-chat/reference.mdx +909 -0
  63. package/docs/ai-chat/server-chat.mdx +263 -0
  64. package/docs/ai-chat/sessions.mdx +333 -0
  65. package/docs/ai-chat/testing.mdx +682 -0
  66. package/docs/ai-chat/tools.mdx +191 -0
  67. package/docs/ai-chat/types.mdx +242 -0
  68. package/docs/ai-chat/upgrade-guide.mdx +515 -0
  69. package/docs/apikeys.mdx +54 -0
  70. package/docs/building-with-ai.mdx +261 -0
  71. package/docs/bulk-actions.mdx +49 -0
  72. package/docs/changelog.mdx +6 -0
  73. package/docs/cli-deploy-commands.mdx +9 -0
  74. package/docs/cli-dev-commands.mdx +9 -0
  75. package/docs/cli-dev.mdx +8 -0
  76. package/docs/cli-init-commands.mdx +58 -0
  77. package/docs/cli-introduction.mdx +25 -0
  78. package/docs/cli-list-profiles-commands.mdx +42 -0
  79. package/docs/cli-login-commands.mdx +33 -0
  80. package/docs/cli-logout-commands.mdx +33 -0
  81. package/docs/cli-preview-archive.mdx +59 -0
  82. package/docs/cli-promote-commands.mdx +9 -0
  83. package/docs/cli-switch.mdx +43 -0
  84. package/docs/cli-update-commands.mdx +42 -0
  85. package/docs/cli-whoami-commands.mdx +33 -0
  86. package/docs/community.mdx +6 -0
  87. package/docs/config/config-file.mdx +602 -0
  88. package/docs/config/extensions/additionalFiles.mdx +38 -0
  89. package/docs/config/extensions/additionalPackages.mdx +40 -0
  90. package/docs/config/extensions/aptGet.mdx +34 -0
  91. package/docs/config/extensions/audioWaveform.mdx +20 -0
  92. package/docs/config/extensions/custom.mdx +380 -0
  93. package/docs/config/extensions/emitDecoratorMetadata.mdx +29 -0
  94. package/docs/config/extensions/esbuildPlugin.mdx +31 -0
  95. package/docs/config/extensions/ffmpeg.mdx +45 -0
  96. package/docs/config/extensions/lightpanda.mdx +56 -0
  97. package/docs/config/extensions/overview.mdx +67 -0
  98. package/docs/config/extensions/playwright.mdx +195 -0
  99. package/docs/config/extensions/prismaExtension.mdx +1014 -0
  100. package/docs/config/extensions/puppeteer.mdx +30 -0
  101. package/docs/config/extensions/pythonExtension.mdx +182 -0
  102. package/docs/config/extensions/syncEnvVars.mdx +291 -0
  103. package/docs/context.mdx +235 -0
  104. package/docs/database-connections.mdx +213 -0
  105. package/docs/deploy-environment-variables.mdx +435 -0
  106. package/docs/deployment/atomic-deployment.mdx +172 -0
  107. package/docs/deployment/overview.mdx +257 -0
  108. package/docs/deployment/preview-branches.mdx +224 -0
  109. package/docs/errors-retrying.mdx +379 -0
  110. package/docs/github-actions.mdx +222 -0
  111. package/docs/github-integration.mdx +136 -0
  112. package/docs/github-repo.mdx +8 -0
  113. package/docs/help-email.mdx +6 -0
  114. package/docs/help-slack.mdx +11 -0
  115. package/docs/hidden-tasks.mdx +56 -0
  116. package/docs/how-it-works.mdx +454 -0
  117. package/docs/how-to-reduce-your-spend.mdx +217 -0
  118. package/docs/idempotency.mdx +504 -0
  119. package/docs/introduction.mdx +223 -0
  120. package/docs/limits.mdx +241 -0
  121. package/docs/logging.mdx +195 -0
  122. package/docs/machines.mdx +952 -0
  123. package/docs/manual-setup.mdx +632 -0
  124. package/docs/mcp-agent-rules.mdx +41 -0
  125. package/docs/mcp-introduction.mdx +385 -0
  126. package/docs/mcp-tools.mdx +273 -0
  127. package/docs/migrating-from-v3.mdx +334 -0
  128. package/docs/observability/dashboards.mdx +102 -0
  129. package/docs/observability/query.mdx +585 -0
  130. package/docs/open-source-contributing.mdx +16 -0
  131. package/docs/open-source-self-hosting.mdx +541 -0
  132. package/docs/private-networking/aws-console-setup.mdx +304 -0
  133. package/docs/private-networking/overview.mdx +144 -0
  134. package/docs/private-networking/troubleshooting.mdx +78 -0
  135. package/docs/queue-concurrency.mdx +354 -0
  136. package/docs/quick-start.mdx +97 -0
  137. package/docs/realtime/auth.mdx +208 -0
  138. package/docs/realtime/backend/overview.mdx +45 -0
  139. package/docs/realtime/backend/streams.mdx +418 -0
  140. package/docs/realtime/backend/subscribe.mdx +225 -0
  141. package/docs/realtime/how-it-works.mdx +94 -0
  142. package/docs/realtime/overview.mdx +63 -0
  143. package/docs/realtime/react-hooks/overview.mdx +73 -0
  144. package/docs/realtime/react-hooks/streams.mdx +449 -0
  145. package/docs/realtime/react-hooks/subscribe.mdx +674 -0
  146. package/docs/realtime/react-hooks/swr.mdx +87 -0
  147. package/docs/realtime/react-hooks/triggering.mdx +194 -0
  148. package/docs/realtime/react-hooks/use-wait-token.mdx +34 -0
  149. package/docs/realtime/run-object.mdx +174 -0
  150. package/docs/replaying.mdx +72 -0
  151. package/docs/request-feature.mdx +6 -0
  152. package/docs/roadmap.mdx +6 -0
  153. package/docs/run-tests.mdx +20 -0
  154. package/docs/run-usage.mdx +113 -0
  155. package/docs/runs/heartbeats.mdx +38 -0
  156. package/docs/runs/max-duration.mdx +139 -0
  157. package/docs/runs/metadata.mdx +734 -0
  158. package/docs/runs/priority.mdx +31 -0
  159. package/docs/runs.mdx +396 -0
  160. package/docs/self-hosting/docker.mdx +458 -0
  161. package/docs/self-hosting/env/supervisor.mdx +74 -0
  162. package/docs/self-hosting/env/webapp.mdx +276 -0
  163. package/docs/self-hosting/kubernetes.mdx +601 -0
  164. package/docs/self-hosting/overview.mdx +108 -0
  165. package/docs/skills.mdx +85 -0
  166. package/docs/tags.mdx +120 -0
  167. package/docs/tasks/overview.mdx +697 -0
  168. package/docs/tasks/scheduled.mdx +382 -0
  169. package/docs/tasks/schemaTask.mdx +413 -0
  170. package/docs/tasks/streams.mdx +884 -0
  171. package/docs/triggering.mdx +1320 -0
  172. package/docs/troubleshooting-alerts.mdx +385 -0
  173. package/docs/troubleshooting-debugging-in-vscode.mdx +8 -0
  174. package/docs/troubleshooting-github-issues.mdx +6 -0
  175. package/docs/troubleshooting-uptime-status.mdx +6 -0
  176. package/docs/troubleshooting.mdx +398 -0
  177. package/docs/upgrading-packages.mdx +80 -0
  178. package/docs/vercel-integration.mdx +207 -0
  179. package/docs/versioning.mdx +56 -0
  180. package/docs/video-walkthrough.mdx +23 -0
  181. package/docs/wait-for-token.mdx +540 -0
  182. package/docs/wait-for.mdx +42 -0
  183. package/docs/wait-until.mdx +53 -0
  184. package/docs/wait.mdx +18 -0
  185. package/docs/writing-tasks-introduction.mdx +33 -0
  186. package/package.json +8 -5
  187. package/skills/trigger-authoring-chat-agent/SKILL.md +296 -0
  188. package/skills/trigger-authoring-tasks/SKILL.md +254 -0
  189. package/skills/trigger-chat-agent-advanced/SKILL.md +368 -0
  190. package/skills/trigger-cost-savings/SKILL.md +116 -0
  191. package/skills/trigger-realtime-and-frontend/SKILL.md +276 -0
@@ -0,0 +1,601 @@
1
+ ---
2
+ title: "Kubernetes"
3
+ description: "You can self-host Trigger.dev in Kubernetes using our official Helm chart."
4
+ ---
5
+
6
+ The following instructions will help you deploy Trigger.dev to Kubernetes using our official Helm chart. Make sure to read the self-hosting [overview](/self-hosting/overview) first.
7
+
8
+ As self-hosted deployments tend to have unique requirements and configurations, we don't provide specific advice for securing your deployment, scaling up, or improving reliability.
9
+
10
+ Should the burden ever get too much, we'd be happy to see you on [Trigger.dev cloud](https://trigger.dev/pricing) where we deal with these concerns for you.
11
+
12
+ **Warning:** This guide alone is unlikely to result in a production-ready deployment. Security, scaling, and reliability concerns are not fully addressed here.
13
+
14
+ ## Requirements
15
+
16
+ ### Prerequisites
17
+
18
+ - Kubernetes cluster 1.19+
19
+ - Helm 3.8+
20
+ - Kubectl with cluster access
21
+
22
+ ### Resources
23
+
24
+ The following are minimum requirements for running the entire stack on Kubernetes:
25
+
26
+ **Cluster resources:**
27
+
28
+ - 6+ vCPU total
29
+ - 12+ GB RAM total
30
+ - Persistent volume support
31
+
32
+ **Individual components:**
33
+
34
+ - **Webapp**: 1 vCPU, 2 GB RAM
35
+ - **Supervisor**: 1 vCPU, 1 GB RAM
36
+ - **PostgreSQL**: 1 vCPU, 2 GB RAM
37
+ - **Redis**: 0.5 vCPU, 1 GB RAM
38
+ - **ClickHouse**: 1 vCPU, 2 GB RAM
39
+ - **Object Storage**: 0.5 vCPU, 1 GB RAM
40
+ - **Workers**: Depending on concurrency and machine preset
41
+
42
+ These requirements scale based on your task concurrency and can be adjusted via the `resources` section in your `values.yaml`. For example:
43
+
44
+ ```yaml
45
+ webapp:
46
+ resources:
47
+ requests:
48
+ cpu: 500m
49
+ memory: 1Gi
50
+ limits:
51
+ cpu: 2000m
52
+ memory: 4Gi
53
+ ```
54
+
55
+ ## Installation
56
+
57
+ ### Quick start
58
+
59
+ 1. Install with default values (for testing only):
60
+
61
+ ```bash
62
+ helm upgrade -n trigger --install trigger \
63
+ oci://ghcr.io/triggerdotdev/charts/trigger \
64
+ --version "~4.0.0" \
65
+ --create-namespace
66
+ ```
67
+
68
+ 2. Access the webapp:
69
+
70
+ ```bash
71
+ kubectl port-forward svc/trigger-webapp 3040:3030 -n trigger
72
+ ```
73
+
74
+ 3. Open the dashboard: `http://localhost:3040`
75
+
76
+ 4. Login with the magic link:
77
+
78
+ ```bash
79
+ # Check the webapp logs
80
+ kubectl logs -n trigger deployment/trigger-webapp | grep -A1 "magic link"
81
+ ```
82
+
83
+ ## Configuration
84
+
85
+ Most values map directly to the environment variables documented in the [webapp](/self-hosting/env/webapp) and [supervisor](/self-hosting/env/supervisor) environment variable overview.
86
+
87
+ **Naming convention:**
88
+
89
+ - Environment variables use `UPPER_SNAKE_CASE`
90
+ - Helm values use `camelCase`
91
+
92
+ **Example mapping:**
93
+
94
+ ```bash
95
+ # Environment variable
96
+ APP_ORIGIN=https://trigger.example.com
97
+
98
+ # Becomes Helm value
99
+ config:
100
+ appOrigin: "https://trigger.example.com"
101
+ ```
102
+
103
+ ### Default values
104
+
105
+ The following commands will display the default values:
106
+
107
+ ```bash
108
+ # Specific version
109
+ helm show values oci://ghcr.io/triggerdotdev/charts/trigger \
110
+ --version "4.0.5"
111
+
112
+ # Latest v4
113
+ helm show values oci://ghcr.io/triggerdotdev/charts/trigger \
114
+ --version "~4.0.0"
115
+ ```
116
+
117
+ ### Custom values
118
+
119
+ The default values are insecure and are only suitable for testing. You will need to configure your own secrets as a bare minimum.
120
+
121
+ Create a `values-custom.yaml` file to override the defaults. For example:
122
+
123
+ ```yaml
124
+ # Generate new secrets with `openssl rand -hex 16`
125
+ # WARNING: You should probably use an existingSecret instead
126
+ secrets:
127
+ enabled: true
128
+ sessionSecret: "your-32-char-hex-secret-1"
129
+ magicLinkSecret: "your-32-char-hex-secret-2"
130
+ # ...
131
+
132
+ # Recommended: existingSecret, must contain at least the following keys:
133
+ # - SESSION_SECRET
134
+ # - MAGIC_LINK_SECRET
135
+ # - ENCRYPTION_KEY
136
+ # - MANAGED_WORKER_SECRET
137
+ # - OBJECT_STORE_ACCESS_KEY_ID
138
+ # - OBJECT_STORE_SECRET_ACCESS_KEY
139
+ secrets:
140
+ enabled: false
141
+ existingSecret: "your-existing-secret"
142
+
143
+ # Application URLs
144
+ config:
145
+ appOrigin: "https://trigger.example.com"
146
+ loginOrigin: "https://trigger.example.com"
147
+ apiOrigin: "https://trigger.example.com"
148
+
149
+ # Resource limits
150
+ webapp:
151
+ resources:
152
+ requests:
153
+ cpu: 1000m
154
+ memory: 2Gi
155
+ limits:
156
+ cpu: 2000m
157
+ memory: 4Gi
158
+
159
+ supervisor:
160
+ resources:
161
+ requests:
162
+ cpu: 200m
163
+ memory: 512Mi
164
+ limits:
165
+ cpu: 1000m
166
+ memory: 2Gi
167
+ ```
168
+
169
+ Deploy with your custom values:
170
+
171
+ ```bash
172
+ helm upgrade -n trigger --install trigger \
173
+ oci://ghcr.io/triggerdotdev/charts/trigger \
174
+ --version "~4.0.0" \
175
+ --create-namespace \
176
+ -f values-custom.yaml
177
+ ```
178
+
179
+ ### Extra env
180
+
181
+ You can set extra environment variables on all services. For example:
182
+
183
+ ```yaml
184
+ webapp:
185
+ extraEnvVars:
186
+ - name: EXTRA_ENV_VAR
187
+ value: "extra-value"
188
+ ```
189
+
190
+ ### Extra annotations
191
+
192
+ You can set extra annotations on all services. For example:
193
+
194
+ ```yaml
195
+ webapp:
196
+ podAnnotations:
197
+ "my-annotation": "my-value"
198
+ ```
199
+
200
+ ### External services
201
+
202
+ You can disable the built-in services and use external services instead. The chart supports both direct configuration and existing Kubernetes secrets for secure credential management.
203
+
204
+ #### PostgreSQL
205
+
206
+ **Direct configuration:**
207
+
208
+ ```yaml
209
+ postgres:
210
+ deploy: false
211
+ external:
212
+ databaseUrl: "postgresql://user:password@host:5432/database?schema=public"
213
+ directUrl: "" # Optional, defaults to databaseUrl
214
+ ```
215
+
216
+ **Using existing secrets (recommended):**
217
+
218
+ ```yaml
219
+ postgres:
220
+ deploy: false
221
+ external:
222
+ existingSecret: "postgres-credentials"
223
+ # Optional: Use secretKeys to specify the key names in the secret
224
+ # secretKeys:
225
+ # databaseUrlKey: "postgres-database-url" # default
226
+ # directUrlKey: "postgres-direct-url" # default
227
+ ```
228
+
229
+ #### Redis
230
+
231
+ **Direct configuration:**
232
+
233
+ ```yaml
234
+ redis:
235
+ deploy: false
236
+ external:
237
+ host: "my-redis.example.com"
238
+ port: 6379
239
+ password: "my-password"
240
+ tls:
241
+ enabled: true
242
+ ```
243
+
244
+ **Using existing secrets (recommended):**
245
+
246
+ ```yaml
247
+ redis:
248
+ deploy: false
249
+ external:
250
+ host: "my-redis.example.com"
251
+ port: 6379
252
+ existingSecret: "redis-credentials"
253
+ # existingSecretPasswordKey: "redis-password" # default (optional)
254
+ tls:
255
+ enabled: true
256
+ ```
257
+
258
+ #### ClickHouse
259
+
260
+ **Direct configuration:**
261
+
262
+ ```yaml
263
+ clickhouse:
264
+ deploy: false
265
+ external:
266
+ host: "my-clickhouse.example.com"
267
+ port: 8123
268
+ username: "my-username"
269
+ password: "my-password"
270
+ ```
271
+
272
+ **Using existing secrets (recommended):**
273
+
274
+ ```yaml
275
+ clickhouse:
276
+ deploy: false
277
+ external:
278
+ host: "my-clickhouse.example.com"
279
+ port: 8123
280
+ username: "my-username"
281
+ existingSecret: "clickhouse-credentials"
282
+ # existingSecretKey: "clickhouse-password" # default (optional)
283
+ ```
284
+
285
+ #### S3 Object Storage
286
+
287
+ **Direct configuration:**
288
+
289
+ ```yaml
290
+ minio:
291
+ deploy: false
292
+ s3:
293
+ external:
294
+ endpoint: "https://s3.amazonaws.com"
295
+ accessKeyId: "my-access-key"
296
+ secretAccessKey: "my-secret-key"
297
+ ```
298
+
299
+ **Using existing secrets (recommended):**
300
+
301
+ ```yaml
302
+ minio:
303
+ deploy: false
304
+ s3:
305
+ external:
306
+ endpoint: "https://s3.amazonaws.com"
307
+ existingSecret: "s3-credentials"
308
+ # Optional: Use secretKeys to specify the key names in the secret
309
+ # secretKeys:
310
+ # accessKeyIdKey: "access-key-id" # default
311
+ # secretAccessKeyKey: "secret-access-key" # default
312
+ ```
313
+
314
+ ### PostgreSQL SSL with custom CA certificates
315
+
316
+ When connecting to PostgreSQL instances that require custom CA certificates (such as AWS RDS with SSL verification), you can mount the CA certificate as a volume and configure the webapp to use it:
317
+
318
+ ```yaml
319
+ postgres:
320
+ deploy: false
321
+ external:
322
+ databaseUrl: "postgresql://user:password@mydb.example.com:5432/triggerdb?schema=public&sslmode=require"
323
+ # Alternatively, use an existing secret
324
+ existingSecret: "postgres-credentials"
325
+ # secretKeys:
326
+ # databaseUrlKey: "postgres-database-url" # default
327
+ connection:
328
+ sslMode: "require"
329
+
330
+ # Webapp configuration with SSL CA certificate
331
+ webapp:
332
+ extraEnvVars:
333
+ - name: NODE_EXTRA_CA_CERTS
334
+ value: "/etc/ssl/certs/postgres-ca.crt"
335
+
336
+ extraVolumes:
337
+ - name: postgres-ca-cert
338
+ secret:
339
+ secretName: postgres-ca-secret
340
+ items:
341
+ - key: ca.crt
342
+ path: postgres-ca.crt
343
+
344
+ extraVolumeMounts:
345
+ - name: postgres-ca-cert
346
+ mountPath: /etc/ssl/certs
347
+ readOnly: true
348
+ ```
349
+
350
+ **Benefits:**
351
+
352
+ - No plaintext credentials in `values.yaml` or Helm releases
353
+ - Complete `DATABASE_URL` stored securely in Kubernetes secrets
354
+ - Compatible with secret management tools (External Secrets Operator, etc.)
355
+ - Follows Kubernetes security best practices
356
+
357
+ ## DNS performance
358
+
359
+ For production clusters we recommend deploying [NodeLocal DNSCache](https://kubernetes.io/docs/tasks/administer-cluster/nodelocaldns/). DNS queries — especially to managed Postgres or Redis endpoints — can be very slow under Kubernetes' default resolver, and a node-local cache typically gives a large step change in latency and throughput across the cluster.
360
+
361
+ The default `ndots: 5` setting also forces every cluster search domain to be tried before resolving hostnames with fewer dots (the case for most external database hosts). Lowering `ndots` to `1` on the webapp and supervisor pods avoids those extra round-trips.
362
+
363
+ ## Task events
364
+
365
+ By default, task events (timeline, logs, spans) are stored in PostgreSQL. For production deployments we recommend storing them in ClickHouse instead, it scales to much higher volumes and avoids unbounded growth of the `TaskEvent` table.
366
+
367
+ ClickHouse is already deployed by the chart, so no extra services are required. To enable, set `EVENT_REPOSITORY_DEFAULT_STORE` on the webapp via `extraEnvVars`:
368
+
369
+ ```yaml
370
+ webapp:
371
+ extraEnvVars:
372
+ - name: EVENT_REPOSITORY_DEFAULT_STORE
373
+ value: "clickhouse_v2"
374
+ ```
375
+
376
+ This only affects new runs; existing runs continue to read from wherever their events were originally stored.
377
+
378
+ ## Worker token
379
+
380
+ When using the default bootstrap configuration, worker creation and authentication is handled automatically. The webapp generates a worker token and makes it available to the supervisor via a shared volume.
381
+
382
+ ### Bootstrap (default)
383
+
384
+ ```yaml
385
+ webapp:
386
+ bootstrap:
387
+ enabled: true
388
+ workerGroupName: "bootstrap"
389
+ ```
390
+
391
+ ### Manual
392
+
393
+ If you need to set up workers separately or use a custom token:
394
+
395
+ 1. Get the worker token from the webapp logs:
396
+
397
+ ```bash
398
+ kubectl logs deployment/trigger-webapp -n trigger | grep -A15 "Worker Token"
399
+ ```
400
+
401
+ 2. Create a secret with the token:
402
+
403
+ ```bash
404
+ kubectl create secret generic worker-token \
405
+ --from-literal=token=tr_wgt_your_token_here \
406
+ -n trigger
407
+ ```
408
+
409
+ 3. Configure the supervisor to use the secret:
410
+
411
+ ```yaml
412
+ supervisor:
413
+ bootstrap:
414
+ enabled: false
415
+ workerToken:
416
+ secret:
417
+ name: "worker-token"
418
+ key: "token"
419
+ ```
420
+
421
+ ## Registry setup
422
+
423
+ See the [Docker registry setup](/self-hosting/docker#registry-setup) for conceptual information. The configuration is specified in your `values.yaml`:
424
+
425
+ ```yaml
426
+ # Use external registry (recommended)
427
+ registry:
428
+ deploy: false
429
+ # Part of deployment image ref, for example: your-registry.example.com/your-company/proj_123:20250625.1.prod
430
+ repositoryNamespace: "your-company"
431
+ external:
432
+ host: "your-registry.example.com"
433
+ port: 5000
434
+ auth:
435
+ enabled: true
436
+ username: "your-username"
437
+ password: "your-password"
438
+ ```
439
+
440
+ <Note>
441
+ The internal registry (`registry.external: false`) is experimental and requires proper TLS setup
442
+ and additional cluster configuration. Use an external registry for production.
443
+ </Note>
444
+
445
+ ## Object storage
446
+
447
+ See the [Docker object storage setup](/self-hosting/docker#object-storage) for conceptual information. The defaults will use built-in MinIO, but you can use an external S3-compatible storage. The configuration is specified in your `values.yaml`:
448
+
449
+ ```yaml
450
+ # Use external S3-compatible storage
451
+ minio:
452
+ deploy: false
453
+ external:
454
+ url: "https://s3.amazonaws.com"
455
+ # or: "https://your-minio.com:9000"
456
+
457
+ # Configure credentials
458
+ secrets:
459
+ objectStore:
460
+ accessKeyId: "admin"
461
+ secretAccessKey: "very-safe-password"
462
+ ```
463
+
464
+ ## Authentication
465
+
466
+ Authentication options are identical to the [Docker-based installation](/self-hosting/docker#authentication). The configuration is specified in your `values.yaml`:
467
+
468
+ **GitHub OAuth:**
469
+
470
+ ```yaml
471
+ webapp:
472
+ extraEnvVars:
473
+ - name: AUTH_GITHUB_CLIENT_ID
474
+ value: "your-github-client-id"
475
+ - name: AUTH_GITHUB_CLIENT_SECRET
476
+ value: "your-github-client-secret"
477
+ ```
478
+
479
+ **Email authentication (Resend):**
480
+
481
+ ```yaml
482
+ webapp:
483
+ extraEnvVars:
484
+ - name: EMAIL_TRANSPORT
485
+ value: "resend"
486
+ - name: FROM_EMAIL
487
+ value: "noreply@yourdomain.com"
488
+ - name: REPLY_TO_EMAIL
489
+ value: "support@yourdomain.com"
490
+ - name: RESEND_API_KEY
491
+ value: "your-resend-api-key"
492
+ ```
493
+
494
+ **Restricting access:**
495
+
496
+ ```yaml
497
+ webapp:
498
+ extraEnvVars:
499
+ - name: WHITELISTED_EMAILS
500
+ value: "^(user1@company\\.com|user2@company\\.com)$"
501
+ ```
502
+
503
+ ## Version locking
504
+
505
+ You can lock versions in two ways:
506
+
507
+ **Helm chart version (recommended):**
508
+
509
+ ```bash
510
+ # Pin to a specific version for production
511
+ helm upgrade -n trigger --install trigger \
512
+ oci://ghcr.io/triggerdotdev/charts/trigger \
513
+ --version "4.0.5"
514
+
515
+ # The app version will be different from the chart version
516
+ # This is the version of the Trigger.dev webapp and supervisor
517
+ # ..and should always match your Trigger.dev CLI version
518
+ helm show chart \
519
+ oci://ghcr.io/triggerdotdev/charts/trigger \
520
+ --version "4.0.5" | grep appVersion
521
+ ```
522
+
523
+ **Specific image tags:**
524
+
525
+ ```yaml
526
+ webapp:
527
+ image:
528
+ tag: "v4.0.0"
529
+
530
+ supervisor:
531
+ image:
532
+ tag: "v4.0.0"
533
+ ```
534
+
535
+ The chart version's `appVersion` field determines the default image tags. Newer image tags may be incompatible with older chart versions and vice versa.
536
+
537
+ ## Troubleshooting
538
+
539
+ **Check logs:**
540
+
541
+ ```bash
542
+ # Webapp logs
543
+ kubectl logs deployment/trigger-webapp -n trigger -f
544
+
545
+ # Supervisor logs
546
+ kubectl logs deployment/trigger-supervisor -n trigger -f
547
+
548
+ # All pods
549
+ kubectl logs -l app.kubernetes.io/instance=trigger -n trigger -f
550
+ ```
551
+
552
+ **Check pod status:**
553
+
554
+ ```bash
555
+ kubectl get pods -n trigger
556
+ kubectl describe pod <pod-name> -n trigger
557
+ ```
558
+
559
+ **Start from scratch:**
560
+
561
+ ```bash
562
+ # Delete the release
563
+ helm uninstall trigger -n trigger
564
+
565
+ # Delete persistent volumes (optional)
566
+ # WARNING: This will delete all your data!
567
+ kubectl delete pvc -l app.kubernetes.io/instance=trigger -n trigger
568
+
569
+ # Delete the namespace (optional)
570
+ kubectl delete namespace trigger
571
+ ```
572
+
573
+ **Common issues:**
574
+
575
+ - **Magic links not working**: Check webapp logs for email delivery errors
576
+ - **Deploy fails**: Verify registry access and authentication
577
+ - **Pods stuck pending**: Describe the pod and check the events
578
+ - **Worker token issues**: Check webapp and supervisor logs for errors
579
+ - **Deploy fails with `ERROR: schema "graphile_worker" does not exist`**: See the [Docker troubleshooting](/self-hosting/docker#troubleshooting) section for details on resolving PostgreSQL SSL certificate issues that prevent Graphile Worker migrations.
580
+
581
+ See the [Docker troubleshooting](/self-hosting/docker#troubleshooting) section for more information.
582
+
583
+ ## CLI usage
584
+
585
+ See the [Docker CLI usage](/self-hosting/docker#cli-usage) section, the commands are identical regardless of deployment method.
586
+
587
+ ## CI / GitHub Actions
588
+
589
+ When running the CLI in a CI environment, your login profiles won't be available. Instead, you can use the `TRIGGER_API_URL` and `TRIGGER_ACCESS_TOKEN` environment
590
+ variables to point at your self-hosted instance and authenticate.
591
+
592
+ For more detailed instructions, see the [GitHub Actions guide](/github-actions).
593
+
594
+ ## Telemetry
595
+
596
+ By default, the Trigger.dev webapp sends telemetry data to our servers. This data is used to improve the product and is not shared with third parties. To disable telemetry, set in your `values.yaml`:
597
+
598
+ ```yaml
599
+ telemetry:
600
+ enabled: false
601
+ ```
@@ -0,0 +1,108 @@
1
+ ---
2
+ title: "Overview"
3
+ description: "You can self-host Trigger.dev on your own infrastructure."
4
+ ---
5
+
6
+ Self-hosting Trigger.dev means you run and manage the platform on your own infrastructure, giving you full control over your environment, deployment process, and the URLs you expose the service on.
7
+
8
+ You are responsible for provisioning resources, handling updates, and managing any security, scaling or reliability challenges that arise.
9
+
10
+ We provide version-tagged releases for self-hosted deployments. It's highly advised to use these tags exclusively and keep them locked with your CLI version.
11
+
12
+ ## Should you self-host?
13
+
14
+ Trigger.dev Cloud is fully managed, scalable, and comes with dedicated support. For most users, it offers the best experience. However, if you have specific requirements around data residency, compliance, or infrastructure control, self-hosting may be the right choice for you.
15
+
16
+ The self-hosted version is functionally the same as Trigger.dev Cloud with [some exceptions](#feature-comparison), but our managed Cloud infrastructure is designed for high availability, security, and scale.
17
+
18
+ Because we don't manage self-hosted instances, we cannot guarantee how Trigger.dev will perform on your infrastructure. You assume all responsibility and risk for your deployment, including security, uptime, and data integrity.
19
+
20
+ For more details, carry on reading and follow our guides for instructions on setting up a self-hosted Trigger.dev instance. If you prefer a managed experience, you can [sign up](https://cloud.trigger.dev/login) for our Cloud offering instead - we have a generous [free tier](https://trigger.dev/pricing) for you to try it out.
21
+
22
+ ## Architecture
23
+
24
+ The self-hosted version is a set of containers running on your own infrastructure. It's split into two parts that can be scaled independently:
25
+
26
+ - **Webapp**: includes the dashboard and other services like Redis and Postgres.
27
+ - **Worker**: includes the supervisor and the runners that execute your tasks.
28
+
29
+ ![Self-hosting architecture](./architecture.png)
30
+
31
+ ## Feature comparison
32
+
33
+ While [limits](#limits) are generally configurable when self-hosting, some features are only available on Trigger.dev Cloud:
34
+
35
+ | Feature | Cloud | Self-hosted | Description |
36
+ | :---------------- | :---- | :---------- | :-------------------------------------- |
37
+ | Warm starts | ✅ | ❌ | Faster startups for consecutive runs |
38
+ | Auto-scaling | ✅ | ❌ | No need for manual worker node scaling |
39
+ | Checkpoints | ✅ | ❌ | Non-blocking waits, less resource usage |
40
+ | Dedicated support | ✅ | ❌ | Direct access to our support team |
41
+ | Community support | ✅ | ✅ | Access to our Discord community |
42
+ | ARM support | ✅ | ✅ | ARM-based deployments |
43
+
44
+
45
+ ## Limits
46
+
47
+ Most of the [limits](/limits) are configurable when self-hosting, with some hardcoded exceptions. You can configure them via environment variables on the [webapp](/self-hosting/env/webapp) container.
48
+
49
+ | Limit | Configurable | Hardcoded value |
50
+ | :---------------- | :----------- | :-------------- |
51
+ | Concurrency | ✅ | — |
52
+ | Rate limits | ✅ | — |
53
+ | Queued tasks | ✅ | — |
54
+ | Task payloads | ✅ | — |
55
+ | Batch payloads | ✅ | — |
56
+ | Task outputs | ✅ | — |
57
+ | Batch size | ✅ | — |
58
+ | Log size | ✅ | — |
59
+ | Machines | ✅ | — |
60
+ | OTel limits | ✅ | — |
61
+ | Log retention | — | Never deleted |
62
+ | I/O packet length | ❌ | 128KB |
63
+ | Alerts | ❌ | 100M |
64
+ | Schedules | ❌ | 100M |
65
+ | Team members | ❌ | 100M |
66
+ | Preview branches | ❌ | 100M |
67
+
68
+ ### Machine overrides
69
+
70
+ You can override the machine type for a task by setting the `MACHINE_PRESETS_OVERRIDE_PATH` environment variable to a JSON file with the following structure.
71
+
72
+ ```json
73
+ {
74
+ "defaultMachine": "small-1x",
75
+ "machines": {
76
+ "micro": { "cpu": 0.25, "memory": 0.25 },
77
+ "small-1x": { "cpu": 0.5, "memory": 0.5 },
78
+ "small-2x": { "cpu": 1, "memory": 1 }
79
+ // ...etc
80
+ }
81
+ }
82
+ ```
83
+
84
+ All fields are optional. Partial overrides are supported:
85
+
86
+ ```json
87
+ {
88
+ "defaultMachine": "small-2x",
89
+ "machines": {
90
+ "small-1x": { "memory": 2 }
91
+ }
92
+ }
93
+ ```
94
+
95
+ ## Community support
96
+
97
+ It's dangerous to go alone! Join the self-hosting channel on our [Discord server](https://discord.gg/NQTxt5NA7s).
98
+
99
+ ## Next steps
100
+
101
+ <CardGroup>
102
+ <Card title="Docker compose" color="#2496ED" icon="docker" href="/self-hosting/docker">
103
+ Learn how to self-host Trigger.dev with Docker compose.
104
+ </Card>
105
+ <Card title="Kubernetes" color="#326CE5" icon="dharmachakra" href="/self-hosting/kubernetes">
106
+ Learn how to self-host Trigger.dev with Kubernetes.
107
+ </Card>
108
+ </CardGroup>