To install dsh on Linux you need two things: Node.js 24.9.0 or newer, then sudo npm install -g @deepseek-ai/dsh. The catch is that no stock distro archive we tested ships a Node that new as its default nodejs, so a DeepSeek Harness Ubuntu or Debian install goes through the NodeSource repository. Rocky Linux needs the AppStream nodejs24 package and one alternatives command, because without it the install dies halfway with node: command not found.
DeepSeek Harness, dsh on your PATH, is not a model. It is the runtime that wraps one and turns it into an agent: the turn loop, the tool calls, the kernel sandbox those tools run in, the session log and a browser UI. For this DeepSeek Harness Linux guide we reinstalled dsh 0.2.2-rc.5 in November 2026 on fresh Ubuntu 26.04, Ubuntu 24.04, Debian 13 and Rocky Linux 10.2 VMs and ran the same agent task on all four.
What DeepSeek Harness actually is
DeepSeek Harness is an MIT-licensed agent harness: the code between a language model and your filesystem. It ships the pieces a coding agent needs and leaves each one swappable, because it is built on the Cordis plugin framework where everything is a plugin. The model route is a plugin row. The bash tool is a plugin row. The permission policy that decides whether that bash tool may write to /etc is a plugin row too.
DeepSeek made the repository public on 13 August 2026 alongside the V4-Pro launch. It is still labelled a developer preview, and the project warns about compatibility-breaking changes between release candidates. We’ve watched that happen: the Node floor, a native addon path and the session log format have all moved since August, so pin the version you tested.

On top of that plugin tree you get a Web UI, a one-shot headless mode, a Python SDK that bundles its own Node runtime, an MCP bridge, an Agent Client Protocol server, subagents, workflows and context compaction. If you already run agents, dsh occupies the same slot as Claude Code or OpenCode. The difference is that the seams are exposed and the model behind it is your choice.
How a task moves through dsh
Nothing the model asks for runs directly. Every turn follows the same path, and knowing that path is what makes the permission modes and the session log make sense later.

Your prompt goes to the runtime, which assembles the system prompt, the tool list and the session so far, then sends one request to whichever model route you configured. The model replies with a tool call, not an action. The runtime turns that request into a real process, wraps it in the sandbox, runs it and hands back stdout, stderr and the exit code. Every step is appended to the session log before the answer reaches your screen.
Check the Node.js requirement first
The hard requirement is Node 24.9.0 or newer, and the package declares it in its own manifest. Read it from the registry on any machine that already has npm, before you touch the target box:
npm view @deepseek-ai/dsh engines dist-tags
On 22 November both latest and next pointed at the same release candidate, and the floor was unchanged from rc.1:
engines = { node: '>=24.9.0' }
dist-tags = { alpha: '0.2.2-alpha.3', latest: '0.2.2-rc.5', next: '0.2.2-rc.5' }
Four candidates landed between 12 and 18 November, so an unpinned install takes whatever latest is that morning. The soft requirement is bubblewrap, which the sandbox prefers on Linux and falls back from when it can’t use it. Here is what each test VM shipped and what it needed:
| Item | Ubuntu 26.04 | Ubuntu 24.04 | Debian 13 | Rocky Linux 10.2 |
|---|---|---|---|---|
Default nodejs package | 22.22.1 | 18.19.1 | 20.19.2 | 22.23.4 |
| Node 24 route | NodeSource setup_24.x | NodeSource setup_24.x | NodeSource setup_24.x | AppStream nodejs24 + alternatives |
| bubblewrap | 0.11.1 | 0.9.0 | 0.12.0 | 0.10.0 |
| Unprivileged bwrap works | Yes | No (AppArmor) | Yes | Yes (SELinux enforcing) |
dsh lands in | /usr/bin | /usr/bin | /usr/bin | /usr/local/bin |
Every default nodejs package in that first row is below the floor, so the distro package is the wrong one to install everywhere. All four kernels list landlock in /sys/kernel/security/lsm, which matters later when bubblewrap is blocked.
npm WARN EBADENGINE Unsupported engine
This is what the Ubuntu 26.04 archive Node 22 gives you, and it is easy to scroll past. npm treats engines as advice unless engine-strict is set, so it prints the warning, installs everything and exits 0. We captured this on rc.1, which has the same floor:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@deepseek-ai/[email protected]',
npm WARN EBADENGINE required: { node: '>=24.9.0' },
npm WARN EBADENGINE current: { node: 'v22.22.1', npm: '9.2.0' }
npm WARN EBADENGINE }
A script or Ansible task that checks only the exit code reports success. In that run dsh --version even started on Node 22, which makes the warning more dangerous rather than less: the next candidate is free to use a Node 24 API and fail at launch the way Node 18 does below. Treat the warning as an install failure.

The exit status of 0 at the bottom is the trap. Nothing in a pipeline stops, so a person has to read the warning.
SyntaxError: The requested module ‘node:util’ does not provide an export named ‘parseEnv’
This is what Node 18 produces, and the message never mentions Node versions. On the Ubuntu 24.04 archive Node 18.19.1, npm printed EBADENGINE, finished the install and exited 0. The first dsh --version then failed:
file:///usr/local/lib/node_modules/@deepseek-ai/dsh/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js:4
import { inspect, parseEnv } from "node:util";
^^^^^^^^
SyntaxError: The requested module 'node:util' does not provide an export named 'parseEnv'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
...
Node.js v18.19.1
util.parseEnv landed in Node 21.7 and was backported to 20.12, so the import fails before any dsh code runs. Run node -v first and the whole class of problem disappears.
Install dsh on Ubuntu 26.04, Ubuntu 24.04 and Debian 13
The same commands worked on all three Debian-family VMs. Download the NodeSource setup script for the Node 24 line rather than piping it into a root shell, so you can read it before it runs:
curl -fsSL https://deb.nodesource.com/setup_24.x -o nodesource_setup.sh
sudo -E bash nodesource_setup.sh
Once it finishes, the node_24.x repository is configured and the package lists are fresh. Install Node.js from it along with bubblewrap for the sandbox, zstd for reading session logs and Python for the demo task later:
sudo apt-get install -y nodejs bubblewrap zstd python3
Confirm the runtime clears the floor. The NodeSource package carries its own npm, so skip the distro npm package:
node -v; npm -v
All three VMs got the same NodeSource build, 24.22.3-1nodesource1 in apt-cache policy nodejs. In November 2026 NodeSource’s published support matrix still stopped at Ubuntu 24.04 and Debian 12, but the script writes a distro-independent nodistro repository and it installed cleanly there too:
v24.22.3
11.19.1
Now the harness. A global install puts dsh on PATH for every shell and every systemd unit later:
sudo npm install -g @deepseek-ai/dsh
It’s a big tree, and it grows between candidates: 671 packages on rc.5, up from 654 on rc.1. It took between 1m37s and 1m58s on our small cloud VMs:
added 671 packages in 2m
72 packages are looking for funding
run `npm fund` for details
npm warn install-scripts 5 packages have install scripts not yet covered by allowScripts:
npm warn install-scripts @deepseek-ai/[email protected] (postinstall: node scripts/ensure-spawn-helper.mjs)
npm warn install-scripts [email protected] (install: node ./cnoke.cjs -P . -D src/koffi --prebuild --release)
npm warn install-scripts [email protected] (install: node scripts/prebuild.js || node-gyp rebuild; postinstall: node scripts/post-install.js)
npm warn install-scripts @google/[email protected] (preinstall: echo 'preinstall: no-op')
npm warn install-scripts [email protected] (postinstall: node scripts/postinstall)
Don’t panic at the install-scripts block. It is a notice about npm 11’s script allowlist, not a failure. The install exited 0 and dsh worked straight after it. The same message prints an npm install -g --allow-scripts=... line if your policy wants those five packages allowed explicitly. Keep an eye on koffi in that list, because it is the package that breaks on Rocky.
Check the version you actually got:
dsh --version
which dsh
All three reported the same candidate, with the launcher symlinked into /usr/bin:
0.2.2-rc.5
/usr/bin/dsh
Once a config works, pin it with sudo npm install -g @deepseek-ai/[email protected] so the next candidate cannot change it under you.

That is the whole Debian-family install. Running Ubuntu 24.04? Read the AppArmor note in the sandbox section before you trust the default confinement.
Install dsh on Rocky Linux 10 and other RHEL rebuilds
Rocky 10.2’s AppStream carries several Node streams side by side. The plain nodejs package is 22.23.4, below the floor. The one you want is nodejs24:
dnf list --available "nodejs*" | grep -E "^nodejs(2[0-9])?(-npm)?\."
The listing also showed a nodejs26 stream, which we did not test:
nodejs.x86_64 1:22.23.4-1.el10_2 appstream
nodejs-npm.x86_64 1:10.9.9-1.22.23.4.1.el10_2 appstream
nodejs24.x86_64 1:24.22.1-3.el10_2 appstream
nodejs24-npm.noarch 2:11.19.1-1.24.22.1.3.el10_2 appstream
nodejs26.x86_64 1:26.12.1-3.el10_3 appstream
nodejs26-npm.noarch 1:11.20.0-1.26.12.1.3.el10_3 appstream
Install the Node 24 stream with the same helpers as on Ubuntu:
sudo dnf install -y nodejs24 nodejs24-npm bubblewrap zstd python3
Here is the gotcha. The nodejs24 package names its binaries with a version suffix, and nothing provides the plain names:
/usr/bin/node-24instead ofnode/usr/bin/npm-24instead ofnpm
So node -v says command not found. Running npm-24 directly looks like the obvious workaround, but it fails partway through the install because a dependency still calls the plain name.
npm error sh: line 1: node: command not found (koffi)
Running sudo npm-24 install -g @deepseek-ai/dsh downloads the tree for over a minute, then dies in a dependency’s install script:
npm error code 127
npm error path /usr/local/lib/node_modules/@deepseek-ai/dsh/node_modules/koffi
npm error command failed
npm error command sh -c node ./cnoke.cjs -P . -D src/koffi --prebuild --release
npm error sh: line 1: node: command not found
npm itself ran fine under npm-24, but koffi‘s install script calls a bare node, and nothing by that name exists. A symlink in /usr/local/bin doesn’t fix it either: your shell finds it, but sudo resets PATH to its secure_path and gives sudo: npm: command not found. The clean fix is to register node-24 as the system node with the alternatives system, which the stock package does not do:
sudo alternatives --install /usr/bin/node node /usr/bin/node-24 24 --slave /usr/bin/npm npm /usr/bin/npm-24
Check that both your shell and sudo now see Node 24:
node -v; npm -v; sudo node -v
All three answers should be the Node 24 build:
v24.22.1
11.19.1
v24.22.1
Now the ordinary install command works. On Rocky npm’s global prefix is /usr/local, so the launcher lands in /usr/local/bin/dsh. Don’t install the plain nodejs or nodejs-npm packages on this box afterwards: they own /usr/bin/node and /usr/bin/npm, and pulling them in would put Node 22 back in front of the alternatives link.
sudo npm install -g @deepseek-ai/dsh
dsh --version
It added the same 671 packages, in 43 seconds on this VM, and reported 0.2.2-rc.5. SELinux stayed in enforcing mode for the whole run, including the sandbox tests below.

The same nodejs24 naming applies to other RHEL 10 rebuilds that share this AppStream, but Rocky 10.2 is the only one we ran. Fedora was not part of this round.
Give dsh a model
With no config at all, dsh routes to DeepSeek’s own API, provider deepseek-official with the deepseek-flash model, reading its key from DEEPSEEK_API_KEY. Export a key from platform.deepseek.com in the shell that launches dsh and the default route works with no config file.
Our lab had no DeepSeek platform key, so these runs used the same DeepSeek V4 Flash model through OpenRouter. dsh reads a patch file from ~/.dsh/cordis.patch.yml on start. Create it:
mkdir -p ~/.dsh
vim ~/.dsh/cordis.patch.yml
This is the exact file the four VMs ran. It adds an OpenAI-compatible provider and makes it the default model:
- id: llm-pi-ai
config:
providers:
openrouter:
displayName: OpenRouter
apiKeyEnv: OPENROUTER_API_KEY
api: openai-completions
baseURL: https://openrouter.ai/api/v1
models:
- id: deepseek/deepseek-v4-flash
name: DeepSeek V4 Flash
contextWindow: 1048576
maxTokens: 16384
- id: agent-default-model
config:
provider: openrouter
model: deepseek/deepseek-v4-flash
Export OPENROUTER_API_KEY in the same shell. The baseURL and api lines are the part to change for any other OpenAI-compatible server, including an Ollama host on your LAN. Plain local servers usually need extra compatibility switches, which the DeepSeek Harness local model guide covers along with the MISSING_CREDENTIAL errors that route throws.
Run the first agent task
Give the agent a bug small enough to check by eye, so you judge the harness rather than the model. Ours is a port parser with the classic Python range mistake on line 9 of a 15-line file:
import sys
def parse_ports(spec):
out = []
for part in spec.split(","):
if "-" in part:
a, b = part.split("-")
out.extend(range(int(a), int(b)))
else:
out.append(int(part))
return out
print(parse_ports(sys.argv[1]))
Save it as ~/demo-app/ports.py and confirm the bug: python3 ports.py 80-83 prints [80, 81, 82]. The headless profile is the quickest way to give dsh one task. It runs the prompt in a fresh persisted session, prints the final answer and exits:
cd ~/demo-app
dsh headless "ports.py has an off-by-one: a range like 80-83 should include 83. Fix it, then run python3 ports.py 80-83 to prove it."
Every VM fixed it in 10 to 19 seconds of wall time. The Ubuntu 26.04 answer was the most complete:
The fix is confirmed. The off-by-one error was on line 9 of `ports.py`: `range(int(a), int(b))` excluded the upper bound `b`. Changing it to `range(int(a), int(b) + 1)` makes it inclusive, so `80-83` now correctly produces `[80, 81, 82, 83]`.
Don’t take the agent’s word for it. Run the script yourself afterwards, which is the only verification that counts:
sed -n 9p ports.py
python3 ports.py 80-83
Line 9 gained a + 1 and 83 is now in the list, on all four distros:
out.extend(range(int(a), int(b) + 1))
[80, 81, 82, 83]
The Debian 13 run gave a shorter answer to the same prompt, which is normal model variance rather than a distro difference:

Standard output is only the answer, which makes headless mode pipe-friendly for cron jobs and CI. The other headless flags, --patch overlays and --dump-config are collected in our dsh cheat sheet.
Start the Web UI and inspect the run
Start the server from the directory you work in, because the launch directory becomes the default workspace:
cd ~/demo-app
dsh web --no-open
It prints one line and stays in the foreground:
dsh web: http://127.0.0.1:3080/?token=<redacted>
Treat the token in that URL as the password, because it is the only login the UI has. A plain curl http://127.0.0.1:3080/ without it returned 401. The listener is loopback only, shown by ss -ltnp | grep 3080, which is the right default for a process holding an API key and write access to your code:
LISTEN 0 511 127.0.0.1:3080 0.0.0.0:* users:(("MainThread",pid=3048,fd=21))
On a lab box, forward the port rather than moving the bind. When we tried it on rc.1, the web app rejected --host 0.0.0.0 outright, because binding every interface would expose remote code execution to the network. One SSH tunnel from your workstation does the job:
ssh -N -L 3080:127.0.0.1:3080 [email protected]
First load shows a Preview Notice; click Continue and it doesn’t come back. The demo-app workspace is already in the sidebar, and so is the headless session from the terminal. Our screenshot shows a second one because we ran the sandbox test further down first. A cron job and a browser session are the same thing to the storage layer.

The composer shows the active permission mode, Workspace Write, and the model, DeepSeek V4 Flash marked Default, picked up from the patch file.
Set or check the API key in Settings
Settings lives behind the More menu at the bottom of the sidebar. Open Models, click Edit on the DeepSeek card, paste a platform key into the API key field and click Apply. Leave the field blank to keep using DEEPSEEK_API_KEY from the environment. The red dot and the orange warning below the field mean dsh found no key for that provider, while the green dot on OpenRouter is the route our runs used.

- 1Models
- 2API key
- 3Apply
We didn’t save a DeepSeek key here, so that card stayed red throughout. The older “Add provider” and “Add a custom provider” buttons are now a single Add model provider button.
Turn off Upload Session Log if your code is private
Scroll to the bottom of Settings, General. The Upload Session Log switch, labelled “Upload Session Log when using the official model API” with the line “Help improve DeepSeek models and products”, was on by default on every fresh install we did. Our reading of the label is that it applies to the DeepSeek API route, not to OpenRouter or local models. If your sessions contain private code, turn it off before you add a platform key.

The same page sets the default Permission for new sessions and shows the running version at the bottom. The Show coding view switch higher up is what exposes the Trajectory tab and all the agent presets, so leave it on.
Read the session and its trajectory
Click the “Fix off-by-one in ports.py” session. The Chat tab replays the run: a file read, the agent’s diagnosis of line 9, the edit and the bash run. The bar at the bottom is worth one look:
1 turns 4 steps · 46 tok/s 24.8K tok · Cache hit 73%
Behind those numbers sit 24,762 tokens in total, of which 17,664 came from the prompt cache, 6,683 were uncached input and only 415 were output. That is the standing cost of the system prompt, the tool schemas and the runtime context, the same overhead shape we measured for context engineering for AI agents. Model time was 14.7 seconds against 0.3 seconds of tool time.

The Trajectory tab is the one to open when a run goes sideways. It lays the turn out as a timeline with input, model and tool lanes, then every message in order, including the raw JSON of each read, edit and bash call and its result.

Seeing the exact edit payload ends most arguments about what an agent “decided” to do. The CONTEXT row also shows what the runtime injects every turn: the working directory and the file policy, workspace-write here.
Read the session log from the shell
Sessions land under ~/.dsh/sessions/, one directory per workspace, as an append-only JSONL stream compressed with zstd. The workspace directory name is its path with / turned into - and wrapped in --, so /home/josphat/demo-app becomes --home-josphat-demo-app--, and it grows one session-* directory per run. List them newest first:
ls -td ~/.dsh/sessions/*/session-*
Pick the session you want and read its first events. Ours was session-03a5e591 under --home-josphat-demo-app--, so swap in your own user and session ID:
zstdcat ~/.dsh/sessions/--home-josphat-demo-app--/session-03a5e591-*/session.v4.jsonl.zstd | head -n 4
The ports.py session held 36 events. The first four record the permission preset, the sandbox mode and the approval policy the session was born with:
{"type":"session","version":4,"id":"session-03a5e591-eccc-4eb8-9e29-f6499a00e17b","createdAt":1795305377089,"cwd":"/home/josphat/demo-app","isSeeded":false,"delegationDepth":0}
{"type":"permission/preset","seq":0,"time":1795305377098,"data":{"preset":"workspace-write"}}
{"type":"sandbox/mode","seq":1,"time":1795305377102,"data":{"mode":"workspace-write"}}
{"type":"approval/policy","seq":2,"time":1795305377102,"data":{"policy":"ask"}}
Resume, fork, search and replay all read that same stream, so there is no second database to keep in sync.
Pick an agent preset
A preset is the plugin composition a session runs: its tools, its prompt, its capabilities. Four ship with rc.5, and you switch per session or ask the agent to help build your own under Custom.

Boiled down, the four cards say this:
| Preset | ID | Use it for |
|---|---|---|
| Standard mode | standard | The new-task default: code, files, search, terminal and other tools as needed |
| PTC mode | ptc | Standard plus batch tool calls that it then filters, counts or summarises |
| Minimal mode | minimal | A terminal and image reading with context compaction, for testing a model’s basics |
| Creator mode | cordis | Having the agent write plugins and build your own modes |
PTC mode’s ID changed from code in the August build to ptc, so update any config that names it. Collapsing many tool calls into one program cuts round trips, the same lever behind our guide on reducing agent token usage. We ran every task here on Standard mode.
Check what the sandbox blocks on your distro
The default for a new session is workspace-write with the ask approval policy, as the session log showed. Writes are confined to the workspace root, and anything wider has to go through an approval prompt. Change the default under Settings, General, Permission, or per session in the composer.
Enforcement is a kernel feature, not a polite decline from the model. On Linux dsh reaches for bubblewrap first and falls back to Landlock, and the Landlock launcher ships inside the npm package as a prebuilt binary:
ls -l $(npm root -g)/@deepseek-ai/dsh/node_modules/@deepseek-ai/node-addon-system-linux-x64/bin/
The August path under node-addon-landlock-run-linux-x64 no longer exists, so a script pointing there fails before the sandbox starts:
total 48
drwxr-xr-x 2 root root 4096 Nov 21 23:52 glibc
-rwxr-xr-x 1 root root 38552 Nov 21 23:52 landlock-run
drwxr-xr-x 2 root root 4096 Nov 21 23:52 musl
To test it, ask a session to write outside its workspace:
dsh headless "Use bash to run: echo test > $HOME/outside.txt . Report exactly what happened."
ls -l ~/outside.txt
On all four distros the write failed and ls reported No such file or directory every time. What differed was the error. Ubuntu 26.04, Debian 13 and Rocky 10.2 reported Read-only file system plus file access denied under workspace-write mode, which is bubblewrap’s read-only bind of everything outside the workspace.
Ubuntu 24.04: bwrap: setting up uid map: Permission denied
Ubuntu 24.04 restricts unprivileged user namespaces through AppArmor and ships no profile that exempts bubblewrap. So bwrap can’t start for a normal user, even though the package is installed:
sysctl kernel.apparmor_restrict_unprivileged_userns
bwrap --ro-bind / / true
The sysctl is 1 and bwrap fails on the uid map:
kernel.apparmor_restrict_unprivileged_userns = 1
bwrap: setting up uid map: Permission denied
Ubuntu 26.04 has the same sysctl set to 1, but it ships a bwrap-userns-restrict profile in /etc/apparmor.d/, so bwrap works there. On 24.04 dsh still blocked the write. The error changed to Permission denied, which fits the Landlock fallback rather than bubblewrap, though the session log does not name the backend. The file was not created:

So 24.04 is confined, just by the fallback. Don’t fix it by setting the sysctl to 0, which reopens unprivileged user namespaces for every program on the box. In the 24.04 run the agent also said a one-shot retry with a wider sandbox mode was available, but it would not try it without your approval.
Where dsh is rough right now
Know these before you wire dsh into anything that matters. Release candidates have shipped every few days, and the project openly promises breaking changes, so a config that worked last week can fail after an unpinned upgrade. Since August we’ve seen four such changes:
- The Node floor jumped to 24.9.0
- The Landlock launcher moved to
node-addon-system-linux-x64 - The session log went to format version 4
- PTC mode’s preset ID became
ptc
Record the exact rc a working config was tested against, because that is the only way to tell an upgrade regression from your own mistake. Read the engines field before every upgrade too, since npm only warns when it is wrong.
The Linux packaging story is uneven. Ubuntu and Debian need a third-party Node repository, Rocky needs a manual alternatives entry that the error message never hints at, and Ubuntu 24.04 quietly runs the sandbox on its fallback. None of that is dsh’s fault exactly, but you will hit all of it on a clean box. The English documentation is still thin, and several answers only turn up in package READMEs rather than a user guide.
The parts that matter already hold. The same first task passed on four distros, the sandbox refused the write on every one of them, the session log is honest, and swapping the model route is a ten-line YAML file rather than a fork. Next in this series we compare dsh with Claude Code where they actually differ, then wire it to a local model, which pairs with running DeepSeek V4 Flash locally and the tradeoffs in MCP vs RAG vs agent skills.