Fixing OpenClaw Gateway Crash and Warnings | Generated by AI
Question: How do I fix the openclaw-gateway.service that keeps crashing with the error error: unknown option '--host' and a Telegram group policy warning?
Answer:
Your log shows two distinct problems — one is the fatal crash (the --host option error), and the other is a Telegram warning. Fix them separately:
Problem 1 (Fatal): error: unknown option '--host'
This is the root cause of the crash loop (restart counter at 131+). The gateway startup command is passing a --host flag that is not a valid option for the current version of OpenClaw. The error message itself hints: (Did you mean --port?).
This typically happens when:
- Your config has a
gateway.hostkey that the CLI is incorrectly translating to a--hostflag, OR - The systemd service unit was manually edited with
--hostin theExecStartline, which is no longer valid in v2026.x
Fix Steps:
Step 1 — Remove the invalid gateway.host config key:
openclaw config set gateway.bind "localhost"
Or if you specifically want to set a port:
openclaw config set gateway.port 3001
Do not use gateway.host — the correct config keys are gateway.host for some older setups, but the current recommended fix is openclaw config set gateway.bind "localhost" and openclaw config set gateway.port 3001.
Step 2 — Run the auto-fix doctor:
openclaw doctor --fix
openclaw doctor --fix runs health checks and auto-fixes common issues including permissions, config, and missing directories.
Step 3 — Check your systemd service unit for any hardcoded --host flag:
systemctl --user cat openclaw-gateway.service
If you see --host in the ExecStart= line, edit it out:
systemctl --user edit openclaw-gateway.service
Remove the --host argument and save.
Step 4 — Reinstall and restart the gateway:
openclaw gateway install --force
openclaw gateway restart
Or via systemd:
systemctl --user restart openclaw-gateway
Problem 2 (Warning): Telegram Group Messages Being Silently Dropped
The log warns:
channels.telegram.groupPolicy is "allowlist" but groupAllowFrom (and allowFrom) is empty — all group messages will be silently dropped.
This won’t crash the service, but it means your bot ignores all Telegram group messages. Fix it with one of these two options:
Option A — Add allowed sender IDs to the allowlist:
openclaw config set channels.telegram.groupAllowFrom '[-1001234567890]'
Replace the number with your actual Telegram group chat ID.
Option B — Open group messages to everyone (less secure):
openclaw config set channels.telegram.groupPolicy "open"
Summary of Commands to Run
# 1. Fix the host config issue
openclaw config set gateway.bind "localhost"
openclaw config set gateway.port 3001
# 2. Auto-fix any other config problems
openclaw doctor --fix
# 3. Fix the Telegram group policy (choose one)
openclaw config set channels.telegram.groupPolicy "open"
# OR add specific group IDs to the allowlist
# 4. Reinstall and restart
openclaw gateway install --force
openclaw gateway restart
# 5. Verify it's stable
openclaw status
openclaw logs --follow
After restarting, the crash loop should stop and the restart counter should freeze.
References:
- OpenClaw Official Troubleshooting
- ClawTank: Fix Common Errors
- LumaDock: OpenClaw Deep Troubleshooting
- Zeabur: OpenClaw Troubleshooting