What Is n8n?
n8n is an open-source workflow automation tool similar to Zapier. It lets you connect different services and automate tasks with a visual node-based editor.
Requirements
- A Breeze with at least 2 GB RAM
- Docker and Docker Compose
Docker Compose Setup
mkdir -p /opt/n8n && cd /opt/n8n
cat > docker-compose.yml <<'EOF'
services:
n8n:
image: docker.n8n.io/n8nio/n8n
restart: unless-stopped
ports:
- "5678:5678"
environment:
- N8N_HOST=n8n.yourdomain.com
- N8N_PORT=5678
- N8N_PROTOCOL=https
- WEBHOOK_URL=https://n8n.yourdomain.com/
- GENERIC_TIMEZONE=America/New_York
volumes:
- n8n-data:/home/node/.n8n
volumes:
n8n-data:
EOF
docker compose up -dReverse Proxy with Nginx
server {
server_name n8n.yourdomain.com;
location / {
proxy_pass http://127.0.0.1:5678;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "";
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}
}Example Workflows
- Monitor a website and send Slack alerts on downtime
- Automatically create support tickets from email
- Sync data between CRM and spreadsheet
- Post social media updates on a schedule
- Process incoming webhooks and trigger actions