Port Detection
Auto-detected listening ports with browser integration and process info.
Port Detection
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
Ports appear in the Ports section of the sidebar, grouped by workspace when possible.
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
dockerCLI — Docker detection needs thedockercommand on yourPATHwith socket access. Containers started with plaindocker run(which lack the Compose labels Codemux matches on) aren't associated with a workspace.
Actions
Right-click or hover a port badge to:
- Open in Browser — Opens
http://localhost:{port}in the embedded browser pane - Kill — Terminates the process listening on the port
Runtime Only
Port detection is runtime-only. Detected ports are not persisted — they're rescanned on each app launch and when workspace state changes.