dsh-restart-anywhere: A Universal Restart Button for DeepSeek Harness

During the use of DSH, restarting the service is often required after modifying plugins or configurations. Most solutions rely on specific daemons or manual operations. Here, we introduce a plugin that handles restart logic for all scenarios via a single button in the Web interface.

What is this

dsh-restart-anywhere is a DSH Web interface plugin developed by JoblessJoe. It adds a “Restart dsh” button above “Settings” in the sidebar, supporting systemd, Docker/Podman/Kubernetes, pm2, supervisord, launchd, terminal/tmux, and Windows. It restarts in place (same PID), requires no daemon detection or configuration, and has zero runtime dependencies.

Installation and Enablement

  1. Install it into your DSH Web configuration file (the filename below web; use the configuration file that supports your Web GUI). If installing from a source checkout, use pnpm dsh instead of npx @deepseek-ai/dsh:
npx @deepseek-ai/dsh plugin --profile web add dsh-restart-anywhere
  1. Environment requirements must be met: dsh >= 0.2.0 and Node >= 20.

Core Features

  • Interface Integration: Adds a “Restart dsh” button above “Settings” in the sidebar.
  • Multi-environment Support: Compatible with systemd, Docker/Podman/Kubernetes, pm2, supervisord, launchd, terminal/tmux, and Windows.
  • In-place Restart: Maintains the same PID in scenarios like systemd, containers, pm2, etc., without the need for daemon detection or configuration.
  • Agent Tool: Agents can call the dsh_restart tool, combined with continue_prompt to resume the session after a restart.

Typical Usage

  • Manual Restart: Click the “Restart dsh” button and confirm. The page will automatically refresh once the service recovers.
  • Agent Restart: The Agent calls dsh_restart({ continue_prompt }) after installing or editing plugins. Upon completion of the restart, the Agent wakes the session with the provided text to continue execution.

Notes and Security

  • Login Requirement: The restart route is protected by ctx.connection.fetch and is restricted to logged-in users only. On publicly exposed instances, unauthenticated requests will return a 401.
  • No Shell Commands: No shell command execution is used; it relies solely on Node.js APIs and systemd-run (when dsh is a systemd service).

By providing cross-platform, dependency-free in-place restart capabilities, this plugin simplifies DSH operations and maintenance. For more details, please refer to the GitHub Repository or the Plugin Directory.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye