Module 8 • Intermediate

Basic Controls OpenClaw Gateway

Essential commands to start, stop, and manage your OpenClaw gateway like a pro.

📊Module Progress

Complete objectives and quizzes to unlock your badge!
0/8 Tasks Completed

🎯Learning Objectives

Master the 5 essential gateway commands status, start, stop, restart, logs.
Check gateway health Know if OpenClaw is running and for how long.
Read logs for debugging Find errors, warnings, connection issues.
Understand when to restart After config changes, updates, or when stuck.

📊 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

💻
1. Check Status
Find out if OpenClaw is running and for how long.
openclaw gateway status

Output includes: Running/Stopped, PID, Port (18789), Uptime, any errors.

💻
2. Start Gateway
Start OpenClaw if it's not running.
openclaw gateway start

Use when: First install, after reboot, status shows "not running".

💻
3. Stop Gateway
Stop OpenClaw gracefully.
openclaw gateway stop

Use when: Updating, troubleshooting, going offline intentionally.

💻
4. Restart Gateway
Stop and start applies config changes, fixes stuck state.
openclaw gateway restart

Use after editing openclaw.json, changing models, installing plugins, or when things feel "stuck".

💻
5. View Logs
See recent activity, errors, warnings your debugging best friend.
openclaw gateway logs

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

Step 1 Imagine running: openclaw gateway status
Expected 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 restart
Scenario: 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 logs
Expected 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 stop
Result: Gateway stops. Dashboard becomes unreachable.

Step 5 Restart
openclaw gateway start ? Back online!

📊 Quiz: Basic Controls Mastery (5 Questions)

Q1: To check if OpenClaw is running, use:

A
openclaw play
B
openclaw gateway status
C
openclaw dance

Q2: After editing openclaw.json, you should:

A
Do nothing
B
Restart the gateway
C
Delete the file

Q3: Which command shows recent activity and errors?

A
openclaw gateway logs
B
openclaw gateway clean

Q4: What does openclaw gateway stop do?

A
Pauses the internet
B
Stops the OpenClaw Gateway
C
Stops time itself

Q5: Where would you look to diagnose connection issues?

A
In a chat session
B
Gateway logs
C
In a text file on desktop
🎮
Badge Earned!
Basic Controller 🎮

You've completed all objectives and quizzes!