Skip to content

Feature request: Allow NODE_FUNCTION_ALLOW_BUILTIN to be set via env var on external runner (without editing n8n-task-runners.json) #28639

Description

@dgattupalli696

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed:enhancement/featureIssue was closed as it was an enhancement or feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions