Windows (WSL2)¶
There is no native Windows build. Session discovery reads /proc and runs
ps, control goes through the tmux binary, and the service installer knows
systemd and launchd only. On Windows, run the daemon inside a WSL2 distribution
and run Claude Code or Codex inside the same distribution: the daemon reads
their transcripts from ~/.claude and ~/.codex of the Linux home, so agents
started from PowerShell or cmd are not seen. Everything on
Install the daemon applies inside WSL2; this page covers what
differs.
Set up WSL2¶
Enable systemd so porthole install can register the user service. Inside the
distribution:
If /etc/wsl.conf already exists, add the two lines to it instead of
replacing it.
Then from PowerShell:
Open the distribution again and confirm with systemctl --user status. Without
systemd the service step fails and porthole install prints You can still run
porthole serve by hand; run porthole install --no-service instead and start
porthole serve in a tmux window yourself.
Install tmux:
The daemon needs it for every session you want to control from the phone.
Run the installer:
uname -s reports Linux inside WSL2, so the script takes the Linux path: it
downloads the linux release for your architecture, verifies the checksum, and
runs porthole install. The install step tries loginctl enable-linger; if
that needs root it prints the sudo command to run.
Networking¶
The phone must reach the daemon on a private address. The daemon accepts connections from loopback, link-local, RFC 1918, CGNAT (100.64.0.0/10, the range Tailscale uses) and IPv6 ULA addresses, and binds VPN interfaces by name (see Security). Pick one of these two setups.
Tailscale inside WSL¶
Install Tailscale inside the distribution, not on Windows:
The distribution gets its own tailscale0 interface with a 100.x address. The
daemon binds it and lists it first in the pairing QR, and the phone connects
over the tailnet from anywhere. No Windows firewall change is needed because
the traffic arrives through the tunnel.
Mirrored networking and a firewall rule¶
Mirrored networking (Windows 11 22H2 or later) gives the distribution the same
LAN address as the Windows host. Create or edit %UserProfile%\.wslconfig:
Then from PowerShell:
Allow TCP 7433 through Windows Defender Firewall, from an elevated PowerShell:
New-NetFirewallRule -DisplayName "Porthole" -Direction Inbound -Protocol TCP -LocalPort 7433 -Action Allow
Use the port you set in config.toml if you changed it. If the phone still cannot connect, allow inbound traffic to WSL in the Hyper-V firewall:
Set-NetFirewallHyperVVMSetting -Name '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}' -DefaultInboundAction Allow
NAT mode is not supported¶
The default WSL2 networking mode puts the distribution behind NAT with a
172.x address that the phone cannot reach. Forwarding the port with
netsh interface portproxy does not help: the daemon sees the proxy as the
connection source, so it cannot tell your phone from any other client, and the
address it prints for pairing is still the unreachable one. Use one of the two
setups above.
Pair¶
Inside the distribution:
prints the QR code and a Manual entry: host ... line with the addresses the
daemon chose. Check that line before scanning: with Tailscale it should show a
100.x address, with mirrored networking the LAN address of the Windows host.
If it shows only a 172.x address, or ends with
warning: no VPN or private address is bound, the networking step is not
complete. Then follow Pair a phone.
Limits¶
- The daemon runs only while the WSL instance runs.
wsl --shutdown, a Windows reboot, or WSL stopping the distribution stops it. Open a WSL terminal to start the instance again; with systemd and lingering enabled the user service starts with it, otherwise runporthole serve. - Agents started on the Windows side (PowerShell, cmd, Windows Terminal without WSL) are not discovered. The daemon only sees processes and transcripts inside its own distribution.
porthole wrap, hooks and session control needtmuxandclaudeorcodexinstalled inside the distribution, on the LinuxPATH.