n8n - 💡(How to fix) Fix Feature request: Allow NODE_FUNCTION_ALLOW_BUILTIN to be set via env var on external runner (without editing n8n-task-runners.json) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
n8n-io/n8n#28639Fetched 2026-04-18 05:56:52
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
closed ×1commented ×1labeled ×1

Fix Action

Fix / Workaround

The only way to change the allowed modules is to volume-mount a patched /etc/n8n-task-runners.json — which is fragile and breaks on version updates.

Current workaround

Volume-mount a patched config:

volumes:
  - ./patches/n8n-task-runners.json:/etc/n8n-task-runners.json:ro

Code Example

# docker-compose.ymlthis does NOT work
n8n-runner:
  image: n8nio/runners:2.14.2
  environment:
    - NODE_FUNCTION_ALLOW_BUILTIN=fs,path,crypto  # ← silently ignored

---

"env-overrides": {
    "NODE_FUNCTION_ALLOW_BUILTIN": "crypto"
}

---

volumes:
  - ./patches/n8n-task-runners.json:/etc/n8n-task-runners.json:ro
RAW_BUFFERClick to expand / collapse

Feature Description

When using the external task runner (n8nio/runners), the NODE_FUNCTION_ALLOW_BUILTIN environment variable set on the container is silently ignored. The runner launcher binary reads /etc/n8n-task-runners.json which contains env-overrides that hardcode NODE_FUNCTION_ALLOW_BUILTIN=crypto, completely overriding any container-level environment variable.

The only way to change the allowed modules is to volume-mount a patched /etc/n8n-task-runners.json — which is fragile and breaks on version updates.

Current behavior

# docker-compose.yml — this does NOT work
n8n-runner:
  image: n8nio/runners:2.14.2
  environment:
    - NODE_FUNCTION_ALLOW_BUILTIN=fs,path,crypto  # ← silently ignored

The launcher reads /etc/n8n-task-runners.json which has:

"env-overrides": {
    "NODE_FUNCTION_ALLOW_BUILTIN": "crypto"
}

This override takes precedence, and NODE_FUNCTION_ALLOW_BUILTIN is not in the allowed-env list, so the container env var is never passed through to the spawned Node.js process.

Expected behavior

Container-level NODE_FUNCTION_ALLOW_BUILTIN should be respected, either by:

  1. Adding it to the allowed-env list in the default config, or
  2. Making env-overrides lower priority than container env vars, or
  3. Providing an env var like N8N_RUNNERS_ALLOWED_BUILTIN_MODULES that the launcher binary reads directly

This would allow users to configure allowed modules without editing internal config files.

Current workaround

Volume-mount a patched config:

volumes:
  - ./patches/n8n-task-runners.json:/etc/n8n-task-runners.json:ro

This is the same workaround other users have reported in related issues.

Related issues

This is a recurring pain point — multiple issues have been filed and closed:

  • #23120 — N8N_RUNNERS_STDLIB_ALLOW="*" has no effect
  • #25793 — N8N_RUNNERS_STDLIB_ALLOW not working when set
  • #23175 — Task Runner ignores N8N_RUNNERS_STDLIB_ALLOW=* and blocks ALL imports

All were closed as "working as designed" (must edit JSON config), but the feedback from users is consistent: the JSON override approach is fragile, undocumented in the quick-start guides, and breaks on image updates.

Debug Info

  • n8nVersion: 2.14.2
  • runner image: n8nio/runners:2.14.2
  • platform: docker (self-hosted)
  • database: PostgreSQL

Operating System

Linux (Debian 12)

n8n Version

2.14.2

Hosting

self hosted

extent analysis

TL;DR

To fix the issue where the NODE_FUNCTION_ALLOW_BUILTIN environment variable is silently ignored, consider volume-mounting a patched /etc/n8n-task-runners.json file or waiting for a potential update that prioritizes container environment variables over env-overrides.

Guidance

  • Verify that the NODE_FUNCTION_ALLOW_BUILTIN environment variable is correctly set in the container by checking the docker-compose.yml file and ensuring it matches the expected behavior.
  • Use the current workaround of volume-mounting a patched /etc/n8n-task-runners.json file to override the env-overrides settings, as shown in the provided example: volumes: - ./patches/n8n-task-runners.json:/etc/n8n-task-runners.json:ro.
  • Review related issues (#23120, #25793, #23175) to understand the history of this problem and potential future solutions.
  • Consider providing feedback to the developers to prioritize container environment variables over env-overrides or to introduce a new environment variable like N8N_RUNNERS_ALLOWED_BUILTIN_MODULES to simplify configuration.

Example

No code snippet is provided as the issue is more related to configuration and environment variables.

Notes

The provided workaround may break on version updates, and there is no clear indication of when or if this issue will be addressed in a future update. The n8n version and runner image version are both 2.14.2, which may be relevant for tracking future updates.

Recommendation

Apply the workaround by volume-mounting a patched /etc/n8n-task-runners.json file, as this is the only currently available solution to override the env-overrides settings and respect the container-level NODE_FUNCTION_ALLOW_BUILTIN environment variable.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Container-level NODE_FUNCTION_ALLOW_BUILTIN should be respected, either by:

  1. Adding it to the allowed-env list in the default config, or
  2. Making env-overrides lower priority than container env vars, or
  3. Providing an env var like N8N_RUNNERS_ALLOWED_BUILTIN_MODULES that the launcher binary reads directly

This would allow users to configure allowed modules without editing internal config files.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

n8n - 💡(How to fix) Fix Feature request: Allow NODE_FUNCTION_ALLOW_BUILTIN to be set via env var on external runner (without editing n8n-task-runners.json) [1 comments, 2 participants]