Disk usage index for Linux servers

Disko keeps every folder's size in SQLite and updates it from kernel file events, so size queries answer in 1 to 5 ms.

The disk tree and its largest folders

Pick a disk and the dashboard draws it as a treemap. Click a folder to go in. The largest folders sit beside it, sorted by space on disk.

Read the user guide

The daemon updates live. The kernel reports each change, so nothing is rescanned.

Follows every disk change

One fanotify mark covers a whole filesystem, Btrfs subvolumes included.

  • created/srv/backups/db-2026-11-24.zst
  • renamed~/photos → ~/archive/photos
  • removed/tmp/build-7f2c
  • created~/src/api/target/release/api
  • removed~/.cache/pip/http
  • renamed/srv/media/inbox → /srv/media/2026

The daemon rereads only changed folders

Daily scans skip folders whose timestamps match the index; a full check runs weekly.

serverbash
~$disko health
ok: watching, heartbeat 3s ago
incremental scan: 841220 entries in 312s, no errors
~$

Moves renamed folders in one step

On Linux 5.17 and later a rename updates one row, however large the folder.

# fanotify FAN_RENAME
old  /srv/media/inbox        id 48211
new  /srv/media/2026         id 48211

UPDATE nodes SET parent = 3907, name = '2026'
  WHERE id = 48211;      -- 1 row, 31,402 entries moved

The watchdog restarts a stalled daemon

A watchdog logs the stuck step and exits after 15 minutes, so systemd resumes the scan.

$ journalctl -u disko
fanotify covers 6 device IDs on 3 filesystems
resuming interrupted scan: 5,290 directories pending
deep scan checked 12,318,655 entries in 3,029s
watching  0 metadata errors, 0 watch errors

Disko is open source

MIT licence. Use it, fork it, change it and ship it. Issues and pull requests are welcome.

See the source on GitHub
  • Written in RustOne binary, about 5,000 lines of source in files under 200 lines each.
  • Stored in SQLiteOne index file you can query with plain SQL.
  • Built for Linuxfanotify and inotify, with a hardened systemd unit.

Install Disko in 3 steps

A static binary for x86_64 Linux with systemd, SQLite included. To build from source instead, see the README.

1

Download the release

One archive of 2 MB with the binary and its installer.

$ curl -LO https://github.com/olibuijr/disko/releases/latest/download/disko-x86_64-linux.tar.gz
2

Run the installer

Installs the binary and the service, then starts the daemon.

$ tar xzf disko-x86_64-linux.tar.gz
$ cd disko-x86_64-linux
$ sudo ./install.sh "$USER"
Dashboard password: printed once
3

Open the dashboard

Or ask the index from a shell.

# http://localhost:7331
$ disko largest --kind dirs
$ disko --json du /srv

Disko for AI agents

Every command answers in JSON, and disko health gives one verdict with an exit code. The binary carries an agent skill that teaches Claude Code, Codex and other agents to ask the index instead of walking the disk.

Read the agent skill
$ disko skill --install ~/.claude/skills
installed ~/.claude/skills/disko/SKILL.md

$ disko --json health
{"level":"ok","state":"watching","writer_alive":true,
 "heartbeat_age_seconds":0,"problems":[],"warnings":[]}

$ disko --json largest /srv --kind dirs -n 1
[{"path": "/srv/media/2026", "kind": "directory",
  "allocated_bytes": 11994283008, "files": 212}]

$ sudo disko rescan
asked the daemon for a deep scan

Questions about Disko

Does Disko read file contents?

No. It records names, sizes, owners and timestamps, never file contents, and does not follow symlinks.

How much memory does the Disko daemon use?

About 90 MB resident while watching an index of 12 million entries, with a 64 MiB SQLite cache.

Which Linux systems does it support?

Linux. Filesystem-wide watching needs fanotify; older kernels and other setups fall back to inotify.

Can I put Disko on the internet?

Keep it on a trusted network or behind an HTTPS proxy or SSH tunnel. Passwords are stored as Argon2id hashes.

$ disko --json info ~/src/api
{
  "path": "/home/dev/src/api",
  "kind": "directory",
  "allocated_bytes": 16012595200,
  "files": 48211,
  "entries": 51906,
  "mtime": 1795536131,
  "uid": 1000
}

Every command prints JSON with --json, and disko sql runs read-only queries for scripts and agents.