# Use the official Node.js image as the base FROM node:18-alpine # Install n8n globally using npm RUN npm install -g n8n # Create a directory for n8n data and set full permissions RUN mkdir -p /home/node/.n8n && chmod 777 /home/node/.n8n # Set Environment Variables for Security and Port ENV N8N_BASIC_AUTH_ACTIVE=true ENV N8N_BASIC_AUTH_USER=aditya ENV N8N_BASIC_AUTH_PASSWORD=YourSecretPassword ENV N8N_PORT=7860 # Expose the default Hugging Face port EXPOSE 7860 # Command to start n8n CMD ["n8n", "start"]