psmux on Windows hosts
1. What psmux is
psmux is a tmux for Windows: a free, open-source program (MIT licence) that runs natively on Windows, with no WSL. meshTerm can use it to keep your sessions on a Windows host running after you disconnect, the way tmux does on Linux and macOS. Close the app, lose the network or switch to another device, and the session is still there when you reconnect, with its programs and output.
psmux runs on your Windows machine, so it has to be installed there. meshTerm doesn't install it for you. It installs for your account only and needs no admin rights.
- You need meshTerm 2.3.3 or later and psmux 3.4.0 or later.
- The host is a Windows PC or server you connect to through its built-in OpenSSH server (see Windows hosts). Shells such as MSYS2, MinGW or Cygwin don't count as Windows for this: psmux is offered only for a native Windows host. If Check for psmux finds that the host's SSH shell is one of them, meshTerm stops offering psmux for that host.
- Sessions belong to the Windows account you sign in with. They keep running until you end them, the last shell in them exits, or the machine restarts.
2. Installing psmux
Install psmux as the account you use with meshTerm. Every method below works for a standard account; only Chocolatey usually needs an administrator.
The signed installer (recommended)
From 3.4.0, psmux publishes a signed installer with each release on its GitHub releases page. Take the latest release and pick the file for your machine:
| Machine | File |
|---|---|
| Most PCs and servers (64-bit Intel or AMD) | psmux-v<version>-x64-setup.exe |
| ARM (for example Snapdragon laptops) | psmux-v<version>-arm64-setup.exe |
| 32-bit Windows | psmux-v<version>-x86-setup.exe |
Run it on the Windows machine. It installs for your account only, into %LOCALAPPDATA%\psmux, and adds that folder to your account's PATH. No admin rights are needed. The file is signed by Open Source Developer Godwin Josh (a Certum code-signing certificate), and GitHub lists a SHA-256 checksum next to every file.
You can also install it from an SSH session, for example from meshTerm's terminal on that host. In Command Prompt (replace 3.4.0 with the latest version, and x64 with your machine's):
curl.exe -fL -o "%TEMP%\psmux-setup.exe" https://github.com/psmux/psmux/releases/download/v3.4.0/psmux-v3.4.0-x64-setup.exe
start "" /wait "%TEMP%\psmux-setup.exe" /S
In PowerShell:
curl.exe -fL -o "$env:TEMP\psmux-setup.exe" https://github.com/psmux/psmux/releases/download/v3.4.0/psmux-v3.4.0-x64-setup.exe
(Start-Process "$env:TEMP\psmux-setup.exe" -ArgumentList '/S' -PassThru).WaitForExit()
/S installs silently, and the second line waits for the installer, which takes about 20 seconds. When the prompt comes back, tap Reconnect in meshTerm (see Without psmux). Don't reconnect or close the tab before then: that ends the SSH session, which can stop the installer half-way.
To check the file before you run the installer (after the curl.exe line), in PowerShell:
Get-AuthenticodeSignature "$env:TEMP\psmux-setup.exe" | Format-List Status, SignerCertificate
Get-FileHash "$env:TEMP\psmux-setup.exe" -Algorithm SHA256
Status should be Valid and the certificate's subject should start CN=Open Source Developer Godwin Josh. Compare the hash with the SHA-256 that GitHub lists for the file (ignoring case). In Command Prompt, certutil -hashfile "%TEMP%\psmux-setup.exe" SHA256 prints the same hash.
The installer (and its uninstaller) stops every running psmux server on the machine first, so installing or updating psmux ends all your psmux sessions, including ones meshTerm started. It also closes any program named tmux.exe or pmux.exe. Install or update at a moment when nothing important is running in a session.
When it finishes, the installer leaves one spare psmux server running in the background. It is psmux's own standby server, which makes new sessions start faster, and it doesn't show in your session list. It is harmless; it uses some memory until the machine restarts. Sessions meshTerm starts don't keep a spare server running.
winget, Scoop and Chocolatey
If you already use one of these package managers, it can install psmux instead. Each one also installs tmux.exe and pmux.exe beside psmux.exe; meshTerm always runs psmux.exe.
| Package manager | Install | Good to know |
|---|---|---|
| winget | winget install --exact --id marlocarlo.psmux | Installs for your account. Use the exact id: the same publisher has another package, psmux.TerminalMap (a map viewer), that a plain winget install psmux can also match. winget isn't on every Windows: Windows Server often lacks it, and an account that only signs in over SSH may not have it either. |
| Scoop | scoop bucket add psmux https://github.com/psmux/scoop-psmuxscoop install psmux | Installs for your account, no admin rights. |
| Chocolatey | choco install psmux | Usually run from an administrator shell. The package has the 64-bit (x64) build only: on 32-bit Windows or an ARM machine, use the signed installer for your machine instead. |
After installing, reconnect so meshTerm opens a new SSH session, which sees the updated PATH. meshTerm also looks in each of these install folders itself.
3. Turning it on in meshTerm
psmux is a per-host choice, and every Windows host starts at None.
- Open the host's Edit Host > Session.
- Under Persistence, choose psmux. A Windows host offers psmux and None (tmux and mtRoam need Linux or macOS). You can also choose psmux when you add a Windows host.
- Optionally set a Session name, as for tmux. Letters, digits,
-and_are kept and other characters become-, and a name that's too long (over 64 characters) or that Windows reserves (such asCONorNUL) is adjusted. When the name changes, meshTerm shows the one psmux will use under the field. - Tap Check for psmux, then tap Check for psmux again on the screen that opens, to see whether meshTerm finds psmux on the host, and which version. If it isn't found, the result links to this page.
- Save, and open the host. The terminal attaches to your psmux session, creating it the first time.
Choosing None again goes back to a plain SSH shell that ends with the connection.
4. Without psmux
If you choose psmux for a host where it isn't installed, nothing breaks: the terminal opens the host's plain shell, as it would with None, and shows No session persistence: "psmux isn't installed on <host>, so this session won't keep running when you disconnect." The notice has two buttons:
- Install Guide opens this page.
- Reconnect connects again and looks for psmux. Once it is installed, the tab reopens inside your psmux session.
meshTerm remembers for a day that psmux was missing, so automatic reconnects on that host open the plain shell straight away instead of trying psmux each time. Tapping Reconnect always looks again.
The Sessions list for the host says "psmux isn't installed on <host>." with Install Guide and Try Again.
5. Using a psmux session
- Disconnecting: leave the app, lose the network or close the tab, and the session keeps running on the host. Reconnect, or open the host again, to pick it up where you left it.
- The shell inside a psmux session is the same shell your SSH server opens (Command Prompt unless the server's default shell was changed). Run
powershellorpwshin it if you prefer. Ctrl-C normally stops a running program (see the known issue in psmux 3.4.0). - Scrolling back: swiping or scrolling the terminal scrolls psmux's history (its copy mode). Tap the return-to-prompt pill that appears to go back to the prompt, or press
q. - Sessions: long-press the host and choose Sessions… to see its psmux sessions. Tap one to open it, tap + for a new one, or swipe a row and tap End Session to close it on the host. Session names on Windows ignore case:
Workandworkare the same session. - Ending a session: type
exitin its last shell. The tab says "The psmux session ended." and doesn't reconnect by itself; Reconnect starts a new session with the same name. - Detaching on purpose with psmux's own keys (Ctrl-B then D) disconnects the tab and leaves the session running.
- Environment variables and Secret Profiles aren't applied on Windows hosts (see Windows hosts). Agent notifications work in psmux sessions for Claude Code, Codex and agy (Gemini); see the notification guide for setup and Codex's routing limits.
6. Troubleshooting
- Ctrl-C doesn't stop a program: in psmux 3.4.0, Ctrl-C may not stop a running program such as
ping -tif the psmux server was first started from PowerShell over SSH. psmux has fixed this upstream; the fix will be in the next psmux release. Until then, close the program another way (for example,qif that is its quit key), or end and restart the psmux session so meshTerm starts its server again. - "psmux isn't installed" right after installing it: tap Reconnect (or Try Again in Sessions, or Check for psmux in Edit Host > Session). If it still says so, check that it installed for the same Windows account meshTerm signs in with, and that
psmux -Vin a new SSH session prints a linepsmux 3.4.0or later. (Its first line saystmux 3.4.0, for compatibility with tmux tools; thepsmuxline is the one that counts.) - All my sessions ended at once: installing, updating or uninstalling psmux stops every psmux server (see the warning above), and a restart of the machine ends them too.
- "Couldn't start psmux on <host>": psmux was found but the session didn't start. Tap Reconnect. If it keeps happening, update psmux to the latest release.
- Uninstalling: use Windows' Installed apps list (or
uninstall.exein%LOCALAPPDATA%\psmux), or your package manager. Then set the host's Persistence back to None. - More Windows help: key installed, still asks for a password, permission denied, and Windows hosts in the User Guide.