diff --git a/docs/platforms/windows.md b/docs/platforms/windows.md index d15131486..3ab668ea0 100644 --- a/docs/platforms/windows.md +++ b/docs/platforms/windows.md @@ -55,6 +55,50 @@ Repair/migrate: openclaw doctor ``` +## Gateway auto-start before Windows login + +For headless setups, ensure the full boot chain runs even when no one logs into +Windows. + +### 1) Keep user services running without login + +Inside WSL: + +```bash +sudo loginctl enable-linger "$(whoami)" +``` + +### 2) Install the OpenClaw gateway user service + +Inside WSL: + +```bash +openclaw gateway install +``` + +### 3) Start WSL automatically at Windows boot + +In PowerShell as Administrator: + +```powershell +schtasks /create /tn "WSL Boot" /tr "wsl.exe -d Ubuntu --exec /bin/true" /sc onstart /ru SYSTEM +``` + +Replace `Ubuntu` with your distro name from: + +```powershell +wsl --list --verbose +``` + +### Verify startup chain + +After a reboot (before Windows sign-in), check from WSL: + +```bash +systemctl --user is-enabled openclaw-gateway +systemctl --user status openclaw-gateway --no-pager +``` + ## Advanced: expose WSL services over LAN (portproxy) WSL has its own virtual network. If another machine needs to reach a service