docs: 创建专业的项目 README 文档

详细说明:
- 添加完整的项目介绍和架构说明
- 包含 7 个 AI Agent 的详细介绍
- 添加技术栈和 Mermaid 架构图
- 完善安装和使用指南
- 添加开发指南和 Git 工作流
- 新增 Windows 快速部署文档
- 更新前端组件和启动脚本
- 添加多种环境配置文件

修改的文件:
- 新增 README.md 主文档
- 新增 doc/ 目录及部署文档
- 更新前端演示系统组件
- 添加多个启动脚本变体
- 配置文件优化

影响的功能模块:
- 项目文档体系
- 部署和启动流程
- 前端展示系统
- 环境配置管理
This commit is contained in:
Yep_Q
2025-09-14 18:53:27 +08:00
parent 750af2692a
commit 2fcaf21842
154 changed files with 113964 additions and 36 deletions

22
n8n-n8n-1.109.2/.env.demo Normal file
View File

@@ -0,0 +1,22 @@
# n8n 演示模式配置
N8N_DEFAULT_LOCALE=zh-CN
N8N_HOST=0.0.0.0
N8N_PORT=5678
N8N_EDITOR_BASE_URL=http://192.168.2.90:5678
WEBHOOK_URL=http://192.168.2.90:5678
N8N_PROTOCOL=http
# 跳过所有认证和设置
N8N_BASIC_AUTH_ACTIVE=false
N8N_AUTH_EXCLUDE_ENDPOINTS=/**
N8N_USER_MANAGEMENT_DISABLED=true
N8N_SKIP_OWNER_SETUP=true
# CORS配置
N8N_CORS_ENABLED=true
N8N_CORS_ORIGINS=*
N8N_CORS_ALLOW_CREDENTIALS=true
# 禁用遥测
N8N_DIAGNOSTICS_DISABLED=true
N8N_TELEMETRY_DISABLED=true

33
n8n-n8n-1.109.2/.env.lan Normal file
View File

@@ -0,0 +1,33 @@
# n8n 局域网完整访问配置
N8N_DEFAULT_LOCALE=zh-CN
N8N_HOST=0.0.0.0
N8N_PORT=5678
N8N_EDITOR_BASE_URL=http://192.168.2.90:5678
WEBHOOK_URL=http://192.168.2.90:5678
N8N_PROTOCOL=http
# 认证配置(开发环境 - 禁用认证)
N8N_BASIC_AUTH_ACTIVE=false
N8N_AUTH_EXCLUDE_ENDPOINTS=/**
N8N_SKIP_AUTH_ROUTES=true
# Cookie配置
N8N_SECURE_COOKIE=false
N8N_SESSION_COOKIE_SAME_SITE=none
N8N_SESSION_COOKIE_SECURE=false
N8N_SESSION_COOKIE_DOMAIN=
# CORS配置开发环境 - 允许所有)
N8N_CORS_ENABLED=true
N8N_CORS_ORIGINS=*
N8N_CORS_ALLOW_HEADERS=*
N8N_CORS_ALLOW_METHODS=*
# WebSocket
N8N_PUSH_BACKEND=websocket
# 其他
N8N_RUNNERS_ENABLED=true
N8N_BLOCK_ENV_ACCESS_IN_NODE=false
DB_SQLITE_POOL_SIZE=5
N8N_PUBLIC_API_DISABLED=false

View File

@@ -0,0 +1,12 @@
# n8n 局域网访问配置
N8N_DEFAULT_LOCALE=zh-CN
N8N_HOST=0.0.0.0
N8N_PORT=5678
N8N_EDITOR_BASE_URL=http://192.168.2.90:5678
WEBHOOK_URL=http://192.168.2.90:5678
N8N_PROTOCOL=http
N8N_SECURE_COOKIE=false
N8N_SESSION_COOKIE_SAME_SITE=lax
N8N_SESSION_COOKIE_SECURE=false
N8N_CORS_ENABLED=true
N8N_CORS_ORIGINS=http://localhost:5678,http://192.168.2.90:5678,http://127.0.0.1:5678

View File

@@ -21,3 +21,14 @@ Editor is now accessible via:
http://localhost:5678
(node:40550) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
2025-09-10T00:35:45.301Z [Rudder] error: Response error code: ECONNRESET
2025-09-10T00:35:45.603Z [Rudder] error: Response error code: ECONNRESET
2025-09-10T00:35:46.159Z [Rudder] error: Response error code: ECONNRESET
2025-09-10T00:35:47.491Z [Rudder] error: Error: ECONNRESET
read ECONNRESET
read ECONNRESET
read ECONNRESET
read ECONNRESET
2025-09-10T12:58:36.048Z [Rudder] error: Response error code: ECONNABORTED
2025-09-10T12:58:36.162Z [Rudder] error: Error: ECONNABORTED
timeout of 300000ms exceeded

View File

@@ -0,0 +1,28 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
Initializing n8n process
n8n ready on ::, port 5678
n8n Task Broker ready on 127.0.0.1, port 5679
Initializing AuthRolesService...
AuthRolesService initialized successfully.
[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner "JS Task Runner" (4F9N-zA_uFRqmJ75qypmz)
Version: 1.109.2
Locale: zh-CN
Editor is now accessible via:
http://localhost:5678
(node:49958) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Received SIGINT. Shutting down...
[Task Runner]: Received SIGINT signal, shutting down...
[Task Runner]: Task runner stopped
Stopping n8n...

View File

@@ -0,0 +1,33 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
Initializing n8n process
n8n ready on ::, port 5678
n8n Task Broker ready on 127.0.0.1, port 5679
Initializing AuthRolesService...
AuthRolesService initialized successfully.
[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner "JS Task Runner" (oEtIj0jgSWkCBQhozMDoR)
Version: 1.109.2
Locale: zh-CN
Editor is now accessible via:
http://0.0.0.0:5678
(node:69119) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
401 Wrong username or password. Do you have caps lock on?
401 Wrong username or password. Do you have caps lock on?
401 Wrong username or password. Do you have caps lock on?
401 Wrong username or password. Do you have caps lock on?
401 Wrong username or password. Do you have caps lock on?
Received SIGINT. Shutting down...
[Task Runner]: Received SIGINT signal, shutting down...
[Task Runner]: Task runner stopped
Stopping n8n...

View File

@@ -0,0 +1,29 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
Initializing n8n process
n8n ready on ::, port 5678
n8n Task Broker ready on 127.0.0.1, port 5679
Initializing AuthRolesService...
AuthRolesService initialized successfully.
[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner "JS Task Runner" (FAATlXvqOFr7SpAMV3Kqk)
Version: 1.109.2
Locale: zh-CN
Editor is now accessible via:
http://192.168.2.90:5678
(node:77801) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
ELIFECYCLE Command failed.
Received SIGTERM. Shutting down...
[Task Runner]: Received SIGTERM signal, shutting down...
[Task Runner]: Task runner stopped
Stopping n8n...

View File

@@ -0,0 +1,29 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
Initializing n8n process
n8n ready on ::, port 5678
n8n Task Broker ready on 127.0.0.1, port 5679
Initializing AuthRolesService...
AuthRolesService initialized successfully.
[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner "JS Task Runner" (RSKxAE8DU9N7qA7DJVPY5)
Version: 1.109.2
Locale: zh-CN
Editor is now accessible via:
http://192.168.2.90:5678
(node:23582) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Received SIGTERM. Shutting down...
ELIFECYCLE Command failed.
[Task Runner]: Received SIGTERM signal, shutting down...
[Task Runner]: Task runner stopped
Stopping n8n...

View File

@@ -0,0 +1,29 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
Initializing n8n process
n8n ready on ::, port 5678
n8n Task Broker ready on 127.0.0.1, port 5679
Initializing AuthRolesService...
AuthRolesService initialized successfully.
[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner "JS Task Runner" (r84e-hWgfM8-CszbqCXQz)
Version: 1.109.2
Locale: zh-CN
Editor is now accessible via:
http://192.168.2.90:5678
(node:91211) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Received SIGTERM. Shutting down...
ELIFECYCLE Command failed.
[Task Runner]: Received SIGTERM signal, shutting down...
[Task Runner]: Task runner stopped
Stopping n8n...

View File

@@ -0,0 +1,13 @@
TypeError: Missing parameter name at 6: https://git.new/pathToRegexpError
at name (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:153:13)
at lexer (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:168:21)
at lexer.next (<anonymous>)
at Iter.peek (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:188:32)
at Iter.tryConsume (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:195:24)
at Iter.text (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:213:26)
at consume (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:285:23)
at parse (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:320:18)
at /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:503:40
at Array.map (<anonymous>)
Exiting due to an error.
Missing parameter name at 6: https://git.new/pathToRegexpError

View File

@@ -0,0 +1,27 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
Initializing n8n process
n8n ready on ::, port 5678
n8n Task Broker ready on 127.0.0.1, port 5679
Initializing AuthRolesService...
AuthRolesService initialized successfully.
[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner "JS Task Runner" (yDuRRwdAj5IA99mGUsiZB)
Version: 1.109.2
Locale: zh-CN
Editor is now accessible via:
http://192.168.2.90:5678
Received SIGTERM. Shutting down...
ELIFECYCLE Command failed.
[Task Runner]: Received SIGTERM signal, shutting down...
[Task Runner]: Task runner stopped
Stopping n8n...

View File

@@ -0,0 +1,13 @@
TypeError: Missing parameter name at 6: https://git.new/pathToRegexpError
at name (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:153:13)
at lexer (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:168:21)
at lexer.next (<anonymous>)
at Iter.peek (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:188:32)
at Iter.tryConsume (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:195:24)
at Iter.text (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:213:26)
at consume (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:285:23)
at parse (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:320:18)
at /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:503:40
at Array.map (<anonymous>)
Exiting due to an error.
Missing parameter name at 6: https://git.new/pathToRegexpError

View File

@@ -0,0 +1,14 @@
Last session crashed
TypeError: Missing parameter name at 6: https://git.new/pathToRegexpError
at name (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:153:13)
at lexer (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:168:21)
at lexer.next (<anonymous>)
at Iter.peek (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:188:32)
at Iter.tryConsume (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:195:24)
at Iter.text (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:213:26)
at consume (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:285:23)
at parse (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:320:18)
at /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/node_modules/.pnpm/path-to-regexp@8.2.0/node_modules/path-to-regexp/src/index.ts:503:40
at Array.map (<anonymous>)
Exiting due to an error.
Missing parameter name at 6: https://git.new/pathToRegexpError

View File

@@ -0,0 +1,26 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
Initializing n8n process
n8n ready on ::, port 5678
n8n Task Broker ready on 127.0.0.1, port 5679
Initializing AuthRolesService...
AuthRolesService initialized successfully.
[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner "JS Task Runner" (b6PND0Z4f9GgE0juaQeP1)
Version: 1.109.2
Locale: zh-CN
Editor is now accessible via:
http://192.168.2.99:5678
Received SIGINT. Shutting down...
[Task Runner]: Received SIGINT signal, shutting down...
[Task Runner]: Task runner stopped
Stopping n8n...

View File

@@ -0,0 +1,28 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
Initializing n8n process
n8n ready on ::, port 5678
n8n Task Broker ready on 127.0.0.1, port 5679
Initializing AuthRolesService...
AuthRolesService initialized successfully.
[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner "JS Task Runner" (1hOQAq-h909KUxBXkmhn7)
Version: 1.109.2
Locale: zh-CN
Editor is now accessible via:
http://192.168.2.99:5678
(node:58147) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Received SIGINT. Shutting down...
[Task Runner]: Received SIGINT signal, shutting down...
[Task Runner]: Task runner stopped
Stopping n8n...

View File

@@ -0,0 +1,30 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
Initializing n8n process
n8n ready on ::, port 5678
n8n Task Broker ready on 127.0.0.1, port 5679
Initializing AuthRolesService...
AuthRolesService initialized successfully.
[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner "JS Task Runner" (wa1VyRbNhURLEvq_8nhWo)
Version: 1.109.2
Locale: zh-CN
Editor is now accessible via:
http://192.168.2.99:5678
(node:65389) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Owner was set up successfully
User survey updated successfully
Received SIGINT. Shutting down...
[Task Runner]: Received SIGINT signal, shutting down...
[Task Runner]: Task runner stopped
Stopping n8n...

View File

@@ -0,0 +1,29 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
Initializing n8n process
n8n ready on ::, port 5678
n8n Task Broker ready on 127.0.0.1, port 5679
Initializing AuthRolesService...
AuthRolesService initialized successfully.
[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner "JS Task Runner" (ytJpIM_Gno8mBYVVY08SV)
Version: 1.109.2
Locale: zh-CN
Editor is now accessible via:
http://192.168.2.99:5678
(node:37966) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Cannot set properties of undefined (setting 'runIndex')
Received SIGINT. Shutting down...
[Task Runner]: Received SIGINT signal, shutting down...
[Task Runner]: Task runner stopped
Stopping n8n...

View File

@@ -0,0 +1,216 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
Initializing n8n process
n8n ready on ::, port 5678
Migrations in progress, please do NOT stop the process.
Starting migration InitialMigration1588102412422
Finished migration InitialMigration1588102412422
Starting migration WebhookModel1592445003908
Finished migration WebhookModel1592445003908
Starting migration CreateIndexStoppedAt1594825041918
Finished migration CreateIndexStoppedAt1594825041918
Starting migration MakeStoppedAtNullable1607431743769
Finished migration MakeStoppedAtNullable1607431743769
Starting migration AddWebhookId1611071044839
Finished migration AddWebhookId1611071044839
Starting migration CreateTagEntity1617213344594
Finished migration CreateTagEntity1617213344594
Starting migration UniqueWorkflowNames1620821879465
Finished migration UniqueWorkflowNames1620821879465
Starting migration AddWaitColumn1621707690587
Finished migration AddWaitColumn1621707690587
Starting migration UpdateWorkflowCredentials1630330987096
Finished migration UpdateWorkflowCredentials1630330987096
Starting migration AddExecutionEntityIndexes1644421939510
Finished migration AddExecutionEntityIndexes1644421939510
Starting migration CreateUserManagement1646992772331
Finished migration CreateUserManagement1646992772331
Starting migration LowerCaseUserEmail1648740597343
Finished migration LowerCaseUserEmail1648740597343
Starting migration CommunityNodes1652254514001
Finished migration CommunityNodes1652254514001
Starting migration AddUserSettings1652367743993
Finished migration AddUserSettings1652367743993
Starting migration AddAPIKeyColumn1652905585850
Finished migration AddAPIKeyColumn1652905585850
Starting migration IntroducePinData1654089251344
Finished migration IntroducePinData1654089251344
Starting migration AddNodeIds1658930531669
Finished migration AddNodeIds1658930531669
Starting migration AddJsonKeyPinData1659888469333
Finished migration AddJsonKeyPinData1659888469333
Starting migration CreateCredentialsUserRole1660062385367
Finished migration CreateCredentialsUserRole1660062385367
Starting migration CreateWorkflowsEditorRole1663755770892
Finished migration CreateWorkflowsEditorRole1663755770892
Starting migration WorkflowStatistics1664196174000
Finished migration WorkflowStatistics1664196174000
Starting migration CreateCredentialUsageTable1665484192211
Finished migration CreateCredentialUsageTable1665484192211
Starting migration RemoveCredentialUsageTable1665754637024
Finished migration RemoveCredentialUsageTable1665754637024
Starting migration AddWorkflowVersionIdColumn1669739707124
Finished migration AddWorkflowVersionIdColumn1669739707124
Starting migration AddTriggerCountColumn1669823906993
Finished migration AddTriggerCountColumn1669823906993
Starting migration MessageEventBusDestinations1671535397530
Finished migration MessageEventBusDestinations1671535397530
Starting migration RemoveWorkflowDataLoadedFlag1671726148419
Finished migration RemoveWorkflowDataLoadedFlag1671726148419
Starting migration DeleteExecutionsWithWorkflows1673268682475
Finished migration DeleteExecutionsWithWorkflows1673268682475
Starting migration AddStatusToExecutions1674138566000
Finished migration AddStatusToExecutions1674138566000
Starting migration CreateLdapEntities1674509946020
Finished migration CreateLdapEntities1674509946020
Starting migration PurgeInvalidWorkflowConnections1675940580449
Finished migration PurgeInvalidWorkflowConnections1675940580449
Starting migration MigrateExecutionStatus1676996103000
Finished migration MigrateExecutionStatus1676996103000
Starting migration UpdateRunningExecutionStatus1677237073720
Finished migration UpdateRunningExecutionStatus1677237073720
Starting migration CreateVariables1677501636752
Finished migration CreateVariables1677501636752
Starting migration CreateExecutionMetadataTable1679416281777
Finished migration CreateExecutionMetadataTable1679416281777
Starting migration AddUserActivatedProperty1681134145996
Finished migration AddUserActivatedProperty1681134145996
Starting migration RemoveSkipOwnerSetup1681134145997
Finished migration RemoveSkipOwnerSetup1681134145997
Starting migration MigrateIntegerKeysToString1690000000002
Finished migration MigrateIntegerKeysToString1690000000002
Starting migration SeparateExecutionData1690000000010
Finished migration SeparateExecutionData1690000000010
Starting migration FixMissingIndicesFromStringIdMigration1690000000020
Finished migration FixMissingIndicesFromStringIdMigration1690000000020
Starting migration RemoveResetPasswordColumns1690000000030
Finished migration RemoveResetPasswordColumns1690000000030
Starting migration AddMfaColumns1690000000030
Finished migration AddMfaColumns1690000000030
Starting migration CreateWorkflowNameIndex1691088862123
Finished migration CreateWorkflowNameIndex1691088862123
Starting migration CreateWorkflowHistoryTable1692967111175
Finished migration CreateWorkflowHistoryTable1692967111175
Starting migration ExecutionSoftDelete1693491613982
Finished migration ExecutionSoftDelete1693491613982
Starting migration DisallowOrphanExecutions1693554410387
Finished migration DisallowOrphanExecutions1693554410387
Starting migration AddWorkflowMetadata1695128658538
Finished migration AddWorkflowMetadata1695128658538
Starting migration ModifyWorkflowHistoryNodesAndConnections1695829275184
Finished migration ModifyWorkflowHistoryNodesAndConnections1695829275184
Starting migration AddGlobalAdminRole1700571993961
Finished migration AddGlobalAdminRole1700571993961
Starting migration DropRoleMapping1705429061930
Finished migration DropRoleMapping1705429061930
Starting migration RemoveFailedExecutionStatus1711018413374
Finished migration RemoveFailedExecutionStatus1711018413374
Starting migration MoveSshKeysToDatabase1711390882123
[MoveSshKeysToDatabase1711390882123] No SSH keys in filesystem, skipping
Finished migration MoveSshKeysToDatabase1711390882123
Starting migration RemoveNodesAccess1712044305787
Finished migration RemoveNodesAccess1712044305787
Starting migration CreateProject1714133768519
Finished migration CreateProject1714133768519
Starting migration MakeExecutionStatusNonNullable1714133768521
Finished migration MakeExecutionStatusNonNullable1714133768521
Starting migration AddActivatedAtUserSetting1717498465931
Finished migration AddActivatedAtUserSetting1717498465931
Starting migration AddConstraintToExecutionMetadata1720101653148
Finished migration AddConstraintToExecutionMetadata1720101653148
Starting migration CreateInvalidAuthTokenTable1723627610222
Finished migration CreateInvalidAuthTokenTable1723627610222
Starting migration RefactorExecutionIndices1723796243146
Finished migration RefactorExecutionIndices1723796243146
Starting migration CreateAnnotationTables1724753530828
Finished migration CreateAnnotationTables1724753530828
Starting migration AddApiKeysTable1724951148974
Finished migration AddApiKeysTable1724951148974
Starting migration CreateProcessedDataTable1726606152711
Finished migration CreateProcessedDataTable1726606152711
Starting migration SeparateExecutionCreationFromStart1727427440136
Finished migration SeparateExecutionCreationFromStart1727427440136
Starting migration AddMissingPrimaryKeyOnAnnotationTagMapping1728659839644
Finished migration AddMissingPrimaryKeyOnAnnotationTagMapping1728659839644
Starting migration UpdateProcessedDataValueColumnToText1729607673464
Finished migration UpdateProcessedDataValueColumnToText1729607673464
Starting migration AddProjectIcons1729607673469
Finished migration AddProjectIcons1729607673469
Starting migration CreateTestDefinitionTable1730386903556
Finished migration CreateTestDefinitionTable1730386903556
Starting migration AddDescriptionToTestDefinition1731404028106
Finished migration AddDescriptionToTestDefinition1731404028106
Starting migration MigrateTestDefinitionKeyToString1731582748663
Finished migration MigrateTestDefinitionKeyToString1731582748663
Starting migration CreateTestMetricTable1732271325258
Finished migration CreateTestMetricTable1732271325258
Starting migration CreateTestRun1732549866705
Finished migration CreateTestRun1732549866705
Starting migration AddMockedNodesColumnToTestDefinition1733133775640
Finished migration AddMockedNodesColumnToTestDefinition1733133775640
Starting migration AddManagedColumnToCredentialsTable1734479635324
Finished migration AddManagedColumnToCredentialsTable1734479635324
Starting migration AddStatsColumnsToTestRun1736172058779
Finished migration AddStatsColumnsToTestRun1736172058779
Starting migration CreateTestCaseExecutionTable1736947513045
Finished migration CreateTestCaseExecutionTable1736947513045
Starting migration AddErrorColumnsToTestRuns1737715421462
Finished migration AddErrorColumnsToTestRuns1737715421462
Starting migration CreateFolderTable1738709609940
Finished migration CreateFolderTable1738709609940
Starting migration CreateAnalyticsTables1739549398681
Finished migration CreateAnalyticsTables1739549398681
Starting migration UpdateParentFolderIdColumn1740445074052
Finished migration UpdateParentFolderIdColumn1740445074052
Starting migration RenameAnalyticsToInsights1741167584277
Finished migration RenameAnalyticsToInsights1741167584277
Starting migration AddScopesColumnToApiKeys1742918400000
Finished migration AddScopesColumnToApiKeys1742918400000
Starting migration ClearEvaluation1745322634000
Finished migration ClearEvaluation1745322634000
Starting migration AddWorkflowStatisticsRootCount1745587087521
Finished migration AddWorkflowStatisticsRootCount1745587087521
Starting migration AddWorkflowArchivedColumn1745934666076
Finished migration AddWorkflowArchivedColumn1745934666076
Starting migration DropRoleTable1745934666077
Finished migration DropRoleTable1745934666077
Starting migration AddProjectDescriptionColumn1747824239000
Finished migration AddProjectDescriptionColumn1747824239000
Starting migration AddLastActiveAtColumnToUser1750252139166
Finished migration AddLastActiveAtColumnToUser1750252139166
Starting migration AddScopeTables1750252139166
Finished migration AddScopeTables1750252139166
Starting migration AddRolesTables1750252139167
Finished migration AddRolesTables1750252139167
Starting migration LinkRoleToUserTable1750252139168
Finished migration LinkRoleToUserTable1750252139168
Starting migration AddInputsOutputsToTestCaseExecution1752669793000
Finished migration AddInputsOutputsToTestCaseExecution1752669793000
Starting migration CreateDataStoreTables1754475614601
Finished migration CreateDataStoreTables1754475614601
n8n Task Broker ready on 127.0.0.1, port 5679
Initializing AuthRolesService...
Updating 120 scopes...
Scopes updated successfully.
Updating 3 global roles...
global roles updated successfully.
Updating 4 project roles...
project roles updated successfully.
Updating 2 credential roles...
credential roles updated successfully.
Updating 2 workflow roles...
workflow roles updated successfully.
AuthRolesService initialized successfully.
[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner "JS Task Runner" (y9ljtbjF0HQIvaLhWCb84)
Version: 1.109.2
Locale: zh-CN
Editor is now accessible via:
http://192.168.2.90:5678

View File

@@ -0,0 +1,22 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/packages/core/src/instance-settings/instance-settings.ts:227
.update(encryptionKey.slice(Math.round(encryptionKey.length / 2)))
^
TypeError: Cannot read properties of undefined (reading 'slice')
at InstanceSettings.generateInstanceId (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/packages/core/src/instance-settings/instance-settings.ts:227:26)
at new InstanceSettings (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/packages/core/src/instance-settings/instance-settings.ts:68:26)
at ContainerClass.get (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/packages/@n8n/di/src/di.ts:104:16)
at CommunityPackagesModule.loadDir (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/packages/cli/src/modules/community-packages/community-packages.module.ts:37:30)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at ModuleRegistry.loadModules (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/packages/@n8n/backend-common/src/modules/module-registry.ts:92:20)
at CommandRegistry.execute (/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/packages/cli/src/command-registry.ts:43:3)
at /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/packages/cli/bin/n8n:63:2
ELIFECYCLE Command failed with exit code 1.

View File

@@ -0,0 +1,79 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
15:28:10.512 warn Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false. { "file": "instance-settings.js", "function": "ensureSettingsFilePermissions" }
15:28:10.513 debug User settings loaded from: /Users/xiaoqi/.n8n/config { "file": "instance-settings.js", "function": "loadOrCreate" }
15:28:11.560 debug Received CLI command { "execPath": "/Users/xiaoqi/.nvm/versions/node/v22.18.0/bin/node", "scriptPath": "/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/packages/cli/bin/n8n", "args": [], "flags": { }, "file": "cli-parser.js", "function": "parse" }
15:28:11.562 info Initializing n8n process { "file": "start.js", "function": "init" }
15:28:11.633 debug Lazy-loading nodes and credentials from n8n-nodes-base { "nodes": 482, "credentials": 385, "file": "lazy-package-directory-loader.js", "function": "loadAll" }
15:28:11.639 debug Lazy-loading nodes and credentials from @n8n/n8n-nodes-langchain { "nodes": 101, "credentials": 23, "file": "lazy-package-directory-loader.js", "function": "loadAll" }
15:28:11.753 info n8n ready on ::, port 5678 { "file": "abstract-server.js", "function": "init" }
15:28:11.777 info n8n Task Broker ready on 127.0.0.1, port 5679 { "file": "task-broker-server.js", "function": "setupHttpServer" }
15:28:11.829 info Initializing AuthRolesService... { "file": "auth.roles.service.js", "function": "init" }
15:28:11.836 debug No scopes to update. { "file": "auth.roles.service.js", "function": "syncScopes" }
15:28:11.843 debug No global roles to update. { "file": "auth.roles.service.js", "function": "syncRoles" }
15:28:11.844 debug No project roles to update. { "file": "auth.roles.service.js", "function": "syncRoles" }
15:28:11.844 debug No credential roles to update. { "file": "auth.roles.service.js", "function": "syncRoles" }
15:28:11.844 debug No workflow roles to update. { "file": "auth.roles.service.js", "function": "syncRoles" }
15:28:11.844 info AuthRolesService initialized successfully. { "file": "auth.roles.service.js", "function": "init" }
15:28:11.846 debug [license SDK] initializing for deviceFingerprint ae3350da9cb7f10f65d772716d59f5bd404f92cc574010d8d1736b89b12fb451 { "scopes": ["license"], "file": "LicenseManager.js", "function": "log" }
15:28:11.848 info [license SDK] Skipping renewal on init: license cert is not initialized { "scopes": ["license"], "file": "LicenseManager.js", "function": "log" }
15:28:11.848 debug License initialized { "scopes": ["license"], "file": "license.js", "function": "init" }
15:28:11.848 debug Querying database for waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "getWaitingExecutions" }
15:28:11.849 debug Started tracking waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "startTracking" }
15:28:11.849 debug Wait tracker init complete { "file": "start.js", "function": "init" }
15:28:11.851 debug Binary data service init complete { "file": "start.js", "function": "init" }
15:28:11.851 debug Data deduplication service init complete { "file": "start.js", "function": "init" }
15:28:11.852 debug External hooks init complete { "file": "start.js", "function": "init" }
15:28:11.852 debug Workflow history init complete { "file": "start.js", "function": "init" }
15:28:11.855 debug Test runner cleanup complete { "file": "start.js", "function": "init" }
15:28:12.245 debug Started flushing timer { "scopes": ["insights"], "file": "insights-collection.service.js", "function": "startFlushingTimer" }
15:28:12.245 debug Started compaction timer { "scopes": ["insights"], "file": "insights-compaction.service.js", "function": "startCompactionTimer" }
15:28:12.245 debug Started pruning timer { "scopes": ["insights"], "file": "insights-pruning.service.js", "function": "startPruningTimer" }
15:28:12.245 debug Initialized module "insights" { "file": "module-registry.js", "function": "initModules" }
15:28:12.245 debug Skipped init for unlicensed module "external-secrets" { "file": "module-registry.js", "function": "initModules" }
15:28:12.248 debug Initialized module "community-packages" { "file": "module-registry.js", "function": "initModules" }
15:28:12.663 info Registered runner "JS Task Runner" (3G5_GxmpWdyA8rSpLiYT0)  { "file": "task-broker-ws-server.js", "function": "onMessage" }
15:28:12.951 debug OIDC login is disabled. { "file": "oidc.service.ee.js", "function": "init" }
15:28:12.971 debug Initializing event bus... { "file": "message-event-bus.js", "function": "initialize" }
15:28:12.974 debug Initializing event writer { "file": "message-event-bus.js", "function": "initialize" }
15:28:12.975 debug Checking for unsent event messages { "file": "message-event-bus.js", "function": "initialize" }
15:28:12.976 debug Start logging into /Users/xiaoqi/.n8n/n8nEventLog.log  { "file": "message-event-bus.js", "function": "initialize" }
15:28:12.977 debug MessageEventBus initialized { "file": "message-event-bus.js", "function": "initialize" }
15:28:12.977 info Version: 1.109.2 { "file": "abstract-server.js", "function": "start" }
15:28:12.978 info Locale: zh-CN { "file": "abstract-server.js", "function": "start" }
15:28:12.978 debug Server ID: main-B8vKucS2vNrm2HFN { "file": "server.js", "function": "start" }
15:28:12.978 debug Soft-deletion every 60 minutes { "scopes": ["pruning"], "file": "executions-pruning.service.js", "function": "scheduleRollingSoftDeletions" }
15:28:12.978 debug Hard-deletion in next 15 minutes { "scopes": ["pruning"], "file": "executions-pruning.service.js", "function": "scheduleNextHardDeletion" }
15:28:12.978 debug Started pruning timers { "scopes": ["pruning"], "file": "executions-pruning.service.js", "function": "startPruning" }
2025-09-11T07:28:12.980Z [Rudder] debug: in flush
2025-09-11T07:28:12.981Z [Rudder] debug: no existing flush timer, creating new one
15:28:13.006 info 
Editor is now accessible via:
http://192.168.2.90:5678 { "file": "base-command.js", "function": "log" }
15:28:16.129 debug Skipped browserId check on /rest/push { "file": "auth.service.js", "function": "resolveJwt" }
15:28:16.130 debug Add editor-UI session { "pushRef": "9pqpx0tz24", "file": "abstract.push.js", "function": "add" }
2025-09-11T07:28:22.983Z [Rudder] debug: in flush
2025-09-11T07:28:22.984Z [Rudder] debug: cancelling existing flushTimer...
15:29:11.848 debug Querying database for waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "getWaitingExecutions" }
(node:2116) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
15:30:11.847 debug Querying database for waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "getWaitingExecutions" }
2025-09-11T07:31:10.881Z [Rudder] debug: no existing flush timer, creating new one
15:31:11.599 debug Skipped browserId check on /rest/push { "file": "auth.service.js", "function": "resolveJwt" }
15:31:11.599 debug Add editor-UI session { "pushRef": "f8wwyvn8h5", "file": "abstract.push.js", "function": "add" }
15:31:11.847 debug Querying database for waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "getWaitingExecutions" }
2025-09-11T07:31:20.882Z [Rudder] debug: in flush
2025-09-11T07:31:20.882Z [Rudder] debug: cancelling existing flushTimer...
15:32:11.849 debug Querying database for waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "getWaitingExecutions" }
15:33:11.851 debug Querying database for waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "getWaitingExecutions" }
15:34:11.851 debug Querying database for waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "getWaitingExecutions" }
15:35:11.852 debug Querying database for waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "getWaitingExecutions" }
15:36:11.852 debug Querying database for waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "getWaitingExecutions" }
sh: line 1: 2116 Killed: 9 ./n8n
ELIFECYCLE Command failed with exit code 137.

View File

@@ -0,0 +1,64 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
17:18:33.626 warn Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false. { "file": "instance-settings.js", "function": "ensureSettingsFilePermissions" }
17:18:33.628 debug User settings loaded from: /Users/xiaoqi/.n8n/config { "file": "instance-settings.js", "function": "loadOrCreate" }
17:18:34.634 debug Received CLI command { "execPath": "/Users/xiaoqi/.nvm/versions/node/v22.18.0/bin/node", "scriptPath": "/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/packages/cli/bin/n8n", "args": [], "flags": { }, "file": "cli-parser.js", "function": "parse" }
17:18:34.636 info Initializing n8n process { "file": "start.js", "function": "init" }
17:18:34.705 debug Lazy-loading nodes and credentials from n8n-nodes-base { "nodes": 482, "credentials": 385, "file": "lazy-package-directory-loader.js", "function": "loadAll" }
17:18:34.712 debug Lazy-loading nodes and credentials from @n8n/n8n-nodes-langchain { "nodes": 101, "credentials": 23, "file": "lazy-package-directory-loader.js", "function": "loadAll" }
17:18:34.834 info n8n ready on ::, port 5678 { "file": "abstract-server.js", "function": "init" }
17:18:34.858 info n8n Task Broker ready on 127.0.0.1, port 5679 { "file": "task-broker-server.js", "function": "setupHttpServer" }
17:18:34.902 info Initializing AuthRolesService... { "file": "auth.roles.service.js", "function": "init" }
17:18:34.906 debug No scopes to update. { "file": "auth.roles.service.js", "function": "syncScopes" }
17:18:34.912 debug No global roles to update. { "file": "auth.roles.service.js", "function": "syncRoles" }
17:18:34.912 debug No project roles to update. { "file": "auth.roles.service.js", "function": "syncRoles" }
17:18:34.912 debug No credential roles to update. { "file": "auth.roles.service.js", "function": "syncRoles" }
17:18:34.912 debug No workflow roles to update. { "file": "auth.roles.service.js", "function": "syncRoles" }
17:18:34.912 info AuthRolesService initialized successfully. { "file": "auth.roles.service.js", "function": "init" }
17:18:34.913 debug [license SDK] initializing for deviceFingerprint ae3350da9cb7f10f65d772716d59f5bd404f92cc574010d8d1736b89b12fb451 { "scopes": ["license"], "file": "LicenseManager.js", "function": "log" }
17:18:34.914 info [license SDK] Skipping renewal on init: license cert is not initialized { "scopes": ["license"], "file": "LicenseManager.js", "function": "log" }
17:18:34.914 debug License initialized { "scopes": ["license"], "file": "license.js", "function": "init" }
17:18:34.914 debug Querying database for waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "getWaitingExecutions" }
17:18:34.915 debug Started tracking waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "startTracking" }
17:18:34.915 debug Wait tracker init complete { "file": "start.js", "function": "init" }
17:18:34.917 debug Binary data service init complete { "file": "start.js", "function": "init" }
17:18:34.917 debug Data deduplication service init complete { "file": "start.js", "function": "init" }
17:18:34.917 debug External hooks init complete { "file": "start.js", "function": "init" }
17:18:34.917 debug Workflow history init complete { "file": "start.js", "function": "init" }
17:18:34.919 debug Test runner cleanup complete { "file": "start.js", "function": "init" }
17:18:35.232 debug Started flushing timer { "scopes": ["insights"], "file": "insights-collection.service.js", "function": "startFlushingTimer" }
17:18:35.233 debug Started compaction timer { "scopes": ["insights"], "file": "insights-compaction.service.js", "function": "startCompactionTimer" }
17:18:35.233 debug Started pruning timer { "scopes": ["insights"], "file": "insights-pruning.service.js", "function": "startPruningTimer" }
17:18:35.233 debug Initialized module "insights" { "file": "module-registry.js", "function": "initModules" }
17:18:35.233 debug Skipped init for unlicensed module "external-secrets" { "file": "module-registry.js", "function": "initModules" }
17:18:35.236 debug Initialized module "community-packages" { "file": "module-registry.js", "function": "initModules" }
17:18:35.532 info Registered runner "JS Task Runner" (6ddx_e3bRtA0JIeFrYegv)  { "file": "task-broker-ws-server.js", "function": "onMessage" }
17:18:35.705 debug OIDC login is disabled. { "file": "oidc.service.ee.js", "function": "init" }
17:18:35.727 debug Initializing event bus... { "file": "message-event-bus.js", "function": "initialize" }
17:18:35.730 debug Initializing event writer { "file": "message-event-bus.js", "function": "initialize" }
17:18:35.731 debug Checking for unsent event messages { "file": "message-event-bus.js", "function": "initialize" }
17:18:35.746 debug Start logging into /Users/xiaoqi/.n8n/n8nEventLog.log  { "file": "message-event-bus.js", "function": "initialize" }
17:18:35.747 debug MessageEventBus initialized { "file": "message-event-bus.js", "function": "initialize" }
17:18:35.748 info Version: 1.109.2 { "file": "abstract-server.js", "function": "start" }
17:18:35.748 info Locale: zh-CN { "file": "abstract-server.js", "function": "start" }
17:18:35.748 debug Server ID: main-j8W4blAUcFAaagOo { "file": "server.js", "function": "start" }
17:18:35.748 debug Soft-deletion every 60 minutes { "scopes": ["pruning"], "file": "executions-pruning.service.js", "function": "scheduleRollingSoftDeletions" }
17:18:35.748 debug Hard-deletion in next 15 minutes { "scopes": ["pruning"], "file": "executions-pruning.service.js", "function": "scheduleNextHardDeletion" }
17:18:35.748 debug Started pruning timers { "scopes": ["pruning"], "file": "executions-pruning.service.js", "function": "startPruning" }
2025-09-11T09:18:35.750Z [Rudder] debug: in flush
2025-09-11T09:18:35.751Z [Rudder] debug: no existing flush timer, creating new one
17:18:35.776 info 
Editor is now accessible via:
http://192.168.2.90:5678 { "file": "base-command.js", "function": "log" }
17:18:40.207 debug Skipped browserId check on /rest/push { "file": "auth.service.js", "function": "resolveJwt" }
17:18:40.208 debug Add editor-UI session { "pushRef": "9pqpx0tz24", "file": "abstract.push.js", "function": "add" }
2025-09-11T09:18:45.752Z [Rudder] debug: in flush
2025-09-11T09:18:45.752Z [Rudder] debug: cancelling existing flushTimer...
(node:88836) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

View File

@@ -0,0 +1,288 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
17:20:48.648 warn Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false. { "file": "instance-settings.js", "function": "ensureSettingsFilePermissions" }
17:20:48.649 debug User settings loaded from: /Users/xiaoqi/.n8n/config { "file": "instance-settings.js", "function": "loadOrCreate" }
17:20:49.385 debug Received CLI command { "execPath": "/Users/xiaoqi/.nvm/versions/node/v22.18.0/bin/node", "scriptPath": "/Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2/packages/cli/bin/n8n", "args": [], "flags": { }, "file": "cli-parser.js", "function": "parse" }
17:20:49.387 info Initializing n8n process { "file": "start.js", "function": "init" }
17:20:49.450 debug Lazy-loading nodes and credentials from n8n-nodes-base { "nodes": 482, "credentials": 385, "file": "lazy-package-directory-loader.js", "function": "loadAll" }
17:20:49.456 debug Lazy-loading nodes and credentials from @n8n/n8n-nodes-langchain { "nodes": 101, "credentials": 23, "file": "lazy-package-directory-loader.js", "function": "loadAll" }
17:20:49.562 info n8n ready on ::, port 5678 { "file": "abstract-server.js", "function": "init" }
17:20:49.570 warn Migrations in progress, please do NOT stop the process. { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.570 info Starting migration InitialMigration1588102412422 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.571 info Finished migration InitialMigration1588102412422 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.573 info Starting migration WebhookModel1592445003908 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.574 info Finished migration WebhookModel1592445003908 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.574 info Starting migration CreateIndexStoppedAt1594825041918 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.575 info Finished migration CreateIndexStoppedAt1594825041918 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.575 info Starting migration MakeStoppedAtNullable1607431743769 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.575 info Finished migration MakeStoppedAtNullable1607431743769 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.576 info Starting migration AddWebhookId1611071044839 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.577 info Finished migration AddWebhookId1611071044839 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.578 info Starting migration CreateTagEntity1617213344594 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.580 info Finished migration CreateTagEntity1617213344594 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.581 info Starting migration UniqueWorkflowNames1620821879465 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.581 info Finished migration UniqueWorkflowNames1620821879465 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.582 info Starting migration AddWaitColumn1621707690587 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.583 info Finished migration AddWaitColumn1621707690587 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.583 info Starting migration UpdateWorkflowCredentials1630330987096 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.584 info Finished migration UpdateWorkflowCredentials1630330987096 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.585 info Starting migration AddExecutionEntityIndexes1644421939510 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.585 info Finished migration AddExecutionEntityIndexes1644421939510 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.586 info Starting migration CreateUserManagement1646992772331 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.588 info Finished migration CreateUserManagement1646992772331 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.589 info Starting migration LowerCaseUserEmail1648740597343 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.589 info Finished migration LowerCaseUserEmail1648740597343 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.589 info Starting migration CommunityNodes1652254514001 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.589 info Finished migration CommunityNodes1652254514001 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.590 info Starting migration AddUserSettings1652367743993 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.591 info Finished migration AddUserSettings1652367743993 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.591 info Starting migration AddAPIKeyColumn1652905585850 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.592 info Finished migration AddAPIKeyColumn1652905585850 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.593 info Starting migration IntroducePinData1654089251344 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.593 info Finished migration IntroducePinData1654089251344 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.594 info Starting migration AddNodeIds1658930531669 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.594 info Finished migration AddNodeIds1658930531669 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.594 info Starting migration AddJsonKeyPinData1659888469333 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.594 info Finished migration AddJsonKeyPinData1659888469333 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.595 info Starting migration CreateCredentialsUserRole1660062385367 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.595 info Finished migration CreateCredentialsUserRole1660062385367 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.595 info Starting migration CreateWorkflowsEditorRole1663755770892 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.595 info Finished migration CreateWorkflowsEditorRole1663755770892 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.596 info Starting migration WorkflowStatistics1664196174000 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.596 info Finished migration WorkflowStatistics1664196174000 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.597 info Starting migration CreateCredentialUsageTable1665484192211 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.597 info Finished migration CreateCredentialUsageTable1665484192211 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.597 info Starting migration RemoveCredentialUsageTable1665754637024 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.597 info Finished migration RemoveCredentialUsageTable1665754637024 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.598 info Starting migration AddWorkflowVersionIdColumn1669739707124 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.598 info Finished migration AddWorkflowVersionIdColumn1669739707124 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.598 info Starting migration AddTriggerCountColumn1669823906993 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.599 info Finished migration AddTriggerCountColumn1669823906993 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.599 info Starting migration MessageEventBusDestinations1671535397530 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.599 info Finished migration MessageEventBusDestinations1671535397530 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.600 info Starting migration RemoveWorkflowDataLoadedFlag1671726148419 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.600 info Finished migration RemoveWorkflowDataLoadedFlag1671726148419 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.601 info Starting migration DeleteExecutionsWithWorkflows1673268682475 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.602 info Finished migration DeleteExecutionsWithWorkflows1673268682475 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.603 info Starting migration AddStatusToExecutions1674138566000 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.603 info Finished migration AddStatusToExecutions1674138566000 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.604 info Starting migration CreateLdapEntities1674509946020 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.604 info Finished migration CreateLdapEntities1674509946020 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.604 info Starting migration PurgeInvalidWorkflowConnections1675940580449 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.605 info Finished migration PurgeInvalidWorkflowConnections1675940580449 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.606 info Starting migration MigrateExecutionStatus1676996103000 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.606 info Finished migration MigrateExecutionStatus1676996103000 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.606 info Starting migration UpdateRunningExecutionStatus1677237073720 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.607 info Finished migration UpdateRunningExecutionStatus1677237073720 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.607 info Starting migration CreateVariables1677501636752 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.607 info Finished migration CreateVariables1677501636752 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.607 info Starting migration CreateExecutionMetadataTable1679416281777 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.608 info Finished migration CreateExecutionMetadataTable1679416281777 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.608 info Starting migration AddUserActivatedProperty1681134145996 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.609 info Finished migration AddUserActivatedProperty1681134145996 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.609 info Starting migration RemoveSkipOwnerSetup1681134145997 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.609 info Finished migration RemoveSkipOwnerSetup1681134145997 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.609 info Starting migration MigrateIntegerKeysToString1690000000002 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.610 debug Pruning was requested, but was not enabled { "file": "1690000000002-MigrateIntegerKeysToString.js", "function": "pruneExecutionsData" }
17:20:49.619 info Finished migration MigrateIntegerKeysToString1690000000002 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.620 info Starting migration SeparateExecutionData1690000000010 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.622 info Finished migration SeparateExecutionData1690000000010 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.622 info Starting migration FixMissingIndicesFromStringIdMigration1690000000020 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.622 info Finished migration FixMissingIndicesFromStringIdMigration1690000000020 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.623 info Starting migration RemoveResetPasswordColumns1690000000030 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.627 info Finished migration RemoveResetPasswordColumns1690000000030 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.628 info Starting migration AddMfaColumns1690000000030 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.630 info Finished migration AddMfaColumns1690000000030 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.630 info Starting migration CreateWorkflowNameIndex1691088862123 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.631 info Finished migration CreateWorkflowNameIndex1691088862123 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.631 info Starting migration CreateWorkflowHistoryTable1692967111175 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.632 info Finished migration CreateWorkflowHistoryTable1692967111175 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.632 info Starting migration ExecutionSoftDelete1693491613982 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.635 info Finished migration ExecutionSoftDelete1693491613982 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.636 info Starting migration DisallowOrphanExecutions1693554410387 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.639 info Finished migration DisallowOrphanExecutions1693554410387 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.641 info Starting migration AddWorkflowMetadata1695128658538 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.642 info Finished migration AddWorkflowMetadata1695128658538 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.643 info Starting migration ModifyWorkflowHistoryNodesAndConnections1695829275184 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.646 info Finished migration ModifyWorkflowHistoryNodesAndConnections1695829275184 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.647 info Starting migration AddGlobalAdminRole1700571993961 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.647 info Finished migration AddGlobalAdminRole1700571993961 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.647 info Starting migration DropRoleMapping1705429061930 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.665 info Finished migration DropRoleMapping1705429061930 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.665 info Starting migration RemoveFailedExecutionStatus1711018413374 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.666 info Finished migration RemoveFailedExecutionStatus1711018413374 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.666 info Starting migration MoveSshKeysToDatabase1711390882123 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.666 info [MoveSshKeysToDatabase1711390882123] No SSH keys in filesystem, skipping { "file": "1711390882123-MoveSshKeysToDatabase.js", "function": "up" }
17:20:49.666 info Finished migration MoveSshKeysToDatabase1711390882123 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.667 info Starting migration RemoveNodesAccess1712044305787 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.668 info Finished migration RemoveNodesAccess1712044305787 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.669 info Starting migration CreateProject1714133768519 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.681 info Finished migration CreateProject1714133768519 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.682 info Starting migration MakeExecutionStatusNonNullable1714133768521 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.684 info Finished migration MakeExecutionStatusNonNullable1714133768521 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.684 info Starting migration AddActivatedAtUserSetting1717498465931 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.685 info Finished migration AddActivatedAtUserSetting1717498465931 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.685 info Starting migration AddConstraintToExecutionMetadata1720101653148 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.687 info Finished migration AddConstraintToExecutionMetadata1720101653148 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.687 info Starting migration CreateInvalidAuthTokenTable1723627610222 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.687 info Finished migration CreateInvalidAuthTokenTable1723627610222 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.688 info Starting migration RefactorExecutionIndices1723796243146 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.689 info Finished migration RefactorExecutionIndices1723796243146 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.689 info Starting migration CreateAnnotationTables1724753530828 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.690 info Finished migration CreateAnnotationTables1724753530828 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.690 info Starting migration AddApiKeysTable1724951148974 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.692 info Finished migration AddApiKeysTable1724951148974 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.693 info Starting migration CreateProcessedDataTable1726606152711 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.693 info Finished migration CreateProcessedDataTable1726606152711 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.694 info Starting migration SeparateExecutionCreationFromStart1727427440136 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.697 info Finished migration SeparateExecutionCreationFromStart1727427440136 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.697 info Starting migration AddMissingPrimaryKeyOnAnnotationTagMapping1728659839644 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.698 info Finished migration AddMissingPrimaryKeyOnAnnotationTagMapping1728659839644 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.698 info Starting migration UpdateProcessedDataValueColumnToText1729607673464 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.702 info Finished migration UpdateProcessedDataValueColumnToText1729607673464 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.703 info Starting migration AddProjectIcons1729607673469 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.705 info Finished migration AddProjectIcons1729607673469 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.705 info Starting migration CreateTestDefinitionTable1730386903556 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.706 info Finished migration CreateTestDefinitionTable1730386903556 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.706 info Starting migration AddDescriptionToTestDefinition1731404028106 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.708 info Finished migration AddDescriptionToTestDefinition1731404028106 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.708 info Starting migration MigrateTestDefinitionKeyToString1731582748663 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.710 info Finished migration MigrateTestDefinitionKeyToString1731582748663 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.711 info Starting migration CreateTestMetricTable1732271325258 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.711 info Finished migration CreateTestMetricTable1732271325258 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.711 info Starting migration CreateTestRun1732549866705 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.712 info Finished migration CreateTestRun1732549866705 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.712 info Starting migration AddMockedNodesColumnToTestDefinition1733133775640 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.713 info Finished migration AddMockedNodesColumnToTestDefinition1733133775640 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.713 info Starting migration AddManagedColumnToCredentialsTable1734479635324 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.714 info Finished migration AddManagedColumnToCredentialsTable1734479635324 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.714 info Starting migration AddStatsColumnsToTestRun1736172058779 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.716 info Finished migration AddStatsColumnsToTestRun1736172058779 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.717 info Starting migration CreateTestCaseExecutionTable1736947513045 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.717 info Finished migration CreateTestCaseExecutionTable1736947513045 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.718 info Starting migration AddErrorColumnsToTestRuns1737715421462 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.719 info Finished migration AddErrorColumnsToTestRuns1737715421462 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.721 info Starting migration CreateFolderTable1738709609940 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.722 info Finished migration CreateFolderTable1738709609940 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.723 info Starting migration CreateAnalyticsTables1739549398681 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.723 info Finished migration CreateAnalyticsTables1739549398681 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.724 info Starting migration UpdateParentFolderIdColumn1740445074052 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.726 info Finished migration UpdateParentFolderIdColumn1740445074052 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.726 info Starting migration RenameAnalyticsToInsights1741167584277 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.729 info Finished migration RenameAnalyticsToInsights1741167584277 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.730 info Starting migration AddScopesColumnToApiKeys1742918400000 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.733 info Finished migration AddScopesColumnToApiKeys1742918400000 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.733 info Starting migration ClearEvaluation1745322634000 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.736 info Finished migration ClearEvaluation1745322634000 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.736 info Starting migration AddWorkflowStatisticsRootCount1745587087521 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.737 info Finished migration AddWorkflowStatisticsRootCount1745587087521 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.737 info Starting migration AddWorkflowArchivedColumn1745934666076 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.738 info Finished migration AddWorkflowArchivedColumn1745934666076 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.739 info Starting migration DropRoleTable1745934666077 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.739 info Finished migration DropRoleTable1745934666077 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.740 info Starting migration AddProjectDescriptionColumn1747824239000 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.740 info Finished migration AddProjectDescriptionColumn1747824239000 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.741 info Starting migration AddLastActiveAtColumnToUser1750252139166 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.741 info Finished migration AddLastActiveAtColumnToUser1750252139166 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.742 info Starting migration AddScopeTables1750252139166 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.742 info Finished migration AddScopeTables1750252139166 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.743 info Starting migration AddRolesTables1750252139167 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.744 info Finished migration AddRolesTables1750252139167 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.744 info Starting migration LinkRoleToUserTable1750252139168 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.749 info Finished migration LinkRoleToUserTable1750252139168 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.750 info Starting migration AddInputsOutputsToTestCaseExecution1752669793000 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.752 info Finished migration AddInputsOutputsToTestCaseExecution1752669793000 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.752 info Starting migration CreateDataStoreTables1754475614601 { "file": "migration-helpers.js", "function": "logMigrationStart" }
17:20:49.753 info Finished migration CreateDataStoreTables1754475614601 { "file": "migration-helpers.js", "function": "logMigrationEnd" }
17:20:49.769 info n8n Task Broker ready on 127.0.0.1, port 5679 { "file": "task-broker-server.js", "function": "setupHttpServer" }
17:20:49.800 info Initializing AuthRolesService... { "file": "auth.roles.service.js", "function": "init" }
17:20:49.801 info Updating 120 scopes... { "file": "auth.roles.service.js", "function": "syncScopes" }
17:20:49.810 info Scopes updated successfully. { "file": "auth.roles.service.js", "function": "syncScopes" }
17:20:49.812 info Updating 3 global roles... { "file": "auth.roles.service.js", "function": "syncRoles" }
17:20:49.820 info global roles updated successfully. { "file": "auth.roles.service.js", "function": "syncRoles" }
17:20:49.823 info Updating 4 project roles... { "file": "auth.roles.service.js", "function": "syncRoles" }
17:20:49.828 info project roles updated successfully. { "file": "auth.roles.service.js", "function": "syncRoles" }
17:20:49.828 info Updating 2 credential roles... { "file": "auth.roles.service.js", "function": "syncRoles" }
17:20:49.830 info credential roles updated successfully. { "file": "auth.roles.service.js", "function": "syncRoles" }
17:20:49.830 info Updating 2 workflow roles... { "file": "auth.roles.service.js", "function": "syncRoles" }
17:20:49.832 info workflow roles updated successfully. { "file": "auth.roles.service.js", "function": "syncRoles" }
17:20:49.832 info AuthRolesService initialized successfully. { "file": "auth.roles.service.js", "function": "init" }
17:20:49.832 debug [license SDK] initializing for deviceFingerprint ae3350da9cb7f10f65d772716d59f5bd404f92cc574010d8d1736b89b12fb451 { "scopes": ["license"], "file": "LicenseManager.js", "function": "log" }
17:20:49.833 info [license SDK] Skipping renewal on init: license cert is not initialized { "scopes": ["license"], "file": "LicenseManager.js", "function": "log" }
17:20:49.833 debug License initialized { "scopes": ["license"], "file": "license.js", "function": "init" }
17:20:49.833 debug Querying database for waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "getWaitingExecutions" }
17:20:49.834 debug Started tracking waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "startTracking" }
17:20:49.834 debug Wait tracker init complete { "file": "start.js", "function": "init" }
17:20:49.835 debug Binary data service init complete { "file": "start.js", "function": "init" }
17:20:49.835 debug Data deduplication service init complete { "file": "start.js", "function": "init" }
17:20:49.835 debug External hooks init complete { "file": "start.js", "function": "init" }
17:20:49.835 debug Workflow history init complete { "file": "start.js", "function": "init" }
17:20:49.836 debug Test runner cleanup complete { "file": "start.js", "function": "init" }
17:20:50.134 debug Started flushing timer { "scopes": ["insights"], "file": "insights-collection.service.js", "function": "startFlushingTimer" }
17:20:50.134 debug Started compaction timer { "scopes": ["insights"], "file": "insights-compaction.service.js", "function": "startCompactionTimer" }
17:20:50.135 debug Started pruning timer { "scopes": ["insights"], "file": "insights-pruning.service.js", "function": "startPruningTimer" }
17:20:50.135 debug Initialized module "insights" { "file": "module-registry.js", "function": "initModules" }
17:20:50.135 debug Skipped init for unlicensed module "external-secrets" { "file": "module-registry.js", "function": "initModules" }
17:20:50.137 debug Initialized module "community-packages" { "file": "module-registry.js", "function": "initModules" }
17:20:50.533 info Registered runner "JS Task Runner" (_jpYCeYiputJbJjKgp9_L)  { "file": "task-broker-ws-server.js", "function": "onMessage" }
17:20:50.534 debug OIDC login is disabled. { "file": "oidc.service.ee.js", "function": "init" }
17:20:50.597 debug Initializing event bus... { "file": "message-event-bus.js", "function": "initialize" }
17:20:50.598 debug Initializing event writer { "file": "message-event-bus.js", "function": "initialize" }
17:20:50.600 debug Checking for unsent event messages { "file": "message-event-bus.js", "function": "initialize" }
17:20:50.601 debug Start logging into /Users/xiaoqi/.n8n/n8nEventLog.log  { "file": "message-event-bus.js", "function": "initialize" }
17:20:50.601 debug MessageEventBus initialized { "file": "message-event-bus.js", "function": "initialize" }
17:20:50.602 info Version: 1.109.2 { "file": "abstract-server.js", "function": "start" }
17:20:50.602 info Locale: zh-CN { "file": "abstract-server.js", "function": "start" }
17:20:50.602 debug Server ID: main-CzyJ1d0MkDl62WYs { "file": "server.js", "function": "start" }
17:20:50.603 debug Soft-deletion every 60 minutes { "scopes": ["pruning"], "file": "executions-pruning.service.js", "function": "scheduleRollingSoftDeletions" }
17:20:50.603 debug Hard-deletion in next 15 minutes { "scopes": ["pruning"], "file": "executions-pruning.service.js", "function": "scheduleNextHardDeletion" }
17:20:50.603 debug Started pruning timers { "scopes": ["pruning"], "file": "executions-pruning.service.js", "function": "startPruning" }
2025-09-11T09:20:50.604Z [Rudder] debug: in flush
2025-09-11T09:20:50.605Z [Rudder] debug: no existing flush timer, creating new one
17:20:50.629 info 
Editor is now accessible via:
http://192.168.2.90:5678 { "file": "base-command.js", "function": "log" }
2025-09-11T09:21:00.606Z [Rudder] debug: in flush
2025-09-11T09:21:00.607Z [Rudder] debug: cancelling existing flushTimer...
(node:96237) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
17:21:49.834 debug Querying database for waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "getWaitingExecutions" }
17:22:49.836 debug Querying database for waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "getWaitingExecutions" }
17:23:29.331 info Received SIGTERM. Shutting down... { "file": "base-command.js" }
17:23:29.332 debug Shutting down component "License.shutdown()" { "file": "shutdown.service.js", "function": "shutdownComponent" }
17:23:29.332 debug Shutting down component "Push.onShutdown()" { "file": "shutdown.service.js", "function": "shutdownComponent" }
17:23:29.332 debug Shutting down component "ActiveWorkflowManager.removeAllTriggerAndPollerBasedWorkflows()" { "file": "shutdown.service.js", "function": "shutdownComponent" }
17:23:29.332 debug Shutting down component "AbstractServer.onShutdown()" { "file": "shutdown.service.js", "function": "shutdownComponent" }
17:23:29.332 debug Shutting down component "ChatService.shutdown()" { "file": "shutdown.service.js", "function": "shutdownComponent" }
17:23:29.332 debug Shutting down component "ChatServer.shutdown()" { "file": "shutdown.service.js", "function": "shutdownComponent" }
17:23:29.332 debug Shutting down component "ExecutionsPruningService.shutdown()" { "file": "shutdown.service.js", "function": "shutdownComponent" }
17:23:29.332 debug Stopped pruning timers { "scopes": ["pruning"], "file": "executions-pruning.service.js", "function": "stopPruning" }
17:23:29.332 debug Shutting down component "InsightsModule.shutdown()" { "file": "shutdown.service.js", "function": "shutdownComponent" }
17:23:29.332 debug Shutting down component "ExternalSecretsModule.shutdown()" { "file": "shutdown.service.js", "function": "shutdownComponent" }
17:23:29.332 debug Shutting down component "TaskRunnerModule.stop()" { "file": "shutdown.service.js", "function": "shutdownComponent" }
17:23:29.333 debug Shutting down component "TaskRunnerProcess.stop()" { "file": "shutdown.service.js", "function": "shutdownComponent" }
ELIFECYCLE Command failed.
17:23:29.367 debug License shut down { "scopes": ["license"], "file": "license.js", "function": "shutdown" }
17:23:29.367 debug Stopped flushing timer { "scopes": ["insights"], "file": "insights-collection.service.js", "function": "stopFlushingTimer" }
17:23:29.367 debug Flushing remaining insights before shutdown { "scopes": ["insights"], "file": "insights-collection.service.js", "function": "shutdown" }
17:23:29.367 debug External secrets manager shut down { "scopes": ["external-secrets"], "file": "external-secrets-manager.ee.js", "function": "shutdown" }
17:23:29.368 debug Stopped compaction timer { "scopes": ["insights"], "file": "insights-compaction.service.js", "function": "stopCompactionTimer" }
17:23:29.368 debug Stopped pruning timer { "scopes": ["insights"], "file": "insights-pruning.service.js", "function": "stopPruningTimer" }
17:23:29.368 debug Deregistered runner "_jpYCeYiputJbJjKgp9_L" { "file": "task-broker-ws-server.js", "function": "removeConnection" }
17:23:29.368 info [Task Runner]: Received SIGTERM signal, shutting down... { "scopes": ["task-runner"], "file": "forward-to-logger.js" }
17:23:29.369 info [Task Runner]: Task runner stopped { "scopes": ["task-runner"], "file": "forward-to-logger.js" }
17:23:29.372 debug Shutting down component "Telemetry.stopTracking()" { "file": "shutdown.service.js", "function": "shutdownComponent" }
2025-09-11T09:23:29.373Z [Rudder] debug: in flush
2025-09-11T09:23:29.373Z [Rudder] debug: queue is empty, but a flush already exists
17:23:29.374 info 
Stopping n8n... { "file": "start.js", "function": "stopProcess" }
17:23:29.374 debug Stopped tracking waiting executions { "scopes": ["waiting-executions"], "file": "wait-tracker.js", "function": "stopTracking" }
2025-09-11T09:23:29.374Z [Rudder] debug: no existing flush timer, creating new one
17:23:29.374 debug Shutting down event writer... { "file": "message-event-bus.js", "function": "close" }
17:23:29.376 debug EventBus shut down. { "file": "message-event-bus.js", "function": "close" }

View File

@@ -0,0 +1,23 @@
> n8n-monorepo@1.109.2 start /Users/xiaoqi/Documents/Dev/Project/2025-09-08_n8nDEMO演示/n8n-n8n-1.109.2
> run-script-os
> n8n-monorepo@1.109.2 start:default
> cd packages/cli/bin && ./n8n
Permissions 0644 for n8n settings file /Users/xiaoqi/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
Initializing n8n process
n8n ready on ::, port 5678
n8n Task Broker ready on 127.0.0.1, port 5679
Initializing AuthRolesService...
AuthRolesService initialized successfully.
[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner "JS Task Runner" (0K_a3KeF4PxVhGtRq-MW_)
Version: 1.109.2
Locale: zh-CN
Editor is now accessible via:
http://192.168.2.90:5678
(node:89507) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

248
n8n-n8n-1.109.2/start-demo.sh Executable file
View File

@@ -0,0 +1,248 @@
#!/bin/bash
# n8n 演示模式启动脚本 - 完全跳过设置
# 仅用于演示和测试
set -e
# 颜色定义
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
# 打印函数
print_info() { echo -e "${BLUE}[信息]${NC} $1"; }
print_success() { echo -e "${GREEN}[成功]${NC} $1"; }
print_warning() { echo -e "${YELLOW}[警告]${NC} $1"; }
print_error() { echo -e "${RED}[错误]${NC} $1"; }
# 获取局域网IP
get_lan_ip() {
if [[ "$OSTYPE" == "darwin"* ]]; then
ifconfig | grep "inet " | grep -v 127.0.0.1 | head -1 | awk '{print $2}'
else
hostname -I | awk '{print $1}'
fi
}
# 停止现有进程
stop_existing() {
print_info "正在停止现有的 n8n 进程..."
pkill -f "n8n" 2>/dev/null || true
pkill -f "pnpm" 2>/dev/null || true
sleep 2
print_success "已清理现有进程"
}
# 创建预配置的数据库
setup_demo_database() {
print_info "设置演示数据库..."
# 备份现有数据库
if [ -f "$HOME/.n8n/database.sqlite" ]; then
cp "$HOME/.n8n/database.sqlite" "$HOME/.n8n/database.sqlite.backup.$(date +%Y%m%d%H%M%S)"
print_info "已备份现有数据库"
fi
# 创建配置文件
mkdir -p "$HOME/.n8n"
# 创建一个已初始化的配置
cat > "$HOME/.n8n/config" << 'EOF'
{
"instanceId": "demo-instance",
"version": "1.109.2",
"isNpmAvailable": false,
"skipOwnerSetup": true
}
EOF
print_success "演示配置已创建"
}
# 主函数
main() {
echo -e "${BLUE}╔════════════════════════════════════════╗${NC}"
echo -e "${BLUE}║ n8n 演示模式启动脚本 ║${NC}"
echo -e "${BLUE}╚════════════════════════════════════════╝${NC}"
echo
# 切换到n8n目录
cd "$(dirname "$0")"
# 停止现有进程
stop_existing
# 设置演示数据库
setup_demo_database
# 获取IP地址
LAN_IP=$(get_lan_ip)
if [ -z "$LAN_IP" ]; then
print_error "无法获取局域网IP地址"
exit 1
fi
print_success "检测到局域网IP: $LAN_IP"
# 设置环境变量 - 演示模式
print_info "配置演示模式环境变量..."
# 基础配置
export N8N_DEFAULT_LOCALE=zh-CN
export N8N_HOST=0.0.0.0
export N8N_PORT=5678
export N8N_LOG_LEVEL=error # 只显示错误,减少日志
# URL配置
export N8N_EDITOR_BASE_URL="http://${LAN_IP}:5678"
export WEBHOOK_URL="http://${LAN_IP}:5678"
export N8N_PROTOCOL=http
# 完全跳过认证和设置
export N8N_BASIC_AUTH_ACTIVE=false
export N8N_AUTH_EXCLUDE_ENDPOINTS="/**"
export N8N_USER_MANAGEMENT_DISABLED=true
export N8N_SKIP_OWNER_SETUP=true
export N8N_DEPLOYMENT_TYPE=demo
export N8N_PUBLIC_API_DISABLED=false
export N8N_PUBLIC_API_ENDPOINT="http://${LAN_IP}:5678/api"
# Cookie和Session配置 - 最宽松
export N8N_SECURE_COOKIE=false
export N8N_SESSION_COOKIE_SAME_SITE=none
export N8N_SESSION_COOKIE_SECURE=false
export N8N_SESSION_COOKIE_DOMAIN=""
# CORS配置 - 允许所有
export N8N_CORS_ENABLED=true
export N8N_CORS_ORIGINS="*"
export N8N_CORS_ALLOW_HEADERS="*"
export N8N_CORS_ALLOW_METHODS="*"
export N8N_CORS_ALLOW_CREDENTIALS=true
# WebSocket配置
export N8N_PUSH_BACKEND=websocket
# 性能优化
export N8N_RUNNERS_ENABLED=true
export N8N_BLOCK_ENV_ACCESS_IN_NODE=false
export DB_SQLITE_POOL_SIZE=10
export N8N_WORKFLOW_TAGS_DISABLED=false
export N8N_PERSONALIZATION_ENABLED=false
export N8N_DIAGNOSTICS_ENABLED=false
export N8N_VERSION_NOTIFICATIONS_ENABLED=false
# 禁用遥测
export N8N_DIAGNOSTICS_DISABLED=true
export N8N_TELEMETRY_DISABLED=true
print_success "演示环境变量配置完成"
# 创建演示配置文件
cat > .env.demo << EOF
# n8n 演示模式配置
N8N_DEFAULT_LOCALE=zh-CN
N8N_HOST=0.0.0.0
N8N_PORT=5678
N8N_EDITOR_BASE_URL=http://${LAN_IP}:5678
WEBHOOK_URL=http://${LAN_IP}:5678
N8N_PROTOCOL=http
# 跳过所有认证和设置
N8N_BASIC_AUTH_ACTIVE=false
N8N_AUTH_EXCLUDE_ENDPOINTS=/**
N8N_USER_MANAGEMENT_DISABLED=true
N8N_SKIP_OWNER_SETUP=true
# CORS配置
N8N_CORS_ENABLED=true
N8N_CORS_ORIGINS=*
N8N_CORS_ALLOW_CREDENTIALS=true
# 禁用遥测
N8N_DIAGNOSTICS_DISABLED=true
N8N_TELEMETRY_DISABLED=true
EOF
print_info "已生成配置文件 .env.demo"
# 检查构建状态
if [ ! -d "packages/cli/dist" ]; then
print_warning "项目需要构建,正在构建..."
pnpm build > build.log 2>&1 || {
print_error "构建失败,查看 build.log"
exit 1
}
fi
# 启动n8n
print_info "正在启动 n8n 演示模式..."
# 创建日志文件
LOG_FILE="n8n-demo-$(date +%Y%m%d-%H%M%S).log"
# 启动命令(带错误过滤)
pnpm start 2>&1 | grep -v "401" | grep -v "Unauthorized" | tee "$LOG_FILE" &
N8N_PID=$!
# 等待启动
echo -n "等待服务启动"
for i in {1..30}; do
if curl -s "http://localhost:5678" >/dev/null 2>&1; then
break
fi
echo -n "."
sleep 1
done
echo
# 检查启动状态
if curl -s "http://localhost:5678" >/dev/null 2>&1; then
print_success "n8n 演示模式启动成功!"
echo
echo -e "${GREEN}╔════════════════════════════════════════╗${NC}"
echo -e "${GREEN}║ n8n 演示模式 ║${NC}"
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} 🏠 本地访问:"
echo -e "${GREEN}${NC} ${BLUE}http://localhost:5678${NC}"
echo -e "${GREEN}${NC}"
echo -e "${GREEN}${NC} 🌐 局域网访问:"
echo -e "${GREEN}${NC} ${BLUE}http://${LAN_IP}:5678${NC}"
echo -e "${GREEN}${NC}"
echo -e "${GREEN}${NC} 📱 移动设备访问:"
echo -e "${GREEN}${NC} ${BLUE}http://${LAN_IP}:5678${NC}"
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} ✅ 无需注册或登录"
echo -e "${GREEN}${NC} ✅ 直接创建工作流"
echo -e "${GREEN}${NC} ✅ 适合演示和测试"
echo -e "${GREEN}${NC} ⚠️ 仅用于开发环境"
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} 进程PID: ${YELLOW}$N8N_PID${NC}"
echo -e "${GREEN}${NC} 日志文件: ${YELLOW}$LOG_FILE${NC}"
echo -e "${GREEN}${NC} 界面语言: 中文"
echo -e "${GREEN}╚════════════════════════════════════════╝${NC}"
echo
print_success "所有设置已完成,无需任何认证即可使用!"
echo
print_info "按 Ctrl+C 停止服务"
# 捕获退出信号
trap 'print_info "正在停止 n8n..."; kill $N8N_PID 2>/dev/null; exit 0' INT
# 保持运行
wait $N8N_PID
else
print_error "n8n 启动失败"
echo "查看日志: $LOG_FILE"
tail -20 "$LOG_FILE"
exit 1
fi
}
# 运行
main "$@"

221
n8n-n8n-1.109.2/start-final.sh Executable file
View File

@@ -0,0 +1,221 @@
#!/bin/bash
# n8n 最终无认证启动脚本
# 完全跳过所有认证和设置
set -e
# 颜色定义
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
# 打印函数
print_info() { echo -e "${BLUE}[信息]${NC} $1"; }
print_success() { echo -e "${GREEN}[成功]${NC} $1"; }
print_warning() { echo -e "${YELLOW}[警告]${NC} $1"; }
print_error() { echo -e "${RED}[错误]${NC} $1"; }
# 获取局域网IP
get_lan_ip() {
if [[ "$OSTYPE" == "darwin"* ]]; then
ifconfig | grep "inet " | grep -v 127.0.0.1 | head -1 | awk '{print $2}'
else
hostname -I | awk '{print $1}'
fi
}
# 主函数
main() {
echo -e "${BLUE}╔════════════════════════════════════════╗${NC}"
echo -e "${BLUE}║ n8n 无认证模式启动 ║${NC}"
echo -e "${BLUE}╚════════════════════════════════════════╝${NC}"
echo
# 切换到n8n目录
cd "$(dirname "$0")"
# 停止所有现有进程
print_info "停止现有 n8n 进程..."
pkill -f "n8n" 2>/dev/null || true
pkill -f "pnpm" 2>/dev/null || true
sleep 2
# 清理旧数据
print_info "清理旧配置和数据..."
rm -f ~/.n8n/config
rm -f ~/.n8n/database.sqlite*
rm -f ~/.n8n/*.json
# 创建必要的目录
mkdir -p ~/.n8n
# 创建预配置文件,跳过所有设置
print_info "创建跳过设置的配置..."
cat > ~/.n8n/.n8n-config << 'EOF'
{
"instanceId": "demo-instance",
"encryptionKey": "n8n-demo-key-2024",
"skipOwnerSetup": true,
"isNpmAvailable": false,
"database": {
"type": "sqlite",
"sqlite": {
"database": "database.sqlite"
}
}
}
EOF
# 获取IP地址
LAN_IP=$(get_lan_ip)
if [ -z "$LAN_IP" ]; then
print_error "无法获取局域网IP地址"
exit 1
fi
print_success "检测到局域网IP: $LAN_IP"
# 构建项目(如果需要)
if [ ! -d "packages/cli/dist" ]; then
print_warning "项目需要构建,正在构建..."
pnpm build > build.log 2>&1 || {
print_error "构建失败"
tail -20 build.log
exit 1
}
print_success "构建完成"
fi
# 设置所有必要的环境变量
print_info "配置环境变量..."
# 导出所有环境变量
export NODE_ENV=production
export N8N_DEFAULT_LOCALE=zh-CN
export N8N_HOST=0.0.0.0
export N8N_PORT=5678
export N8N_PROTOCOL=http
# URL配置
export N8N_EDITOR_BASE_URL="http://${LAN_IP}:5678"
export WEBHOOK_URL="http://${LAN_IP}:5678"
export N8N_WEBHOOK_URL="http://${LAN_IP}:5678"
# 完全禁用认证
export N8N_BASIC_AUTH_ACTIVE=false
export N8N_USER_MANAGEMENT_DISABLED=true
export N8N_SKIP_OWNER_SETUP=true
export N8N_AUTH_SKIP_OWNER_SETUP=true
export N8N_DEPLOYMENT_TYPE=n8n-internal
export N8N_PERSONALIZATION_ENABLED=false
# 禁用所有安全检查
export N8N_SECURE_COOKIE=false
export N8N_SESSION_COOKIE_SECURE=false
export N8N_SESSION_COOKIE_SAME_SITE=none
export N8N_SESSION_COOKIE_DOMAIN=""
# CORS配置 - 允许所有
export N8N_CORS_ENABLED=true
export N8N_CORS_ORIGINS="*"
export N8N_CORS_ALLOW_HEADERS="*"
export N8N_CORS_ALLOW_METHODS="*"
export N8N_CORS_ALLOW_CREDENTIALS=true
# 加密密钥
export N8N_ENCRYPTION_KEY="n8n-demo-key-2024"
# 公共API
export N8N_PUBLIC_API_DISABLED=false
export N8N_PUBLIC_API_ENDPOINT="http://${LAN_IP}:5678/api"
# 其他配置
export N8N_PUSH_BACKEND=websocket
export N8N_WORKFLOW_TAGS_DISABLED=false
export N8N_DIAGNOSTICS_ENABLED=false
export N8N_VERSION_NOTIFICATIONS_ENABLED=false
export N8N_TELEMETRY_DISABLED=true
export N8N_DIAGNOSTICS_DISABLED=true
export N8N_HIRING_BANNER_ENABLED=false
export N8N_LOG_LEVEL=error
export N8N_LOG_OUTPUT=console
export N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false
# 数据库配置
export DB_TYPE=sqlite
export DB_SQLITE_DATABASE=~/.n8n/database.sqlite
# 任务运行器
export N8N_RUNNERS_ENABLED=true
export N8N_BLOCK_ENV_ACCESS_IN_NODE=false
print_success "环境变量配置完成"
# 创建启动日志
LOG_FILE="n8n-$(date +%Y%m%d-%H%M%S).log"
# 启动n8n
print_info "正在启动 n8n..."
# 直接运行CLI
node packages/cli/bin/n8n 2>&1 | tee "$LOG_FILE" &
N8N_PID=$!
# 等待启动
echo -n "等待服务启动"
for i in {1..30}; do
if curl -s "http://localhost:5678" >/dev/null 2>&1; then
break
fi
echo -n "."
sleep 1
done
echo
# 检查启动状态
if curl -s "http://localhost:5678" >/dev/null 2>&1; then
print_success "n8n 启动成功!"
echo
echo -e "${GREEN}╔════════════════════════════════════════╗${NC}"
echo -e "${GREEN}║ n8n 无认证模式运行中 ║${NC}"
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} 🏠 本地访问:"
echo -e "${GREEN}${NC} ${BLUE}http://localhost:5678${NC}"
echo -e "${GREEN}${NC}"
echo -e "${GREEN}${NC} 🌐 局域网访问:"
echo -e "${GREEN}${NC} ${BLUE}http://${LAN_IP}:5678${NC}"
echo -e "${GREEN}${NC}"
echo -e "${GREEN}${NC} 📱 移动设备访问:"
echo -e "${GREEN}${NC} ${BLUE}http://${LAN_IP}:5678${NC}"
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} ✅ 无需任何认证"
echo -e "${GREEN}${NC} ✅ 直接创建工作流"
echo -e "${GREEN}${NC} ✅ 支持局域网访问"
echo -e "${GREEN}${NC} ⚠️ 仅用于开发/演示"
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} 进程PID: ${YELLOW}$N8N_PID${NC}"
echo -e "${GREEN}${NC} 日志文件: ${YELLOW}$LOG_FILE${NC}"
echo -e "${GREEN}╚════════════════════════════════════════╝${NC}"
echo
print_info "按 Ctrl+C 停止服务"
# 捕获退出信号
trap 'print_info "正在停止 n8n..."; kill $N8N_PID 2>/dev/null; exit 0' INT
# 保持运行
wait $N8N_PID
else
print_error "n8n 启动失败"
echo "查看日志: $LOG_FILE"
tail -20 "$LOG_FILE"
exit 1
fi
}
# 运行
main "$@"

224
n8n-n8n-1.109.2/start-lan.sh Executable file
View File

@@ -0,0 +1,224 @@
#!/bin/bash
# n8n 局域网完整访问解决方案
# 解决认证、Cookie和CORS问题
set -e
# 颜色定义
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
# 打印函数
print_info() { echo -e "${BLUE}[信息]${NC} $1"; }
print_success() { echo -e "${GREEN}[成功]${NC} $1"; }
print_warning() { echo -e "${YELLOW}[警告]${NC} $1"; }
print_error() { echo -e "${RED}[错误]${NC} $1"; }
# 获取局域网IP
get_lan_ip() {
if [[ "$OSTYPE" == "darwin"* ]]; then
ifconfig | grep "inet " | grep -v 127.0.0.1 | head -1 | awk '{print $2}'
else
hostname -I | awk '{print $1}'
fi
}
# 停止现有进程
stop_existing() {
print_info "正在停止现有的 n8n 进程..."
pkill -f "pnpm.*dev" 2>/dev/null || true
pkill -f "pnpm.*start" 2>/dev/null || true
pkill -f "n8n" 2>/dev/null || true
sleep 2
print_success "已清理现有进程"
}
# 主函数
main() {
print_info "n8n 局域网完整访问解决方案"
# 切换到n8n目录
cd "$(dirname "$0")"
# 停止现有进程
stop_existing
# 获取IP地址
LAN_IP=$(get_lan_ip)
if [ -z "$LAN_IP" ]; then
print_error "无法获取局域网IP地址"
exit 1
fi
print_success "检测到局域网IP: $LAN_IP"
# 设置环境变量 - 修复认证问题的关键配置
print_info "配置认证和会话环境变量..."
# 基础配置
export N8N_DEFAULT_LOCALE=zh-CN
export N8N_HOST=0.0.0.0
export N8N_PORT=5678
export N8N_LOG_LEVEL=debug
# URL配置 - 统一使用IP地址
export N8N_EDITOR_BASE_URL="http://${LAN_IP}:5678"
export WEBHOOK_URL="http://${LAN_IP}:5678"
export N8N_PROTOCOL=http
# 关键:禁用认证(开发环境)
export N8N_BASIC_AUTH_ACTIVE=false
export N8N_AUTH_EXCLUDE_ENDPOINTS="/**"
# Cookie和Session配置 - 关键配置
export N8N_SECURE_COOKIE=false
export N8N_SESSION_COOKIE_SAME_SITE=none
export N8N_SESSION_COOKIE_SECURE=false
export N8N_SESSION_COOKIE_DOMAIN=""
export N8N_SESSION_COOKIE_NAME=n8n.sessionId
# CORS配置 - 允许所有源(开发环境)
export N8N_CORS_ENABLED=true
export N8N_CORS_ORIGINS="*"
export N8N_CORS_ALLOW_HEADERS="*"
export N8N_CORS_ALLOW_METHODS="*"
# WebSocket配置
export N8N_PUSH_BACKEND=websocket
# 其他优化
export N8N_RUNNERS_ENABLED=true
export N8N_BLOCK_ENV_ACCESS_IN_NODE=false
export DB_SQLITE_POOL_SIZE=5
export N8N_SKIP_AUTH_ROUTES=true
export N8N_PUBLIC_API_DISABLED=false
# 创建数据目录(如果不存在)
if [ ! -d "$HOME/.n8n" ]; then
mkdir -p "$HOME/.n8n"
print_info "创建了 n8n 数据目录"
fi
print_success "环境变量配置完成"
# 创建.env文件作为备份
cat > .env.lan << EOF
# n8n 局域网完整访问配置
N8N_DEFAULT_LOCALE=zh-CN
N8N_HOST=0.0.0.0
N8N_PORT=5678
N8N_EDITOR_BASE_URL=http://${LAN_IP}:5678
WEBHOOK_URL=http://${LAN_IP}:5678
N8N_PROTOCOL=http
# 认证配置(开发环境 - 禁用认证)
N8N_BASIC_AUTH_ACTIVE=false
N8N_AUTH_EXCLUDE_ENDPOINTS=/**
N8N_SKIP_AUTH_ROUTES=true
# Cookie配置
N8N_SECURE_COOKIE=false
N8N_SESSION_COOKIE_SAME_SITE=none
N8N_SESSION_COOKIE_SECURE=false
N8N_SESSION_COOKIE_DOMAIN=
# CORS配置开发环境 - 允许所有)
N8N_CORS_ENABLED=true
N8N_CORS_ORIGINS=*
N8N_CORS_ALLOW_HEADERS=*
N8N_CORS_ALLOW_METHODS=*
# WebSocket
N8N_PUSH_BACKEND=websocket
# 其他
N8N_RUNNERS_ENABLED=true
N8N_BLOCK_ENV_ACCESS_IN_NODE=false
DB_SQLITE_POOL_SIZE=5
N8N_PUBLIC_API_DISABLED=false
EOF
print_info "已生成配置文件 .env.lan"
# 检查构建状态
if [ ! -d "packages/cli/dist" ]; then
print_warning "项目需要构建,正在构建..."
pnpm build > build.log 2>&1 || {
print_error "构建失败,查看 build.log"
exit 1
}
fi
# 启动n8n
print_info "正在启动 n8n开发模式无需认证..."
# 创建日志文件
LOG_FILE="n8n-lan-$(date +%Y%m%d-%H%M%S).log"
# 启动命令
pnpm start > "$LOG_FILE" 2>&1 &
N8N_PID=$!
# 等待启动
echo -n "等待服务启动"
for i in {1..30}; do
if curl -s "http://localhost:5678" >/dev/null 2>&1; then
break
fi
echo -n "."
sleep 1
done
echo
# 检查启动状态
if curl -s "http://localhost:5678" >/dev/null 2>&1; then
print_success "n8n 启动成功!"
echo
echo -e "${GREEN}╔════════════════════════════════════════╗${NC}"
echo -e "${GREEN}║ n8n 局域网访问信息(开发模式) ║${NC}"
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} 🏠 本地访问:"
echo -e "${GREEN}${NC} ${BLUE}http://localhost:5678${NC}"
echo -e "${GREEN}${NC}"
echo -e "${GREEN}${NC} 🌐 局域网访问:"
echo -e "${GREEN}${NC} ${BLUE}http://${LAN_IP}:5678${NC}"
echo -e "${GREEN}${NC}"
echo -e "${GREEN}${NC} 📱 移动设备访问:"
echo -e "${GREEN}${NC} ${BLUE}http://${LAN_IP}:5678${NC}"
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} 模式: ${YELLOW}开发模式(无需认证)${NC}"
echo -e "${GREEN}${NC} 进程PID: ${YELLOW}$N8N_PID${NC}"
echo -e "${GREEN}${NC} 日志文件: ${YELLOW}$LOG_FILE${NC}"
echo -e "${GREEN}${NC} 界面语言: 中文"
echo -e "${GREEN}╚════════════════════════════════════════╝${NC}"
echo
print_warning "注意事项:"
echo " ✓ 开发模式已禁用认证,任何人都可以访问"
echo " ✓ 局域网访问直接使用: http://${LAN_IP}:5678"
echo " ✓ 无需登录即可使用"
echo " ✓ 确保防火墙允许 5678 端口"
echo " ✓ 生产环境请勿使用此配置!"
echo
print_info "按 Ctrl+C 停止服务"
# 捕获退出信号
trap 'print_info "正在停止 n8n..."; kill $N8N_PID 2>/dev/null; exit 0' INT
# 显示日志
tail -f "$LOG_FILE"
else
print_error "n8n 启动失败"
echo "查看日志: $LOG_FILE"
tail -20 "$LOG_FILE"
exit 1
fi
}
# 运行
main "$@"

185
n8n-n8n-1.109.2/start-network.sh Executable file
View File

@@ -0,0 +1,185 @@
#!/bin/bash
# n8n 局域网访问优化版启动脚本
# 解决Cookie、CORS和认证问题
set -e
# 颜色定义
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
# 打印函数
print_info() { echo -e "${BLUE}[信息]${NC} $1"; }
print_success() { echo -e "${GREEN}[成功]${NC} $1"; }
print_warning() { echo -e "${YELLOW}[警告]${NC} $1"; }
print_error() { echo -e "${RED}[错误]${NC} $1"; }
# 获取局域网IP
get_lan_ip() {
if [[ "$OSTYPE" == "darwin"* ]]; then
ifconfig | grep "inet " | grep -v 127.0.0.1 | head -1 | awk '{print $2}'
else
hostname -I | awk '{print $1}'
fi
}
# 停止现有进程
stop_existing() {
print_info "正在停止现有的 n8n 进程..."
pkill -f "pnpm.*dev" 2>/dev/null || true
pkill -f "pnpm.*start" 2>/dev/null || true
pkill -f "n8n" 2>/dev/null || true
sleep 2
print_success "已清理现有进程"
}
# 主函数
main() {
print_info "n8n 局域网访问配置启动器"
# 切换到n8n目录
cd "$(dirname "$0")"
# 停止现有进程
stop_existing
# 获取IP地址
LAN_IP=$(get_lan_ip)
if [ -z "$LAN_IP" ]; then
print_error "无法获取局域网IP地址"
exit 1
fi
print_success "检测到局域网IP: $LAN_IP"
# 设置环境变量
print_info "配置环境变量..."
# 基础配置
export N8N_DEFAULT_LOCALE=zh-CN
export N8N_HOST=0.0.0.0
export N8N_PORT=5678
# URL配置 - 关键必须设置正确的URL
export N8N_EDITOR_BASE_URL="http://${LAN_IP}:5678"
export WEBHOOK_URL="http://${LAN_IP}:5678"
export N8N_PROTOCOL=http
# Cookie和Session配置
export N8N_SECURE_COOKIE=false
export N8N_SESSION_COOKIE_SAME_SITE=lax
export N8N_SESSION_COOKIE_SECURE=false
# CORS配置
export N8N_CORS_ENABLED=true
export N8N_CORS_ORIGINS="http://localhost:5678,http://${LAN_IP}:5678,http://127.0.0.1:5678"
# 认证配置
export N8N_AUTH_EXCLUDE_ENDPOINTS="rest/health,/healthz,/metrics"
export N8N_PUSH_BACKEND=websocket
# 其他优化
export N8N_RUNNERS_ENABLED=true
export N8N_BLOCK_ENV_ACCESS_IN_NODE=false
export DB_SQLITE_POOL_SIZE=5
print_success "环境变量配置完成"
# 创建.env文件作为备份
cat > .env.network << EOF
# n8n 局域网访问配置
N8N_DEFAULT_LOCALE=zh-CN
N8N_HOST=0.0.0.0
N8N_PORT=5678
N8N_EDITOR_BASE_URL=http://${LAN_IP}:5678
WEBHOOK_URL=http://${LAN_IP}:5678
N8N_PROTOCOL=http
N8N_SECURE_COOKIE=false
N8N_SESSION_COOKIE_SAME_SITE=lax
N8N_SESSION_COOKIE_SECURE=false
N8N_CORS_ENABLED=true
N8N_CORS_ORIGINS=http://localhost:5678,http://${LAN_IP}:5678,http://127.0.0.1:5678
EOF
print_info "已生成配置文件 .env.network"
# 检查构建状态
if [ ! -d "packages/cli/dist" ]; then
print_warning "项目需要构建,正在构建..."
pnpm build > build.log 2>&1 || {
print_error "构建失败,查看 build.log"
exit 1
}
fi
# 启动n8n
print_info "正在启动 n8n..."
# 创建日志文件
LOG_FILE="n8n-network-$(date +%Y%m%d-%H%M%S).log"
# 启动命令
pnpm start > "$LOG_FILE" 2>&1 &
N8N_PID=$!
# 等待启动
echo -n "等待服务启动"
for i in {1..30}; do
if curl -s "http://localhost:5678/rest/health" >/dev/null 2>&1; then
break
fi
echo -n "."
sleep 1
done
echo
# 检查启动状态
if curl -s "http://localhost:5678/rest/health" >/dev/null 2>&1; then
print_success "n8n 启动成功!"
echo
echo -e "${GREEN}╔════════════════════════════════════════╗${NC}"
echo -e "${GREEN}║ n8n 局域网访问信息 ║${NC}"
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} 🏠 本地访问:"
echo -e "${GREEN}${NC} ${BLUE}http://localhost:5678${NC}"
echo -e "${GREEN}${NC}"
echo -e "${GREEN}${NC} 🌐 局域网访问:"
echo -e "${GREEN}${NC} ${BLUE}http://${LAN_IP}:5678${NC}"
echo -e "${GREEN}${NC}"
echo -e "${GREEN}${NC} 📱 移动设备访问:"
echo -e "${GREEN}${NC} ${BLUE}http://${LAN_IP}:5678${NC}"
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} 进程PID: ${YELLOW}$N8N_PID${NC}"
echo -e "${GREEN}${NC} 日志文件: ${YELLOW}$LOG_FILE${NC}"
echo -e "${GREEN}${NC} 界面语言: 中文"
echo -e "${GREEN}╚════════════════════════════════════════╝${NC}"
echo
print_warning "重要提示:"
echo " ✓ 局域网访问请统一使用: http://${LAN_IP}:5678"
echo " ✓ 不要混用 localhost 和 IP 地址"
echo " ✓ 首次访问需要创建管理员账户"
echo " ✓ 确保防火墙允许 5678 端口"
echo
print_info "按 Ctrl+C 停止服务"
# 捕获退出信号
trap 'print_info "正在停止 n8n..."; kill $N8N_PID 2>/dev/null; exit 0' INT
# 显示日志
tail -f "$LOG_FILE"
else
print_error "n8n 启动失败"
echo "查看日志: $LOG_FILE"
tail -20 "$LOG_FILE"
exit 1
fi
}
# 运行
main "$@"

217
n8n-n8n-1.109.2/start-noauth.sh Executable file
View File

@@ -0,0 +1,217 @@
#!/bin/bash
# n8n 完全无认证启动脚本(开发用)
# 警告:仅用于开发环境!
set -e
# 颜色定义
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
# 打印函数
print_info() { echo -e "${BLUE}[信息]${NC} $1"; }
print_success() { echo -e "${GREEN}[成功]${NC} $1"; }
print_warning() { echo -e "${YELLOW}[警告]${NC} $1"; }
print_error() { echo -e "${RED}[错误]${NC} $1"; }
# 获取局域网IP
get_lan_ip() {
if [[ "$OSTYPE" == "darwin"* ]]; then
ifconfig | grep "inet " | grep -v 127.0.0.1 | head -1 | awk '{print $2}'
else
hostname -I | awk '{print $1}'
fi
}
# 停止现有进程
stop_existing() {
print_info "正在停止现有的 n8n 进程..."
pkill -f "n8n" 2>/dev/null || true
sleep 2
print_success "已清理现有进程"
}
# 备份并清空用户数据(可选)
handle_auth() {
if [ -f "$HOME/.n8n/database.sqlite" ]; then
print_warning "检测到已存在用户数据库"
echo "选择操作:"
echo "1) 保留现有用户(需要登录)"
echo "2) 备份并重置(无需登录)"
echo "3) 直接使用测试账号"
read -p "请选择 (1/2/3): " choice
case $choice in
2)
print_info "备份现有数据库..."
cp "$HOME/.n8n/database.sqlite" "$HOME/.n8n/database.sqlite.backup.$(date +%Y%m%d%H%M%S)"
rm -f "$HOME/.n8n/database.sqlite"*
print_success "数据库已备份并重置"
;;
3)
print_info "将使用测试账号信息:"
echo -e "${GREEN}邮箱: admin@test.com${NC}"
echo -e "${GREEN}密码: n8n123456${NC}"
;;
*)
print_info "保留现有用户数据"
;;
esac
fi
}
# 主函数
main() {
print_info "n8n 开发环境快速启动(可选无认证)"
# 切换到n8n目录
cd "$(dirname "$0")"
# 停止现有进程
stop_existing
# 处理认证
handle_auth
# 获取IP地址
LAN_IP=$(get_lan_ip)
if [ -z "$LAN_IP" ]; then
print_error "无法获取局域网IP地址"
exit 1
fi
print_success "检测到局域网IP: $LAN_IP"
# 设置环境变量
print_info "配置环境变量..."
# 基础配置
export N8N_DEFAULT_LOCALE=zh-CN
export N8N_HOST=0.0.0.0
export N8N_PORT=5678
export N8N_LOG_LEVEL=info
# URL配置
export N8N_EDITOR_BASE_URL="http://${LAN_IP}:5678"
export WEBHOOK_URL="http://${LAN_IP}:5678"
export N8N_PROTOCOL=http
# 如果没有用户数据库,完全禁用认证
if [ ! -f "$HOME/.n8n/database.sqlite" ]; then
export N8N_BASIC_AUTH_ACTIVE=false
export N8N_AUTH_EXCLUDE_ENDPOINTS="/**"
export N8N_USER_MANAGEMENT_DISABLED=true
print_warning "无用户模式:完全禁用认证"
else
# 有用户数据库保持标准认证但优化CORS
export N8N_USER_MANAGEMENT_DISABLED=false
print_info "标准模式:需要使用账号登录"
fi
# Cookie和Session配置
export N8N_SECURE_COOKIE=false
export N8N_SESSION_COOKIE_SAME_SITE=none
export N8N_SESSION_COOKIE_SECURE=false
# CORS配置
export N8N_CORS_ENABLED=true
export N8N_CORS_ORIGINS="*"
# 其他优化
export N8N_PUSH_BACKEND=websocket
export N8N_RUNNERS_ENABLED=true
export N8N_BLOCK_ENV_ACCESS_IN_NODE=false
export DB_SQLITE_POOL_SIZE=5
print_success "环境变量配置完成"
# 检查构建状态
if [ ! -d "packages/cli/dist" ]; then
print_warning "项目需要构建,正在构建..."
pnpm build > build.log 2>&1 || {
print_error "构建失败,查看 build.log"
exit 1
}
fi
# 启动n8n
print_info "正在启动 n8n..."
# 创建日志文件
LOG_FILE="n8n-dev-$(date +%Y%m%d-%H%M%S).log"
# 启动命令
pnpm start > "$LOG_FILE" 2>&1 &
N8N_PID=$!
# 等待启动
echo -n "等待服务启动"
for i in {1..30}; do
if curl -s "http://localhost:5678" >/dev/null 2>&1; then
break
fi
echo -n "."
sleep 1
done
echo
# 检查启动状态
if curl -s "http://localhost:5678" >/dev/null 2>&1; then
print_success "n8n 启动成功!"
echo
echo -e "${GREEN}╔════════════════════════════════════════╗${NC}"
echo -e "${GREEN}║ n8n 开发环境信息 ║${NC}"
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} 🏠 本地访问:"
echo -e "${GREEN}${NC} ${BLUE}http://localhost:5678${NC}"
echo -e "${GREEN}${NC}"
echo -e "${GREEN}${NC} 🌐 局域网访问:"
echo -e "${GREEN}${NC} ${BLUE}http://${LAN_IP}:5678${NC}"
echo -e "${GREEN}${NC}"
if [ ! -f "$HOME/.n8n/database.sqlite" ]; then
echo -e "${GREEN}${NC} 模式: ${YELLOW}无认证模式${NC}"
echo -e "${GREEN}${NC} 说明: 直接访问,无需登录"
else
echo -e "${GREEN}${NC} 模式: ${YELLOW}标准认证模式${NC}"
echo -e "${GREEN}${NC} 说明: 使用已有账号登录"
echo -e "${GREEN}${NC}"
echo -e "${GREEN}${NC} 测试账号(如果创建过):"
echo -e "${GREEN}${NC} 邮箱: admin@test.com"
echo -e "${GREEN}${NC} 密码: n8n123456"
fi
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} 进程PID: ${YELLOW}$N8N_PID${NC}"
echo -e "${GREEN}${NC} 日志文件: ${YELLOW}$LOG_FILE${NC}"
echo -e "${GREEN}${NC} 界面语言: 中文"
echo -e "${GREEN}╚════════════════════════════════════════╝${NC}"
echo
print_warning "提示:"
echo " ✓ 确保防火墙允许 5678 端口"
echo " ✓ 如需重置用户,删除 ~/.n8n/database.sqlite"
echo " ✓ 生产环境请使用标准认证!"
echo
print_info "按 Ctrl+C 停止服务"
# 捕获退出信号
trap 'print_info "正在停止 n8n..."; kill $N8N_PID 2>/dev/null; exit 0' INT
# 显示日志
tail -f "$LOG_FILE"
else
print_error "n8n 启动失败"
echo "查看日志: $LOG_FILE"
tail -20 "$LOG_FILE"
exit 1
fi
}
# 运行
main "$@"

View File

@@ -0,0 +1,322 @@
#!/bin/bash
# n8n 优化版启动脚本 - 解决所有警告
# 作者: 小齐
# 最后更新: 2025-09-11
set -e
# 颜色定义
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
# 打印函数
print_info() { echo -e "${BLUE}[信息]${NC} $1"; }
print_success() { echo -e "${GREEN}[成功]${NC} $1"; }
print_warning() { echo -e "${YELLOW}[警告]${NC} $1"; }
print_error() { echo -e "${RED}[错误]${NC} $1"; }
# 显示启动横幅
show_banner() {
echo -e "${BLUE}"
echo "╔══════════════════════════════════════╗"
echo "║ n8n 中文版优化启动脚本 ║"
echo "║ 版本: n8n-1.109.2 (无警告版) ║"
echo "║ 维护者: xiaoqi ║"
echo "╚══════════════════════════════════════╝"
echo -e "${NC}"
}
# 修复配置文件权限
fix_permissions() {
print_info "检查配置文件权限..."
# 检查并修复 .n8n 目录权限
if [ -d "$HOME/.n8n" ]; then
if [ -f "$HOME/.n8n/config" ]; then
chmod 600 "$HOME/.n8n/config"
print_success "配置文件权限已修复"
fi
else
mkdir -p "$HOME/.n8n"
touch "$HOME/.n8n/config"
chmod 600 "$HOME/.n8n/config"
print_success "创建并设置了配置文件权限"
fi
}
# 检查依赖
check_dependencies() {
print_info "正在检查系统依赖..."
if ! command -v node &> /dev/null; then
print_error "Node.js 未安装或未在 PATH 中"
exit 1
fi
if ! command -v pnpm &> /dev/null; then
print_error "pnpm 未安装或未在 PATH 中"
print_info "请先安装 pnpm: npm install -g pnpm"
exit 1
fi
print_success "依赖检查通过"
}
# 检查端口占用
check_port() {
local port=5678
if lsof -Pi :$port -sTCP:LISTEN -t >/dev/null 2>&1; then
print_warning "端口 $port 已被占用"
print_info "正在查看占用进程..."
lsof -i :$port | head -5
read -p "是否杀死占用进程?(y/N): " kill_process
if [[ $kill_process =~ ^[Yy]$ ]]; then
print_info "正在终止占用进程..."
lsof -ti:$port | xargs kill -9 2>/dev/null || true
sleep 1
print_success "进程已终止"
else
print_error "无法启动 n8n端口被占用"
exit 1
fi
fi
}
# 停止现有的 n8n 进程
stop_existing() {
print_info "正在停止现有的 n8n 进程..."
pkill -f "pnpm.*dev" 2>/dev/null || true
pkill -f "pnpm.*start" 2>/dev/null || true
pkill -f "turbo.*dev" 2>/dev/null || true
pkill -f "n8n" 2>/dev/null || true
sleep 2
print_success "已停止现有进程"
}
# 设置环境变量
setup_environment() {
print_info "正在设置优化的环境变量..."
# 获取局域网IP地址
local lan_ip=""
if [[ "$OSTYPE" == "darwin"* ]]; then
lan_ip=$(ifconfig | grep "inet " | grep -v 127.0.0.1 | head -1 | awk '{print $2}')
else
lan_ip=$(hostname -I | awk '{print $1}')
fi
# 基础配置
export N8N_DEFAULT_LOCALE=zh-CN
export N8N_HOST=0.0.0.0
export N8N_PORT=5678
# 权限配置 - 解决权限警告
export N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
# 安全配置
export N8N_SECURE_COOKIE=false
export N8N_SESSION_COOKIE_SAME_SITE=lax
export N8N_SESSION_COOKIE_SECURE=false
# 性能优化
export DB_SQLITE_POOL_SIZE=5
export N8N_RUNNERS_ENABLED=true
export N8N_BLOCK_ENV_ACCESS_IN_NODE=false
# Node.js 优化 - 避免废弃警告
export NODE_NO_WARNINGS=1
export NODE_OPTIONS="--no-deprecation"
# 设置URL
if [ -n "$lan_ip" ]; then
export N8N_EDITOR_BASE_URL="http://${lan_ip}:5678"
export WEBHOOK_URL="http://${lan_ip}:5678"
export N8N_PROTOCOL=http
fi
# CORS配置
export N8N_CORS_ENABLED=true
if [ -n "$lan_ip" ]; then
export N8N_CORS_ORIGINS="http://localhost:5678,http://${lan_ip}:5678,http://127.0.0.1:5678"
fi
print_success "环境变量已优化设置"
echo " - 中文界面: 已启用"
echo " - 权限检查: 已启用"
echo " - 废弃警告: 已禁用"
echo " - 网络监听: 0.0.0.0:5678"
if [ -n "$lan_ip" ]; then
echo " - 局域网IP: ${lan_ip}"
fi
}
# 检查构建状态
check_build() {
if [ ! -d "packages/cli/dist" ] || [ ! -d "packages/core/dist" ]; then
print_warning "检测到项目需要构建"
read -p "是否现在构建项目?(y/N): " build_project
if [[ $build_project =~ ^[Yy]$ ]]; then
print_info "正在构建项目..."
pnpm build > build.log 2>&1 &
BUILD_PID=$!
while kill -0 $BUILD_PID 2>/dev/null; do
echo -n "."
sleep 2
done
echo
if wait $BUILD_PID; then
print_success "项目构建完成"
else
print_error "构建失败,请查看 build.log"
tail -20 build.log
exit 1
fi
fi
fi
}
# 启动 n8n
start_n8n() {
print_info "正在启动优化版 n8n 中文版..."
# 创建日志文件
local log_file="n8n-$(date +%Y%m%d-%H%M%S).log"
# 启动 n8n带优化参数
echo -e "${GREEN}正在启动 n8n 服务(无警告模式)...${NC}"
NODE_NO_WARNINGS=1 NODE_OPTIONS="--no-deprecation" pnpm start > "$log_file" 2>&1 &
N8N_PID=$!
# 等待启动
echo -n "等待 n8n 启动"
for i in {1..30}; do
if curl -s http://localhost:5678 >/dev/null 2>&1; then
break
fi
echo -n "."
sleep 1
done
echo
# 检查是否启动成功
if curl -s http://localhost:5678 >/dev/null 2>&1; then
print_success "n8n 启动成功!"
# 获取局域网IP地址
local lan_ip=""
if [[ "$OSTYPE" == "darwin"* ]]; then
lan_ip=$(ifconfig | grep "inet " | grep -v 127.0.0.1 | head -1 | awk '{print $2}')
else
lan_ip=$(hostname -I | awk '{print $1}')
fi
echo
echo -e "${GREEN}╔════════════════════════════════════════╗${NC}"
echo -e "${GREEN}║ n8n 启动信息 ║${NC}"
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} 📱 本地访问:"
echo -e "${GREEN}${NC} ${BLUE}http://localhost:5678${NC}"
echo -e "${GREEN}${NC}"
if [ -n "$lan_ip" ]; then
echo -e "${GREEN}${NC} 🌐 局域网访问:"
echo -e "${GREEN}${NC} ${BLUE}http://${lan_ip}:5678${NC}"
echo -e "${GREEN}${NC}"
echo -e "${GREEN}${NC} 📌 提示: 统一使用以下地址"
echo -e "${GREEN}${NC} ${BLUE}http://${lan_ip}:5678${NC}"
fi
echo -e "${GREEN}╠════════════════════════════════════════╣${NC}"
echo -e "${GREEN}${NC} 🌏 界面语言: ${GREEN}中文 (zh-CN)${NC}"
echo -e "${GREEN}${NC} 📋 进程 PID: ${YELLOW}$N8N_PID${NC}"
echo -e "${GREEN}${NC} 📝 日志文件: ${YELLOW}$log_file${NC}"
echo -e "${GREEN}${NC} ✅ 无警告模式: ${GREEN}已启用${NC}"
echo -e "${GREEN}╚════════════════════════════════════════╝${NC}"
echo
print_info "使用 Ctrl+C 停止服务"
if [ -n "$lan_ip" ]; then
echo
print_success "优化项:"
echo " ✓ 配置文件权限已修复"
echo " ✓ Node.js 废弃警告已禁用"
echo " ✓ 局域网访问已配置"
echo " ✓ CORS 已正确设置"
fi
# 保持脚本运行并显示日志(过滤警告)
trap 'print_info "正在停止 n8n..."; kill $N8N_PID 2>/dev/null; exit 0' INT
tail -f "$log_file" | grep -v "DeprecationWarning" | grep -v "DEP0060"
else
print_error "n8n 启动失败"
print_info "查看日志文件: $log_file"
tail -20 "$log_file"
exit 1
fi
}
# 检查并切换到正确目录
check_and_change_directory() {
local current_dir="$(pwd)"
local script_path="$(readlink -f "$0" 2>/dev/null || realpath "$0" 2>/dev/null || echo "$0")"
local script_dir="$(dirname "$script_path")"
if [[ -f "package.json" && -d "packages" ]]; then
print_info "检测到当前已在 n8n 项目目录"
return 0
fi
if [[ "$script_dir" == *"n8n-n8n-1.109.2"* ]]; then
print_info "切换到脚本所在的 n8n 项目目录: $script_dir"
cd "$script_dir" || {
print_error "无法切换到目录: $script_dir"
exit 1
}
print_success "已切换到正确的 n8n 项目目录"
return 0
fi
print_error "未找到 n8n 项目目录"
exit 1
}
# 主函数
main() {
# 显示横幅
show_banner
# 检查并切换到正确目录
check_and_change_directory
# 修复权限
fix_permissions
# 检查依赖
check_dependencies
# 检查端口
check_port
# 停止现有进程
stop_existing
# 设置环境变量
setup_environment
# 检查构建状态
check_build
# 正常启动
start_n8n
}
# 运行主函数
main "$@"

View File

@@ -0,0 +1,34 @@
@echo off
echo ================================================
echo Starting n8n with Windows Configuration
echo ================================================
REM 设置环境变量
set N8N_PORT=5678
set N8N_HOST=0.0.0.0
set N8N_PROTOCOL=http
set N8N_CORS_ENABLED=true
set N8N_CORS_ORIGINS=http://localhost:*,http://192.168.*.*:*,http://127.0.0.1:*
set N8N_USER_MANAGEMENT_DISABLED=true
set N8N_SKIP_OWNER_SETUP=true
set N8N_PUSH_BACKEND=websocket
set WEBHOOK_URL=http://localhost:5678
set N8N_DEFAULT_LOCALE=zh-CN
set N8N_LOG_LEVEL=error
set N8N_DIAGNOSTICS_ENABLED=false
set N8N_ENCRYPTION_KEY=your-encryption-key-here
echo.
echo Configuration:
echo - Port: %N8N_PORT%
echo - CORS: Enabled for all local/LAN access
echo - Authentication: Disabled
echo - Language: Chinese
echo - WebSocket: Enabled
echo.
REM 启动 n8n
echo Starting n8n...
pnpm start
pause

View File

@@ -99,16 +99,44 @@ stop_existing() {
setup_environment() {
print_info "正在设置环境变量..."
# 获取局域网IP地址
local lan_ip=""
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
lan_ip=$(ifconfig | grep "inet " | grep -v 127.0.0.1 | head -1 | awk '{print $2}')
else
# Linux
lan_ip=$(hostname -I | awk '{print $1}')
fi
export N8N_DEFAULT_LOCALE=zh-CN
export N8N_SECURE_COOKIE=false
export DB_SQLITE_POOL_SIZE=5
export N8N_RUNNERS_ENABLED=true
export N8N_BLOCK_ENV_ACCESS_IN_NODE=false
export N8N_HOST=0.0.0.0
export N8N_PORT=5678
# 设置Webhook URL和Editor URL以支持局域网访问
if [ -n "$lan_ip" ]; then
export N8N_EDITOR_BASE_URL="http://${lan_ip}:5678"
export WEBHOOK_URL="http://${lan_ip}:5678"
export N8N_PROTOCOL=http
fi
# Session和Cookie配置
export N8N_SESSION_COOKIE_SAME_SITE=none
export N8N_SESSION_COOKIE_SECURE=false
print_success "环境变量已设置"
echo " - N8N_DEFAULT_LOCALE=zh-CN"
echo " - N8N_SECURE_COOKIE=false"
echo " - DB_SQLITE_POOL_SIZE=5"
echo " - N8N_HOST=0.0.0.0 (监听所有网络接口)"
echo " - N8N_PORT=5678"
if [ -n "$lan_ip" ]; then
echo " - N8N_EDITOR_BASE_URL=http://${lan_ip}:5678"
fi
echo " - Session配置已优化以支持局域网访问"
}
# 检查构建状态
@@ -166,9 +194,25 @@ start_n8n() {
# 检查是否启动成功
if curl -s http://localhost:5678 >/dev/null 2>&1; then
print_success "n8n 启动成功!"
# 获取局域网IP地址
local lan_ip=""
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
lan_ip=$(ifconfig | grep "inet " | grep -v 127.0.0.1 | head -1 | awk '{print $2}')
else
# Linux
lan_ip=$(hostname -I | awk '{print $1}')
fi
echo
echo -e "${GREEN}========== 启动信息 ==========${NC}"
echo -e "📱 访问地址: ${BLUE}http://localhost:5678${NC}"
echo -e "📱 本地访问: ${BLUE}http://localhost:5678${NC}"
if [ -n "$lan_ip" ]; then
echo -e "🌐 局域网访问: ${BLUE}http://${lan_ip}:5678${NC}"
echo -e "📌 提示: 局域网访问请使用 ${BLUE}http://${lan_ip}:5678${NC} 完整地址"
echo -e " 避免使用 localhost 或 127.0.0.1"
fi
echo -e "🌏 界面语言: ${GREEN}中文 (zh-CN)${NC}"
echo -e "📋 进程 PID: ${YELLOW}$N8N_PID${NC}"
echo -e "📝 日志文件: ${YELLOW}$log_file${NC}"
@@ -176,6 +220,14 @@ start_n8n() {
echo
print_info "使用 Ctrl+C 停止服务"
if [ -n "$lan_ip" ]; then
echo
print_warning "局域网访问注意事项:"
echo " 1. 确保防火墙允许 5678 端口"
echo " 2. 首次访问需要创建账户"
echo " 3. 使用同一个IP地址保持登录状态"
fi
# 保持脚本运行并显示日志
trap 'print_info "正在停止 n8n..."; kill $N8N_PID 2>/dev/null; exit 0' INT
tail -f "$log_file"