You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This launcher is intended for deployment as a sidecar container alongside one or more n8n instance containers. The launcher exposes a health check endpoint at `/healthz` on port `5680` for liveness checks, and the n8n instance does so on port `5681`. The orchestrator (e.g. k8s) can use this to monitor the health of the launcher and of the n8n instance.
3
+
To set up the launcher:
4
4
5
-
1. Download the **launcher binary** from the [releases page](https://github.com/n8n-io/task-runner-launcher/releases).
5
+
1. Download the latest launcher binary from the [releases page](https://github.com/n8n-io/task-runner-launcher/releases).
6
6
7
-
2. Create a **config file** on the host at `/etc/n8n-task-runners.json` and make this file accessible to the launcher.
7
+
2. Create a [config file](#config-file) on the host and make it accessible to the launcher.
-`runner-type` is the type of task runner, currently only `javascript` is supported.
39
-
-`workdir` is the path to directory containing the task runner binary.
40
-
-`command` is the command to execute in order to start the task runner.
41
-
-`args` are the args for the command to execute, currently the path to the task runner entrypoint.
42
-
-`allowed-env` and `env-overrides` are env vars that the launcher will pass through to or set directly on the runner, respectively. See [environment](environment.md).
43
-
44
-
3. Set the **environment variables** for the launcher.
|`runner-type`| Type of task runner, e.g. `javascript` or `python`. The launcher can manage only one runner per type. |
90
+
|`workdir`| Path where the task runner's `command` will run. |
91
+
|`command`| Command to start the task runner. |
92
+
|`args`| Args and flags to use with `command`. |
93
+
|`allowed-env`| Env vars that the launcher will pass through from its own environment to the runner. See [environment](environment.md). |
94
+
|`env-overrides`| Env vars that the launcher will set directly on the runner. See [environment](environment.md). |
45
95
46
-
- It is required to specify an auth token by setting `N8N_RUNNERS_AUTH_TOKEN` to a secret. The launcher will use this secret to authenticate with the n8n instance. You will also pass this `N8N_RUNNERS_AUTH_TOKEN` to the n8n instance as well.
96
+
## Environment variables
47
97
48
-
- Optionally, specify the launcher's log level by setting `N8N_RUNNERS_LAUNCHER_LOG_LEVEL`to `debug`, `info`, `warn` or `error`. Default is `info`. You can also use `NO_COLOR=1` to disable color output.
98
+
It is required to pass `N8N_RUNNERS_AUTH_TOKEN` to the launcher and to the n8n instance. This token will allow the launcher to authenticate with the n8n instance and to obtain a grant tokens for every runner it manages. All other env vars are optional and are listed in the [n8n docs](https://docs.n8n.io/hosting/configuration/environment-variables/task-runners).
49
99
50
-
- Optionally, specify the launcher's auto-shutdown timeout by setting `N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT`to a number of seconds, or set it to `0` to disable. Default is `15`. The runner will exit after this timeout if it is idle for the specified duration, and will be re-launched on demand when the next task comes in.
100
+
The launcher can pass env vars to task runners in two ways, as specified in the [config file](#config-file):
51
101
52
-
- Optionally, specify the task broker's URI (i.e. n8n instance's URI) by setting `N8N_RUNNERS_TASK_BROKER_URI`. Default is `http://127.0.0.1:5679`.
102
+
| Source | Description | Purpose |
103
+
|--------|-------------|------------|
104
+
|`allowed-env`| Env vars filtered from the launcher's own environment | Passing env vars common to all runner types |
105
+
|`env-overrides`| Env vars set by the launcher directly on the runner, with precedence over `allowed-env`| Passing env vars specific to a single runner type |
53
106
54
-
- Optionally, specify the port for the launcher's health check server by setting `N8N_RUNNERS_LAUNCHER_HEALTH_CHECK_PORT`. Default is `5680`. When overriding this port, be mindful of port conflicts - by default, the n8n instance uses `5678` for its regular server and `5679` for its task broker server, and the runner uses `5681` for its health check server.
107
+
Exceptionally, these three env vars cannot be disallowed or overridden:
55
108
56
-
- Optionally, configure [Sentry error tracking](https://docs.sentry.io/platforms/go/configuration/options/) with these env vars:
57
-
-`SENTRY_DSN`
58
-
-`DEPLOYMENT_NAME`: Mapped to `ServerName`
59
-
-`ENVIRONMENT`: Mapped to `Environment`
60
-
-`N8N_VERSION`: Mapped to `Release`
61
-
62
-
- Optionally, set `N8N_RUNNERS_TASK_TIMEOUT` to specify how long (in seconds) a task may run for before it is aborted. Default is `60`.
0 commit comments