Learning Objectives

  • Install Node.js and OpenClaw on a local machine or VPS using the official install script.
  • Complete the onboarding wizard and connect OpenClaw to a language model provider using an API key.
  • Set up a Discord bot and configure it as the communication channel for the agent.
  • Verify the installation is working by sending a successful message through the connected channel.
Prerequisites & Installation
Installing Node.js 22+ and running the OpenClaw install script, including common issues on Windows and Linux environments.
Choosing a Model Provider
A practical guide to selecting a provider such as OpenAI, with guidance on model selection, free tier limitations, and setting a spending limit to prevent unexpected costs.
Discord Bot Setup
Creating a Discord application and bot token, enabling the Message Content Intent, setting the correct permissions (View Channels, Send Messages, Read Message History, Embed Links, Attach Files), and inviting the bot to a server.
Config File Walkthrough
An explanation of the openclaw.json file structure, including how to set environment variables for API keys, configure group policies, and enable session memory.
Troubleshooting Common Errors
A reference guide to the most frequent setup failures, including token format issues, rate limit errors, and gateway startup problems.
Install sequence
1. Install Node.js 22+ → 2. Run npm install -g openclaw → 3. Run openclaw doctor → 4. Start gateway with openclaw gateway start → 5. Connect Discord via openclaw channels login discord