my-n8n-bot / Dockerfile
aditya9708's picture
Update Dockerfile
c66dca7 verified
Raw History Blame Contribute Delete
630 Bytes
# Use the official n8n image directly (This is better)
FROM n8nio/n8n:latest
# Switch to root to fix permissions
USER root
# Create necessary folders and set permissions
RUN mkdir -p /home/node/.n8n && \
chown -R node:node /home/node/.n8n && \
chmod -R 777 /home/node/.n8n
# Set Port to 7860 (Hugging Face Requirement)
ENV N8N_PORT=7860
EXPOSE 7860
# Security: Set your Username and Password
ENV N8N_BASIC_AUTH_ACTIVE=true
ENV N8N_BASIC_AUTH_USER=aditya
ENV N8N_BASIC_AUTH_PASSWORD=AapkaSecretPassword
# Switch back to node user for safety
USER node
# Start n8n using the direct path
ENTRYPOINT ["n8n"]
CMD ["start"]