Skip to content

Commit 2ae3aec

Browse files
lingshichatclaude
andcommitted
fix(deploy): improve first-time deployment experience
- Fix release asset naming: add arona-webui-latest.tar.gz/zip aliases so README curl commands don't 404 - Enhance .env.example with all config vars and grouped comments - Add auto npm install to start.sh/start.bat for git clone users - Enhance docker-compose.yml with healthcheck, extra_hosts, env params - Update README with first-run setup guide and gateway-side preparation - Add quick start template to GitHub Release body Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7909440 commit 2ae3aec

File tree

6 files changed

+343
-21
lines changed

6 files changed

+343
-21
lines changed

.env.example

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
1-
# OpenClaw WebUI local development template
2-
# Copy this file to .env and fill real values.
1+
# Arona WebUI Configuration
2+
# Copy to .env.local and edit: cp .env.example .env.local
3+
# Or use the Setup Wizard: http://localhost:18790/setup.html
34

4-
# Login credentials for WebUI
5-
GATEWAY_USERNAME=admin
6-
GATEWAY_PASSWORD=
7-
8-
# Optional: token-based auth (if your gateway uses token instead of password)
9-
GATEWAY_TOKEN=
5+
# ─── Gateway Connection ───
106

11-
# OpenClaw gateway websocket URL
7+
# OpenClaw gateway WebSocket URL
128
GATEWAY_URL=ws://127.0.0.1:18789
139

14-
# Allowed origin for browser access to WebUI
10+
# Authentication — choose ONE (leave both empty if gateway has no auth)
11+
GATEWAY_PASSWORD=
12+
# GATEWAY_TOKEN=
13+
14+
# Browser origin for WebSocket handshake (must match how you access the WebUI)
1515
GATEWAY_ORIGIN=http://localhost:18790
1616

17-
# WebUI server port
17+
# Override the WebSocket URL the browser uses to connect to gateway directly.
18+
# Leave empty for auto-detection. Useful for reverse proxy setups.
19+
# GATEWAY_PUBLIC_WS_URL=
20+
21+
# ─── WebUI Auth ───
22+
23+
# Login username
24+
GATEWAY_USERNAME=admin
25+
26+
# ─── Server ───
27+
28+
# HTTP listen port
1829
PORT=18790

.github/workflows/release.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 18
20+
21+
- run: npm ci --production
22+
23+
- name: Package release archives
24+
run: |
25+
VERSION="${GITHUB_REF_NAME}"
26+
STAGING="arona-webui-${VERSION}"
27+
28+
mkdir "$STAGING"
29+
cp -r src public node_modules "$STAGING/"
30+
cp package.json start.bat start.sh .env.example README.md LICENSE "$STAGING/" 2>/dev/null || true
31+
cp -r scripts "$STAGING/" 2>/dev/null || true
32+
chmod +x "$STAGING/start.sh" "$STAGING/scripts/install.sh" 2>/dev/null || true
33+
34+
zip -r "arona-webui-${VERSION}.zip" "$STAGING"
35+
tar czf "arona-webui-${VERSION}.tar.gz" "$STAGING"
36+
37+
# Fixed-name aliases so README curl commands always work
38+
cp "arona-webui-${VERSION}.zip" "arona-webui-latest.zip"
39+
cp "arona-webui-${VERSION}.tar.gz" "arona-webui-latest.tar.gz"
40+
41+
- name: Create GitHub Release
42+
uses: softprops/action-gh-release@v2
43+
with:
44+
generate_release_notes: true
45+
body: |
46+
## Quick Start / 快速开始
47+
48+
**Windows**: Download `.zip` → Extract → Double-click `start.bat`
49+
50+
**macOS / Linux**:
51+
```bash
52+
curl -fsSL https://github.com/lingshichat/Arona_WebUI/releases/latest/download/arona-webui-latest.tar.gz | tar xz
53+
cd arona-webui-*/
54+
./start.sh
55+
```
56+
57+
**Docker**:
58+
```bash
59+
GATEWAY_URL=ws://your-gateway:18789 GATEWAY_PASSWORD=xxx docker compose up -d
60+
```
61+
62+
首次启动浏览器会自动打开配置向导,按提示填入网关地址和密码即可。
63+
64+
详见 [README](https://github.com/lingshichat/Arona_WebUI#readme)。
65+
files: |
66+
arona-webui-*.zip
67+
arona-webui-*.tar.gz

README.md

Lines changed: 130 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,146 @@ Monitor, configure, and interact with your OpenClaw instance from the browser.
5050

5151
## Quick Start / 快速开始
5252

53+
### Windows
54+
55+
1. Install [Node.js](https://nodejs.org/) 18+ (if not already) / 安装 [Node.js](https://nodejs.org/) 18+
56+
2. Download `arona-webui-latest.zip` from [Latest Release](https://github.com/lingshichat/Arona_WebUI/releases/latest) / 从 [最新发行版](https://github.com/lingshichat/Arona_WebUI/releases/latest) 下载 `.zip`
57+
3. Extract the zip / 解压
58+
4. Double-click **`start.bat`** / 双击 **`start.bat`**(首次会自动安装依赖)
59+
5. Browser opens automatically → Setup Wizard / 浏览器自动打开 → 配置向导
60+
61+
### macOS / Linux
62+
63+
```bash
64+
# 1. Install Node.js 18+ (if not already)
65+
# macOS: brew install node
66+
# Ubuntu: sudo apt install -y nodejs
67+
68+
# 2. Download & extract latest release / 下载解压最新发行包
69+
curl -fsSL https://github.com/lingshichat/Arona_WebUI/releases/latest/download/arona-webui-latest.tar.gz \
70+
| tar xz
71+
cd arona-webui-*/
72+
73+
# 3. Start (auto-installs dependencies on first run) / 启动(首次自动安装依赖)
74+
./start.sh
75+
```
76+
77+
### First-run Setup / 首次配置
78+
79+
On first launch, the browser will open the **Setup Wizard** automatically:
80+
81+
首次启动时,浏览器会自动打开**配置向导**
82+
83+
1. **Fill in your gateway info / 填写网关信息** — Gateway URL (`ws://127.0.0.1:18789`), password or token, username
84+
2. **Test connection / 测试连接** — Click "测试连接" to verify
85+
3. **Save & restart / 保存重启** — WebUI restarts and connects to your gateway
86+
4. **(Optional) Patch gateway / 配置网关** — Set `allowedOrigins` and `dangerouslyDisableDeviceAuth` on your gateway
87+
88+
> You can also skip the wizard and configure manually: `cp .env.example .env.local` then edit.
89+
>
90+
> 也可以跳过向导手动配置:`cp .env.example .env.local` 然后编辑。
91+
92+
### Gateway-side preparation / 网关侧准备
93+
94+
If your gateway uses **non-loopback** access (e.g. LAN or Docker), you may need to configure it:
95+
96+
如果网关不是 loopback 访问(如局域网或 Docker),可能需要在网关侧配置:
97+
98+
```json5
99+
// ~/.openclaw/openclaw.json
100+
{
101+
gateway: {
102+
controlUi: {
103+
allowedOrigins: ["http://localhost:18790"],
104+
dangerouslyDisableDeviceAuth: true // required for Arona WebUI
105+
}
106+
}
107+
}
108+
```
109+
110+
Or use `openclaw config set` / 或通过命令设置:
111+
112+
```bash
113+
openclaw config set gateway.controlUi.allowedOrigins '["http://localhost:18790"]'
114+
openclaw config set gateway.controlUi.dangerouslyDisableDeviceAuth true
115+
```
116+
117+
> The Setup Wizard (Step 3) can also apply these settings automatically via WebSocket.
118+
>
119+
> 配置向导第 3 步也可以通过 WebSocket 自动应用这些设置。
120+
121+
> Default port is `18790`. To change it, edit `PORT=<your-port>` in `.env.local`.
122+
>
123+
> 默认端口 `18790`。如需修改,在 `.env.local` 中设置 `PORT=<端口号>`
124+
125+
---
126+
127+
## Other Install Methods / 其他安装方式
128+
129+
<details>
130+
<summary><b>One-line Install Script / 一键安装脚本</b></summary>
131+
53132
```bash
54-
git clone https://github.com/nicepkg/arona-webui.git
55-
cd arona-webui
56-
npm install
133+
bash <(curl -fsSL https://raw.githubusercontent.com/lingshichat/Arona_WebUI/main/scripts/install.sh)
57134
```
58135

59-
Create `.env.local` with your gateway connection info / 创建 `.env.local` 填写网关连接信息:
136+
Downloads the latest release, extracts it, and walks you through configuring `.env.local` interactively.
137+
138+
下载最新发行包、解压、交互式配置 `.env.local`
139+
140+
</details>
60141

61-
```env
62-
GATEWAY_URL=ws://127.0.0.1:18789
63-
GATEWAY_PASSWORD=your-gateway-password
142+
<details>
143+
<summary><b>Docker</b></summary>
144+
145+
```bash
146+
git clone https://github.com/lingshichat/Arona_WebUI.git
147+
cd Arona_WebUI
148+
docker compose up -d
149+
# Open http://localhost:18790 → Setup Wizard
150+
```
151+
152+
Gateway on another machine / 网关在其他机器上:
153+
154+
```bash
155+
GATEWAY_URL=ws://192.168.1.100:18789 GATEWAY_PASSWORD=xxx docker compose up -d
64156
```
65157

66-
Start the server / 启动服务:
158+
> **Linux host gateway / Linux 宿主机网关**: Uncomment `extra_hosts` in `docker-compose.yml`, or use `network_mode: host`.
159+
>
160+
> **Linux 宿主机网关**: 取消 `docker-compose.yml``extra_hosts` 的注释,或使用 `network_mode: host`
161+
162+
</details>
163+
164+
<details>
165+
<summary><b>Manual / 手动安装(开发者)</b></summary>
67166

68167
```bash
69-
npm start
70-
# Open / 打开 http://localhost:18790
168+
git clone https://github.com/lingshichat/Arona_WebUI.git
169+
cd Arona_WebUI
170+
./start.sh # auto-installs deps + starts server / 自动安装依赖并启动
171+
# Or: npm install && npm start
172+
# Open http://localhost:18790 → Setup Wizard
71173
```
72174

175+
</details>
176+
177+
## Setup Wizard / 配置向导
178+
179+
On first launch, the browser auto-redirects to the Setup Wizard. You can also open it manually:
180+
181+
首次启动时浏览器会自动跳转到配置向导,也可以手动访问:
182+
183+
```
184+
http://localhost:18790/setup.html
185+
```
186+
187+
The wizard guides you through: WebUI config → connection check → gateway config.
188+
189+
向导流程:WebUI 配置 → 连接检测 → 网关配置(bind / allowedOrigins / disableDeviceAuth)。
190+
191+
> Setup APIs are localhost-only (403 from remote). / Setup API 仅限本机访问。
192+
73193
## Configuration / 配置项
74194

75195
| Variable / 变量 | Default / 默认值 | Description / 说明 |

docker-compose.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Arona WebUI — Docker Compose
2+
#
3+
# Quick start:
4+
# docker compose up -d
5+
#
6+
# With custom env:
7+
# cp .env.example .env.local
8+
# # edit .env.local, then:
9+
# docker compose --env-file .env.local up -d
10+
#
11+
# Linux host gateway:
12+
# If OpenClaw gateway runs on the Docker host (Linux), uncomment
13+
# extra_hosts below, or use network_mode: host instead.
14+
15+
services:
16+
arona-webui:
17+
build: .
18+
ports:
19+
- "${PORT:-18790}:18790"
20+
environment:
21+
- GATEWAY_URL=${GATEWAY_URL:-ws://host.docker.internal:18789}
22+
- GATEWAY_ORIGIN=${GATEWAY_ORIGIN:-http://localhost:18790}
23+
- GATEWAY_USERNAME=${GATEWAY_USERNAME:-admin}
24+
# Auth — uncomment one:
25+
# - GATEWAY_PASSWORD=your-password
26+
# - GATEWAY_TOKEN=your-token
27+
# Browser WS override (for reverse proxy):
28+
# - GATEWAY_PUBLIC_WS_URL=
29+
# Linux: enable host.docker.internal
30+
# extra_hosts:
31+
# - "host.docker.internal:host-gateway"
32+
restart: unless-stopped
33+
healthcheck:
34+
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:18790/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
35+
interval: 30s
36+
timeout: 5s
37+
retries: 3
38+
start_period: 10s

start.bat

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
@echo off
2+
chcp 65001 >nul 2>&1
3+
title Arona WebUI
4+
5+
:: Check Node.js
6+
where node >nul 2>&1
7+
if %errorlevel% neq 0 (
8+
echo.
9+
echo [ERROR] Node.js is not installed or not in PATH.
10+
echo.
11+
echo Please download and install Node.js 18+ from:
12+
echo https://nodejs.org/
13+
echo.
14+
pause
15+
exit /b 1
16+
)
17+
18+
:: Auto-install dependencies if missing
19+
if not exist "node_modules" (
20+
echo Installing dependencies...
21+
npm install --production
22+
)
23+
24+
:: Read PORT from .env.local (default 18790)
25+
set PORT=18790
26+
if exist .env.local (
27+
for /f "tokens=1,* delims==" %%A in (.env.local) do (
28+
if "%%A"=="PORT" set PORT=%%B
29+
)
30+
)
31+
32+
:: Start server
33+
echo Starting Arona WebUI on port %PORT% ...
34+
start "" "http://localhost:%PORT%"
35+
node src/server.mjs
36+
if %errorlevel% neq 0 (
37+
echo.
38+
echo [ERROR] Server exited with an error.
39+
pause
40+
)

start.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
cd "$(dirname "$0")"
4+
5+
# Check Node.js
6+
if ! command -v node &>/dev/null; then
7+
echo ""
8+
echo " [ERROR] Node.js is not installed."
9+
echo ""
10+
echo " macOS: brew install node"
11+
echo " Ubuntu: sudo apt install -y nodejs"
12+
echo " Windows: https://nodejs.org/"
13+
echo ""
14+
exit 1
15+
fi
16+
17+
# Auto-install dependencies if missing
18+
if [ ! -d "node_modules" ]; then
19+
echo " Installing dependencies..."
20+
npm install --production
21+
fi
22+
23+
# Read PORT from .env.local (default 18790)
24+
PORT=18790
25+
if [ -f .env.local ]; then
26+
_p=$(grep '^PORT=' .env.local 2>/dev/null | cut -d= -f2)
27+
[ -n "$_p" ] && PORT="$_p"
28+
fi
29+
30+
echo " Starting Arona WebUI on port ${PORT} ..."
31+
32+
# Start server in background
33+
node src/server.mjs &
34+
SERVER_PID=$!
35+
36+
# Wait briefly then open browser
37+
sleep 1
38+
URL="http://localhost:${PORT}"
39+
if command -v xdg-open &>/dev/null; then
40+
xdg-open "$URL" 2>/dev/null || true
41+
elif command -v open &>/dev/null; then
42+
open "$URL" 2>/dev/null || true
43+
fi
44+
45+
# Wait for server process
46+
wait $SERVER_PID

0 commit comments

Comments
 (0)