节点与集成

Environment variable installation

On self-hosted n8n, you can manage the set of installed community packages from environment variables. n8n reconciles the installed packages against the list on every startup, installing missing packages, correcting versions, and uninstalling packages not in the list. Use this method to bootstrap an instance with a fixed set of packages, for example through a deployment pipeline.

Configure

Set the following environment variables on your n8n instance, then restart:

Variable Type Default Description
N8N_COMMUNITY_PACKAGES_MANAGED_BY_ENV Boolean false Set to true to manage installed community packages from environment variables. When true, n8n reconciles the installed packages against N8N_COMMUNITY_PACKAGES on every startup, installing missing packages, correcting versions, and uninstalling any currently-installed packages that aren't in the list. The Community nodes settings page becomes read-only: you can't install, update, or uninstall packages from the UI while this is enabled.
N8N_COMMUNITY_PACKAGES JSON string - JSON array of community packages to install. Each entry is an object with a name (required) and optional version and checksum fields. You can also embed the version in the name as <package-name>@<version>. See environment variable installation for the full per-field reference.

For example:

bash
export N8N_COMMUNITY_PACKAGES_MANAGED_BY_ENV=true
export N8N_COMMUNITY_PACKAGES='[{"name":"n8n-nodes-foo","version":"1.2.3"}]'

While N8N_COMMUNITY_PACKAGES_MANAGED_BY_ENV is true, the Community nodes settings page is read-only: you can't install, update, or uninstall packages from the UI.

Per-package fields

Field Type Required Description
name string Yes npm package name. You can include the version inline as <package-name>@<version>. If you do, don't also set the version field to a different value, n8n rejects conflicting versions.
version string No Version specifier. If omitted, n8n looks the package up in the vetted-packages registry and uses that version; if the package isn't vetted, n8n installs whatever npm resolves and won't reconcile the version across restarts.
checksum string No SHA-512 checksum (sha512-...) for the resolved tarball. Requires version to be set. n8n resolves the checksum automatically from the vetted registry when possible.

Example with all three fields:

json
[
  { "name": "n8n-nodes-foo", "version": "1.2.3" },
  { "name": "n8n-nodes-bar@0.5.0" },
  { "name": "n8n-nodes-baz", "version": "2.0.0", "checksum": "sha512-..." }
]

For the supported ways to set environment variables, see Configuration methods.

Manage packages

To add, remove, upgrade, or downgrade a package, edit N8N_COMMUNITY_PACKAGES and restart n8n. n8n reconciles to the new list on the next startup.

官方原文和授权

本页来自 N8N 英文官方网站固定快照,并转换成 xueai 静态页面。内容以 N8N 持续更新的官方页面为准。

来源、授权与修改

本站保留许可证、固定提交号、社区作者和修改说明,不代表 n8n 对本站背书。

查看许可证查看来源和修改说明