Windows 11 WSL Ubuntu setup guide

Personal notes for a local AI development box on Windows 11 Pro: WSL 2 with Ubuntu, Ollama on the Windows side, Docker, Open WebUI.

1. Install WSL (Microsoft docs, page updated 2026-06-02, rechecked 2026-10-02)

Requirements: Windows 10 version 2004 (build 19041) or later, or Windows 11.

  1. Open PowerShell as administrator.
  2. Run wsl --install, then restart. This enables the needed Windows features and installs Ubuntu by default; new installs use WSL 2.
  3. To pick another distro or a specific Ubuntu release: wsl --list --online, then wsl --install -d <DistroName>. If the install hangs at 0.0%, use wsl --install --web-download -d <DistroName>.
  4. If wsl --install only prints help text (WSL already installed), use the --list --online route above.
  5. First launch asks you to create a Linux username and password.
  6. Check versions with wsl -l -v; convert with wsl --set-version <Distro> 2.

The original note (2024) used Ubuntu 22.04. Ubuntu’s WSL docs say the plain Ubuntu distro name ships the latest stable LTS; numbered releases follow the pattern Ubuntu-22.04, Ubuntu-24.04 (and, per 2026 how-tos, Ubuntu-26.04) and get five years of standard support. Pin a release with wsl --install -d Ubuntu-24.04. Which LTS the bare Ubuntu maps to today is not stated on the Ubuntu page; check wsl --list --online.

2. Local stack (personal workflow)

  • Start the Ollama Windows app (default bind 127.0.0.1:11434). Windows Ollama reads user/system environment variables: quit Ollama from the tray, set OLLAMA_HOST / OLLAMA_ORIGINS / OLLAMA_MODELS, restart it (Ollama FAQ). See ollama and set-ollama-env-vars-in-powershell.
  • Start Docker, then run Open WebUI. Current docs command: docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data -e WEBUI_SECRET_KEY=<secret> --name open-webui --restart always ghcr.io/open-webui/open-webui:main; the UI is then on port 3000 and reaches a host Ollama at http://host.docker.internal:11434.
  • Start WSL and activate the conda environment you use.
  • WSL2 on Windows 10 may show slow networking; the Ollama FAQ suggests disabling Large Send Offload on the vEthernet (WSL) adapter.

3. Tips from Microsoft’s setup guidance

The docs recommend Windows Terminal and cover Git, VS Code remote server, file-storage practices, databases, and GPU acceleration. See “Best practices for setting up a WSL development environment” (https://learn.microsoft.com/en-us/windows/wsl/setup/environment).

Sources