# openclaw-guide > Guide for OpenClaw setup, CLI commands, Discord bot integration, configuration, and troubleshooting. Use when helping with OpenClaw agent configuration, channel setup (especially Discord), gateway management, or diagnosing connection issues. - Author: Ryan - Repository: YENSTDi/agent_skills - Version: 20260203094911 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/YENSTDi/agent_skills - Web: https://mule.run/skillshub/@@YENSTDi/agent_skills~openclaw-guide:20260203094911 --- --- name: openclaw-guide description: Guide for OpenClaw setup, CLI commands, Discord bot integration, configuration, and troubleshooting. Use when helping with OpenClaw agent configuration, channel setup (especially Discord), gateway management, or diagnosing connection issues. --- # OpenClaw Guide ## Overview OpenClaw is a messaging gateway that connects AI agents to chat platforms (Discord, Telegram, WhatsApp, Slack, and more). It provides CLI tools for managing agents, channels, sessions, and cron jobs, with a WebSocket-based gateway architecture. ## Quick Start ```bash openclaw setup # Initialize config and workspace openclaw onboard # Interactive wizard (gateway, workspace, skills) openclaw configure # Interactive prompt for credentials, devices, agent openclaw gateway start # Start the WebSocket gateway openclaw doctor # Verify everything is healthy ``` ## Common Tasks ### Connect a Discord Bot 1. Create bot in [Discord Developer Portal](https://discord.com/developers/applications) 2. Enable Privileged Gateway Intents (Message Content is required) 3. Set token: `openclaw config set channels.discord.token "BOT_TOKEN"` 4. Enable: `openclaw config set channels.discord.enabled true` 5. Restart: `openclaw gateway restart` 6. See [references/discord-integration.md](references/discord-integration.md) for full setup ### Check System Health ```bash openclaw doctor # Full diagnostics with quick-fix suggestions openclaw gateway status # Gateway service status openclaw channels status # Channel connection status ``` ### Send a Message ```bash openclaw agent --to +15555550123 --message "Hello" openclaw agent --agent ops --message "Run the task" ``` ### Access Dashboard (Control UI) Remotely 1. Forward port 18789 (e.g., Codespace port forwarding) 2. Open with token: `https://:18789/?token=GATEWAY_TOKEN` 3. If "pairing required" (1008): approve the pending device via CLI or `paired.json` 4. If proxy warnings: set `gateway.trustedProxies` to `["127.0.0.1","::1"]` 5. See [references/discord-integration.md#dashboard--webchat-pairing](references/discord-integration.md#dashboard--webchat-pairing) for details ### Manage Cron Jobs ```bash openclaw cron list # List scheduled jobs openclaw cron add # Add a new job openclaw cron run [id] # Run immediately ``` ## References - [CLI Commands](references/cli-commands.md) - Full command reference organized by category - [Discord Integration](references/discord-integration.md) - Discord bot setup, config, and troubleshooting - [Config Schema](references/config-schema.md) - Complete openclaw.json schema and directory structure - [Use Cases](references/use-cases.md) - Real-world usage patterns and examples