We've debugged hundreds of OpenClaw setups. The same problems appear again and again. Not because people are careless — because the error messages don't point to the actual cause.

This is the troubleshooting playbook we use internally. It covers the eight most frequent setup failures, explains why they happen, and gives you the exact fix. No guesswork, no "try reinstalling."

Failure 1: "Authentication Failed" on Channel Connect

What you see

OpenClaw reports an authentication error when trying to connect to Telegram or Discord, even though you're sure the token is correct.

What's actually wrong

In 90% of cases, the token is correct but the bot hasn't been properly invited to the target chat. Telegram requires you to add the bot to the group and give it message permissions. Discord requires the bot to be invited with the correct OAuth2 scopes.

The fix

  • Telegram: Add the bot to your group. Go to group settings and make sure "Add new members" didn't silently restrict bot access. Send a test message in the group, then retry the connection.
  • Discord: Regenerate the bot invite URL with bot and applications.commands scopes. Ensure the bot has "Send Messages" and "Read Message History" permissions in the target channel.

Quick check: Can you see the bot listed as a member of the chat/channel? If not, the token is irrelevant — the bot isn't there.

Failure 2: Bot Token Works, But No Responses

What you see

The connection test passes, but when you send commands, nothing comes back. No error, no response, just silence.

What's actually wrong

The bot is receiving messages but OpenClaw isn't processing them. Common causes:

  • The bot's webhook URL is misconfigured or pointing to a previous installation
  • OpenClaw's message handler crashed silently and isn't restarting
  • A firewall or proxy is blocking outbound responses from the server

The fix

# Check if the message handler is running
openclaw process list

# Check recent logs for errors
openclaw log --last 50 --level error

# Reset the webhook (Telegram)
openclaw channel reset telegram

Failure 3: "Permission Denied" on File Operations

What you see

OpenClaw can respond to messages but fails when trying to read or write files. Error: "Permission denied" or "EACCES."

What's actually wrong

The OpenClaw process is running under a user account that doesn't have access to the target directories. This is especially common on Linux servers where OpenClaw was installed under one user but needs to access repos owned by another.

The fix

  • Check which user the OpenClaw process runs as: openclaw process info
  • Verify that user has read/write access to the target directories
  • Don't fix this with chmod 777. Instead, add the OpenClaw user to the appropriate group or change the directory ownership

Failure 4: Git Operations Fail with "Remote Rejected"

What you see

OpenClaw can clone repos and read files, but pushing commits or creating branches fails with a "remote rejected" or "403 Forbidden" error.

What's actually wrong

The Git access token has read permissions but not write permissions. GitHub's fine-grained tokens separate these, and it's easy to miss the write checkboxes during token creation.

The fix

  1. Go to GitHub Settings > Developer Settings > Personal Access Tokens
  2. Check the token's permissions. It needs: Contents: Read and write, Pull requests: Read and write, and Metadata: Read
  3. If using a fine-grained token, make sure the correct repositories are selected — "All repositories" during testing, scoped repositories for production
  4. Update the token in your .env file and restart OpenClaw

Watch out: Classic tokens and fine-grained tokens have completely different permission models. If you switched from one to the other, review every permission from scratch.

Failure 5: Intermittent "Connection Reset" Errors

What you see

OpenClaw works for a while, then starts throwing "ECONNRESET" or "socket hang up" errors. Restarting temporarily fixes it.

What's actually wrong

Almost always a resource limit. Common culprits:

  • Too many open file descriptors: Each connection, log file, and socket uses one. The default limit (1024 on most Linux systems) runs out fast.
  • Memory pressure: OpenClaw caches session data. If the machine runs low on RAM, the OS starts killing connections.
  • VPS throttling: Cheap VPS providers throttle network I/O after sustained usage. This appears as random connection failures.

The fix

# Check file descriptor limit
ulimit -n

# Increase it (add to ~/.bashrc for persistence)
ulimit -n 65536

# Check memory usage
free -h

# Check OpenClaw's resource consumption
openclaw process stats

Failure 6: Environment Variable Not Found (But It's in .env)

What you see

OpenClaw complains that an environment variable is missing, but you can clearly see it in your .env file.

What's actually wrong

One of these:

  • Invisible characters: The .env file has trailing spaces, BOM markers, or Windows-style line endings (\r\n instead of \n). These corrupt the variable value without being visible.
  • Quoting issues: Values with special characters need to be wrapped in double quotes. A password like p@ss#word! will break without quotes.
  • Multiple .env files: OpenClaw found a different .env file than the one you edited. Check which file is actually being loaded.

The fix

# Check for invisible characters
cat -A .env | head -20

# Convert line endings if needed
sed -i 's/\r$//' .env

# Verify which .env OpenClaw is loading
openclaw config show --env-path

Failure 7: "Model Not Available" or Slow Responses

What you see

OpenClaw either reports the AI model isn't available, or responses take 30+ seconds when they used to be fast.

What's actually wrong

Your API key's rate limit is exhausted, the provider is experiencing an outage, or you're hitting a model that's been deprecated or renamed.

The fix

  • Check the AI provider's status page (Anthropic: status.anthropic.com)
  • Verify your API key hasn't been rotated or revoked
  • Check your usage dashboard for rate limit information
  • If the model name changed, update it in your config: openclaw config set ai.model claude-sonnet-4-6

Failure 8: Process Dies After SSH Disconnect

What you see

OpenClaw runs fine while you're SSH'd into the server. The moment you disconnect, it stops.

What's actually wrong

OpenClaw is running in the foreground of your SSH session. When the session ends, the process gets a SIGHUP and terminates.

The fix

Run OpenClaw as a background service using PM2 or systemd:

# Using PM2 (recommended)
pm2 start openclaw --name "openclaw"
pm2 save
pm2 startup

The pm2 startup command generates a system service that ensures OpenClaw restarts after server reboots. Run the command it outputs with sudo.

The Diagnostic Cheat Sheet

Symptom First Check
Auth failed on connect Is the bot a member of the chat?
No response to commands openclaw process list + check logs
Permission denied on files Check process user and directory ownership
Git push rejected Verify token has write permissions
Intermittent connection errors ulimit -n and free -h
Missing env variable cat -A .env for invisible chars
Slow or failed AI responses Provider status page + rate limits
Dies after SSH disconnect Run with PM2 or systemd

Keep this page bookmarked. When something breaks, start with the diagnostic cheat sheet, find your symptom, and follow the fix. Most OpenClaw issues resolve in under ten minutes once you know where to look.