From 67b2dde7c5711e4e928110f3a037e13f8d228f4b Mon Sep 17 00:00:00 2001 From: Mark L <73659136+liuxiaopai-ai@users.noreply.github.com> Date: Tue, 3 Mar 2026 01:07:15 +0800 Subject: [PATCH] Docs: add WSL2 boot auto-start guide (#31616) --- docs/platforms/windows.md | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/docs/platforms/windows.md b/docs/platforms/windows.md index d1513148689..3ab668ea01e 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