FROM n8nio/n8n # Configure n8n to run on port 7860 ENV N8N_PORT=7860 ENV N8N_HOST=0.0.0.0 ENV N8N_PROTOCOL=https ENV WEBHOOK_URL=https://eligapris-n8n-power.hf.space # Authentication ENV N8N_BASIC_AUTH_ACTIVE=true ENV N8N_BASIC_AUTH_USER=admin ENV N8N_BASIC_AUTH_PASSWORD=passswordiwacu908 # Other settings ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false ENV N8N_RUNNERS_ENABLED=true ENV N8N_SKIP_USER_MANAGEMENT_SETUP=true # Stay as root to create directories USER root # Create the directory structure with proper permissions RUN mkdir -p /data/.n8n && \ chown -R node:node /data && \ chmod -R 755 /data # Redirect n8n data to /data (AFTER creating the directory) ENV N8N_USER_FOLDER=/data/.n8n ENV XDG_DATA_HOME=/data # Switch back to node user for running the application USER node EXPOSE 7860 # CMD ["n8n", "start"]