dsh-as-service
其他 活跃维护

dsh-as-service

lyuwen/dsh-as-service

可将DSH配置为后台常驻服务,无需手动反复启动,支持开机自启与进程托管,资源占用低,运行稳定,适配DSH需长期在线的工作需要。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
Shell
主要语言
None
开源协议
4 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:lyuwen/dsh-as-service
git clone https://github.com/lyuwen/dsh-as-service.git
git clone git@github.com:lyuwen/dsh-as-service.git
README.md main

dsh-web systemd user service

Run the DeepSeek Harness Web UI (dsh web) as a systemd user service, so it
starts on login, restarts on failure, and logs to the journal.

Requirements

  • dsh on your PATH
    (e.g. npm install -g @deepseek-ai/dsh)
  • systemd with user services (standard on most Linux distros)

Install

./install.sh

The script:

  1. Resolves your real dsh path with command -v dsh (with fallbacks to
    common install locations such as ~/.npm-global/bin/dsh when it is not on
    the current PATH, e.g. in non-login shells).
  2. Renders dsh-web.service with that path and writes it to
    ~/.config/systemd/user/dsh-web.service.
  3. Runs systemctl --user daemon-reload and systemctl --user enable --now dsh-web.

You can then manage it like any user service:

systemctl --user status dsh-web
systemctl --user restart dsh-web
journalctl --user -u dsh-web -f

Keeping it running after logout

User services normally stop when you log out. To keep dsh-web running in the
background:

loginctl enable-linger "$USER"

Manual install (no script)

Copy dsh-web.service to ~/.config/systemd/user/, then replace the
ExecStart=/path/to/dsh web line with the output of command -v dsh, e.g.:

ExecStart=/home/you/.npm-global/bin/dsh web

Then:

systemctl --user daemon-reload
systemctl --user enable --now dsh-web

Environment variables

If the web profile needs env vars (API keys, etc.), create a file and uncomment
the EnvironmentFile= line in the unit:

mkdir -p ~/.config/dsh
cat > ~/.config/dsh/env <<'EOF'
SOME_API_KEY=...
EOF
systemctl --user daemon-reload
systemctl --user restart dsh-web

Uninstall

./install.sh --uninstall