Troubleshooting
Steps for diagnosing connection problems between the Pocketmux mobile app and a host running pmux. For installation problems (PATH, Gatekeeper, checksums), see the Installation guide.
First checks
Start with the agent's own view of the world:
pmux status # version, agent state, session count, paired device
pmux agent status # is the background agent running?
If the agent is not running, start it with pmux agent start (bare pmux or any tmux command through pmux, such as pmux ls, also spawns it automatically). If the mobile app shows the host as offline even though the agent is running, the agent's connection to the signaling server is the usual suspect — check the log:
tail -f ~/.config/pmux/agent.log
For more detail, set log_level = "debug" in ~/.config/pmux/config.toml (or PMUX_LOG_LEVEL=debug) and restart the agent with pmux agent restart.
Host shows offline in the app
The signaling server marks a host offline after 90 seconds without a heartbeat. Common causes:
- The host is asleep. A sleeping machine drops its signaling connection, and the mobile app cannot wake it. On macOS and Linux (systemd), the agent marks the host offline just before it sleeps and reconnects as soon as it wakes. Enable
power.keep_awaketo hold the host awake while the agent runs. - The agent can't sign in to your own signaling server. If
agent.log(orpmux pair) shows an error containingchallenge was signed for origin, the server is older than pmux-server 1.2.0 or sees a different origin thanserver.url. Upgrade the server and check thatserver.urlmatches its address. An error containingredirects are not followedmeansserver.urlredirects; set it to the final URL. - The app can't sign in to your own signaling server. Pocketmux mobile 1.2.0 and later also requires pmux-server 1.2.0. On an older server the app can't sign in, so every host on that server shows offline in the app even while its agent is connected, and Settings → Logs shows
Auth token fetch failed. Upgrade the server. - The host's network changed (Wi-Fi switch, VPN up/down, laptop moved). The agent reconnects to the signaling server automatically, first after
connection.reconnect_interval(default 5 s), then backing off up to 30 s between attempts. Give it a few seconds, then refresh the host list in the app. - The agent gave up retrying. After 5 minutes of failed reconnects (for example, a long network outage), the agent stops retrying until you run
pmux agent startor a tmux command throughpmux(such aspmux ls) on the host. - A firewall is blocking the agent. Host firewalls sometimes re-prompt or silently block the agent after a version upgrade. Check your firewall's allowed-apps list for
pmuxand re-approve it.
Connection drops mid-session
The terminal session itself runs over a direct WebRTC connection between phone and host; tmux keeps your session alive on the host regardless, so nothing is lost — reconnecting reattaches to the same session.
- Network transition on the phone (Wi-Fi ↔ cellular): the app re-establishes the connection; reopen the session from the host list if it doesn't recover on its own.
- Repeated drops on one network: some networks (corporate NAT, CGNAT, hotel Wi-Fi) block peer-to-peer paths. Verify whether the TURN relay fallback works by forcing relay-only mode on both ends — a relay-only connection that succeeds while normal mode keeps dropping points at the direct path being unstable on that network.
Host is online but the connection fails
- "Host is busy — another device is connected" — the agent is still releasing a previous connection. Wait a moment and tap Retry.
- The connection fails immediately and
agent.logshowsconnection rejected: shared secret unavailable— the agent could not read the pairing secret from its secret backend, usually because the system keychain is locked (common when you are logged in only over SSH). Unlock the keychain or log in at the console, then tap Retry. For machines where the keychain is never unlocked, see the secret backend options.
App says pmux is out of date
pmux 0.5.5 and earlier use an older connection handshake that does not bind the pairing secret to the live connection. When the app connects to one of these hosts, it labels the host Outdated in the host list and shows a banner in the terminal: "pmux on this computer is out of date. Run pmux update there. Until then this connection is less secure." If the host has already connected with the current handshake, the app refuses the older one and shows "pmux on this computer is out of date. Run pmux update there, then reconnect."
Either way, run pmux update on the host, then reconnect from the app.
Isolating the failing layer
Work down the stack:
pmux status— agent running and paired?pmux config— server URL correct? (server.url, defaulthttps://signal.pmux.io)~/.config/pmux/agent.log— signaling connect/reconnect lines, and on connect the selected ICE candidate pair (usingRelayflag).- In the app, Settings → Logs — the negotiated transport is logged on connect (
P2P directvsTURN relay). - Force TURN relay on both ends to cleanly separate "TURN is broken" from "ICE in general is broken".
Still stuck?
Open an issue on the pmux-agent issue tracker with:
pmux --versionoutput and your OS- the relevant lines from
~/.config/pmux/agent.log(debug level if possible) - what the mobile app's Logs screen shows for the failed connection
For security-sensitive reports, follow the vulnerability disclosure policy instead of filing a public issue.