Skip to main content
CODEMUXManual

Port Detection

Auto-detected listening ports with browser integration and process info.

Codemux automatically detects TCP ports listening on your machine and displays them in the sidebar.

How It Works

The backend periodically scans for listening TCP ports. Each detected port shows:

  • Port number
  • Process name — The process that opened the port
  • PID — Process ID
  • Workspace association — If the port was opened by a process in a specific workspace

The Ports button in the sidebar footer shows a badge with the number of active ports. Click it for a popover listing them, grouped by workspace when possible, with a filter box at the top.

Docker Container Ports

If you run a containerized dev stack (for example docker compose up) inside a workspace, Codemux also surfaces the container's published ports under a dedicated Docker group in the sidebar, labeled by container name.

This fills a gap in the normal scan. On Linux, ports published by a container are owned by Docker's root docker-proxy process, so the regular per-process scan — which only sees ports owned by your user — never attributes them and they'd otherwise be invisible. Codemux recovers them by reading docker ps directly.

A few details worth knowing:

  • Scoped to your workspaces — only containers whose Compose working directory matches an open workspace are shown, so unrelated stacks you run by hand elsewhere don't clutter the list.
  • Published TCP only — a container port is listed only when it's published to a host port. Internal-only ports, UDP ports, and host-port ranges aren't shown.
  • No kill action — killing the listening socket wouldn't stop the container, so the Kill action is hidden for Docker rows. Stop the container instead (e.g. docker compose down).
  • Requires the docker CLI — Docker detection needs the docker command on your PATH with socket access. Containers started with plain docker run (which lack the Compose labels Codemux matches on) aren't associated with a workspace.

Actions

Click a port to open it in the browser, or hover its row for:

  • Open in browser pane — Opens http://localhost:{port} in the embedded browser pane, switching to the port's workspace first if needed
  • Copy URL — Copies the port's local URL
  • Kill process — Terminates the process listening on the port (not offered for Docker rows)

Detected ports also show up as suggestions in the browser's address bar, and typing a bare localhost:5173 there opens it over http://.

Runtime Only

Port detection is runtime-only. Detected ports are not persisted — they're rescanned on each app launch and when workspace state changes.