360 Secure SkillHub
360 安全技能中心

Gateway Restart

该 Skill 针对 OpenClaw 网关重启不可靠的问题,规定统一使用 systemd 用户服务命令重启,并列出不应使用的高风险替代方式。

suderbot
suderbot
热度 30.25
最近更新 2026-03-21 05:56:48
分类:自动化依赖:代码执行应用场景:DevOps / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add gateway-restart
Metadata
name
gateway-restart
description
Reliably restart the OpenClaw gateway service. Use whenever the gateway needs to be restarted, reloaded, or restarted after config changes.

Gateway Restart Skill

The Problem

Multiple methods of restarting the gateway are unreliable and can leave the system in a broken state requiring manual rescue.

The Solution

Always use this command to restart the gateway:

systemctl --user restart openclaw-gateway.service

When to Use

  • After modifying openclaw.json config
  • When the gateway is unresponsive
  • Any time a restart is needed

What This Does

  • Cleanly stops the current gateway process
  • Starts a fresh gateway instance via systemd
  • Properly handles port cleanup

What NOT to Use

  • openclaw gateway restart — unreliable, causes port conflicts
  • openclaw gateway stop + openclaw gateway start — leaves orphaned processes
  • pkill openclaw — too aggressive, can corrupt state