- 使用 ComfyUI 和 Z Image Turbo 生成图像
- 使用 LM Studio 运行并提供 LLM 服务
- 使用 n8n 和本地 LLM 自动化工作流
- 使用 VS Code 和 Qwen3-Coder 进行本地 LLM 编码
- 基于 AMD ROCm™ 软件在 PyTorch 上运行 LLM
- AMD Ryzen™ AI NPU 本地计算机视觉
- Lemonade 入门指南
- Ollama 入门
- OpenHands 与本地 LLM 入门指南
- Ryzen AI Halo(代号 Project Zenith)入门指南
- Ryzen™ AI Halo 双机通过 RPC 集群
- vLLM 入门指南
- 两台 Ryzen™ AI Halo 的 RCCL 集群
- 使用 AMD Sync 进行远程开发
- 使用 ds4 运行 DeepSeek V4 Flash
- 使用 GAIA 构建你的第一个智能体
- 使用 Lemonade Server 在本地运行 OpenClaw
- 使用 LLaMA-Factory 微调 LLM
- 使用 PyTorch 和 AMD ROCm™ 构建自定义 GPU 内核
- 使用 PyTorch 和 AMD ROCm™ 软件微调大语言模型
- 使用 Unsloth 微调 LLM
- 使用智能体画布构建 GitHub 到 Slack 的开发摘要
- 四台 Ryzen™ AI Halo 的 RCCL 集群
- 在 Open WebUI 中与大语言模型聊天
- 在本地通过 Lemonade Server 运行 Hermes 智能体
- 实时语音到语音翻译
- 集群化四台 Ryzen™ AI Halo
Wait for native Windows Lemonade to be ready before touching the bridge. At
Keep the WSL <-> Lemonade Bridge Working Automatically (Optional)
WSL2 runs on a virtual network whose gateway IP can change after a restart (for example after “wsl —shutdown” or a reboot). When that happens, the Windows port proxy that lets OpenClaw (inside WSL) reach Lemonade (on Windows) points at the old IP, and the bridge stops working.
This optional helper script detects a broken bridge and rebuilds the port proxy and firewall rule against the current gateway IP. You can also schedule it to run at startup and sign-in, so the bridge repairs itself automatically and you never have to fix it by hand.
All the PowerShell steps below must be run in an elevated shell: right-click Windows PowerShell and choose “Run as administrator”.
Lemonade Server must be running on Windows for the bridge to work. Lemonade should be running before the bridge repairs automatically after a reboot, otherwise there is nothing for the bridge to point to. The script below waits up to about 2 minutes for Lemonade to become ready before it repairs the bridge, which absorbs the normal start-up delay at boot.
- Create the script file
New-Item -ItemType Directory -Force C:\Scripts | Out-Nullnotepad C:\Scripts\Repair-LemonadeWslBridge.ps1- Paste the following into the file and save it
$ErrorActionPreference = "Stop"$Distro = "Ubuntu-24.04"$LemonadePort = 13305$PrivateRemoteRanges = @("10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16")
function Test-UrlFromWindows { param([string]$Url) $oldPreference = $ErrorActionPreference $ErrorActionPreference = "Continue" try { curl.exe -fsS --max-time 5 $Url *> $null return ($LASTEXITCODE -eq 0) } finally { $ErrorActionPreference = $oldPreference }}
function Test-UrlFromWsl { param([string]$Url) $oldPreference = $ErrorActionPreference $ErrorActionPreference = "Continue" try { wsl -d $Distro -- bash -lc "curl -fsS --max-time 5 '$Url' >/dev/null 2>/dev/null" *> $null return ($LASTEXITCODE -eq 0) } finally { $ErrorActionPreference = $oldPreference }}
$WslGateway = (wsl -d $Distro -- bash -lc "ip route show default | sed -n 's/^default via \([^ ]*\).*/\1/p' | head -1").Trim()if (-not $WslGateway) { throw "Could not determine WSL gateway IP"}
$NativeUrl = "http://127.0.0.1:$LemonadePort/api/v1/models"$BridgeUrl = "http://${WslGateway}:$LemonadePort/api/v1/models"Write-Host "Current WSL gateway IP: $WslGateway"
# boot the scheduled task can start before Lemonade has finished loading, so we# poll for up to ~2 minutes instead of failing immediately.$nativeReady = $falsefor ($i = 0; $i -lt 60; $i++) { if (Test-UrlFromWindows $NativeUrl) { $nativeReady = $true; break } Write-Host "Waiting for Lemonade to be ready at $NativeUrl ..." Start-Sleep -Seconds 2}if (-not $nativeReady) { throw "Native Windows Lemonade is not reachable at $NativeUrl after waiting. Make sure Lemonade Server is running and set to start automatically at login."}Write-Host "OK: Native Windows Lemonade is reachable"
if (Test-UrlFromWsl $BridgeUrl) { Write-Host "OK: The WSL Lemonade bridge is already working" exit 0}Write-Host "The WSL Lemonade bridge is not working. Recreating the port proxy and firewall rule..."
netsh interface portproxy resetRemove-NetFirewallRule -DisplayName "Lemonade-WSL" -ErrorAction SilentlyContinueRestart-Service iphlpsvc -ForceSet-Service iphlpsvc -StartupType Automatic
netsh interface portproxy add v4tov4 ` listenaddress=$WslGateway listenport=$LemonadePort ` connectaddress=127.0.0.1 connectport=$LemonadePort
New-NetFirewallRule ` -DisplayName "Lemonade-WSL" ` -Direction Inbound ` -Protocol TCP ` -LocalAddress $WslGateway ` -LocalPort $LemonadePort ` -RemoteAddress $PrivateRemoteRanges ` -Action Allow | Out-Null
Start-Sleep -Seconds 2
Write-Host "Current portproxy rules:"netsh interface portproxy show all
if (-not (Test-UrlFromWindows $BridgeUrl)) { throw "Windows portproxy is still not reachable at $BridgeUrl"}if (-not (Test-UrlFromWsl $BridgeUrl)) { throw "WSL still cannot reach Windows Lemonade through $BridgeUrl"}Write-Host "OK: WSL Lemonade bridge repaired successfully"- Run it once to confirm the bridge is healthy
powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\Scripts\Repair-LemonadeWslBridge.ps1You should see an “OK: …” message.
If it reports that Lemonade is not reachable even after the wait, start Lemonade Server on Windows, then run the script again.
- (Optional) Run it automatically at startup and sign-in
Register a scheduled task so the bridge is checked and repaired every time you start or sign in to the machine:
$TaskName = "Repair Lemonade WSL Bridge"$ScriptPath = "C:\Scripts\Repair-LemonadeWslBridge.ps1"
$Action = New-ScheduledTaskAction ` -Execute "powershell.exe" ` -Argument "-NoProfile -ExecutionPolicy Bypass -File `"$ScriptPath`""
$TriggerAtStartup = New-ScheduledTaskTrigger -AtStartup$TriggerAtLogon = New-ScheduledTaskTrigger -AtLogOn
$Principal = New-ScheduledTaskPrincipal ` -UserId "$env:USERDOMAIN\$env:USERNAME" ` -LogonType Interactive ` -RunLevel Highest
Register-ScheduledTask ` -TaskName $TaskName ` -Action $Action ` -Trigger $TriggerAtStartup, $TriggerAtLogon ` -Principal $Principal ` -Force- Test the scheduled task
Start-ScheduledTask -TaskName "Repair Lemonade WSL Bridge"Start-Sleep -Seconds 10Get-ScheduledTaskInfo -TaskName "Repair Lemonade WSL Bridge"A “LastTaskResult” of 0 means the task ran successfully.
- (Optional) Confirm the bridge from WSL
Open your WSL terminal and verify that OpenClaw can reach Lemonade through the bridge:
WINDOWS_HOST=$(ip route show default | awk '{print $3}' | head -1)curl -fsS "http://$WINDOWS_HOST:13305/api/v1/models" >/dev/null && echo "OK: WSL can reach Lemonade"需要有关此操作手册的帮助?
遇到问题或有疑问?请创建 GitHub issue,我们的团队会跟进处理。