As of 1.71.0, we’re excited to announce that Task runners for the Code node has entered public beta on self-hosted instances. This is a significant upgrade that fundamentally changes how JavaScript code executes in n8n, bringing major performance improvements and enhanced isolation.
What’s New?
Performance Boost: Our benchmarks show up to 6x improvement in workflow executions using Code nodes (from ~6 to ~35 executions per second)
Better process isolation: Code execution now happens in a separate process
Zero learning curve: All improvements happen under the hood - your Code node experience remains exactly the same
How Does It Work?
Task Runners move JavaScript code execution to a separate process, preventing Code node operations from blocking your entire n8n instance. We offer two modes:
Internal Mode (default): Perfect for getting started, automatically manages task runners as child processes
External Mode: For advanced hosting scenarios requiring maximum isolation and security
Once the beta period concludes successfully, Task runners will become the default execution method for Code nodes. We’ll continue monitoring performance and stability to ensure a smooth transition.
Thank you for helping us test and improve Task Runners! Your feedback is crucial in making n8n better for everyone.
Basically the only environment variable you need is N8N_RUNNERS_ENABLED=true to get started, and that should be enough for majority of the cases. It’s the external mode that requires a more complex setup. See the documentation for more details.
Biggest gripe with VM2 has been its inability to use native, standard nodeJS APIs (eg. fetch, buffers) nor extend Javascript classes which has ruled out some newer libraries. Looking forward to trying all sorts of fun experiments with this!
Python next? Maybe Rails, Lua or PHP?
Also probably not but I have to ask - any plans to extend task runners to Langchain Code node enjoyers?
This could not come at a better time. Testing a workflow with a code step that has a nasty habit of locking up the entire server. This completely resolved that!
The feature is still in beta, so we don’t have all documentation available yet. Thank you for bringing this up. We will consider adding more examples how to configure the external mode.
Is it possible to disable the task runner for just one node using a small piece of code or an environment variable? I have issues when I activate the task runner for one of my code nodes, and I would be disappointed if I can’t update n8n anymore when the task runner becomes mandatory