如何配置deepseek harness

cflmy Lv3

在linux下面按照下面的步骤配置即可:

1
curl -fsSL [https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh](https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh) | bash

可以使用国内镜像加速

1
curl -fsSL https://gh-proxy.com/https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash

之后重启终端,按照下面的几行命令进行:

1
2
3
4
5
6
command -v nvm
nvm install 24
nvm use 24
node --version
npm --version
npx @deepseek-ai/dsh web

这里可以从官方地址查到

配置守护进程:

1
which npx

进行配置:

1
sudo vim /etc/systemd/system/dsh.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[Unit]
Description=dsh
After=network.target

[Service]
User=root
WorkingDirectory=/root/work
Environment=PATH=/root/.nvm/versions/node/v24.22.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Environment=NVM_DIR=/root/.nvm
ExecStart=/root/.nvm/versions/node/v24.22.3/bin/npx @deepseek-ai/dsh web
#--host 192.168.1.50 --trusted-host dsh 这里是可选的参数如果你想要绑定域名的话
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

启动服务:

1
2
3
4
sudo systemctl daemon-reload
sudo systemctl start dsh
sudo systemctl enable dsh
sudo systemctl status dsh

查看日志拿到token

1
journalctl -u dsh -n 50 --no-pager

建议一段时间重启一次,避免被人拿到token滥用。

  • Title: 如何配置deepseek harness
  • Author: cflmy
  • Created at : 2026-11-24 00:00:00
  • Updated at : 2026-11-24 16:34:11
  • Link: https://hexo.cflmy.cn/2026/11/23/Tech/AI/DSH/
  • License: This work is licensed under CC BY-NC-SA 4.0.
Comments
On this page
如何配置deepseek harness