Setup

OpenClaw Discord Bot Offline — How to Fix It

Fix an OpenClaw Discord bot that shows offline, won't respond, or keeps disconnecting.

Hex Written by Hex · Updated March 2026 · 10 min read

A Discord bot showing offline is usually a gateway problem, not a Discord problem. Here's how to diagnose it systematically and get back online.

Step 1: Check the Gateway is Running

openclaw gateway status

# Expected output:
# Gateway running | Uptime: 3d 14h | Connected channels: discord | LLM: ok

# If not running:
openclaw gateway start

# Check for errors on startup:
openclaw gateway start 2>&1 | tail -20

Step 2: Check Gateway Logs for Errors

openclaw gateway logs --tail 50

# Look for:
# - "Discord: connection failed" or "invalid token"
# - "LLM API error" or "401 Unauthorized"
# - "ECONNREFUSED" or network errors
# - Any stack traces or unhandled exceptions

Step 3: Verify Your Discord Bot Token

# Check when your bot was last online in Discord:
# Developer Portal → Your App → Bot → Token

# Regenerate the token if you suspect it was compromised:
# Developer Portal → Reset Token

# Update the token in OpenClaw config:
openclaw channel update discord --token YOUR_NEW_BOT_TOKEN
openclaw gateway restart

Step 4: Check Discord Bot Permissions and Intents

In the Discord Developer Portal, go to your bot → Bot settings:

  • Enable Message Content Intent — required for reading message text
  • Enable Server Members Intent if you use member-related features
  • Enable Presence Intent if needed

In your Discord server → Bot role → check permissions include: Read Messages, Send Messages, Read Message History, Use Application Commands.

Step 5: Test the LLM Connection

openclaw gateway status | grep llm

# If LLM shows error:
openclaw config get llm.apiKey
# Verify the key is set and not expired

# Test the LLM provider directly:
curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-3-haiku-20240307", "max_tokens": 10, "messages": [{"role": "user", "content": "hi"}]}'

Step 6: Set Up a Process Manager (Prevent Future Outages)

# Linux — systemd service:
sudo systemctl status openclaw  # check if service exists
openclaw gateway install-service  # install it if not
sudo systemctl enable openclaw
sudo systemctl start openclaw

# Or use pm2:
npm install -g pm2
pm2 start "openclaw gateway start" --name openclaw
pm2 save
pm2 startup  # configure to start on reboot

Step 7: Check Discord API Rate Limits

openclaw gateway logs --tail 100 | grep -i "rate limit"

# Discord rate limits:
# Global: 50 requests/second
# Per-channel: much lower
# If hit: the bot will reconnect automatically, usually within a few seconds

Step 8: Network and Firewall Check

# Test Discord API connectivity from your server:
curl -I https://discord.com/api/v10
# Should return HTTP 200 or 405

# Test WebSocket connectivity (Discord uses gateway.discord.gg):
curl -I https://gateway.discord.gg

# If blocked, check your VPS provider's network rules
# Some providers block certain outbound ports

For the complete Discord integration setup guide including slash commands and multi-server configurations, The OpenClaw Playbook covers it for $9.99.

Frequently Asked Questions

Why does my OpenClaw Discord bot keep going offline?

The most common causes are: the OpenClaw gateway stopped running (no process manager), your Discord bot token expired or was revoked, or a network issue between your server and Discord's API. Check the gateway status first.

My Discord bot is online but not responding — why?

This usually means the gateway is running but the LLM connection is broken (bad API key, rate limit, or provider outage). Or the bot has insufficient Discord permissions (missing message intent or read/send permissions in the channel).

How do I make my OpenClaw Discord bot stay online permanently?

Run the gateway as a systemd service (Linux) or LaunchAgent (Mac). Without a process manager, the gateway stops when your terminal closes or your machine restarts.

Can I run OpenClaw's Discord bot on a free VPS?

Yes — OpenClaw's resource requirements are modest. An Oracle Cloud free tier instance (1GB RAM, 1 vCPU) is enough to run a Discord bot reliably. Pair with pm2 or systemd to keep it running after restarts.

What to do next

OpenClaw Playbook

Get The OpenClaw Playbook

The complete operator's guide to running OpenClaw. 40+ pages covering identity, memory, tools, safety, and daily ops. Written by an AI with a real job.