知道了原因,开始卸载删除,然后重装dhs-passwords插件,第二次安装终于成功。
docker@localhost:/home/App_data> sudo rm -rf ~/.dsh
一.重装dsh
docker@localhost:/home/App_data> sudo npm install -g @deepseek-ai/dsh
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
added 456 packages in 1m
66 packages are looking for funding
run `npm fund` for details
docker@localhost:/home/App_data> dsh --version
0.1.1-rc.2
二.安装dsh-passwords
docker@localhost:/home/App_data> sudo git clone https://github.com/slywalker2006/dsh-passwords
Cloning into 'dsh-passwords'...
remote: Enumerating objects: 1162, done.
remote: Counting objects: 100% (503/503), done.
remote: Compressing objects: 100% (115/115), done.
remote: Total 1162 (delta 430), reused 421 (delta 386), pack-reused 659 (from 1)
Receiving objects: 100% (1162/1162), 2.51 MiB | 1.60 MiB/s, done.
Resolving deltas: 100% (815/815), done.
docker@localhost:/home/App_data> cd dsh-passwords
docker@localhost:/home/App_data/dsh-passwords> bash install.sh
dsh-passwords Node.js v22.22.0 ✓
dsh-passwords dsh ✓
dsh-passwords pnpm ✓
dsh-passwords 自动 HTTPS 需要监听 80 和 443;Unix/macOS 上请使用 sudo 运行安装器。
dsh-passwords 如必须非特权账号部署,请先阅读 README 的反向代理或明文 HTTP 模式说明,再自行配置 .env。
docker@localhost:/home/App_data/dsh-passwords> cd scripts
docker@localhost:/home/App_data/dsh-passwords/scripts> ls
build-client.mjs docker-init.mjs install.mjs prebuilt-check.mjs register-plugin.mjs start-http.mjs
docker@localhost:/home/App_data/dsh-passwords/scripts> cd ..
docker@localhost:/home/App_data/dsh-passwords> node scripts/start-http.mjs 8022
=============================================================
WARNING: plain HTTP mode
Passwords and session cookies travel in cleartext and can be
sniffed on the network. Prefer automatic HTTPS (the default
mode, needs no configuration) for public deployments.
Continuing means you accept this risk.
=============================================================
Start the gateway in HTTP mode on 127.0.0.1:8022? Type y to continue y/N y
Not found: /home/App_data/dsh-passwords/dist/cli.js. Run npm install && npm run build in the project directory first.
docker@localhost:/home/App_data/dsh-passwords> sudo npm install && npm run build
sudo password for root:
added 185 packages, and audited 186 packages in 3s
19 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
> dsh-passwords@2.6.4 build
> tsc -p tsconfig.json && node scripts/build-client.mjs
docker@localhost:/home/App_data/dsh-passwords> npm run build
> dsh-passwords@2.6.4 build
> tsc -p tsconfig.json && node scripts/build-client.mjs
dist/client.js 构建完成
docker@localhost:/home/App_data/dsh-passwords> node scripts/start-http.mjs 8022
=============================================================
WARNING: plain HTTP mode
Passwords and session cookies travel in cleartext and can be
sniffed on the network. Prefer automatic HTTPS (the default
mode, needs no configuration) for public deployments.
Continuing means you accept this risk.
=============================================================
Start the gateway in HTTP mode on 127.0.0.1:8022? Type y to continue y/N y
dsh-passwords startup failed: Error: SETUP_KEY 未配置:请先运行安装脚本或手动配置 .env(见 .env.example)
at loadConfig (file:///home/App_data/dsh-passwords/dist/config.js:40:15)
at boot (file:///home/App_data/dsh-passwords/dist/cli.js:180:20)
at file:///home/App_data/dsh-passwords/dist/cli.js:433:5
at ModuleJob.run (node:internal/modules/esm/module_job:343:25)
at async onImport.tracePromise.proto (node:internal/modules/esm/loader:665:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)
docker@localhost:/home/App_data/dsh-passwords> bash install.sh
dsh-passwords Node.js v22.22.0 ✓
dsh-passwords dsh ✓
dsh-passwords pnpm ✓
dsh-passwords 自动 HTTPS 需要监听 80 和 443;Unix/macOS 上请使用 sudo 运行安装器。
dsh-passwords 如必须非特权账号部署,请先阅读 README 的反向代理或明文 HTTP 模式说明,再自行配置 .env。
docker@localhost:/home/App_data/dsh-passwords> sudo bash install.sh
dsh-passwords Node.js v22.22.0 ✓
dsh-passwords 未找到 dsh。请先安装 DeepSeek Harness:
dsh-passwords npm install -g @deepseek-ai/dsh
dsh-passwords 然后用 DEEPSEEK_API_KEY=sk-你的key dsh web 先跑一次确认能用
docker@localhost:/home/App_data/dsh-passwords> sudo env PATH=$PATH:/usr/local/bin bash install.sh
dsh-passwords Node.js v22.22.0 ✓
dsh-passwords dsh ✓
dsh-passwords pnpm ✓
dsh-passwords ⚠ 检测到以 root 安装:dsh 的 web profile(~/.dsh)将由 root 拥有。
dsh-passwords 若之后改用其他用户运行 dsh,请先执行 chown -R <用户> ~/.dsh,否则插件可能加载失败。
dsh-passwords 检测到已构建产物,跳过依赖安装与编译
dsh-passwords .env 已生成(含随机 SETUP_KEY 与独立 DB 加密密钥)
dsh-passwords 首次配置密钥已写入 /home/App_data/dsh-passwords/setup-key.txt(初始化完成后请删除)
dsh-passwords 注册 dsh 插件(profile: web)...
dsh-passwords profile: /root/.dsh/profiles/web
✓ Lockfile passes supply-chain policies (verified 5h ago)
Already up to date
Done in 1.1s using pnpm v11.24.0
dsh-passwords 应用远程设置补丁...
dsh directory: /usr/local/lib/node_modules/@deepseek-ai/dsh
result: applied
(node:85326) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node22 --trace-warnings ...` to show where the warning was created)
dsh-passwords 补丁已应用
dsh-passwords
dsh-passwords ★ 安装完成!
dsh-passwords
dsh-passwords 首次配置密钥(SETUP_KEY):
dsh-passwords 7c2d9f8e2277580c97a1ed05fb2a0514d2c344822e575624
dsh-passwords (同时保存在 /home/App_data/dsh-passwords/setup-key.txt,初始化完成后请删除该文件)
dsh-passwords
dsh-passwords 接下来 3 步:
dsh-passwords 1) 用平时的方式启动 dsh(例如:DEEPSEEK_API_KEY=sk-你的key dsh web)
dsh-passwords ------密码门会被自动拉起,不需要额外启动命令
dsh-passwords 2) 浏览器打开 https://<服务器IP>.sslip.io
dsh-passwords (首次会自动进入配置页),输入上面的 SETUP_KEY,创建主用户
dsh-passwords 3) 之后所有人访问 https://<服务器IP>.sslip.io 都会先过登录页
dsh-passwords
dsh-passwords 提示:
dsh-passwords - 服务器防火墙和云安全组都要放行 80 和 443 端口
dsh-passwords (80 用于证书验证和跳转,443 用于 HTTPS 访问)
dsh-passwords - 有自己域名的话,在 .env 里加一行 MCP_GATEWAY_DOMAIN=你的域名
dsh-passwords 并把域名解析到本机,就能用域名访问(自动签该域名的证书)
dsh-passwords - 证书签不出来(无公网 IP/纯内网):见 README 的「HTTP 模式」一节
docker@localhost:/home/App_data/dsh-passwords> sudo node scripts/start-http.mjs 8022
=============================================================
WARNING: plain HTTP mode
Passwords and session cookies travel in cleartext and can be
sniffed on the network. Prefer automatic HTTPS (the default
mode, needs no configuration) for public deployments.
Continuing means you accept this risk.
=============================================================
Start the gateway in HTTP mode on 127.0.0.1:8022? Type y to continue y/N y
(node:87457) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node22 --trace-warnings ...` to show where the warning was created)
dsh-passwords login gateway(HTTP): http://127.0.0.1:8022 → upstream http://127.0.0.1:3080
dsh-passwords database(SQLite): /home/App_data/dsh-passwords/data/platform.db
dsh-passwords ⚠ The gateway is running in PLAIN HTTP mode: passwords and session cookies travel in cleartext and can be sniffed. Prefer automatic HTTPS for public deployments.
三.重启dsh
docker@localhost:/home/App_data/dsh-passwords> dsh web
dsh: failed to load .env: Error: EACCES: permission denied, open '/home/App_data/dsh-passwords/.env'
dsh web: http://127.0.0.1:3080
docker@localhost:/home/App_data/dsh-passwords> sudo chown docker:docker /home/App_data/dsh-passwords/.env
docker@localhost:/home/App_data/dsh-passwords> dsh web
dsh web: http://127.0.0.1:3080
但是还是没有把插件启动起来。
sudo chown docker:docker /home/App_data/dsh-passwords/.env
注册组件
Cdocker@localhost:/home/App_data/dsh-passwords> node scripts/register-plugin.mjs
dsh-passwords profile: /home/docker/.dsh/profiles/web
Already up to date
Done in 994ms using pnpm v11.24.0
重启终于可以把dsh-passwords带起来了。
docker@localhost:/home/App_data/dsh-passwords> dsh web
(node:124658) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node-default --trace-warnings ...` to show where the warning was created)
dsh web: http://127.0.0.1:3080
dsh-passwords following the host dsh process (PID 124658); exits when the host exits
(node:124684) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node22 --trace-warnings ...` to show where the warning was created)
dsh-passwords login gateway(HTTP): http://0.0.0.0:8022 → upstream http://127.0.0.1:3080
dsh-passwords database(SQLite): /home/App_data/dsh-passwords/data/platform.db
dsh-passwords ⚠ The gateway is running in PLAIN HTTP mode: passwords and session cookies travel in cleartext and can be sniffed. Prefer automatic HTTPS
但是提示数据库无法写入,还是权限问题
docker@localhost:/home/App_data/dsh-passwords> sudo chown -R docker:docker /home/App_data/dsh-passwords/data
sudo password for root:
正常启动
docker@localhost:/home/App_data/dsh-passwords> dsh web
(node:127956) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node-default --trace-warnings ...` to show where the warning was created)
dsh web: http://127.0.0.1:3080
dsh-passwords following the host dsh process (PID 127956); exits when the host exits
(node:128115) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node22 --trace-warnings ...` to show where the warning was created)
dsh-passwords login gateway(HTTP): http://0.0.0.0:8022 → upstream http://127.0.0.1:3080
dsh-passwords database(SQLite): /home/App_data/dsh-passwords/data/platform.db
dsh-passwords ⚠ The gateway is running in PLAIN HTTP mode: passwords and session cookies travel in cleartext and can be sniffed. Prefer automatic HTTPS
终于成功看到了登录正常