How every hardening layer connects, where it lives, and what breaks if you skip a step.
WSL2 distros are installed per Windows user. If you run wsl --install while logged in as admin, the distro is bound to that profile and completely invisible to comfyui. Being in the Administrators group or running with privileges does not change this — distro visibility is per-profile, not per-privilege level. Fix: export from admin with wsl --export Ubuntu-24.04, then import under comfyui with wsl --import.
comfyui is missing from the docker-users group. Run as admin: net localgroup "docker-users" "comfyui" /add — then log comfyui out and back in. Group changes don't take effect in an existing session.
comfyui is missing from Hyper-V Administrators, or the Task Scheduler entry was created with the wrong security principal (runs as admin instead of comfyui). In Task Scheduler → General tab → Change User or Group → set to comfyui. Also add the group: net localgroup "Hyper-V Administrators" "comfyui" /add.
If networkingMode=nat is missing from C:\Users\comfyui\.wslconfig, Windows 11 may use Mirrored mode, routing container traffic through the Windows host stack and bypassing all iptables FORWARD rules. The outbound check in comfy_secure will report BLOCKED but traffic may still escape. Always include networkingMode=nat explicitly.
comfyui to docker-users + Hyper-V Administrators. Log comfyui out/in.dism.exe. Reboot.comfyui. All remaining steps run here. Do NOT install Ubuntu or Docker from admin.wsl --install -d Ubuntu-24.04. Distro is now bound to comfyui's profile..wslconfig with memory caps + networkingMode=nat. Set /etc/wsl.conf C: read-only.comfyui Modify perms on .vhdx. Set Task Scheduler entry — principal = comfyui.lsblk — never format sda.comfy_secure.