mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 06:57:26 +00:00
Docs: add WSL2 boot auto-start guide (#31616)
This commit is contained in:
@@ -55,6 +55,50 @@ Repair/migrate:
|
|||||||
openclaw doctor
|
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)
|
## Advanced: expose WSL services over LAN (portproxy)
|
||||||
|
|
||||||
WSL has its own virtual network. If another machine needs to reach a service
|
WSL has its own virtual network. If another machine needs to reach a service
|
||||||
|
|||||||
Reference in New Issue
Block a user