Local AI on Windows
What this article covers
- How to prepare Windows for local AI.
- How WSL2 and Docker Desktop work together.
- How to install Ollama and other tools on Windows.
- What limitations and advantages exist.
Introduction: Local AI on Windows
Windows isn’t the typical home for local AI servers. Yet much of it works very well thanks to WSL2 and Docker Desktop. If Windows is your operating system and you want to test language models, RAG systems, or agents, you don’t need a second machine, just the right setup.
WSL2 gives you a full Linux kernel running under Windows. Docker Desktop leverages WSL2 to run containers nearly natively. Ollama even offers a native Windows version. This makes Windows a solid platform for getting started.
Why Windows for local AI?
Many people work primarily with Windows, whether for work or hobby projects. Buying a Linux server or building a second workstation is often unnecessary. WSL2 lets you use Linux tools while staying on Windows. Docker Desktop brings containerization to your machine. This way, you can experiment before moving to dedicated hardware.
Local AI on Windows in brief
Key steps:
- Install WSL2: Enable the Linux subsystem for Windows.
- Set up Docker Desktop: Install it on WSL2.
- Install Ollama: Use the native Windows version.
- Connect tools: Run Open WebUI, AnythingLLM, or similar via Docker or natively.
- Check GPU support: NVIDIA GPUs need the right drivers and CUDA for Windows or WSL2.
Who should use Windows as an AI platform?
- Beginners comfortable with Windows who don’t want to switch.
- Users wanting to test tools before buying a server.
- Developers mixing Windows tools with AI experiments.
- Anyone looking for a quick test environment.
Key terms for Windows and AI
- WSL2: Windows Subsystem for Linux version 2.
- Docker Desktop: Container management for Windows with WSL2 backend.
- Ollama for Windows: Native Windows version of Ollama.
- CUDA: NVIDIA’s interface for GPU computation.
- Distro: Linux distribution running inside WSL2.
- PowerShell: Windows scripting environment.
Practical examples for Windows
Ollama natively on Windows
Download the installer from the Ollama website and run it. After installation, open PowerShell and type:
ollama run llama3.1:8b
Installing WSL2
Open PowerShell as Administrator and type:
wsl --install
Restart your machine, set up Ubuntu, and update the system:
sudo apt update && sudo apt upgrade -y
Docker Desktop with WSL2
Download Docker Desktop, install it, and enable WSL2 integration. Then you can start containers under Ubuntu:
docker run hello-world
Open WebUI via Docker
docker run -d -p 3000:8080 --gpus all -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --pull always ghcr.io/open-webui/open-webui:ollama
Common pitfalls on Windows
- WSL2 not enabled: Without WSL2, Docker Desktop runs slowly or not at all.
- No GPU passthrough: Not every GPU works out-of-the-box in WSL2. Drivers and CUDA Toolkit must match.
- Firewall blocking: Windows Defender or your router may prevent access to local ports.
- Path issues: Windows and Linux paths behave differently in Docker volumes.
- PowerShell instead of Bash: Commands can vary depending on your environment.
Further reading and resources
FAQ: Local AI on Windows
Do I need Windows 11? Both Windows 10 and 11 support WSL2. Windows 11 typically offers better integration.
Can I use my NVIDIA GPU in WSL2? Yes, with the right drivers and CUDA for WSL2. Check NVIDIA documentation.
Is Windows slower than Linux? Not for pure GPU inference. Container and filesystem operations can be slightly slower with WSL2.
Can I run everything without WSL2? Some tools like Ollama yes. Docker and many Linux tools require WSL2.
How do I uninstall WSL2?
Use wsl --unregister Ubuntu or wsl --uninstall.
Sources and further reading
- WSL documentation: https://learn.microsoft.com/de-de/windows/wsl/
- Docker Desktop: https://www.docker.com/products/docker-desktop/
- Ollama for Windows: https://ollama.com/
Summary: Local AI on Windows
Windows is a viable platform for local AI when WSL2 and Docker Desktop are set up correctly. Ollama runs natively, and many tools can be deployed as containers. GPU support, firewall settings, and path handling are the most common obstacles. Knowing how to address them lets you build a working test environment quickly.


