Cannot access Custom Node in Docker instance

Hello,

I am trying to run a custom docker instance of n8n. Everything works fine until I try to use custom nodes.

I tried to follow this doc but using the Dockerfile linked. I did copy my compiled nodes to /home/node/.n8n/custom but I cannot see them in the UI at all.

n8n version: 1.75.2
Everything default

Please find here my Dockerfile:

ARG NODE_VERSION=20

FROM node:${NODE_VERSION} AS builder

WORKDIR /app

# Enable corepack and install correct yarn version
RUN corepack enable && corepack prepare [email protected] --activate

# Copy yarn-related files first
COPY .yarn/ ./.yarn/
COPY .yarnrc.yml package.json yarn.lock ./

# Install dependencies
RUN yarn install --immutable

COPY . .
RUN yarn build

FROM n8nio/base:${NODE_VERSION} AS runner

ARG N8N_VERSION=1.75.2
RUN if [ -z "$N8N_VERSION" ] ; then echo "The N8N_VERSION argument is missing!" ; exit 1; fi

LABEL org.opencontainers.image.title="n8n"
LABEL org.opencontainers.image.description="Workflow Automation Tool"
LABEL org.opencontainers.image.source="https://github.com/n8n-io/n8n"
LABEL org.opencontainers.image.url="https://n8n.io"
LABEL org.opencontainers.image.version=${N8N_VERSION}

ENV N8N_VERSION=${N8N_VERSION}
ENV NODE_ENV=production
ENV N8N_RELEASE_TYPE=stable
RUN set -eux; \
	npm install -g --omit=dev n8n@${N8N_VERSION} --ignore-scripts && \
	npm rebuild --prefix=/usr/local/lib/node_modules/n8n sqlite3 && \
	rm -rf /usr/local/lib/node_modules/n8n/node_modules/@n8n/chat && \
	rm -rf /usr/local/lib/node_modules/n8n/node_modules/n8n-design-system && \
	rm -rf /usr/local/lib/node_modules/n8n/node_modules/n8n-editor-ui/node_modules && \
	find /usr/local/lib/node_modules/n8n -type f -name "*.ts" -o -name "*.js.map" -o -name "*.vue" | xargs rm -f && \
	rm -rf /root/.npm

# Setup the Task Runner Launcher
ARG TARGETPLATFORM
ARG LAUNCHER_VERSION=1.1.0
COPY n8n-task-runners.json /etc/n8n-task-runners.json
# Download, verify, then extract the launcher binary
RUN \
	if [[ "$TARGETPLATFORM" = "linux/amd64" ]]; then export ARCH_NAME="amd64"; \
	elif [[ "$TARGETPLATFORM" = "linux/arm64" ]]; then export ARCH_NAME="arm64"; fi; \
	mkdir /launcher-temp && \
	cd /launcher-temp && \
	wget https://github.com/n8n-io/task-runner-launcher/releases/download/${LAUNCHER_VERSION}/task-runner-launcher-${LAUNCHER_VERSION}-linux-${ARCH_NAME}.tar.gz && \
	wget https://github.com/n8n-io/task-runner-launcher/releases/download/${LAUNCHER_VERSION}/task-runner-launcher-${LAUNCHER_VERSION}-linux-${ARCH_NAME}.tar.gz.sha256 && \
	# The .sha256 does not contain the filename --> Form the correct checksum file
	echo "$(cat task-runner-launcher-${LAUNCHER_VERSION}-linux-${ARCH_NAME}.tar.gz.sha256) task-runner-launcher-${LAUNCHER_VERSION}-linux-${ARCH_NAME}.tar.gz" > checksum.sha256 && \
	sha256sum -c checksum.sha256 && \
	tar xvf task-runner-launcher-${LAUNCHER_VERSION}-linux-${ARCH_NAME}.tar.gz --directory=/usr/local/bin && \
	cd - && \
	rm -r /launcher-temp

COPY docker-entrypoint.sh /

RUN \
    chmod +x /docker-entrypoint.sh && \
	mkdir .n8n && \
	chown node:node .n8n
ENV SHELL /bin/sh

USER node

RUN mkdir -p /home/node/.n8n/custom

COPY --from=builder --chown=node:node /app/dist/ /home/node/.n8n/custom/

RUN ls -R /home/node/.n8n/custom

ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]

As you can see there is a debug step RUN ls -R /home/node/.n8n/custom returning the following:

#23 [runner 10/10] RUN ls -R /home/node/.n8n/custom
#23 0.101 /home/node/.n8n/custom:
#23 0.101 credentials
#23 0.101 nodes
#23 0.101 
#23 0.101 /home/node/.n8n/custom/credentials:
#23 0.101 CustomAPI.credentials.d.ts
#23 0.101 CustomAPI.credentials.d.ts.map
#23 0.101 CustomAPI.credentials.js
#23 0.101 
#23 0.101 /home/node/.n8n/custom/nodes:
#23 0.101 CustomNode
#23 0.101 
#23 0.101 /home/node/.n8n/custom/nodes/CustomNode:
#23 0.101 CustomNode.node.d.ts
#23 0.101 CustomNode.node.d.ts.map
#23 0.101 CustomNode.node.js
#23 0.101 CustomNode.node.json
#23 0.101 icon.svg
#23 DONE 0.1s

Also there is no error in my running instance log:

2025-01-24 17:48:44 Permissions 0644 for n8n settings file /home/node/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
2025-01-24 17:48:44 User settings loaded from: /home/node/.n8n/config
2025-01-24 17:48:45 Initializing n8n process
2025-01-24 17:48:45 n8n ready on 0.0.0.0, port 5678
2025-01-24 17:48:46 Version: 1.75.2
2025-01-24 17:48:46 
2025-01-24 17:48:46 Editor is now accessible via:
2025-01-24 17:48:46 http://localhost:5678/

Did I miss something?

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:

Hello,

Just making a small bump :innocent:
Still not resolved as of today

hello @Raigato

did you perform steps 3-4?

Install private nodes | n8n Docs

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