localhost-zoo
π¦ Every dev server on your machine in one live dashboard β stop the one squatting on port 3000, and clean up the gigabytes of node_modules and caches yourβ¦
Find out who is squatting on port 3000, which project it belongs to, and whether the whole internet can reach it. Get the exact command that fixes it. Stop it from your browser, your terminal or Telegram. dashboard Β· terminal UI Β· Telegram bot Β· Docker & systemd aware Β· βopen to the internetβ check with fixes Β· MCP Β· zero dependencies The dashboard opens at http://localhost:4321.
Summary extracted from the README.
π¦ localhost-zoo
Every dev server on your machine in one live dashboard.
Find out who is squatting on port 3000, which project it belongs to, and whether the whole internet can reach it. Get the exact command that fixes it. Stop it from your browser, your terminal or Telegram.
dashboard Β· terminal UI Β· Telegram bot Β· Docker & systemd aware Β· βopen to the internetβ check with fixes Β· MCP Β· zero dependencies
β¨ Features
- π Finds everything that listens. Vite, Next.js, Django, Uvicorn, Rails, Jupyter, Postgres, Redis, a forgotten
python -m http.serverβ¦ - π Tells you what the internet can reach. It checks public IPs and ufw rules, and catches the classic trap where Docker publishes ports past ufw.
- π©Ή Tells you how to fix it. You get the exact line for your stack:
--host 127.0.0.1for Vite,bindfor Redis,127.0.0.1:indocker-compose.yml, a ufw rule, an SSH tunnel. - π± Telegram bot. Every process in your pocket, with Stop buttons. It is paired to your account only.
- π³ Knows your containers. Instead of an anonymous
docker-proxyyou seeshop-db-1 Β· postgres:16, and Stop runsdocker stop. - βοΈ Knows systemd. It shows
ml-api.serviceand stops it withsystemctl, so it doesn't spring back to life a second later. - π Won't let you shoot yourself in the foot. sshd and Docker itself can't be stopped by a misclick.
- π₯
zoo top. An htop-style live view right in the terminal. - π§Ή Disk zoo. Finds the gigabytes dev work quietly eats:
node_modules, virtualenvs, Rusttarget,.next, npm/pip/Homebrew/Cargo caches, Xcode DerivedData. Pick and move to the Trash. - π€ MCP server. Claude Code, Cursor and other agents can ask βwhat is on port 3000?β and free it.
- π Knows where each process came from. Shows the folder, the project name from
package.json,pyproject.toml,go.modorCargo.toml, and the page<title>.
π Install
npm install -g github:koigkio/localhost-zoo
Then run:
zoo
The dashboard opens at http://localhost:4321.
Requires Node.js 18 or newer.
| System | What to do |
|---|---|
| macOS | brew install node, or download it from nodejs.org |
| Ubuntu / Debian | curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt-get install -y nodejs |
| Other Linux | nodejs.org/en/download |
Just want to look? Add --demo to any command, and you get fake servers where nothing is stopped for real.
π Commands
| Command | What it does |
|---|---|
zoo |
open the dashboard |
zoo top |
live view in the terminal |
zoo telegram |
Telegram bot (asks for a bot token the first time) |
zoo list |
dev servers as a table, with who can reach them and how to fix it |
zoo kill 3000 |
stop whatever listens on port 3000: process, container or service |
zoo kill 3000 -f |
the same, with SIGKILL / docker kill / systemctl kill |
zoo disk |
folders and caches that can be rebuilt, biggest first |
zoo disk clean 1 4 |
move those to the Trash (numbers from zoo disk) |
zoo disk clean --older 90 |
every project folder untouched for 90+ days |
zoo mcp |
MCP server for AI agents |
zoo --json |
the raw scan as JSON, for scripts |
| Option | Default | Meaning |
|---|---|---|
-p, --port |
4321 |
dashboard port |
-H, --host |
127.0.0.1 |
bind address; anything other than loopback requires a token |
--no-open |
don't open a browser | |
--demo |
fake data, works with every command |
π§Ή Disk zoo
Every old project leaves something behind: a gigabyte of node_modules, a .venv, a Rust target. Package managers keep caches forever. Open the Disk tab in the dashboard, or run:
zoo disk
# SIZE KIND IDLE PATH
1 6.2 GB Xcode DerivedData cache ~/Library/Developer/Xcode/DerivedData
2 3.9 GB Rust build 2d ~/code/ingest-worker/target
3 2.1 GB Rust build 6mo ~/code/rust-playground/target
4 1.8 GB node_modules 8mo ~/code/old-landing/node_modules
5 1.4 GB virtualenv 1.5y ~/notebooks/kaggle-titanic/.venv
24.9 GB in 13 folders Β· 6.3 GB in projects untouched for 90+ days
IDLE is how long ago you last touched the project itself, so a forgotten hackathon stands out from the project you work on every day.
- Only folders that can be rebuilt are listed:
node_modules,.venv(withpyvenv.cfg),targetnext toCargo.toml,.next,.nuxt,.svelte-kit,.turbo,.parcel-cache,.gradle, and the caches of npm, Yarn, pnpm, Bun, pip, Poetry, uv, Homebrew, Cargo, Go, Gradle, Maven and Xcode. A folder calledbuildortargetwithout its project file is left alone. - Everything goes to the Trash (
~/.Trashon macOS,~/.local/share/Trashon Linux), so you can still get it back. Empty the Trash to get the space. Shift-click in the dashboard, or-fin the terminal, deletes for good. - Docker's images and volumes are shown, but cleaning them is left to
docker system prune.
π¨ Hall of shame
These are the ports people forget open most often, and what usually happens next. localhost-zoo knows every one of them by name.
| Port | Who | What happens when the internet finds it | localhost-zoo says |
|---|---|---|---|
2375 |
Docker API | root on your server, for anyone | π INTERNET Β· close the TCP socket, use ssh:// |
6379 |
Redis | a crypto-miner moves in within hours | π INTERNET Β· bind 127.0.0.1 + requirepass |
27017 |
MongoDB | the data is gone, a ransom note is left behind | π INTERNET Β· bindIp: 127.0.0.1 |
9200 |
Elasticsearch | your data shows up in a breach report | π INTERNET Β· network.host: 127.0.0.1 |
11211 |
Memcached | your server joins a DDoS | π INTERNET Β· -l 127.0.0.1 |
8888 |
Jupyter | a remote shell, with a nice UI | π INTERNET Β· --ip 127.0.0.1 |
5173 |
Vite --host |
.env and source maps, served to anyone |
π INTERNET Β· --host 127.0.0.1 |
8000 |
python -m http.server |
the whole folder, .git included |
π INTERNET Β· --bind 127.0.0.1 |
The Docker trap.
docker run -p 6379:6379 redisopens Redis to the whole internet even whenufwdenies the port, because Docker writes its own iptables rules. That is the most common way a βfirewalledβ server leaks. The fix is-p 127.0.0.1:6379:6379.
π©Ή How to fix it
Every exposed dev server gets a How to fix panel with copy-paste commands for its stack:
β shop-cache-1 is open to the internet: Docker publishes :6379 past ufw rules
Redis has no password by default. Exposed instances get taken over for crypto-mining within hours.
π©Ή In ~/code/shop/docker-compose.yml, publish on localhost only:
services:
cache:
ports:
- "127.0.0.1:6379:6379"
The same advice shows up in the dashboard, in zoo top, in zoo list, in the Telegram bot and in the MCP check_exposure tool.
π± Telegram bot
Set it up on the server:
-
In Telegram, open @BotFather, send
/newbotand pick a name. -
Run:
zoo telegram -
Paste the token from BotFather when asked. The input is hidden, and the token is saved to
~/.config/localhost-zoo/telegram.json, readable only by you. -
The terminal shows a one-time code. Send
/start <code>to your bot. From now on the bot answers only you.
| In the chat | What it does |
|---|---|
/list |
every server, with who can reach it; tap one for details |
/exposure |
what the internet can reach, and how to fix it |
/port 3000 or just 3000 |
who is on a port |
| π Stop Β· π Force | stops it after a confirmation; sshd and Docker are protected |
Keep it running after you log out:
zoo telegram service | sudo tee /etc/systemd/system/zoo-bot.service
sudo systemctl enable --now zoo-bot
To change the owner or the token, run zoo telegram --reset. For containers or CI, the token can come from ZOO_TELEGRAM_TOKEN.
π₯ zoo top
π¦ localhost zoo β devbox 8 dev Β· 2 system public IP 203.0.113.7 Β· ufw active
β Open to the internet: ml-api :8000, shop-cache-1 :6379
PORT NAME KIND UP MEM REACH WHERE
π¦ :5173 shop-frontend Vite 2h 178M local ~/code/shop/frontend
π :8000 ml-api Uvicorn 1d 625M INTERNET ~/code/ml-api
βΈ π¦ :6379 shop-cache-1 Redis 2d INTERNET π³ redis:7
πͺ :8888 experiments Jupyter 3d 225M firewalled ~/notebooks/experiments
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
container 3f9a1c2b7d4e Β· Up 2 days redis:7 docker-entrypoint.sh redis-server
internet: Docker publishes :6379 past ufw rules
π©Ή In ~/code/shop/docker-compose.yml, publish on localhost only: services: β cache: β ports: β - "127.0.0.1:6379:6379"
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ move s stop S force / filter a show system r refresh q quit
π Who can reach a port?
| Label | Meaning |
|---|---|
local |
listens on 127.0.0.1, so only this machine can reach it |
firewalled |
listens on all interfaces, but ufw blocks it from the internet |
network |
reachable from your Wi-Fi, office or provider network |
INTERNET |
the server has a public IP and nothing blocks the port |
To read ufw rules and see every process, run sudo zoo.
π€ For AI agents (MCP)
claude mcp add localhost-zoo -- zoo mcp
For Cursor and others (mcp.json):
{ "mcpServers": { "localhost-zoo": { "command": "zoo", "args": ["mcp"] } } }
| Tool | What it does |
|---|---|
list_servers |
every dev server with port, project, framework, folder and HTTP title |
who_is_on_port |
what exactly is listening on a port |
stop_server |
stop a process, container or service on a port (marked destructive, so the agent asks first) |
check_exposure |
what is open to the internet, why, what is at risk, and the fix |
βοΈ How it works
zoo
β
ββ who is listening? macOS: lsof -iTCP -sTCP:LISTEN Β· Linux: ss -ltnp
ββ containers docker ps β names, images, compose projects
ββ services /proc/<pid>/cgroup β nginx.service, ml-api.service β¦
ββ for every process ps β command, uptime, memory Β· cwd β project
ββ who can reach it public IPs + ufw status verbose
ββ how to fix it per-stack advice (bind address, compose ports, ufw, tunnel)
ββ HTTP probe GET / with a 0.7 s timeout β status + <title>
β
ββ dashboard Β· zoo top Β· zoo list Β· Telegram Β· MCP
Who is who:
| π¦ Node.js | π Python | π¦ Rust | πΉ Go |
| π¦ Deno | π° Bun | π Ruby | π PHP Β· PostgreSQL |
| π¬ MySQL | π¦ Redis | π³ Docker | πͺ Jupyter |
| π¦ Storybook | π¦ Elasticsearch | π¦ system | π¦ unknown |
π‘ Safety
- The dashboard listens on
127.0.0.1and checks theHostheader, so a website you visit can't reach it. - Stopping requires a per-run token and only works on entries from the current scan.
- sshd, Docker and init are protected: no Stop button anywhere.
- The Telegram bot works for one paired owner only, and everyone else gets βthis zoo is privateβ. It re-scans right before every stop.
- The bot token lives only in your local config (
chmod 600) and never goes into the repository or the logs.
π¦ FAQ
Why a raccoon? Raccoons go through everything you left lying around at night. So do port scanners. Better that you see it first.
Why βzooβ? Run zoo on a machine that has been up for a month and count the animals.
Does it send anything anywhere? No. Everything runs locally. The only network traffic is the HTTP probe to your own ports, plus Telegram if you turn the bot on.
Is the Hall of shame exaggerated? Unfortunately not. Search the news for βexposed Redisβ or βMongoDB ransomβ.
πΊ Roadmap
- macOS and Linux, project and framework detection
- Docker containers by name Β· systemd services
- Internet exposure check with fixes
-
zoo topΒ· MCP server Β· Telegram bot - Disk zoo:
node_modules, venvs, builds and caches - Bot alerts: βa new port just opened to the internetβ
- Stop the whole process tree (
npm β node β vite) - firewalld and nftables
- Windows
- Publish to npm
Adding a framework takes one line in src/scan.js.
π License
MIT Β© koigkio