## Brief overview This set of guidelines serves as a reference for maintaining and troubleshooting OpenClaw nodes, specifically focusing on version synchronization, environment repair, and remote gateway connectivity on macOS. ## Version synchronization - Always verify that the global OpenClaw binary version (visible via `openclaw --version`) matches the version specified in service configuration files. - Check for version discrepancies in `~/Library/LaunchAgents/ai.openclaw.node.plist` (`OPENCLAW_SERVICE_VERSION` key) and `~/.openclaw/scripts/start-node.sh`. - When a mismatch is found, prioritize automated updates via `openclaw node install --version {NEW_VERSION}` before resorting to manual edits. ## Environment repair - Use `openclaw doctor --fix` as the first step for addressing state integrity issues, missing directories, or path discrepancies. - Review the output of `openclaw doctor` even if it exits with code 0, as it may flag critical missing components (e.g., session store directories) that require human intervention. ## Remote gateway architecture - For nodes connecting to a remote gateway (e.g., via Tailscale), verify connectivity to the target IP and port (default 18789) using `nc -zv {IP} {PORT}`. - Ensure `OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1` is exported in the startup script or plist if using non-SSL WebSocket connections to local/private network gateways. - Confirm that missing local gateway services (e.g., `ai.openclaw.gateway.plist`) are intentional when a host is configured strictly as a node. ## Macos service management - After updating configuration files or binaries, cycle the node service using `launchctl unload ~/Library/LaunchAgents/ai.openclaw.node.plist` followed by `launchctl load ...`. - Always tail logs immediately after a service restart (`tail -f /Users/MWsatwareAG/.openclaw/logs/node.log`) to verify successful registration with the gateway.