How to definitely run custom nodes on queue mode?

I wonder why I’m seeing npm command not found on my instance following this instructions:

Community Node installation with N8N running in queue mode:

Is that output expected? Do I need to install npm on this volume?

  • n8n version: latest
  • Database (default: SQLite): postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via Docker Compose
  • Operating system: Debian 12

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
1 Like

I think the new docker containers have changed the CMD. I’ll see if I can grab the new commands

Try this using the entrypoint argument

# Create the share node container
docker volume create n8n-custom-nodes

# Set the directory permissions to the node user
docker run --rm \
    -v n8n-custom-nodes:/nodes \
    --entrypoint chown \
    n8nio/n8n \
    -R node:node /nodes

# Install the community nodes
docker run --rm \
    -v n8n-custom-nodes:/nodes \
    --entrypoint npm \
    n8nio/n8n \
    install --prefix /nodes n8n-nodes-ldap n8n-nodes-mjml

This is then mounted into /home/node/.n8n/nodes:

[..]
    volumes:
      - n8n-custom-nodes:/home/node/.n8n/nodes
[..]
2 Likes

I do something similar, I have a volume from my host that I bind and I just install the nodes on the host with npm and it does the trick.

This docker solution is cleaner though, I like it.

1 Like

I fear for version compatibility issues. What I do but didn’t capture above is use the same docker tag as what I’m running, so any errors should hopefully surface early

2 Likes

Thanks for your quick reply. I tried your updated instructions and I get this:

chown: /nodes: Operation not permitted

I wonder if I’m missing something or it’s releated to my own instance.

I suspect the owner could be root so you may need to run the docker run command with -u root to use the root user… or -U I can never remember the case for it.

1 Like

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