Skip to content

Remote PCs: support Windows hosts (herdr runs natively on Windows) #189

Closed

Description

@nahwan-kim

Problem

Add PC only accepts Linux and macOS hosts, so a Windows PC can't be added even though herdr itself now runs there. Setup inspects the host with uname -s/uname -m and rejects anything that isn't Linux/Darwin or whose home doesn't start with / (server/machines.ts#L290-L293): "Only Linux/macOS x64 and arm64 PCs are supported". Remote bundles are also built only for Linux/macOS × x64/arm64 (docs/remote-pcs.md).

herdr itself supports this setup. Native Windows support is generally available, and herdr --remote and saved SSH machines support Windows x86_64 hosts (herdr Windows docs). I use it that way today:

  • Host: Windows 11 Pro (10.0.26200, x64), built-in OpenSSH Server, DefaultShell = PowerShell 7.6.6, herdr 0.9.3. Server socket: %APPDATA%\herdr\herdr.sock (from herdr status server).
  • herdr machine add <host> from macOS herdr 0.9.1 and 0.9.2 works. herdr's remote probe tries /bin/sh first, then falls back to PowerShell.
  • Connection server: herdr-web-ui 0.3.33 (remote-v7) on macOS. The same Windows host can't be registered there.

Proposal

  • Detect Windows during setup. When the POSIX probe fails, run a PowerShell probe (OS, arch, %USERPROFILE%, %APPDATA%, Get-Command herdr), the same way herdr's remote attach does.
  • Publish a win32-x64 bridge bundle. It would contain Bun, Node, and node-pty over ConPTY. @lydell/node-pty-win32-x64 is on npm; its dist-tags list only 1.2.0-beta.15.
  • Resolve the socket the Windows way. Use %APPDATA%\herdr\herdr.sock (or ...\sessions\<name>\herdr.sock), or ask herdr status server.
  • Replace the POSIX-only steps. Setup and update use printf, test -x, kill -0, cd -P, and $HOME/.config paths. These need PowerShell equivalents or a small bundled helper script run by the bundled Bun, so the bridge runs the same way on every OS.
  • Keep background start working. herdr's docs say servers started through Windows OpenSSH survive logout. The bridge's background start needs the same property.

Until that lands, it would help if the setup error and docs/remote-pcs.md said explicitly that Windows hosts aren't supported yet. WSL is a workaround, but it drives a Linux herdr, not the native Windows session.

I haven't run the web UI's Add PC flow against this host. The rejection above is from reading the code at the linked commit.

Activity

  1. devswha commented on Sep 30, 2026

    @devswha
    Owner

    Thanks for the detailed write-up and the working herdr setup. I'd like to support Windows hosts. As you noted, it's a larger change: a PowerShell probe, a win32-x64 bridge bundle with node-pty over ConPTY, Windows socket paths, and replacing the POSIX-only setup and update steps. It will come after the current work.

    Meanwhile, I'll make the setup error and docs/remote-pcs.md say plainly that Windows hosts aren't supported yet, so nobody has to find out from the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions