Skip to content
Caution

Restart OpenClaw with an older-version fallback

Tries the newer gateway restart command first and falls back to the older restart command if needed.

openclaw gateway restart || openclaw restart
Update and restartMacLinuxVPS

What it does

Tries the newer gateway restart command first and falls back to the older restart command if needed.

When to use it

Use it when a guide must support multiple OpenClaw versions or when you are not sure which restart subcommand your current CLI supports.

What happens next

The shell runs `openclaw gateway restart` first. If that command fails, it immediately tries `openclaw restart` instead.

Risk warning

Caution. It still restarts the service, and the `||` syntax is shell-oriented, so it is best used in macOS, Linux, or VPS environments.

Related guides