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 chenkui-luo
A Restart button for DeepSeek Harness Settings: replaces the dsh web process serving the page, then reconnects the page by itself.
★ 1
MIT
JavaScript
Oct 12, 2026
dsh plugin --profile web add dsh-plugin-restartby 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 29, 2026
dsh plugin --profile web add @zhengjunyao/dsh-restartby JoblessJoe
One restart button for the DeepSeek Harness (dsh) web GUI that works with your setup: systemd, Docker, Kubernetes, pm2, launchd, terminal, Windows. Restarts in place, zero dependencies.
★ 0
MIT
JavaScript
Oct 25, 2026
dsh plugin --profile web add dsh-restart-anywhereby yizhixiaokong
Adds 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
★ 3
↓ 262/wk
MIT
JavaScript
Nov 10, 2026
dsh plugin --profile web add dsh-simple-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
Sep 28, 2026
dsh plugin --profile web add dsh-restart-buttonby androidly
Adds a restart control at the DSH Web sidebar foot: the host exits through its own graceful path and the detected supervisor (systemd, Kubernetes or Docker) boots the replacement, or the plugin starts
★ 0
MIT
JavaScript
Oct 22, 2026
dsh plugin --profile web add dsh-restart-control