Planning document for Phase 2: deploying n8n locally using Docker.
Status: Planning — do not execute yet.
This document records the intended architecture and prerequisites for Phase 2.
Implementation begins only after Phase 1 validation passes.
n8n (pronounced “n-eight-n”) is an open-source workflow automation platform — self-hosted, like Zapier or Make but running entirely on your machine. It connects APIs, processes data, reacts to webhooks, and can trigger AI inference via HTTP calls.
Key properties:
| Benefit | Detail |
|---|---|
| No API costs | Calls your local Ollama instead of OpenAI API |
| Privacy | Data never leaves your machine |
| Automation | Trigger AI processing from files, webhooks, schedules |
| Chaining | Chain multiple LLM calls in a single workflow |
| Integration | Connect AI output to files, databases, email, Slack, etc. |
Example use cases:
Complete this checklist before running 08-Deploy-N8N.ps1:
07-Validate-Environment.ps1 shows all PASSdocker ps returns without errorTest-NetConnection -Port 5678 -ComputerName localhost returns TcpTestSucceeded: False# Check Docker is installed
docker --version
# Check Docker engine is running
docker ps
# Check available disk
docker system df
# Check host.docker.internal resolves (needed for Ollama access from container)
docker run --rm --add-host=host.docker.internal:host-gateway alpine nslookup host.docker.internal
Save this as docker-compose.n8n.yml in the project root. Script 08-Deploy-N8N.ps1 will create this automatically.
version: '3.8'
services:
n8n:
image: n8nio/n8n:latest
container_name: n8n-local
ports:
- "5678:5678"
environment:
- N8N_HOST=localhost
- N8N_PORT=5678
- N8N_PROTOCOL=http
- WEBHOOK_URL=http://localhost:5678/
- GENERIC_TIMEZONE=Europe/Warsaw
- N8N_LOG_LEVEL=info
# Disable telemetry
- N8N_DIAGNOSTICS_ENABLED=false
- N8N_VERSION_NOTIFICATIONS_ENABLED=false
volumes:
- n8n_data:/home/node/.n8n
restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
n8n_data:
driver: local
| Setting | Value | Reason |
|---|---|---|
ports: 5678:5678 |
localhost:5678 only | No external exposure |
extra_hosts |
host-gateway | Allows container to call Ollama on the host |
n8n_data volume |
Persistent | Workflows survive container restarts |
N8N_DIAGNOSTICS_ENABLED=false |
Disabled | Privacy — no telemetry |
GENERIC_TIMEZONE |
Europe/Warsaw | Correct cron scheduling |
Windows 11 Host
│
├─ Ollama service
│ └─ listens on 127.0.0.1:11434
│
├─ Open-WebUI (Python)
│ └─ listens on 127.0.0.1:3000
│
└─ Docker Desktop
│
└─ n8n container
│
├─ accessible from host at localhost:5678
│
├─ calls Ollama via http://host.docker.internal:11434
│ (host.docker.internal resolves to Windows host IP from inside container)
│
└─ calls Open-WebUI via http://host.docker.internal:3000
Important: From inside the n8n container,
localhostrefers to the container itself, not the Windows host. Always usehost.docker.internalto reach Ollama and Open-WebUI.
http://host.docker.internal:11434/api/generateapplication/jsonBody (JSON):
{
"model": "qwen2.5:7b",
"prompt": "",
"stream": false
}
Response field: response contains the generated text.
http://host.docker.internal:11434/api/chatBody (JSON):
{
"model": "qwen2.5:7b",
"messages": [
{ "role": "user", "content": "" }
],
"stream": false
}
Response field: message.content
Open-WebUI exposes an OpenAI-compatible API.
http://host.docker.internal:3000/api/chat/completionsHeaders:
Content-Type: application/json
Authorization: Bearer <your-open-webui-api-key>
Get an API key: Open-WebUI → Settings → Account → API Keys.
Body (JSON):
{
"model": "qwen2.5:7b",
"messages": [
{ "role": "user", "content": "" }
]
}
Response field: choices[0].message.content
n8n stores all state in the Docker volume n8n_data:
Volume location on host (Docker-managed):
docker volume inspect n8n_data
# Shows actual path under Docker's data directory
# Create backup archive
docker run --rm `
-v n8n_data:/data `
-v "${PWD}:/backup" `
alpine `
tar czf /backup/n8n-backup-$(Get-Date -Format "yyyyMMdd").tar.gz /data
# Restore from backup
docker run --rm `
-v n8n_data:/data `
-v "${PWD}:/backup" `
alpine `
tar xzf /backup/n8n-backup-20260906.tar.gz -C /
localhost:5678 — not from other machines on the network0.0.0.0:5678:5678 port mapping (that would expose it externally)host.docker.internalThis script will be created in Phase 2. Planned steps:
Test-DockerRunning)Test-PortListening 5678 should return false)host.docker.internal resolves inside Dockerdocker-compose.n8n.yml from embedded templatedocker compose -f docker-compose.n8n.yml up -d/healthz endpoint)docker exec n8n-local wget -qO- http://host.docker.internal:11434
reports/n8n-deploy-report.json and .mdParameters will include -DryRun, -NonInteractive, -N8nPort (default 5678), -Timezone.
| Component | RAM | CPU (idle) | Disk |
|---|---|---|---|
| n8n container | ~400MB | ~0% | ~300MB image |
| n8n volume data | — | — | ~50MB (grows with execution history) |
| Ollama (model loaded) | 4-10GB | ~0% | 2-10GB per model |
| Open-WebUI | ~200MB | ~0% | ~500MB |
| Total (Phase 2) | ~5-12GB | ~0% | ~3-11GB |