Where did the disk space go?
Scan a filesystem once, then explore it as an interactive treemap in your browser. Read-only, Docker-aware, JSON-first, and built for servers.
mish is a headless disk-space analyzer for the machines you do not sit in front of. A Rust scanner walks the tree in pre-order and streams fixed-size node records to disk, so memory tracks depth rather than file count. The result is an immutable snapshot that a small daemon serves over a Unix socket and a Svelte web client renders as a treemap, sunburst, icicle, bubble chart or ranked list. Folder totals are one column read, not a recursive query — and nothing in the scanned tree is ever written to.
It is the WinDirStat experience for a server, without the desktop session, and without Diskover's Elasticsearch-shaped RAM bill.
- Why mish
- Screenshots
- Features
- Quick start
- Configuration
- CLI
- Architecture
- Docker integration
- Security model
- Development
- Documentation
- Project status
- Contributing
- License
- Built for remote machines. One container serves the UI, the API and the scanner. No VNC, no desktop app, no X forwarding.
- Bounded memory. The scanner keeps O(depth) state plus a hardlink set. Snapshots are flat
columns read through
mmap; the server never loads a tree into RAM. - Fast where it matters. On Linux the scanner reuses the
statxdata a directory entry already carries. Everything else falls back to a portable path. - Safe by construction. Scanned files are opened read-only. Docker is reached through a GET-only socket proxy. There is no delete, move or chmod anywhere in the product.
- Scriptable first. Every CLI command speaks JSON, the daemon speaks versioned JSON-RPC, and the REST API mirrors both. The web client is a consumer, not a privileged layer.
| Drives | Treemap |
|---|---|
| Sunburst | Icicle |
|---|---|
Screenshots use a synthetic demo dataset, not a real host.
Scanning and index
- Streaming pre-order scanner with hardlink dedup, sparse and mount flags, exclusions, and per-entry error reporting.
- Immutable snapshots: a manifest, fixed-size node records, concatenated names, and a subtree-size column. Versioned format.
- Incremental scans, one-filesystem mode, symlink following, thread control, allocated or apparent size.
- Scheduled scans and snapshot retention (
gc --keep N).
Web client
- Drives dashboard: one card per host filesystem with used/free space, filesystem type, and the newest snapshot's size and age.
- Treemap, sunburst, icicle, bubble, ranked bars, size histogram, heatmap, and extension/age/owner breakdowns — all coupled to one selection.
- Drill-down with breadcrumbs, a full-snapshot tree panel, and URL-encoded view state.
- Search, duplicate candidates, snapshot diff, CSV/JSON export, and a Docker panel with live stats.
- Colour by extension or size, with labelled mount and container overlays.
CLI, API and integration
- JSON-first CLI, an interactive
tui, and a UDS JSON-RPC daemon. - REST/SSE API under
/api/v1with camelCase wire types generated from the Rust IPC contract. - Read-only Docker sizes, mounts and stats through a GET-only proxy.
- An agent Skill with reference docs and helper scripts in
skills/mish/.
Docker Compose is the supported path. Run the published images, or clone and build the Rust core,
the API server, the web client and the docs site locally. Either way the host filesystem is mounted
read-only at /host and Docker is reached through a GET-only socket proxy.
git clone https://github.com/Roobyx/mish.git
cd mish
docker compose up -d --build| Service | URL | Purpose |
|---|---|---|
mish |
http://localhost:9543 | API + web client (bundles the Rust core) |
mish-site |
http://localhost:3300 | Landing page and documentation |
The app port is published on loopback only. Because the container itself binds 0.0.0.0:9543, the
server generates an API token on first start. Read it and paste it into the web client when asked:
docker compose exec mish cat /data/auth-tokenThen open the Drives dashboard and scan /host. That path is the host root, mounted read-only.
To narrow the scope, set HOST_MOUNT to a specific host directory (it is always mounted at
/host); additional bind mounts are listed in MISH_ROOTS by their container paths.
Every release publishes linux/amd64 images to GHCR, so no clone or build is needed. Save this as
docker-compose.yml and run docker compose up -d:
services:
mish:
image: ghcr.io/roobyx/mish/server:${MISH_TAG:-latest}
ports:
- "${MISH_PUBLISH_ADDR:-127.0.0.1}:${MISH_PORT:-9543}:9543"
environment:
MISH_DATA_DIR: /data
MISH_BIND: ${MISH_BIND:-0.0.0.0:9543}
MISH_CORE_SOCKET: /run/mish/mish.sock
MISH_ROOTS: ${MISH_ROOTS:-/host}
MISH_HOST_ROOT: /host
MISH_DOCKER: ${MISH_DOCKER:-true}
MISH_AUTH_TOKEN: ${MISH_AUTH_TOKEN:-}
MISH_ALLOWED_HOSTS: ${MISH_ALLOWED_HOSTS:-localhost,127.0.0.1}
MISH_TRUST_PROXY: ${MISH_TRUST_PROXY:-false}
DOCKER_HOST: tcp://docker-socket-proxy:2375
volumes:
- mish-data:/data
- ${HOST_MOUNT:-/}:/host:ro
cap_drop:
- ALL
cap_add:
- DAC_READ_SEARCH
security_opt:
- no-new-privileges:true
depends_on:
- docker-socket-proxy
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:9543/api/v1/health"]
interval: 30s
timeout: 5s
retries: 5
start_period: 20s
restart: unless-stopped
docker-socket-proxy:
image: tecnativa/docker-socket-proxy:v0.5.0
environment:
CONTAINERS: 1
IMAGES: 1
VOLUMES: 1
EVENTS: 0
POST: 0
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
mish-site:
image: ghcr.io/roobyx/mish/site:${MISH_TAG:-latest}
ports:
- "${MISH_SITE_PORT:-3300}:80"
restart: unless-stopped
volumes:
mish-data:Set HOST_MOUNT to the host directory to expose at /host and MISH_ROOTS to the paths the API
may scan inside it. Pin MISH_TAG to a release tag instead of latest for
reproducible upgrades, and read the generated token with
docker compose exec mish cat /data/auth-token. The app port stays on loopback; for LAN access see
LAN access. On upgrades run docker compose pull before up -d; Compose otherwise
keeps an existing local latest.
Coolify deploys the same stack from a Docker Compose resource. This variant pulls the -path image
(the web bundle built with MISH_WEB_BASE=/app/), runs as root with DAC_OVERRIDE so it can read
hosts whose /mnt is not world-readable, and trusts proxy headers. Paste it into a Compose
resource and set HOST_MOUNT, MISH_ROOTS, MISH_AUTH_TOKEN and MISH_ALLOWED_HOSTS:
services:
mish:
image: ghcr.io/roobyx/mish/server:${MISH_TAG:-latest}-path
pull_policy: always
user: "0:0"
ports:
- "${MISH_PUBLISH_ADDR:-127.0.0.1}:${MISH_PORT:-9543}:9543"
environment:
MISH_DATA_DIR: /data
MISH_BIND: ${MISH_BIND:-0.0.0.0:9543}
MISH_CORE_SOCKET: /run/mish/mish.sock
MISH_ROOTS: ${MISH_ROOTS:-/host}
MISH_HOST_ROOT: /host
MISH_DOCKER: ${MISH_DOCKER:-true}
MISH_AUTH_TOKEN: ${MISH_AUTH_TOKEN:-}
MISH_ALLOWED_HOSTS: ${MISH_ALLOWED_HOSTS:-localhost,127.0.0.1}
MISH_TRUST_PROXY: "true"
DOCKER_HOST: tcp://docker-socket-proxy:2375
volumes:
- mish-data:/data
- ${HOST_MOUNT:-/}:/host:ro
cap_drop:
- ALL
cap_add:
- DAC_READ_SEARCH
- DAC_OVERRIDE
security_opt:
- no-new-privileges:true
depends_on:
- docker-socket-proxy
restart: unless-stopped
docker-socket-proxy:
image: tecnativa/docker-socket-proxy:v0.5.0
environment:
CONTAINERS: 1
IMAGES: 1
VOLUMES: 1
EVENTS: 0
POST: 0
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
volumes:
mish-data:The full stack, including the docs site, is coolify-compose.yml. Coolify's
built-in proxy is not used: the app publishes host ports and an external reverse proxy routes it
under /app/. Set MISH_ALLOWED_HOSTS to the public hostname (or * behind a proxy that rewrites
Host), and keep MISH_TRUST_PROXY=true only when a trusted proxy sets the forwarding headers.
- Linux is the primary target and has the fast path. The portable scanner builds on macOS and Windows; the Linux path is the tuned one.
- Docker Engine with Compose v2 for the stack.
- Root, or
CAP_DAC_READ_SEARCH, for a full-filesystem scan. The compose stack grants exactly that one capability.
Publishing beyond loopback requires a token and an explicit Host allowlist:
MISH_PUBLISH_ADDR=0.0.0.0 \
MISH_BIND=0.0.0.0:9543 \
MISH_AUTH_TOKEN="$(openssl rand -hex 32)" \
MISH_ALLOWED_HOSTS=mish.lan \
docker compose up -dPut TLS in front of it (Traefik, Caddy, Nginx) and set MISH_TRUST_PROXY=true only when a
trusted proxy sets the forwarding headers.
| Variable | Default | Purpose |
|---|---|---|
MISH_DATA_DIR |
./data |
Catalog, snapshots and journal |
MISH_BIND |
127.0.0.1:9543 |
Server bind address; non-loopback requires a token |
MISH_AUTH_TOKEN |
— | Bearer token for the API; auto-generated off-loopback |
MISH_ALLOWED_HOSTS |
localhost,127.0.0.1,[::1] |
Accepted Host headers (DNS-rebinding guard) |
MISH_TRUST_PROXY |
false |
Trust X-Forwarded-* from a reverse proxy |
MISH_ROOTS |
— | Canonical allowlist of scannable roots; empty rejects scans |
MISH_DOCKER |
false |
Enable the Docker collector and routes |
MISH_CORE_SOCKET |
/tmp/mish.sock |
Unix socket for the core daemon |
MISH_CORE_BIN |
— | mish binary the server supervises |
MISH_WEB_DIR |
— | Built web client to serve |
MISH_DOCKER_SOCKET |
$DOCKER_HOST or /var/run/docker.sock |
Docker endpoint |
MISH_MAX_SSE |
32 |
Concurrent SSE progress streams |
MISH_MAX_BODY_BYTES |
1048576 |
Maximum JSON request body |
MISH_DOCS_URL |
GitHub errors page | Docs base or page URL used for the docs link in API errors |
Compose-specific variables (MISH_PORT, MISH_SITE_PORT, HOST_MOUNT,
MISH_PUBLISH_ADDR, MISH_TAG) are documented in
deploy/compose/.env.example. Limits are enforced in both the
server and the core: 32 roots, 128 exclusions, 4 concurrent scans, depth 32, 10k query results and a
100k export cap.
The mish binary works standalone — no daemon needed for a one-shot scan — and every command
accepts --json.
# Scan a path and write a snapshot
mish scan /var --data-dir ./data --json
# Browse the result
mish top /var -n 25 --metric alloc --json
mish find /var --size +1G --mtime -180d --json
mish diff <older-snapshot> <newer-snapshot> --json
# Terminal UI
mish tui --data-dir ./data
mish tui --view treemap --data-dir ./data
mish tui --view histogram --dim ext --data-dir ./data
# Daemon for the API server
mish daemon --socket /tmp/mish.sock --data-dir ./data| Command | Purpose |
|---|---|
scan <path...> |
Scan and index (--incremental, --one-file-system, --follow-symlinks, --exclude, --apparent, --threads) |
daemon |
Unix-socket JSON-RPC server |
ls [path] |
List children (--sort, --limit) |
du [path] |
Subtree sizes (--depth, --apparent) |
top [path] |
Largest entries (-n, --kind, --metric) |
find [path] |
Filter by size, mtime, extension, owner or duplicate status |
tree [path] |
Print the hierarchy (--depth) |
tui [path] |
Browse in the terminal: --view bars|treemap|histogram, --dim size|ext|age|owner |
ext [path] |
Extension breakdown |
diff <a> <b> |
Growth and shrink between snapshots |
docker |
Containers, sizes and mounts (--stats) |
export <snap> |
CSV or JSON export |
snapshots |
list, delete <id>, gc --keep N |
config |
get, set <key> <value> |
completions <shell> |
Shell completions |
Metrics are allocated (blocks consumed, the default) or apparent (logical size). Hardlinked files count once in allocated totals.
flowchart LR
CLI["mish CLI"] --> CORE["Rust core<br/>scanner + query engine"]
WEB["Svelte web client"] -->|REST / SSE| SRV["Bun + Hono server"]
SRV -->|JSON-RPC over UDS| CORE
CORE --> SNAP[("Snapshot<br/>manifest + columns")]
SNAP --> CORE
CORE -.->|GET only| PROXY["docker-socket-proxy"]
| Component | Path | Language | Responsibility |
|---|---|---|---|
| Core library | crates/mish-core/ |
Rust | Scanner, index, query engine, Docker collector |
| CLI / daemon | crates/mish-cli/ |
Rust | mish binary and UDS JSON-RPC server |
| IPC contract | crates/mish-ipc/ |
Rust | Protocol types, single source of truth |
| API server | apps/server/ |
TypeScript (Bun + Hono) | REST/SSE, orchestration, scheduler, static serving |
| Web client | apps/web/ |
TypeScript (Svelte 5 + Vite) | Treemap and all visualizations |
| Docs site | apps/site/ |
Astro + Starlight | Landing page and documentation |
| Shared types | packages/api-types/ |
TypeScript | Wire types and client generated from the IPC contract |
| Agent skill | skills/mish/ |
Markdown + scripts | Skill definition and helpers |
A snapshot is a directory of four flat files, not a database:
snapshots/<id>/
manifest.json # metadata, stats, extension table, errors
nodes.bin # fixed-size node records; id = pre-order index
names.bin # concatenated names
subtree.bin # u32 subtree size per node
Pre-order emission makes every subtree a contiguous id range, so subtree_size turns a folder
total into a single read. The layout is versioned (FORMAT_VERSION), so a format change is a
breaking change rather than a silent one.
Docker support is optional and read-only. The app never mounts docker.sock; it talks to a proxy
that allows GET requests only.
services:
docker-socket-proxy:
image: tecnativa/docker-socket-proxy:v0.5.0
environment:
CONTAINERS: 1
IMAGES: 1
VOLUMES: 1
EVENTS: 0
POST: 0
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
mish:
environment:
MISH_DOCKER: "true"
DOCKER_HOST: tcp://docker-socket-proxy:2375
depends_on:
- docker-socket-proxyThe Docker views show container, image and volume sizes, map mounts back to snapshot nodes, and
report live CPU and memory. With MISH_DOCKER=false those routes return 404 and every other
view keeps working. Rootless Docker and Podman simply report the Docker views as unavailable.
mish is designed to run on a trusted host and read broadly, often the whole filesystem through a read-only bind mount. The network-facing API is the main boundary.
- Read-only toward scanned files. Nothing is deleted, moved or modified. Snapshots are written only to the data directory.
- Docker is read-only. GET-only proxy; the socket is never mounted into the app.
- Loopback by default. A non-loopback bind requires a bearer token; if none is supplied, one is
generated and persisted with mode
0600. - Paths are validated. Roots are checked against the canonical
MISH_ROOTSallowlist; snapshot IDs are single path components. - No heavyweight index and no telemetry. Flat columns,
mmap, SQLite for the small catalog, and zero external calls at runtime. - Exports are neutralized. CSV output defuses spreadsheet formulas; filenames are treated as untrusted input.
The full threat model is in SECURITY.md. To report a vulnerability, follow the
private disclosure process described there.
Prerequisites: Rust (pinned by rust-toolchain.toml), Bun, and Docker for integration tests.
# Rust workspace
cargo build --workspace
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
cargo fmt --all -- --check
# TypeScript workspaces
bun install
bun run build
bun run test
bun run check # Biome + per-workspace typecheckRun the pieces individually:
# Core daemon
cargo run -p mish-cli -- daemon --socket /tmp/mish.sock --data-dir ./data
# API server
MISH_ROOTS=/var/data MISH_CORE_SOCKET=/tmp/mish.sock \
bun run --filter '@mish/server' dev
# Web client
bun run --filter '@mish/web' dev
# Docs site
bun run --filter '@mish/site' devThe Dockerfiles gate the image build on the Rust and TypeScript test suites, so a broken workspace does not produce a runtime image.
- In-repo docs source:
apps/site/src/content/docs/— installation, CLI, API, configuration, Docker, web UI, security and troubleshooting. - Agent skill:
skills/mish/SKILL.md. - Security policy:
SECURITY.md. - Contribution guidelines:
CONTRIBUTING.md. - Changelog:
CHANGELOG.md.
The docs site is built and served by the compose stack at http://localhost:3300.
mish was built out of personal necessity: I needed to answer "where did the disk space go?" on headless machines I could not sit in front of, and nothing existing fit the constraints. It will be maintained to the best of my abilities and available time.
- Free to use. Anyone is free to run, modify and redistribute it under the license terms.
- No warranty and no responsibility. The software is provided as-is. I take no responsibility for how the project is used by other people, or for any consequences of that use, including data loss, downtime or decisions made from its output. Test it before pointing it at anything you care about.
- Roadmap. A roadmap will be published in the future.
- Feature suggestions are welcome. Open an issue with the problem and the use case; see
CONTRIBUTING.md.
The project is open to community contributions. Bugs are prioritized before features: a correctness bug gets triaged and fixed before new feature work, and feature requests are read and kept but are not commitments.
Read CONTRIBUTING.md for the bug report checklist, the development setup, the
checks to run before opening a pull request, and the coding standards. For anything larger than a
bug fix, open an issue first so the design can be agreed on before code is written. Please keep
changes read-only toward scanned files, keep the scanner streaming, and add tests for changed
behavior.
GPL-3.0-or-later. See LICENSE.