dsh-webdav-sync: Synchronize DSH Configurations Across Multiple Computers Using WebDAV

Preface

When using DeepSeek Harness (DSH) across multiple machines, a common practice is to manually copy profiles, credentials, and plugin manifests, or to dump the entire directory into a cloud drive. The YAML and package.json files within a profile often get entangled with local machine paths and secret references; meanwhile, secrets are not stored in the profile itself but reside only in local credential services. Simply syncing files makes merging difficult and risks mixing WebDAV passwords with encryption passphrases into configurations that get uploaded.

The following introduces the community plugin dsh-webdav-sync (repository GaoHu1997/dsh-webdav). It packages the “entire setup” into a single encrypted file stored on WebDAV, performing a server-side three-way merge by part, rather than mirroring the profile directory to the server.

What is this

dsh-webdav-sync is published by maintainer GaoHu1997 under the MIT license. Both the npm package name and the plugin id are dsh-webdav-sync. The design is derived from internal/davsync in magpie, implemented here in TypeScript, targeting DSH’s cordis.patch.yml and the profile’s package.json.

Backups are encrypted with a passphrase before leaving the local machine (AES-256-GCM + PBKDF2-SHA256, 600,000 rounds). The server only ever sees ciphertext; it cannot view model directories, plugin manifests, API keys, or the providers associated with those keys.

What is synced

Synchronization is divided by “Part” (Part), and each computer can independently toggle whether a specific part participates in local reading and writing:

Part (Part) Source Meaning
models llm-pi-ai line in cordis.patch.yml Model providers and models
patch Other loader lines in cordis.patch.yml Remaining profile configurations such as MCP, permission presets, and UI settings
plugins dependencies and dsh.profile.bundles in package.json Installed plugin declarations (excluding node_modules; another machine will reinstall using pnpm)
dirs Absolute path directories selected by the user in “Sync Content” Additional directories (default part switch is off)
keys API keys referenced by the above configurations in the credential service Fills in managed storage values corresponding to apiKeyEnv / secretEnv names

Not in sync scope: The agent-default-model line in cordis.patch.yml (frequent model changes have low cross-machine value); this plugin’s own loader line is excluded when collecting the patch part to prevent WebDAV account passwords from being uploaded with the patch.

Merge rules: Part-based hashing and three-way merge; in case of conflict, the newer part wins, and the older part is written to the local sync/ directory for archival. Uploads use the recorded version for If-Match to prevent silent overwrites. keys are write-only (no deletion); if both sides are modified, the local side takes precedence (credentials lack mtime).

Installation and Activation

This is a DSH plugin composed of a Host (Node) and a browser settings card. Run the following in the profile directory ($DSH_PROFILE_DIR, or $DSH_HOME/profiles/<profile>):

pnpm add dsh-webdav-sync

If the loader is not automatically included via the bundle mechanism, you need to add it manually to cordis.patch.yml:

- insert:
    - id: dsh-webdav-sync
      name: 'dsh-webdav-sync'

The id matches the composition entry on the browser side; the name must equal the installed package name. After installation, reload the interface; a “WebDAV Sync” page will appear in Settings, and the Plugins page will also display the same configuration card when the Host service hosts this plugin’s namespace.

Configuration and Typical Usage

Configuration is written to .dsh-webdav-sync/sync.json under the profile (file permission 0600, directory 0700), not in cordis.patch.yml.

  1. Fill in the WebDAV url, user, and password (sent to the server via HTTP Basic).
  2. Set a passphrase (used locally for encryption/decryption only, must not be the same as the WebDAV password).
  3. Check the parts to sync in “Sync Content”: models, plugins, patch, keys; to include directories outside the profile, enable dirsEnabled and add absolute paths via the “Select Directory” interface (max 5 directories, max 2000 files / 8 MiB per directory).
  4. autoEvery controls the automatic sync interval (minutes): -1 means manual “Sync Now” only; optional values include 3, 15, 30, 60.
  5. After saving, execute sync; install the same plugin on another computer, point to the same WebDAV path, and use the same encryption passphrase to decrypt and merge.

url examples (entering a folder address or server root is fine; trailing slashes are optional):

{
  "url": "https://dav.jianguoyun.com/dav/",
  "user": "me@example.com",
  "password": "…",
  "passphrase": "…",
  "autoEvery": 15,
  "models": true,
  "plugins": true,
  "patch": true,
  "keys": true,
  "dirs": [],
  "dirsEnabled": false
}

Some service providers require additional HTTP headers (e.g., User-Agent, X-Api-Key, or Bearer). These can be filled in the headers field, one “Name: Value” pair per line; if authorization is already written, Basic auth will not be automatically added.

Optional Local Relay (relayEnabled): Listens on relayPort (default 3426) at 127.0.0.1, reusing the same upstream url / authentication configuration, facilitating loopback access by other local clients; local Basic accounts relayUser / relayPassword are stored only locally.

Passwords and passphrases exist only in sync.json and the running Host memory; the browser card only receives passwordSet / passphraseSet and does not fetch plaintext. When “Remember Password” is off, password is not retained on disk, and re-entry is required upon Host restart. If the WebDAV address or username changes without submitting a new password, the old password will not be erroneously applied to the new account.

Use Cases and Notes

Suitable for users who need to align DSH model lists, plugin manifests, MCP and permission patches, and credential references between office computers, home machines, or multiple Linux/macOS development machines. Additional directories are suitable for syncing files under fixed absolute paths such as notes, prompts, or scripts; upon restoration, files are written back to the same paths, and sync does not delete existing files within the directories.

Please note before use:

  • The plugin logic reads and writes the profile, credential service ($DSH_HOME/.credentials.yaml), and user-selected directories under the permissions of the current DSH Host process. Please read the source code and license before installation to ensure it complies with your security policy.
  • The WebDAV account only touches the encrypted bundle; actual confidentiality relies on the passphrase you set. If the passphrase is lost, plaintext cannot be recovered from the files on the server.
  • The community plugin directory entry dsh-webdav on SkillHub has no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem adheres to “everything is a plugin,” and the choice to use it is at your own discretion.

Conclusion

dsh-webdav-sync consolidates cross-machine DSH configuration into “one encrypted file + part-by-part merging,” while separately handling API keys and optional additional directories, mitigating the issues of manual profile copying and credential misalignment. For more field descriptions and design decisions, refer to the repository README and docs/decisions/.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye