Self-hosted n8n controls community nodes through environment variables: whether they load at all, whether verified and unverified packages are allowed, where packages come from, and which packages an instance should have. This page lists every community node variable n8n documents, with its default and when to use it. All values come from the official n8n environment variable reference. They apply to self-hosted n8n; on n8n Cloud the matching switches live in the Cloud console.
Quick reference
| Variable | Type | Default | What it does |
|---|---|---|---|
N8N_COMMUNITY_PACKAGES_ENABLED |
Boolean | true |
Turns installing and loading community nodes on or off. When false, neither verified nor unverified packages are available. |
N8N_VERIFIED_PACKAGES_ENABLED |
Boolean | true |
Shows or hides verified community nodes in the nodes panel. |
N8N_UNVERIFIED_PACKAGES_ENABLED |
Boolean | true |
Allows or blocks installing and using unverified community nodes from an npm registry. |
N8N_COMMUNITY_PACKAGES_PREVENT_LOADING |
Boolean | false |
Stops installed community nodes from loading at startup. For when a faulty node keeps n8n from starting. |
N8N_REINSTALL_MISSING_PACKAGES |
Boolean | false |
Reinstalls missing community packages automatically at startup. |
N8N_COMMUNITY_PACKAGES_REGISTRY |
String | https://registry.npmjs.org |
The npm registry to install packages from. License required. |
N8N_COMMUNITY_PACKAGES_AUTH_TOKEN |
String | none | Token for a private registry, used together with N8N_COMMUNITY_PACKAGES_REGISTRY. |
N8N_COMMUNITY_PACKAGES_MANAGED_BY_ENV |
Boolean | false |
Manages the installed packages from N8N_COMMUNITY_PACKAGES (n8n 2.21.0 and later). |
N8N_COMMUNITY_PACKAGES |
JSON string | none | The list of packages to install when managed by environment variables. |
N8N_CUSTOM_EXTENSIONS |
String | none | Path to directories that contain your own custom nodes. |
NODES_EXCLUDE |
Array of strings | ["n8n-nodes-base.executeCommand", "n8n-nodes-base.localFileTrigger"] |
Nodes n8n should not load. "[]" loads all nodes. |
NODES_INCLUDE |
Array of strings | none | Nodes n8n should load. |
Turn community nodes on or off
N8N_COMMUNITY_PACKAGES_ENABLED is the master switch. With false, n8n doesn’t install or load any community node, verified or not, whatever the other two settings say. Below it:
N8N_VERIFIED_PACKAGES_ENABLED=falsehides verified nodes from the nodes panel.N8N_UNVERIFIED_PACKAGES_ENABLED=falseblocks packages that n8n hasn’t verified.
To let users add only nodes n8n has reviewed, keep the first two on and set unverified to false:
N8N_COMMUNITY_PACKAGES_ENABLED=true
N8N_VERIFIED_PACKAGES_ENABLED=true
N8N_UNVERIFIED_PACKAGES_ENABLED=false
What verification checks is explained in Verified vs Unverified n8n Community Nodes.
Recover from a node that breaks startup
If n8n won’t start after you install or update a community node, set:
N8N_COMMUNITY_PACKAGES_PREVENT_LOADING=true
n8n then starts without loading installed community nodes, so you can uninstall or downgrade the faulty package and set the variable back. On n8n Cloud the same job is done by Disable all community nodes under Instance settings in the Cloud console.
Keep packages after Docker updates
n8n stores installed community nodes on disk and needs them at startup. If a container is recreated without its data, n8n reports missing packages. n8n recommends persisting the ~/.n8n/nodes directory (its Docker guide mounts a volume on /home/node/.n8n). The alternative is:
N8N_REINSTALL_MISSING_PACKAGES=true
n8n’s docs warn that this can make startup slower and may cause health checks to fail.
Use a private npm registry
N8N_COMMUNITY_PACKAGES_REGISTRY=https://npm.example.com
N8N_COMMUNITY_PACKAGES_AUTH_TOKEN=<token>
Changing the registry needs a license, according to n8n’s reference. Without one, private packages can still be installed manually with npm from the command line.
Manage the package list with N8N_COMMUNITY_PACKAGES
From n8n 2.21.0 an instance can take its community packages from environment variables, which suits deployment pipelines and identical instances:
N8N_COMMUNITY_PACKAGES_MANAGED_BY_ENV=true
N8N_COMMUNITY_PACKAGES='[
{ "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-..." }
]'
How it behaves, per n8n’s documentation:
- On every startup n8n installs missing packages, corrects versions and uninstalls installed packages that are not in the list. Before the first start, add every package you want to keep.
- Each entry needs a
name.versionis optional; without it n8n uses the version from its vetted-packages registry, or whatever npm resolves for a package that isn’t vetted (and then doesn’t reconcile its version across restarts). Don’t set an inlinename@versionand a differentversion; n8n rejects the conflict. checksumis an optional SHA-512 (sha512-...) of the package tarball and needsversion.- If a package isn’t in the vetted registry and
N8N_UNVERIFIED_PACKAGES_ENABLEDisfalse, n8n fails to start unless the entry has a checksum. - While this is on, the Community nodes page in Settings is read-only.
- If
N8N_COMMUNITY_PACKAGES_ENABLEDisfalse, n8n ignores the managed list and logs a warning.
To add, upgrade, downgrade or remove a package, edit the list and restart n8n.
Load your own nodes from a folder
N8N_CUSTOM_EXTENSIONS points n8n at directories that contain custom nodes, for nodes you build yourself and don’t publish to npm. See How to Build and Publish Your Own n8n Community Node.
Exclude or include specific nodes
NODES_EXCLUDE lists node types n8n should not load. By default it blocks the built-in Execute Command and Local File Trigger nodes, which can be a security risk if users aren’t trusted. Set it to "[]" to load all nodes. NODES_INCLUDE does the opposite and lists the nodes to load.
Setting the variables in Docker
Pass them with -e on docker run or in the environment section of a Docker Compose file, then restart the container:
docker run -it --rm --name n8n -p 5678:5678 \
-e N8N_UNVERIFIED_PACKAGES_ENABLED=false \
-v n8n_data:/home/node/.n8n \
n8nio/n8n
For installing nodes themselves, read How to Install n8n Community Nodes, and for what you can use on each edition, n8n Community Edition vs Cloud.
FAQ
How do I disable community nodes in n8n?
Set N8N_COMMUNITY_PACKAGES_ENABLED=false and restart n8n.
How do I allow only verified community nodes?
Set N8N_UNVERIFIED_PACKAGES_ENABLED=false and leave N8N_VERIFIED_PACKAGES_ENABLED at true.
What is N8N_COMMUNITY_PACKAGES?
A JSON array of the community packages an instance should have, used when N8N_COMMUNITY_PACKAGES_MANAGED_BY_ENV=true (n8n 2.21.0 and later).
n8n won’t start after installing a community node. What do I do?
Start it with N8N_COMMUNITY_PACKAGES_PREVENT_LOADING=true, remove or downgrade the package, then set it back to false.
Why are my community nodes gone after updating the Docker container?
The nodes folder wasn’t persisted. Mount a volume on /home/node/.n8n, or set N8N_REINSTALL_MISSING_PACKAGES=true.