dsh-restart
Manifest validNo project description is available for this repository yet.
description: "dsh-restart: a Settings page that restarts the dsh Web host process with one click."
dsh-restart
English | 中文
A Restart page in the DeepSeek Harness (dsh) Web settings panel: one button replaces the running host process with a fresh one.

What it does
- Host half registers two routes on the Web server, both limited to direct same-origin loopback requests:
GET /dsh-restart/status— boot id, PID, start time, and serving port of the current processPOST /dsh-restart/restart— replaces the current process (the host exits after answering202)
- Browser half registers a
settings.sectionpage showing that identity plus a restart button. It polls/dsh-restart/statusafter the click and reloads the page as soon as a different boot id answers.
The restart itself is done by a detached helper: the host exits after 400 ms, and the helper waits until the port stops accepting connections before spawning the replacement with exactly the same launch invocation (Node binary, execArgv, absolute entry path, remaining argv, working directory). That ordering is what keeps the replacement from dying of EADDRINUSE while the old socket is still held. Logs land in the system temp directory as dsh-restart-<timestamp>.out.log / .err.log.
Sessions live on disk and survive the restart, and plugins that are installed but not active yet load on the next boot.
Install
# from GitHub
dsh plugin --profile web add github:DWJZ/dsh-restart
# local development (the profile links the checkout, so edits apply directly)
dsh plugin --profile web add link:/path/to/dsh-restart
The first install needs one restart before the page exists — restart the host from a terminal, or use dshmarket's restart button once. After that, this page is the way to restart.
Endpoint contract
POST /dsh-restart/restart accepts only requests whose peer is loopback and whose Origin matches Host; any forwarding header (Forwarded, X-Forwarded-For, X-Real-IP) or non-loopback peer is refused with 403. It answers 202, then the host exits and the helper starts the replacement.
Test
node test/smoke.mjs
Covers: the detached helper really starts a replacement process, all four refusal paths of the same-origin guard, and the client bundle's registration and render. Set DSH_CHECKOUT=<dsh checkout> to add an SSR render assertion using that checkout's React; without it that one assertion is skipped.
License
Comments
Loading…
Similar plugins
by zhengjy01
One-click restart for DeepSeek Harness: a web button (plus a dsh_restart agent tool) hands the relaunch to a detached helper, the page reconnects by itself, and a recovery console shows the boot error
★ 0
MIT
JavaScript
Sep 19, 2026
dsh plugin --profile web add @zhengjunyao/dsh-restartby hadesybil-hub
Adds a restart button next to the shutdown button in the bottom-right of the DSH Web GUI; the server comes back up and the browser reopens.
★ 0
MIT
JavaScript
Aug 29, 2026
dsh plugin --profile web add dsh-restart-buttonAdds a restart row to Settings → General that relaunches dsh web with the same invocation through a detached helper, refuses under a detected systemd supervisor unless allowRestart is true, and tests
★ 0
dsh plugin --profile web add dsh-simple-restartby anweat
Restart DSH: configurable restart method (Node native / legacy PowerShell), post-restart continue prompt, optional watchdog auto-relaunch.
★ 8
↓ 434/wk
MIT
JavaScript
Sep 9, 2026
dsh plugin --profile web add dsh-restartby zhouchengke2046
Independent one-click restart for DeepSeek Harness web (Settings page). · 独立的 DSH Web 一键重启插件。
★ 0
MIT
JavaScript
Aug 19, 2026
dsh plugin --profile web add dsh-restartby dujar
Restart dsh web from Settings → Restart, enable/disable installed plugins with one toggle, and jump to the Community plugins tab to install more. Bilingual (English/中文) UI. 在 设置 → 重启 中一键重启 dsh web、开关已安装插件,并跳转社区插件页安装更多。
★ 0
MIT
JavaScript
Aug 25, 2026
dsh plugin --profile web add dsh-restart