[v2.2.3] Cannot publish/activate workflow: "Unrecognized node type: n8n-nodes-base.executeCommand" (Docker on Debian 13)

Describe the problem/error/question

After upgrading to n8n v2.2.3 (from v1.x), my workflows that use the Execute Command node no longer work: publishing fails and activation is impossible.

  • When I click Publish, I get:
    • Problem activating workflow — The following error occurred on workflow activation
    • Workflow could not be published: Unrecognized node type: n8n-nodes-base.executeCommand

The same workflow worked fine on v1.x.

What I understand / what I’m looking for

  • In v2, certain sensitive nodes are disabled by default (including Execute Command) and must be explicitly re‑enabled via configuration.
  • I’m looking for the exact Docker settings to re‑enable only Execute Command (ideally without enabling other nodes), and the best practices when running workers (queue/scaling) to avoid version mismatch errors after an upgrade.

Questions:

  1. Can you confirm the v2 behavior (Execute Command node disabled by default)?
  2. What is the recommended Docker configuration to allow only this node (rather than enabling all of them)?
  3. Do I need to redeploy/update the workers explicitly to avoid the “Unrecognized node type” error when the main instance and workers run different image tags?

What is the error message (if any)?


Problem activating workflow
The following error occurred on workflow activation:

Workflow could not be published:
Unrecognized node type: n8n-nodes-base.executeCommand

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node


Information on your n8n setup

  • n8n version: 2.2.3 (self‑hosted)
  • Database : Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): <please specify: own/main/queue/scaling + workers if applicable>
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Debian 13

(Optional) Current/expected docker-compose.yml

volumes:
  n8n_storage:
  n8n_files:

x-n8n: &service-n8n
  image: n8nio/n8n:latest
  environment:
# --- Base de données ---
    - DB_TYPE=postgresdb
    - DB_POSTGRESDB_HOST=db
    - DB_POSTGRESDB_USER=postgres
    - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
    - DB_POSTGRESDB_DATABASE=postgres

    # --- Sécurité / Configuration ---
    - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
    - N8N_PERSONALIZATION_ENABLED=false
    - N8N_DIAGNOSTICS_ENABLED=false
    - N8N_USER_MANAGEMENT_JWT_SECRET=${N8N_USER_MANAGEMENT_JWT_SECRET}

    # --- Performance / Gros fichiers ---
    - N8N_DEFAULT_BINARY_DATA_MODE=filesystem
    - N8N_BINARY_DATA_TTL=86400
    - NODE_OPTIONS=--max-old-space-size=18192

    # --- Exécutions via Redis Queue ---
    - EXECUTIONS_MODE=queue
    - QUEUE_BULL_REDIS_HOST=redis
    - QUEUE_BULL_REDIS_PORT=6379
    # si ton container Redis a un mot de passe :
    # - QUEUE_BULL_REDIS_PASSWORD=ton_mdp
    
    #- WEBHOOK_URL=${N8N_HOSTNAME:+https://}${N8N_HOSTNAME:-http://localhost:5678}
    - WEBHOOK_URL=https://domaine.fr

    - N8N_BINARY_DATA_STORAGE_PATH=/files
  


services:

  n8n:
    <<: *service-n8n
    container_name: n8n
    restart: unless-stopped
    expose:
      - 5678/tcp
    volumes:
      - n8n_storage:/home/node/.n8n
      - n8n_files:/files 
      - ./n8n/backup:/backup
      - ./shared:/data/shared


  n8n-worker:
    image: n8nio/n8n:latest
    restart: unless-stopped
    depends_on:
      - redis
      - postgres
    environment:
# --- Base de données ---
    - DB_TYPE=postgresdb
    - DB_POSTGRESDB_HOST=db
    - DB_POSTGRESDB_USER=postgres
    - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
    - DB_POSTGRESDB_DATABASE=postgres

    # --- Sécurité / Configuration ---
    - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
    - N8N_PERSONALIZATION_ENABLED=false
    - N8N_DIAGNOSTICS_ENABLED=false
    - N8N_USER_MANAGEMENT_JWT_SECRET=${N8N_USER_MANAGEMENT_JWT_SECRET}

    # --- Performance / Gros fichiers ---
    - N8N_DEFAULT_BINARY_DATA_MODE=filesystem
    - N8N_BINARY_DATA_TTL=86400
    - NODE_OPTIONS=--max-old-space-size=18192

    # --- Exécutions via Redis Queue ---
    - EXECUTIONS_MODE=queue
    - QUEUE_BULL_REDIS_HOST=redis
    - QUEUE_BULL_REDIS_PORT=6379
    - N8N_BINARY_DATA_STORAGE_PATH=/files    
    # si ton container Redis a un mot de passe :
    # - QUEUE_BULL_REDIS_PASSWORD=ton_mdp
    command: worker

    volumes:
      - n8n_storage:/home/node/.n8n
      - n8n_files:/files       
      - ./n8n/backup:/backup
      - ./shared:/data/shared


  postgres:
    image: postgres:${POSTGRES_VERSION:-latest}
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 3s
      timeout: 3s
      retries: 10
    expose:
      - 5432/tcp
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: postgres
    volumes:
      #- langfuse_postgres_data:/var/lib/postgresql/data
      - langfuse_postgres_data:/var/lib/postgresql/data2

  redis:
    container_name: redis
    image: docker.io/valkey/valkey:8-alpine
    command: valkey-server --save 30 1 --loglevel warning
    restart: unless-stopped
    expose:
      - 6379/tcp
    volumes:
      - valkey-data:/data
    cap_drop:
      - ALL
    cap_add:
      - SETGID
      - SETUID
      - DAC_OVERRIDE
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
        max-file: "1"
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 3s
      timeout: 10s
      retries: 10

Hi @Issa2024,

Since version 2, you need to enable the execute command node by setting the following env variable. It might be a good idea to read this page in detail to see what else you need to change in all your workflows

NODES_EXCLUDE="[]"

According to the code base of n8n, there are only TWO nodes disabled by default:

So if you do not want to enable the localFileTrigger as well and ONLY execute command, then just add that as the only value in the list:

NODES_EXCLUDE="[n8n-nodes-base.localFileTrigger]"

It looks like you need to enable this env var on both your main as well as worker n8n service in docker

Full example using queue mode:

services:
  n8n-db:
    image: postgres:16.1
    restart: always
    environment:
      - POSTGRES_DB=n8n
      - POSTGRES_PASSWORD=n8n
      - POSTGRES_USER=n8n
    volumes:
      - postgres-data:/var/lib/postgresql/data

  n8n-redis:
    image: redis:7-alpine
    restart: always
    volumes:
      - redis-data:/data

  n8n-main:
    image: n8nio/n8n
    restart: always
    depends_on:
      - n8n-db
      - n8n-redis
    volumes:
      - n8n-data:/home/node/.n8n
    ports:
      - 4567:5678
      - 5680:5680
    environment:
      - WEBHOOK_URL=http://localhost:4567
      - NODE_ENV=production
      - N8N_HOST=localhost
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - N8N_SECURE_COOKIE=true
      - EXECUTIONS_MODE=queue
      # Task runner configuration for v2 (external mode)
      - N8N_RUNNERS_ENABLED=true
      - N8N_RUNNERS_MODE=external
      - N8N_RUNNERS_BROKER_LISTEN_ADDRESS=0.0.0.0
      - N8N_RUNNERS_AUTH_TOKEN=your-secure-auth-token-change-this
      # Security settings
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false
      - N8N_BLOCK_ENV_ACCESS_IN_NODE=true
      - N8N_SKIP_AUTH_ON_OAUTH_CALLBACK=false
      # File access restriction
      - N8N_RESTRICT_FILE_ACCESS_TO=/home/node/.n8n-files
      # Binary data configuration (filesystem mode for regular mode)
      - N8N_DEFAULT_BINARY_DATA_MODE=filesystem
      - NODE_FUNCTION_ALLOW_BUILTIN=crypto
      - OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS=true
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_HOST=n8n-db
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_SCHEMA=n8n
      - DB_POSTGRESDB_PASSWORD=n8n
      - DB_POSTGRESDB_POOL_SIZE=40
      - DB_POSTGRESDB_CONNECTION_TIMEOUT=30000
      # Queue mode configuration
      - QUEUE_BULL_REDIS_HOST=n8n-redis
      - QUEUE_BULL_REDIS_PORT=6379
      - QUEUE_BULL_REDIS_DB=0
      #  - N8N_LOG_LEVEL=debug
      - NODES_EXCLUDE="[n8n-nodes-base.localFileTrigger]"

  n8n-worker:
    image: n8nio/n8n
    restart: always
    command: worker --concurrency=6
    depends_on:
      - n8n-db
      - n8n-redis
      - n8n-worker-task-runner
    volumes:
      - n8n-data:/home/node/.n8n
    environment:
      - EXECUTIONS_MODE=queue
      - WEBHOOK_URL=http://localhost:4567
      - N8N_HOST=localhost
      - N8N_SKIP_DB_INIT=true
      # Task runner configuration for v2 (external mode)
      - N8N_RUNNERS_ENABLED=true
      - N8N_RUNNERS_MODE=external
      - N8N_RUNNERS_BROKER_LISTEN_ADDRESS=0.0.0.0
      - N8N_RUNNERS_AUTH_TOKEN=your-secure-auth-token-change-this
      - N8N_PROCESS=worker
      # Security settings
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false
      - N8N_BLOCK_ENV_ACCESS_IN_NODE=true
      # File access restriction
      - N8N_RESTRICT_FILE_ACCESS_TO=/home/node/.n8n-files
      - NODE_FUNCTION_ALLOW_BUILTIN=crypto
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_HOST=n8n-db
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_SCHEMA=n8n
      - DB_POSTGRESDB_PASSWORD=n8n
      - DB_POSTGRESDB_POOL_SIZE=40
      - DB_POSTGRESDB_CONNECTION_TIMEOUT=30000
      # Queue mode configuration
      - QUEUE_BULL_REDIS_HOST=n8n-redis
      - QUEUE_BULL_REDIS_PORT=6379
      - QUEUE_BULL_REDIS_DB=0
      # - N8N_LOG_LEVEL=debug
      - NODES_EXCLUDE="[n8n-nodes-base.localFileTrigger]"

  # Task runner for n8n-worker with Python support for v2
  n8n-worker-task-runner:
    image: n8nio/runners
    restart: always
    depends_on:
      - n8n-db
      - n8n-redis
    environment:
      # Task runner configuration
      - N8N_RUNNERS_MODE=external
      - N8N_RUNNERS_TASK_BROKER_URI=http://n8n-worker:5679
      - N8N_RUNNERS_AUTH_TOKEN=your-secure-auth-token-change-this
      # Enable Python and JavaScript support
      - N8N_RUNNERS_ENABLED_TASK_TYPES=javascript,python
      # Auto shutdown after 15 seconds of inactivity
      - N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT=15
    volumes:
      # Shared volume for file access if needed
      - n8n-data:/home/node/.n8n

volumes:
  postgres-data:
  redis-data:
  n8n-data:

2 Likes

thanks works now

but V2 is big taste !

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.