Skip to main content

Configuration

pmux stores its configuration at ~/.config/pmux/config.toml. The file is created by pmux init with sensible defaults. Most users will never need to edit it.

Config precedence

Configuration values are resolved in three layers, where each layer overrides the previous:

  1. Defaults -- built into the pmux binary.
  2. Config file -- values set in ~/.config/pmux/config.toml.
  3. Environment variables -- override both defaults and file values.

Run pmux config to see the effective values with source annotations showing where each value came from (default, file, or env).

Schema reference

TOML keyTypeDefaultEnv overrideDescription
namestringOS hostname--Display name shown on the paired mobile device
log_levelstringinfoPMUX_LOG_LEVELAgent log verbosity
server.urlstringhttps://signal.pmux.ioPMUX_SERVER_URLSignaling server base URL
identity.key_pathstring~/.config/pmux/keys/PMUX_KEY_PATHDirectory containing the Ed25519 public key
identity.secret_backendstringautoPMUX_SECRET_BACKENDSecret storage backend
connection.reconnect_intervalduration5s--Delay between signaling reconnect attempts
connection.keepalive_intervalduration30s--WebSocket heartbeat interval
connection.max_mobile_connectionsinteger1PMUX_MAX_CONNECTIONSMaximum concurrent mobile connections
tmux.socket_namestringpmuxPMUX_SOCKET_NAMEtmux socket name for the -L flag
tmux.tmux_pathstring(empty)PMUX_TMUX_PATHAbsolute path to the tmux binary

Top-level

name -- the host display name shown on the paired mobile device. Set during pmux init using the OS hostname. Edit the value directly in config.toml to change it. If unset, the agent resolves the OS hostname at runtime.

log_level -- controls the agent's log verbosity. Accepted values are debug, info, warn, and error. The default is info. Useful for troubleshooting: set to debug for verbose output, or error to suppress routine messages. Logs are written to ~/.config/pmux/agent.log.

[server]

url -- the signaling server base URL. Accepts http://, https://, ws://, or wss:// schemes. The agent converts HTTP URLs to WebSocket URLs internally when connecting. Validation rejects any URL that does not start with one of these four schemes.

The legacy environment variable PMUX_AGENT_SIGNAL_URL is also supported, but PMUX_SERVER_URL takes precedence when both are set.

[identity]

key_path -- the directory where ed25519.pub (the Ed25519 public key) is stored. The private key is not stored as a file in this directory. It lives in the secret backend instead.

secret_backend -- controls where private keys and shared secrets are stored. Three values are accepted:

  • auto (default) -- tries the system keychain first. Falls back to an encrypted file if the keychain is unavailable.
  • keyring -- uses macOS Keychain or Linux SecretService via D-Bus. Fails with an error if neither is available.
  • file -- uses NaCl SecretBox (XSalsa20-Poly1305) encryption. Stores secrets at <key_path>/secrets.enc.

Validation rejects any value other than auto, keyring, or file.

[connection]

reconnect_interval -- a Go duration string (e.g., 5s, 1m30s, 500ms). Controls the delay between reconnect attempts when the signaling server connection drops. Must be a valid Go duration or validation fails.

keepalive_interval -- a Go duration string. Controls the WebSocket heartbeat interval used to maintain the signaling connection. Must be a valid Go duration or validation fails.

max_mobile_connections -- the maximum number of concurrent mobile connections. Must be 1 in the current release, which enforces the single-pairing model. Validation rejects any other value.

[tmux]

socket_name -- the tmux socket name passed to -L. All pmux commands use this socket. Changing it creates a completely separate tmux namespace. The default value pmux keeps Pocketmux sessions isolated from regular tmux sessions. Must not be empty.

tmux_path -- the absolute path to the tmux binary. pmux init discovers and saves this automatically using $PATH lookup. This ensures the agent can find tmux even when launched by a service manager (launchd/systemd) where $PATH may be minimal. If empty, the agent falls back to searching $PATH at runtime. Set this manually if tmux moves to a different location after initialization.

Annotated example

A complete config.toml with all fields set:

# Host display name (shown on paired mobile device)
name = "my-workstation"
# Log level: "debug", "info", "warn", or "error" (env: PMUX_LOG_LEVEL)
log_level = "info"

[server]
# Signaling server URL (env: PMUX_SERVER_URL)
url = "https://signal.pmux.io"

[identity]
# Ed25519 key directory (env: PMUX_KEY_PATH)
key_path = "~/.config/pmux/keys/"
# Secret storage: "auto", "keyring", or "file" (env: PMUX_SECRET_BACKEND)
secret_backend = "auto"

[connection]
# Reconnect delay after signaling disconnection
reconnect_interval = "5s"
# WebSocket heartbeat interval
keepalive_interval = "30s"
# Maximum mobile connections (must be 1)
max_mobile_connections = 1

[tmux]
# tmux socket name for -L flag (env: PMUX_SOCKET_NAME)
socket_name = "pmux"
# Absolute path to tmux binary (env: PMUX_TMUX_PATH)
# Resolved automatically during 'pmux init'. Set manually if tmux moves.
tmux_path = "/opt/homebrew/bin/tmux"

When pmux init creates the file, all values are commented out so they act as documentation without overriding the built-in defaults.

Environment variables

VariableConfig equivalentNotes
PMUX_SERVER_URLserver.urlTakes precedence over both the config file and PMUX_AGENT_SIGNAL_URL
PMUX_AGENT_SIGNAL_URLserver.urlLegacy. Lower precedence than PMUX_SERVER_URL
PMUX_LOG_LEVELlog_levelMust be debug, info, warn, or error
PMUX_KEY_PATHidentity.key_pathOverrides the key directory path
PMUX_SECRET_BACKENDidentity.secret_backendMust be auto, keyring, or file
PMUX_MAX_CONNECTIONSconnection.max_mobile_connectionsParsed as an integer. Must be 1
PMUX_SOCKET_NAMEtmux.socket_nameOverrides the tmux socket name
PMUX_TMUX_PATHtmux.tmux_pathOverrides the tmux binary path

File paths

All files and directories pmux creates:

PathCreated byPurpose
~/.config/pmux/pmux initConfiguration root directory
~/.config/pmux/config.tomlpmux initConfiguration file
~/.config/pmux/keys/pmux initKey storage directory
~/.config/pmux/keys/ed25519.pubpmux initEd25519 public key
~/.config/pmux/keys/secrets.encpmux initEncrypted secrets (file backend only)
~/.config/pmux/paired_devices.jsonpmux pairPaired mobile device information
~/.config/pmux/agent.pidAgent startupBackground agent PID file
~/.config/pmux/agent.logAgent startupAgent debug log
~/Library/LaunchAgents/io.pmux.agent.plistpmux agent installlaunchd service (macOS only)
~/.config/systemd/user/pmux.servicepmux agent installsystemd user service (Linux only)