OpenClaw Starter Kit for running a self-hosted OpenClaw in Diploi Development Environment with:
- A wrapper server (
server/) that initializes config, manages the OpenClaw gateway, and exposes control APIs - A React/Vite control UI (
web/)
On startup, the wrapper:
- Initializes
/app/openclaw.json(if missing) viaopenclaw onboard - Patches config defaults (gateway token, model provider, channel/plugin defaults)
- Starts and monitors the OpenClaw gateway on
127.0.0.1:18789 - Proxies:
/dashboardto OpenClaw gateway UI- all other app routes to the Vite frontend
- Diploi's Development Environment
- Node.js 22+
- npm
- OpenClaw runtime available as either:
openclawonPATH, or/lib/openclaw/dist/index.js(provided in this repo's Docker images)
Common variables used by the wrapper:
PORT(default:3000)HOSTNAME(default:0.0.0.0)VITE_HOST(default:127.0.0.1)VITE_PORT(default:5173)OPENCLAW_CONFIG_PATH(default:/app/openclaw.json)OPENCLAW_STATE_DIR(default:/app)OPENCLAW_WORKSPACE_DIR(default:/app/workspace)OPENCLAW_GATEWAY_TOKEN(optional; generated if missing)DIPLOI_AI_GATEWAY_URL/DIPLOI_AI_GATEWAY_TOKEN(optional model proxy wiring)DIPLOI_LOGIN_SECRET(required to validatediploi-jwt-logincookie)DIPLOI_LOGIN_USERNAME/DIPLOI_LOGIN_PASSWORD(credential login)
Install dependencies:
npm installRun dev mode (process manager + wrapper API + Vite UI):
npm run devThis starts:
server/processManager.tsserver/index.ts(Hono wrapper API)webVite dev server
Wrapper endpoints:
GET /healthzGET /api/dashboard-tokenGET /api/gateway/statusPOST /api/gateway/startPOST /api/gateway/stopPOST /api/gateway/restartPOST /api/full-resetPOST /api/logoutWS /api/terminal-ws(browser terminal)
server/
index.ts # wrapper server + proxy
processManager.ts # gateway lifecycle manager
initOpenclaw.ts # OpenClaw config bootstrap + patching
api.ts # API routes
terminalWs.ts # PTY websocket bridge
web/
src/ # React UI
Dockerfile.dev # full dev image including OpenClaw build
Dockerfile # production runtime image
diploi.yaml # Diploi starter metadata