Skip to content

OpenClaw — Development Notes ​

Current State (2026-02-16) ​

Platform: WSL Ubuntu (native install) — migrated from Docker to solve browser dashboard pairing issue.

ComponentStatusDetails
OpenClawv2026.2.15npm install -g openclaw in WSL
Node.jsv22.22.0via nodesource
gogcliv0.11.0/usr/local/bin/gog
LLManthropic/claude-sonnet-4-5API key via env var
GatewayRunning (systemd)port 18789, loopback, auto-starts on WSL boot
DashboardWorkinghttp://localhost:18789/#token=<token>
TUIWorkingopenclaw tui
Gmail (gogcli)Working via agentrichard@salesfield.net, keyring password persisted in systemd
Web fetchWorkingTested: HN headline scrape via dashboard
Brave SearchNOT configuredOnly set in old Docker image
Messaging channelsNone connectedTelegram/WhatsApp pending
Agent identityNot personalizedSOUL.md / IDENTITY.md exist but uncustomized

Resume Checklist (Pick Up Here) ​

The gateway runs as a systemd service and auto-starts. No manual startup needed.

To verify it's running:

bash
systemctl --user status openclaw-gateway.service

To open the dashboard:

http://localhost:18789/#token=be91558ddb97799b89cbf67db3199f14f97efc704140675e

Or run openclaw dashboard --no-open for a fresh tokenized URL.

TUI (optional): openclaw tui in any WSL terminal.

If gateway is stopped for any reason:

bash
systemctl --user start openclaw-gateway.service

What's Done ​

  • [x] Gateway running as systemd service (auto-starts, survives terminal close)
  • [x] GOG_KEYRING_PASSWORD persisted in systemd override (~/.config/systemd/user/openclaw-gateway.service.d/override.conf)
  • [x] Gmail working through agent — agent knows to use gog commands (configured in TOOLS.md)
  • [x] User lingering enabled (loginctl enable-linger ic0s) — services persist without login session
  • [x] WSL set as default distro
  • [x] Dashboard, TUI, web fetch all confirmed working

TODO (Next Session) ​

  • [ ] Personalize agent identity — edit SOUL.md / IDENTITY.md in ~/.openclaw/workspace/
  • [ ] Set Brave Search API key in WSL OpenClaw config
  • [ ] Connect a messaging channel (Telegram or WhatsApp)
  • [ ] Persist ANTHROPIC_API_KEY — currently in systemd service, verify it survives updates
  • [ ] Set up persistent volume / backup for ~/.openclaw/ data

Key Gotchas ​

Docker NAT breaks device pairing (why we moved to WSL) ​

Docker Desktop on Windows routes through NAT (172.17.0.x). OpenClaw rejects non-loopback WebSocket connections. Config bypasses are broken in v2026.2.14. WSL native install fixes this — browser connects via true 127.0.0.1.

gogcli keyring passphrase ​

gogcli encrypts tokens with a keyring passphrase. For the agent to use gogcli non-interactively, GOG_KEYRING_PASSWORD must be set in the gateway's environment. This is now handled via systemd override.

gogcli is not on npm ​

OpenClaw docs say npm install -g gog-cli — that package doesn't exist. Install binary from GitHub releases: https://github.com/steipete/gogcli. Binary name is gog.

gogcli auth requires --manual in WSL ​

gog auth add email@domain.com --manual --services gmail — gives URL to visit, paste back the FULL redirect URL (not just the auth code).

gogcli credentials setup ​

Must run gog auth credentials set <path-to-client_secret.json> before gog auth add. Credentials stored at ~/.config/gogcli/credentials.json.

OpenClaw command names ​

  • Gateway: openclaw gateway (not openclaw run)
  • Chat: openclaw tui (no chat command)
  • Plugins: openclaw plugins install (not add), openclaw plugins list (not search)

Browser token caching ​

Browser caches device tokens in localStorage per origin. When switching installs or regenerating tokens, use the tokenized URL (#token=...) or clear localStorage.

WSL sudo password ​

If forgotten: wsl -d Ubuntu -u root passwd <username> from Windows cmd.

Systemd service management ​

bash
systemctl --user start openclaw-gateway.service
systemctl --user stop openclaw-gateway.service
systemctl --user restart openclaw-gateway.service
systemctl --user status openclaw-gateway.service

Editing systemd overrides without nano ​

bash
# Create/edit override (avoids nano):
mkdir -p ~/.config/systemd/user/openclaw-gateway.service.d
echo -e '[Service]\nEnvironment="KEY=value"' > ~/.config/systemd/user/openclaw-gateway.service.d/override.conf
systemctl --user daemon-reload
systemctl --user restart openclaw-gateway.service

Architecture ​

WSL Ubuntu (native)
├── OpenClaw Gateway (:18789, loopback, systemd managed)
│   ├── LLM: Anthropic Claude Sonnet 4.5
│   ├── gogcli (Gmail for richard@salesfield.net) — keyring password via systemd env
│   ├── Skills (configurable via clawhub)
│   └── Channels (none connected yet)
├── Browser dashboard: http://localhost:18789
└── TUI: openclaw tui

Key Files ​

FileLocationPurpose
OpenClaw config~/.openclaw/openclaw.jsonMain config
Workspace files~/.openclaw/workspace/SOUL.md, IDENTITY.md, TOOLS.md, etc.
TOOLS.md~/.openclaw/workspace/TOOLS.mdAgent tool config (gogcli setup is here)
Systemd service~/.config/systemd/user/openclaw-gateway.serviceAuto-start service
Systemd override~/.config/systemd/user/openclaw-gateway.service.d/override.confGOG_KEYRING_PASSWORD env var
gogcli credentials~/.config/gogcli/credentials.jsonGoogle OAuth client
gogcli keyring~/.config/gogcli/keyringEncrypted tokens
Google OAuth credsd:\_open-claw\client_secret_*.jsonSource file — DO NOT commit
This filed:\_open-claw\_TEMP\CLAUDE.mdDev session notes
Project CLAUDE.mdd:\_open-claw\CLAUDE.mdRepo-level instructions
Cheat sheetd:\_open-claw\_TEMP\cheat_sheet.pngCommunity reference

Docker Reference (archived — fallback only) ​

bash
# Image: my-openclaw-agent:configured (has gogcli Gmail auth + Brave Search)
docker run -it -e ANTHROPIC_API_KEY="sk-ant-..." -p 8080:8080 --name openclaw my-openclaw-agent:configured sh
docker exec -it openclaw /app/openclaw.mjs tui
docker commit openclaw my-openclaw-agent:configured

Security ​

  • WSL is less sandboxed than Docker — OpenClaw has full WSL filesystem access
  • Never expose gateway port to the internet (bind stays loopback)
  • Google OAuth: revoke at https://myaccount.google.com/permissions
  • Community skills: check VirusTotal on ClawHub before installing
  • GOG_KEYRING_PASSWORD is in systemd override — don't share that file
lock

Enter PIN to continue