节点环境变量#
基于文件的配置
您可以在单个变量后添加 _FILE
后缀,以便在单独的文件中提供其配置。有关更多详细信息,请参阅将敏感数据保存在单独的文件中。
本页列出了在 n8n 中管理节点的环境变量配置选项,包括指定要加载或排除的节点、在代码节点中导入内置或外部模块以及启用社区节点。
Variable | Type | Default | Description |
---|---|---|---|
N8N_COMMUNITY_PACKAGES_ENABLED |
Boolean | true |
Enables (true) or disables (false) the functionality to install and load community nodes. If set to false, neither verified nor unverified community packages will be available, regardless of their individual settings. |
N8N_COMMUNITY_PACKAGES_PREVENT_LOADING |
Boolean | false |
Prevents (true) or allows (false) loading installed community nodes on instance startup. Use this if a faulty node prevents the instance from starting. |
N8N_COMMUNITY_PACKAGES_REGISTRY |
String | https://registry.npmjs.org |
NPM registry URL to pull community packages from (license required). |
N8N_CUSTOM_EXTENSIONS |
String | - | Specify the path to directories containing your custom nodes. |
N8N_PYTHON_ENABLED |
Boolean | true |
Whether to enable Python execution on the Code node. |
N8N_UNVERIFIED_PACKAGES_ENABLED |
Boolean | true |
When N8N_COMMUNITY_PACKAGES_ENABLED is true, this variable controls whether to enable the installation and use of unverified community nodes from an NPM registry (true) or not (false). |
N8N_VERIFIED_PACKAGES_ENABLED |
Boolean | true |
When N8N_COMMUNITY_PACKAGES_ENABLED is true, this variable controls whether to show verified community nodes in the nodes panel for installation and use (true) or to hide them (false). |
NODE_FUNCTION_ALLOW_BUILTIN |
String | - | Permit users to import specific built-in modules in the Code node. Use * to allow all. n8n disables importing modules by default. |
NODE_FUNCTION_ALLOW_EXTERNAL |
String | - | Permit users to import specific external modules (from n8n/node_modules ) in the Code node. n8n disables importing modules by default. |
NODES_ERROR_TRIGGER_TYPE |
String | n8n-nodes-base.errorTrigger |
Specify which node type to use as Error Trigger. |
NODES_EXCLUDE |
Array of strings | - | Specify which nodes not to load. For example, to block nodes that can be a security risk if users aren't trustworthy: NODES_EXCLUDE: "[\"n8n-nodes-base.executeCommand\", \"n8n-nodes-base.readWriteFile\"]" |
NODES_INCLUDE |
Array of strings | - | Specify which nodes to load. |
此页面是否
微信
🚀 与作者交流
关注公众号

n8n实战笔记
📚 教程 💡 案例 🔧 技巧
📚 教程 💡 案例 🔧 技巧
添加微信

1对1 专业指导
⚡ 快答 🎯 定制 🚀 支持
⚡ 快答 🎯 定制 🚀 支持