Skip to content
Courses/Self-hosted AI automation for small businesses/n8n on Windows: Docker, WSL, and Common Errors

n8n on Windows: Docker, WSL, and Common Errors

On Windows, the usual bottleneck isn't n8n—it's Docker Desktop, WSL, virtualization, paths, ports, and restarts. This lesson gives you a diagnostic path before connecting Ollama, Qdrant, or Telegram.

  • Prepare Windows for n8n with Docker and WSL.
  • Diagnose errors before blaming the workflow.
  • Start a minimal stack that you can later connect to Ollama.

Pre-installation checklist

  • Windows up to date.
  • Virtualization enabled in BIOS/UEFI.
  • WSL 2 installed with a working Linux distro.
  • Docker Desktop using the WSL 2 backend.
  • Full restart after enabling Windows features.
Terminal
# In PowerShell
wsl --status
wsl --list --verbose
docker version
docker compose version

# If Docker doesn't respond, open Docker Desktop and wait until it shows "Engine running".
# Then try:
docker run --rm hello-world

Minimal stack with persistent volume

For local testing you can start with SQLite. In production, Postgres and a public URL with HTTPS are better—but first we need an instance that starts the same way every time.

Terminal
# docker-compose.yml
services:
  n8n:
    image: docker.n8n.io/n8nio/n8n:latest
    restart: unless-stopped
    ports:
      - "5678:5678"
    environment:
      - N8N_HOST=localhost
      - N8N_PORT=5678
      - N8N_PROTOCOL=http
      - N8N_SECURE_COOKIE=false
      - TZ=Europe/Madrid
    volumes:
      - n8n_data:/home/node/.n8n

volumes:
  n8n_data:
Terminal
docker compose up -d
docker compose logs -f n8n

# Open:
# http://localhost:5678

Common errors and quick troubleshooting

  • Port in use: change `5678:5678` to `5680:5678`.
  • Docker won't start: check WSL, virtualization, and restart.
  • Data disappears: you didn't mount a persistent volume.
  • Ollama won't connect: from Docker, `localhost` points to the container, not Windows.
  • Execute Command can't see your programs: run inside the container, not on the host.

Official sources

  • n8n: Install with Docker
  • n8n: Execute Command node
Complete Aulafy mapSee how this lesson fits without leaving your path.

Complete Aulafy map

How all courses connect

This is not a checklist. Start with the foundation, choose an outcome, and go deeper only when your project needs more control.

  1. 1Understand
  2. 2Apply or build
  3. 3Operate with confidence
01

Choose an application

Turn the foundation into a visible outcome: a website, a business improvement, media, or an interactive experience.

Continue into the technical branch when you need to maintain code, data, or infrastructure.

02

Build with code

Prepare your environment, work with coding agents, and run models while keeping control of your projects.

This branch prepares you to design and operate reliable AI systems.

03

Take systems to production

Combine retrieval, agents, evaluation, security, deployment, and model adaptation when the problem requires it.

You do not need every course: choose the component your system needs and return as it grows.

View full catalogue