Myway + OpenClaw Setup
Myway is a self-hosted personal AI home screen — a local-first PWA that gives you a
phone-style dashboard powered by AI. This skill sets it up using OpenClaw as the
AI backend.
When to use this skill
- - User wants to install Myway and already has OpenClaw running locally
- User asks about setting up a personal AI dashboard with OpenClaw
- User wants to configure or reconfigure their Myway + OpenClaw connection
Prerequisites
Check these before starting:
- 1. Node.js 22+ — run
node -v to verify (must show v22 or higher) - yarn — run
yarn -v to verify. If missing: INLINECODE2 - OpenClaw — run
openclaw gateway status or check if ~/.openclaw/openclaw.json exists
If prerequisites fail, stop and help the user install them first.
Installation
Optionally ask the user for:
- 1. Their OpenClaw gateway URL (default:
http://localhost:18789) - A gateway token (usually not needed for localhost)
- A directory for the file browser (default:
~/vault) - Where to install (directory name, default:
myway)
Then run the setup:
CODEBLOCK0
All flags are optional except --ai-mode openclaw. Defaults:
- - directory: INLINECODE9
- INLINECODE10 : INLINECODE11
- INLINECODE12 : empty (not needed for localhost)
- INLINECODE13 : INLINECODE14
- INLINECODE15 : INLINECODE16
Add --no-aport to skip APort guardrails setup.
The command will:
- 1. Scaffold a new directory with the Myway source
- Install dependencies (2-5 minutes)
- Write
.env.local with the provided config - Initialize the database
- Build for production (1-2 minutes)
- Start the server and open the browser (if
--start is passed)
Important: This command takes 3-7 minutes to complete. Do not interrupt it.
Verify it worked
After the command completes with --start, the server should be running. Verify:
CODEBLOCK1
Should return 200. If the user didn't pass --start:
CODEBLOCK2
Background running with PM2
For long-running deployments:
CODEBLOCK3
Reconfiguring
To reconfigure an existing install:
CODEBLOCK4
Or edit .env.local directly, then rebuild:
CODEBLOCK5
OpenClaw connection details
Myway connects to OpenClaw via its gateway API:
- - Default URL: INLINECODE24
- Config file:
~/.openclaw/openclaw.json (auto-detected at runtime) - Auth: Optional gateway token, not needed for localhost setups
- How it works: Myway sends chat/skill requests to OpenClaw's gateway, which routes them to the configured AI model
Troubleshooting
| Problem | Fix |
|---|
| OpenClaw not detected | Run openclaw gateway status to verify it's running |
| Connection refused |
Check
OPENCLAW_BASE_URL in
.env.local matches
openclaw gateway status output |
| Port already in use | Change
PORT in
.env.local or:
fuser -k 48291/tcp |
| Black screen after restart | Run
pm2 logs myway --err. Usually EADDRINUSE — kill stale process and restart PM2 |
| Build fails | Ensure Node.js 22+ and run
yarn install first |
| Command hangs | Normal — dependency install takes 2-5 min, build takes 1-2 min |
Environment variables
All config lives in <directory>/.env.local. Key variables for OpenClaw mode:
CODEBLOCK6
See .env.local.example in the install directory for all options (Google OAuth, Telegram, TTS, etc.).
Myway + OpenClaw 设置
Myway 是一个自托管的个人AI主屏幕——一款本地优先的渐进式网页应用,为你提供由AI驱动的手机风格仪表盘。本技能使用 OpenClaw 作为AI后端进行设置。
何时使用本技能
- - 用户想要安装Myway,且本地已运行OpenClaw
- 用户询问如何使用OpenClaw设置个人AI仪表盘
- 用户想要配置或重新配置Myway + OpenClaw连接
前置条件
开始前请检查以下内容:
- 1. Node.js 22+ — 运行 node -v 验证(必须显示v22或更高版本)
- yarn — 运行 yarn -v 验证。如果缺失:npm install -g yarn
- OpenClaw — 运行 openclaw gateway status 或检查 ~/.openclaw/openclaw.json 是否存在
如果前置条件不满足,请停止并先帮助用户安装它们。
安装
可选询问用户:
- 1. 他们的OpenClaw网关URL(默认:http://localhost:18789)
- 网关令牌(本地主机通常不需要)
- 文件浏览器的目录(默认:~/vault)
- 安装位置(目录名称,默认:myway)
然后运行设置:
bash
npx @uchibeke/myway <目录> \
--ai-mode openclaw \
--openclaw-url http://localhost:18789 \
--root ~/vault \
--port 48291 \
--start
除 --ai-mode openclaw 外,所有标志均为可选。默认值:
- - 目录:myway
- --openclaw-url:http://localhost:18789
- --openclaw-token:空(本地主机不需要)
- --root:~/vault
- --port:48291
添加 --no-aport 可跳过APort护栏设置。
该命令将:
- 1. 创建包含Myway源码的新目录
- 安装依赖(2-5分钟)
- 使用提供的配置写入 .env.local
- 初始化数据库
- 构建生产版本(1-2分钟)
- 启动服务器并打开浏览器(如果传递了 --start)
重要:此命令需要3-7分钟完成。请勿中断。
验证是否成功
命令以 --start 完成后,服务器应正在运行。验证:
bash
curl -s -o /dev/null -w %{http_code} http://localhost:48291/
应返回 200。如果用户没有传递 --start:
bash
cd <目录>
yarn start
使用PM2后台运行
对于长期运行部署:
bash
cd <目录>
cp ecosystem.config.cjs.example ecosystem.config.cjs
pm2 start ecosystem.config.cjs
重新配置
重新配置现有安装:
bash
cd <现有myway目录>
npx @uchibeke/myway --setup \
--ai-mode openclaw \
--openclaw-url http://localhost:18789
或直接编辑 .env.local,然后重新构建:
bash
cd <现有myway目录>
使用新值编辑 .env.local
yarn build
重启:yarn start,或 pm2 restart myway
OpenClaw连接详情
Myway通过其网关API连接到OpenClaw:
- - 默认URL:http://localhost:18789
- 配置文件:~/.openclaw/openclaw.json(运行时自动检测)
- 认证:可选的网关令牌,本地主机设置不需要
- 工作原理:Myway将聊天/技能请求发送到OpenClaw的网关,网关将其路由到配置的AI模型
故障排除
| 问题 | 解决方法 |
|---|
| 未检测到OpenClaw | 运行 openclaw gateway status 验证其是否正在运行 |
| 连接被拒绝 |
检查 .env.local 中的 OPENCLAW
BASEURL 是否与 openclaw gateway status 输出匹配 |
| 端口已被占用 | 更改 .env.local 中的 PORT 或:fuser -k 48291/tcp |
| 重启后黑屏 | 运行 pm2 logs myway --err。通常是EADDRINUSE — 终止旧进程并重启PM2 |
| 构建失败 | 确保Node.js 22+并先运行 yarn install |
| 命令卡住 | 正常 — 依赖安装需要2-5分钟,构建需要1-2分钟 |
环境变量
所有配置位于 <目录>/.env.local。OpenClaw模式的关键变量:
env
PORT=48291
MYWAY_ROOT=~/vault
OPENCLAWBASEURL=http://localhost:18789
OPENCLAWGATEWAYTOKEN= # 仅当网关需要认证时
MYWAY_SECRET=<自动生成>
查看安装目录中的 .env.local.example 获取所有选项(Google OAuth、Telegram、TTS等)。