A lightweight, self-hosted web app for visualizing disk usage with an interactive donut chart and file browser.
- Interactive donut chart — click to drill into folders, hover to see sizes
- Free space visualization — root level shows used vs free space
- ncdu-style file list — sorted by size with relative size bars
- Breadcrumb navigation — click to jump back to any parent
- Rescan from the UI — trigger a rescan without SSH
- Auto-rescan — periodic cron-based rescans in the background
- Tiny footprint — Python only, no dependencies, ~60MB Docker image
Hi! It's me, a human! I wrote this small web based app to see my NAS disk usage the way I want it. After looking for different options, none of them suited what I wanted. So I built this little thing. Unlike the rest of the project, this paragraph was written by an actual human. Everything else was created by Claude (and guided by me). But I know shit about css, python or docker. So use this at your own risk.
services:
disk-usage:
build: .
container_name: disk-usage
restart: unless-stopped
ports:
- "8888:8888"
volumes:
- /path/to/your/storage:/data:ro
environment:
- SCAN_NAME=Storage
- SCAN_INTERVAL=6hdocker compose up -dOpen http://localhost:8888
docker build -t disk-usage .
docker run -d \
--name disk-usage \
--restart unless-stopped \
-p 8888:8888 \
-v /path/to/your/storage:/data:ro \
-e SCAN_NAME=Storage \
disk-usage| Environment Variable | Default | Description |
|---|---|---|
SCAN_PATH |
/data |
Path to scan inside the container |
SCAN_NAME |
Storage |
Display name shown in the UI for the root folder |
SCAN_INTERVAL |
6h |
Time between automatic rescans (1h, 6h, 12h, 1d) |
| Endpoint | Method | Description |
|---|---|---|
/api/rescan |
POST | Trigger a manual rescan |
/api/status |
GET | Returns {scanning, last_scan} |
To run on Proxmox, create a Docker LXC container and deploy:
# 1. Create a Docker LXC container
# Use a community script from https://community-scripts.org/scripts/docker
# or create one manually with Docker installed
# 2. Bind-mount your storage (read-only)
pct set <CTID> -mp0 /mnt/storage,mp=/mnt/storage,ro=1
# 3. Clone and deploy
pct exec <CTID> -- bash -c "
apt install -y git
cd /opt
git clone https://github.com/Sloy/disk-usage.git
cd disk-usage
docker compose up -d
echo \"Open http://\$(hostname -I | awk '{print \$1}'):8888\"
"To update:
pct exec <CTID> -- bash -c "
cd /opt/disk-usage
git pull
docker compose up -d --build
"No Docker needed. Just Python 3:
cd disk-usage
python3 scan.py ~/Downloads # scan any local folder
python3 server.py # serves at http://localhost:8888Edit index.html directly, delete www/index.html, and restart the server to pick up changes.
scan.pyrecursively walks the mounted directory and builds a JSON tree of file/folder sizes- The scan result is saved as
data.jsonand served byserver.py server.pyis a zero-dependency Python HTTP server that serves the static UI and handles rescan API requests- Cron runs periodic rescans at the configured interval
- The UI polls
/api/statusand auto-reloads data after a rescan completes
No database, no external dependencies, no build step.
MIT
