Running Isolated DSH Web Services for Projects within WSL2

Introduction

When working with multiple repositories using DeepSeek Harness (DSH) on Windows, the common practice is to repeatedly modify the workspace pointed to by dsh web, or to manually switch ports in different terminals. dsh web serves only one workspace at a time—based on the last opened one in the dsh home. Once a second project is involved, it competes with the first for the same home, port, and token: links may open the wrong project, sessions may get mixed up, and restarts can clear login states. To run multiple projects simultaneously, you have to manually keep track of ports and processes.

Below is an introduction to the community plugin dsh-wsl-projects (Maintainer: mvalentsev, GitHub: mvalentsev/dsh-wsl-projects). It allocates an independent systemd user service, port, and dsh home for each project within WSL2, and provides a panel at the bottom of the sidebar in the Windows DSH client to start, stop, and open the Web service for each project. The plugin is categorized as a Client plugin; License: MIT (see the repository README).

What is this

In one sentence: One DeepSeek Harness web server per project, inside WSL2 — started, stopped and opened from a panel in the Windows app.

The DSH app on Windows drives a Linux distribution inside WSL2: each “project” corresponds to a systemd user unit, a listening port, and an isolated dsh home. Sessions and conversations remain within their respective projects; on first startup, the account is copied from ~/.dsh once to avoid re-logging into every home.

Core Features

Per-Project Isolation

  • One systemd user service per project: Start and stop via the panel; services survive terminal closure.
  • One port per project: Ports are not shared with a second project, ensuring links correspond one-to-one with projects.
  • One dsh home per project: Paths look like ~/.dsh/dsh-wsl-projects/homes/<folder>-<tag>/; the tag comes from the path, so folders with the same name will also be assigned different homes.
  • Links shown only when available: The panel only displays “Open” when the currently running service can respond to the link, avoiding expired tokens.

Panel and Refresh

The panel defaults to the bottom of the sidebar and refreshes status approximately every 5 seconds. Each row displays service status, port, and Open, Stop, Start, Restart, Remove. You can create a new service by selecting a directory, naming it, and selecting a port under Start a project.

The panel position can also be changed via a global variable (set before the bundle loads):

window.__DSH_WSL_PROJECTS_SURFACE__ = 'settings'  // A page inside Settings
window.__DSH_WSL_PROJECTS_SURFACE__ = 'floating'  // A draggable floating layer

Automation Interface

  • REST: /wsl-projects/api/, including state, units, projects, distros, start, stop, restart, stop-unit, restart-unit, remove-unit, config, alias, etc.
  • Agent Tool: wsl_dsh, exposing the same operations as the panel to the model.

Environment Requirements

  • A Windows environment with DeepSeek Harness installed.
  • WSL2 and a Linux distribution; the README states testing was done on Ubuntu, other distributions are not tested.
  • dsh available in the PATH within that distribution.
  • systemd enabled in the distribution (the plugin uses systemctl --user).
  • bash present in the distribution.
  • A directory to store projects, defaulting to ~/projects, configurable in settings.

package.json requires Node ≥ 20; the plugin’s version constraint for dsh is >=0.2.0-rc.2 <0.2.2-0 (please compare with your current client version before installing).

Installation and Activation

  1. Run in the Windows terminal (replace <path-or-github-spec> with a local path or GitHub spec, depending on the spec you actually use):
dsh plugin --profile desktop add <path-or-github-spec>

If using a pure dsh web configuration, change --profile desktop to --profile web. Local clone paths can also be used as arguments.

  1. Completely quit the DeepSeek Harness app and restart it. Simply refreshing the page is not enough: the client half and the host half load at different times, and the host half loads with the app startup sequence.

The plugin runs with the permissions of the current dsh process; it is recommended to read the repository source code and the MIT license before installation to ensure the behavior meets your security expectations.

Typical Usage

  1. Open the panel (bottom of the sidebar).
  2. Select a project under Start a project.
  3. Click Start a service for this project.
  4. Click Open on the new row to open the Web interface for that project.

Configuration

Add a plugin block in the profile patch, for example:

- id: wsl-projects
  name: dsh-wsl-projects
  config:
    distro: Ubuntu
    projectsRoot: ~/projects
    unit: dsh-web.service
    defaultPort: 19800
    configFiles:
      - ~/.dsh/settings.yaml
      - ~/.dsh/profiles/web/cordis.patch.yml
Key Meaning Default
distro The WSL distribution to use WSL default distribution
projectsRoot Project root directory ~/projects
unit systemd user unit template for dsh inside WSL dsh-web.service
defaultPort Starting port for new services 19800
configFiles List of config files editable by the panel Standard dsh files

How It Works (Brief)

DSH determines which workspace to open via $DSH_HOME/storages/workspace.json and does not validate the startup directory; therefore, “one home per project” is required to bind the workspace. Browser sessions are distinguished by host and port; “one port per project” avoids session crossover. Tokens are bound to processes, so old tokens become invalid, hence the panel probes before providing links.

On first startup, the launcher creates the home, copies the account from ~/.dsh once, and writes the project into that home’s workspace storage.

Use Cases and Notes

Suitable for: Developers maintaining multiple code repositories simultaneously on Windows + WSL2, who want an independent DSH Web for each repository without manually managing ports and systemd.

Notes:

  • Platform restricted to Windows · WSL2; compatibility for non-Ubuntu distributions is not promised in the README.
  • The account copy within a project’s home does not automatically update with subsequent changes to ~/.dsh; if repeatedly asked to log in, you can delete .credentials.yaml under that home and Start again as per the README.
  • If a service fails to start, use journalctl --user -u dsh-web-<folder>-<tag>.service -n 40 to view logs.
  • If the panel indicates the host half version is too old, you must quit the app and reopen it; reloading the page is not enough.

Troubleshooting Summary

Symptom Resolution Direction
Panel unresponsive, prompts host half too old Quit and restart the DSH app
Open opens the wrong project Check the address; one port per project; Stop then Start on that row then Open
Open reports authentication error Link expired; Stop then Start
Asked to log in again Delete the corresponding home’s .credentials.yaml and restart the project
Service cannot start Check the journalctl logs mentioned above

Conclusion

The DSH ecosystem emphasizes “Everything is a plugin”; the community directory page dsh-wsl-projects on SkillHub and the GitHub repository are indexed independently and are not official DeepSeek / High-Flyer app store entries. If your daily workflow is “Multiple Projects + WSL2 + Windows Client,” this plugin consolidates “one service, one port, one home per project” into a single panel, reducing the manual cost of fighting for the home and port with a single dsh web instance.

  • Directory Page: https://www.skillhub.cn/plugins/mvalentsev/dsh-wsl-projects
  • Source Code and Documentation: https://github.com/mvalentsev/dsh-wsl-projects
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye