Install ComfyUI on Windows 11 the Linux way: WSL2 with Ubuntu, GPU passthrough from the Windows driver, a systemd service inside WSL, and Task Scheduler so the whole thing survives reboots. Windows needs exactly one install: WSL itself.
Join the community: https://skool.com/selfhosthub
CHAPTERS
0:00 Introduction
0:15 Install WSL
0:28 Start WSL & GPU Passthrough
0:41 Linux Prerequisites & Clone
0:59 Install Python 3.13
1:14 Create Environment & PyTorch
1:37 Start ComfyUI & Make It a Service
2:09 Auto-Start at Boot
COMMANDS
Install WSL (PowerShell as administrator, then reboot):
wsl --install -d Ubuntu
Start WSL:
wsl
The GPU passes through from the Windows driver, no Linux driver install:
nvidia-smi
Linux prerequisites:
sudo apt install git python3 python3-venv python3-pip -y
Clone and enter ComfyUI:
git clone https://github.com/comfyanonymous/Com...
cd ComfyUI
Install Python 3.13 (deadsnakes PPA):
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.13 python3.13-venv -y
Create and activate the environment:
python3.13 -m venv venv
source venv/bin/activate
Install PyTorch (CUDA wheels) and requirements:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130
pip install -r requirements.txt
Start ComfyUI:
python main.py --listen 0.0.0.0
Enable systemd inside WSL (/etc/wsl.conf):
[boot]
systemd=true
[user]
default=myuser
ComfyUI service:
sudo nano /etc/systemd/system/comfyui.service
[Unit]
Description=ComfyUI Service
After=network-online.target
Wants=network-online.target
[Service]
User=myuser
Group=myuser
WorkingDirectory=/home/myuser/ComfyUI
ExecStart=/home/myuser/ComfyUI/venv/bin/python3 main.py --listen 0.0.0.0
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now comfyui.service
Auto-start WSL at boot (Task Scheduler - Create Task):
Name: WSL ComfyUI
Run whether user is logged on or not
Action: Start a program
Program: wsl.exe
Arguments: -d Ubuntu
Trigger: At system startup
THE CUDA WHEEL GOTCHA
If you run pip install torch without the --index-url, pip grabs the CPU-only wheels. Everything installs fine, ComfyUI starts fine, and generations crawl. Check it with: python -c "import torch; print(torch.cuda.is_available())" which must print True. If it prints False, uninstall torch, torchvision, and torchaudio and reinstall with the index URL above. Inside WSL there is still no Linux Nvidia driver to install; the Windows driver provides the GPU.
MODELS
ComfyUI generates nothing until it has at least one model. Put the files under the ComfyUI/models folder inside WSL: checkpoints go in models/checkpoints, VAEs in models/vae, LoRAs in models/loras. From Windows Explorer the path is \\wsl$\Ubuntu\home\myuser\ComfyUI\models. Drop the file in, then refresh the browser.
A NOTE ON --listen 0.0.0.0
That flag makes the UI reachable from other devices on your network at http://YOUR_IP:8188, and it is also what lets the Windows browser reach the service running inside WSL. Never forward the port to the internet.
Questions? Drop a comment or bring it to the community: https://skool.com/selfhosthub
=== SELF-DISCLOSURE NOTE (applies to all four if any TTS narration remains) ===
These cuts use your real voice, so YouTube's altered-content disclosure is not needed. If you ever swap in a TTS line, tick the synthetic-voice disclosure on that video.