📊Module Progress
🎯Learning Objectives
📊 Theory: The Gateway Heart of OpenClaw
🌐 What is the Gateway?
The Gateway is OpenClaw's engine room. It listens for messages from chat apps (WhatsApp, Telegram), routes them to the AI, and sends responses back. It manages all connections.
If the Gateway stops, OpenClaw stops. That's why these commands are critical.
🤖 The 5 Essential Commands
Output includes: Running/Stopped, PID, Port (18789), Uptime, any errors.
Use when: First install, after reboot, status shows "not running".
Use when: Updating, troubleshooting, going offline intentionally.
Use after editing openclaw.json, changing models, installing plugins, or when things feel "stuck".
Shows: Connection attempts, errors (e.g., invalid API keys), warnings. Essential for troubleshooting.
🔍 Quick Reference Cheatsheet
| Command | When to Use |
|---|---|
status |
Checking if running |
start |
After install/reboot |
stop |
Before updating/shutting down |
restart |
After config changes |
logs |
When debugging issues |
📊 Hands-On: Command Practice (Simulated)
Familiarize Yourself with the Command Outputs
openclaw gateway statusExpected output:
Gateway Status: Running
PID: 12345
Port: 18789
Uptime: 2h 34m
Task: Identify: Is it running? Yes. For how long? 2h 34m.
Step 2 Imagine running:
openclaw gateway restartScenario: You just edited
openclaw.json to add a new model.What happens: Gateway stops and starts again, loading new config.
Step 3 Imagine running:
openclaw gateway logsExpected output snippet:
[INFO] Gateway started
[INFO] Connected to Telegram
[WARN] Could not reach WhatsApp
[ERROR] Invalid API key for OpenAI
Task: Spot the error! ? "Invalid API key for OpenAI"
Step 4 Imagine running:
openclaw gateway stopResult: Gateway stops. Dashboard becomes unreachable.
Step 5 Restart
openclaw gateway start ? Back online!