

























n8n, a tool we use almost every day here at NetBird, just had a major release. v2.0 beta is now ready to test out in their next release branch. While version 1.0 was about stability and reaching "maturity," Version 2.0 is an architectural shift designed to make n8n enterprise-ready and developer-friendly. The shift is comparable to moving from "writing scripts directly on a server" to "using a proper CI/CD pipeline."
Here is the breakdown of some of the major changes.
The single biggest workflow change in v2 is the separation of development and production.
If you build AI agents or approval flows, v2 fixes a major architectural limitation regarding long-running tasks.
This is arguably the most critical "under the hood" change in v2, specifically regarding stability and security.
In v1, running custom code (JavaScript/Python) was like letting a stranger drive your car while you were sitting in the passenger seat. If they crashed, you both crashed. In v2, with Task Runners, it's like controlling a remote-controlled car. If the RC car crashes, you are safe standing on the sidewalk.
v1: In-Process Execution (The Risk)
Previously, custom code ran inside the same operating system process as the main n8n server.
v2: Task Runners (The Solution)
Version 2 introduces Task Runners—separate processes dedicated entirely to executing custom code.
Python as a First-Class Citizen
This architecture moves Python from "experimental" to stable. The old Pyodide-based Python node has been removed and replaced with a native Python implementation running on Task Runners. Because the Task Runner is a native Python environment, it supports installs and provides a reliable playground for data scientists who prefer Python over JS.
If you are moving to v2, be aware of these requirements:
This is just an overview of the changes; please check out their official docs, website, and blog post on this update!
This quick guide walks through setting up n8n as a persistent background service using PM2.
Install Node.js, npm, and nvm. Visit the official download page for an updated command and different platforms.
Install n8n globally via npm:
Install n8n globally via npm with their next channel for v2:
To update an existing installation to the latest version:
Verify the installation:
PM2 is a production-ready process manager for Node.js applications. Running n8n directly in a terminal means it stops when you close the session. PM2 solves this by:
Install PM2 globally:
Create a configuration file in your home directory. This file tells PM2 how to run n8n and what environment variables to use.
Add the following content:
Save and exit (Ctrl+X, then Y, then Enter).
| Variable | Purpose |
|---|---|
| Set to to remove the [DEV] tag in the browser and enable production optimizations | |
| The IP address n8n listens on. Use to accept connections from any interface, or a specific IP to restrict access | |
| The port n8n runs on (default: 5678) | |
| The public URL for webhooks. Required for triggers and external integrations to reach your instance |
Launch n8n using the configuration file:
Generate the startup script and save the current process list:
This outputs a command you need to run with sudo—copy and execute it. Then save the process list:
Now n8n will automatically start when your system boots.
| Command | Description |
|---|---|
| Start n8n using the config file | |
| Stop the n8n process | |
| Restart n8n | |
| Remove n8n from PM2's process list |
| Command | Description |
|---|---|
| Show all managed processes and their status | |
| Real-time monitoring dashboard (CPU, memory, logs) | |
| View n8n logs (Ctrl+C to exit) | |
| View last 100 lines of logs |
When you modify , apply the changes with:
Alternatively, for environment variable updates only:
| Command | Description |
|---|---|
| Detailed information about the n8n process | |
| Show environment variables for process ID 0 |
Your n8n data (workflows, credentials, settings) is stored separately from PM2 in:
Deleting and recreating the PM2 process does not affect your workflows or credentials.
Check out our initial n8n video for a real use-case example using NetBird peers and resources with your workflows.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。