Hostinger 上跑 OpenClaw 24/7:从交互会话切到守护进程
问题/场景:命令行里手动启动后可用,但合上笔记本或断开 SSH 后服务停止。前置条件:已在 VPS 安装 OpenClaw 并能手动跑通 gateway。实施步骤:改为 gateway 服务模式启动、验证重连后仍在线、再做重启回归。关键命令:`openclaw gateway start|status|restart`。验证:本地离线后仍可从外部渠道访问。风险:防火墙/端口配置错误会导致“服务在跑但不可达”。
REDDITDiscovered 2026-02-15Author u/Worldly-Ebb-7891
Prerequisites
- OpenClaw is installed on a VPS (e.g., Hostinger) and `openclaw gateway status` can run there.
- Remote access and firewall/security-group controls are available for your host.
Steps
- Start gateway as a managed service (`openclaw gateway start`) instead of running it in a temporary shell session.
- Confirm healthy runtime with `openclaw gateway status`, then disconnect SSH/local laptop and wait several minutes.
- From another device/channel, send a test command to verify the bot/agent still responds.
- Perform one controlled restart (`openclaw gateway restart`) and re-run the same end-to-end test.
Commands
openclaw gateway startopenclaw gateway statusopenclaw gateway restartVerify
Gateway stays online after SSH disconnect/reboot and remote channel commands keep working.
Caveats
- Hostinger/VPS firewall and NAT rules may still block inbound access even when gateway process is healthy(需验证).
- Avoid exposing management endpoints directly to public internet without access controls.
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗