Code in this video_How to Install N8N on Ubuntu with Docker
# n8n Configuration
N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=Your-User
N8N_BASIC_AUTH_PASSWORD=Your-Password
N8N_HOST=You-IP-Server
N8N_PORT=5678
N8N_PROTOCOL=http
N8N_SECURE_COOKIE=false # Temporarily disable secure cookie to avoid HTTP access issues
NODE_ENV=production
### YML file
services:
n8n:
image: n8nio/n8n
restart: always
container_name: n8n-server # Custom container name
ports:
- "5678:5678"
env_file:
- .env
volumes:
- ./n8n-data:/home/node/.n8n
Explanation of Configuration:
- container_name: Names the container n8n-server (feel free to change it).
- env_file: Loads environment variables from the .env file.
- volumes: Stores n8n data (including SQLite) on the host machine.