[
    {
        "role": "user",
        "content": "how%20to%20restart%20openclaw%20gateway%20on%20linux%3F"
    },
    {
        "role": "assistant",
        "content": "Here\u2019s how you can restart the OpenClaw Gateway on Linux\u2014depending on how you've installed it (as a service or manually). Use the method that matches your setup.\n\n---\n\n## 1. If OpenClaw Gateway is running as a service (systemd user or system service)\n\nMost Linux installs use **systemd** to run the Gateway in the background. To restart it:\n\n```bash\n# For user services (recommended for most single-user setups)\nsystemctl --user restart openclaw-gateway.service\n```\n\nIf you have multiple profiles, it may include a profile suffix:\n\n```bash\nsystemctl --user restart openclaw-gateway-<profile>.service\n```\n\n### If it's installed as a system-wide service\n\n```bash\nsudo systemctl restart openclaw-gateway.service\n```\n\nDepending on your specific system, the service name might vary (for example, it could be `openclaw.service`). You can check existing services with:\n\n```bash\nsudo systemctl list-units --type=service | grep openclaw\n```\n\nThese commands are documented in the official OpenClaw docs and in their FAQ and troubleshooting guides. ([docs.openclaw.ai](https://docs.openclaw.ai/help/faq?utm_source=openai))\n\n---\n\n## 2. Using the `openclaw` CLI helper\n\nOpenClaw provides built-in commands for managing the Gateway without needing to interact with systemd manually:\n\n```bash\n# Check status\nopenclaw gateway status\n\n# Restart the Gateway\nopenclaw gateway restart\n```\n\nIf you don\u2019t have the Gateway installed as a service (e.g. it's just running manually in a terminal), you may need to stop it and then start it again:\n\n```bash\nopenclaw gateway stop\nopenclaw gateway start\n```\n\nOr for development/testing:\n\n```bash\nopenclaw gateway run\n```\n\nYou might also use `--force` if there\u2019s a port conflict or if a stale process is still holding onto the Gateway\u2019s port. ([docs.openclaw.ai](https://docs.openclaw.ai/help/faq?utm_source=openai))\n\n---\n\n## 3. If experiencing version mismatch after update\n\nSometimes, after updating OpenClaw, the daemon (gateway service) might still run old binaries. You can repair that situation with:\n\n```bash\nopenclaw doctor --repair\nopenclaw gateway restart\n```\n\nThis helps ensure the daemon matches the version of the installed CLI. ([zooclaw.ai](https://zooclaw.ai/help/en/2026-03-23/gateway-daemon-restart-workaround/?utm_source=openai))\n\n---\n\n## 4. Ensuring service is set up for reboots / after SSH disconnect\n\nIf you want the Gateway to stay running after you log out or reboot:\n\n- Use systemd user services (default for many installs).\n- Enable **user lingering** so the service isn\u2019t terminated when you log out:\n\n  ```bash\n  loginctl enable-linger \"$USER\"\n  ```\n\n- If using a system-wide service, ensure it\u2019s enabled so it starts on boot:\n\n  ```bash\n  sudo systemctl enable openclaw-gateway.service\n  sudo systemctl start openclaw-gateway.service\n  ```\n\n([coclaw.com](https://coclaw.com/troubleshooting/solutions/linux-gateway-service-not-installed/?utm_source=openai))\n\n---\n\nIf you're running OpenClaw in Docker or using PM2, or some other process manager, the commands will differ\u2014let me know if that\u2019s your case, and I can walk you through those steps too."
    }
]