Effortlessly integrate and manage external task runners for enhanced n8n automation
Understanding the Task Runner Launcher
Prerequisites: An active n8n instance (Docker preferred) and basic terminal access.
Inspection Step:
Verify the launcher binary by downloading from releases:
wget -O task-runner-launcher https://github.com/n8n-io/task-runner-launcher/releases/latest/download/task-runner-launcher-linux-amd64.tar.gz
tar -xzf task-runner-launcher-linux-amd64.tar.gz
tchmod +x task-runner-launcher
./task-runner-launcher --help
Common Failures:
- Command not found: Ensure you downloaded the correct architecture (amd64/arm64).
- No output: Check file permissions with
ls -la task-runner-launcher.
Step-by-Step Setup Guide
/etc/n8n-task-runners.json (or set N8N_RUNNERS_CONFIG_PATH):
- Configure
N8N_RUNNERS_AUTH_TOKEN(required for both launcher and n8n): - Run launcher specifying runner types:
./task-runner-launcher javascript # or multiple: ./task-runner-launcher javascript python - Configure orchestrator liveness checks on launcher port
5680(N8N_RUNNERS_LAUNCHER_HEALTH_CHECK_PORT) and broker port5679(N8N_RUNNERS_BROKER_PORT).
Verification: curl http://localhost:5680/healthz returns HTTP 200.
Common Failures: Auth token mismatch or blocked ports 5679/5680.
Config File and Environment Variables Explained
/etc/n8n-task-runners.json. Example for JavaScript runner:
[
{
"runner-type": "javascript",
"workdir": "/opt/n8n/scripts",
"command": "node",
"args": [],
"health-check-server-port": 5681,
"allowed-env": ["PATH", "NODE_PATH"],
"env-overrides": {"LOG_LEVEL": "info"}
}
]
Key Variables: N8N_RUNNERS_AUTH_TOKEN (required). Use _FILE suffix for secrets. Launcher auto-passes N8N_RUNNERS_TASK_BROKER_URI, N8N_RUNNERS_GRANT_TOKEN.
Verification: Launcher logs show loaded config on startup.
Integrating Runners and Ensuring Stability
Get broker URL from n8n Settings > Task Runners. Runners show “Online” status when healthy.
Common Failures:
- Network blocks on ports 5679/5680/5681
- Mismatched
N8N_RUNNERS_AUTH_TOKEN - Runner health check fails (verify unique ports for multiple runners)
Production Deployment
Monitor startup logs for config loading and runner connections.
Final Check:
curl http://localhost:5680/healthz
curl http://localhost:5679/healthz
Both return HTTP 200 for healthy deployment.
Quick Setup: Download and run the automated setup.sh script: setup.sh (Co-authored by
References
