JoblessJoe/dsh-restart-anywhere ↗★ 0

dsh-restart-anywhere

One small Restart button in the DeepSeek Harness web GUI sidebar that works with your setup: systemd, Docker/Podman/Kubernetes, pm2, supervisord, launchd, terminal/tmux, Windows. Restarts in place (same PID), no supervisor detection or config, reloads the page when dsh is back. 适合在Docker、systemd等各种部署环境下需要一键重启服务的用户。

パッケージ
dsh-restart-anywhere
互換性
未検証
バージョン
0.1.3
ライセンス
MIT
最終更新
2026/10/12

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:JoblessJoe/dsh-restart-anywhere

ドキュメント

README 全文を読む ↗

dsh-restart-anywhere: one restart button for the DeepSeek Harness web GUI that works with your setup

npm version npm downloads

zero runtime dependencies

project page on joblessjoe.com MIT license

A DeepSeek Harness (dsh) web GUI plugin that adds one small Restart dsh button above Settings. It is for the moments you need a restart: you installed a plugin, changed a config, or fixed a bug in your own plugin.

It works with your setup. systemd, Docker, Kubernetes, pm2, a tmux pane, a plain terminal or Windows: click, and dsh is back in a few seconds. The page reloads by itself.

npx @deepseek-ai/dsh plugin --profile web add dsh-restart-anywhere

The Restart dsh button above Settings in the dsh sidebar

Works with your setup

Most restart buttons kill dsh and hope something starts it again. That only works for the setup their author had. A detached "relaunch me" helper gets killed along with a systemd service. A clean exit doesn't trigger Restart=on-failure. A container without a restart policy just stops. And under pm2 or runit, the helper and the supervisor both start dsh and fight over the port.

dsh-restart-anywhere doesn't hand dsh's life to anyone else. It restarts dsh in place:

Your setupWhat happensLeaves behind
systemd (user or system unit, any Restart= policy)Asks systemd to restart the unit, so you get a fresh process, exactly like systemctl restart. If that's not permitted (a system unit, no root), it falls back to in-place.nothing
Docker / Podman / Kubernetes (with or without a restart policy)In place: same PID, so the container never notices.nothing
pm2, supervisord, launchd, runit, s6, nssm, forever, …In place: the supervisor keeps seeing the process it started, still running.nothing
Terminal, tmux, screen, nohupIn place: same PID, and the new dsh keeps printing to the same terminal. Ctrl-C still stops it.nothing
**Windows / Node Running agent sessions are interrupted by a restart, like with any restart. The confirmation dialog says so.

Security

  • Login required: the restart route is registered through dsh's own /api connection layer (ctx.connection.fetch). It only answers browsers that are logged in to your dsh, and dsh's Host/Origin fence applies.
  • Exposed instances are safe: on an instance reachable from the internet, an unauthenticated request gets 401 and can't restart anything.
  • No shell commands: nothing is run through a shell. The only external program is systemd-run, and only when dsh is a systemd service.

Tested

Verified live with dsh 0.2.0 on Linux:

  • systemd: user unit, with Restart=no and Restart=on-failure.
  • systemd fallback: in place, when systemd-run is unavailable.
  • Plain terminal: in place via execve, three restarts in a row, then Ctrl-C and SIGTERM.
  • Wrapper path: Node without execve, three restarts in a row, then Ctrl-C.
  • Supervisor that only restarts on failure: dsh stays up and the supervisor never notices.
  • --port 0, and two clicks at once.

macOS uses the same execve path as Linux, and Windows the same wrapper path as old Node. Neither has been run on real hardware yet, so reports are very welcome.

npm test runs the setup detection and command-line checks.

License

MIT

中文简介 · DeepSeek Harness (dsh) Web 界面插件:侧边栏「设置」上方的一个小小的「重启 dsh」按钮,适用于你的部署方式 —— systemd、Docker / Podman、Kubernetes、pm2、supervisord、launchd、终端 / tmux / nohup、Windows。原地重启(进程 PID 不变),无需检测或配置守护进程,重启完成后页面自动刷新。零运行时依赖,无需配置。 安装:npx @deepseek-ai/dsh plugin --profile web add dsh-restart-anywhere