Describe the problem/error/question
I’ll start off by saying I am very very new to Docker and have avoided it up to this point, but it seems like I’m going to have to learn it haha. I’m trying to get an n8n instance running locally so that I can work with developing a few custom nodes but for whatever reason I’m having the hardest time getting it done. Firstly it seems to hang when starting n8n at this point:
Finished migration MoveSshKeysToDatabase1711390882123
Starting migration RemoveNodesAccess1712044305787
Finished migration RemoveNodesAccess1712044305787
Starting migration CreateProject1714133768519
Finished migration CreateProject1714133768519
Starting migration MakeExecutionStatusNonNullable1714133768521
Finished migration MakeExecutionStatusNonNullable1714133768521
Starting migration AddActivatedAtUserSetting1717498465931
Finished migration AddActivatedAtUserSetting1717498465931
Starting migration AddConstraintToExecutionMetadata1720101653148
Finished migration AddConstraintToExecutionMetadata1720101653148
Version: 1.53.0
Editor is now accessible via:
http://localhost:5678/
And when visiting it within my browser I get a refusal error. If I build that basic n8n Dockerfile it works no problem.
I’m using the Docker file specifically defined in the documentation to try and do the import of the custom node and it looks like this:
ARG NODE_VERSION=20
FROM n8nio/base:${NODE_VERSION}
ARG N8N_VERSION
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
COPY docker-entrypoint.sh /
RUN \
mkdir .n8n && \
chown node:node .n8n
COPY ./n8n-nodes-starter ~/.n8n/custom/
ENV SHELL /bin/sh
USER node
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
I do the COPY at the very end of the file, I could be doing it in the wrong place, however, every time I view the running containers file system that custom folder just doesn’t exist at all.
Any assistance with this would be greatly appreciated as I overall enjoy the product lol.
Information on your n8n setup
-
n8n version: 1.52.2
-
Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
-
Operating system: Windows 11