Qdirstat / Guides / Docker

Qdirstat Docker: Analyse Disk Usage from Your Browser

By the Qdirstat Guides TeamUpdated 3 December 20267 min read
Network cables and indicator lights inside a server rack

Run Qdirstat in a container when the storage you want to inspect belongs to a NAS or server without a desktop. A community image provides the graphical interface in a browser. Mount the host folder as read only for inspection and keep the container configuration on a separate volume.

How Qdirstat Runs Inside a Container

A normal Qdirstat installation draws its window on your screen. Inside a container there is no screen, so community images bundle three pieces: Qdirstat itself, a small virtual display that Qdirstat draws into, and a web server that streams that display to your browser using noVNC or a similar technology. From your point of view, you open a web page and see a complete Linux desktop window running Qdirstat.

Two well-known community images are widely used:

ImageWeb portStorage pathNotes
jlesage/qdirstat5800/storageBased on Alpine Linux; small and popular on NAS systems
lscr.io/linuxserver/qdirstat3000 (HTTP), 3001 (HTTPS)User-defined mountsMaintained by the LinuxServer.io team

These images are maintained by the community rather than the Qdirstat developer. Read their documentation before deploying them, exactly as you would review any other container you run.

Quick Start with docker run

The following command starts the jlesage/qdirstat container, keeps its configuration in a persistent folder and gives it read-only access to a directory you want to analyse:

docker run -d \
  --name=qdirstat \
  -p 5800:5800 \
  -v /docker/appdata/qdirstat:/config:rw \
  -v /home/user:/storage:ro \
  jlesage/qdirstat

Open http://your-server-ip:5800 in a browser and the Qdirstat interface appears. Inside Qdirstat, the host folder you mounted is available under /storage. Choose it as the directory to scan, and Qdirstat builds the usual tree and treemap.

Understanding Each Option

  • -p 5800:5800 publishes the web interface on port 5800 of the host. Change the first number to use a different host port.
  • /config stores Qdirstat settings, exclude rules and logs so they survive container updates.
  • /storage is where host data appears. The :ro suffix makes it read-only.

Docker Compose Example

For long-term use, Docker Compose keeps your configuration in a readable file. Create a compose.yaml containing:

services:
  qdirstat:
    image: jlesage/qdirstat
    container_name: qdirstat
    ports:
      - "5800:5800"
    volumes:
      - /docker/appdata/qdirstat:/config:rw
      - /srv/data:/storage/data:ro
      - /var:/storage/var:ro
    environment:
      - TZ=Europe/London
    restart: unless-stopped

Start it with docker compose up -d. Mounting several host folders under /storage lets you analyse multiple locations from one Qdirstat session. Adjust the timezone to your own region so file dates display correctly.

Read-Only or Read-Write Storage?

Read-only mounts are the safest default. Qdirstat can still scan everything and display full statistics, but no cleanup action can modify your data. This is ideal for exploration and reporting.

If you want to delete files directly from Qdirstat inside the container, change the storage mount to :rw. Do so deliberately, and consider mounting only the specific folders you intend to clean. Remember that the container may run with a different user identity than your normal account; images usually provide USER_ID and GROUP_ID (or PUID and PGID) variables so files are handled with the right permissions.

Analysing NAS Storage

Qdirstat in Docker is particularly popular on NAS platforms such as Synology, QNAP, TrueNAS and Unraid, many of which offer a graphical interface for deploying containers. The general approach is the same everywhere: mount each shared folder you want to analyse under /storage, publish the web port, and open it in your browser.

On NAS devices, mounting individual shared folders usually works better than mounting an entire volume, because system folders and snapshot directories can confuse results. If you do mount a parent folder that contains other mounted filesystems, enable the “Cross Filesystems” option in Qdirstat so the scan includes them.

Analysing Docker Itself

Ironically, Docker is one of the most common reasons servers run out of space. Images, stopped containers, build caches and volumes accumulate under /var/lib/docker. Mounting that directory read-only into the Qdirstat container shows exactly where the space goes, often revealing that overlay2 layers or forgotten volumes dominate.

Never delete files inside /var/lib/docker directly. Use Docker’s own commands after reviewing what Qdirstat shows:

docker system df
docker image prune -a
docker builder prune
docker volume prune

Check carefully before pruning volumes, because they may contain database files or other persistent data.

After pruning, rescan the mounted Docker directory in Qdirstat to confirm how much space was actually recovered.

Securing the Qdirstat Container

  • Do not expose the port to the internet. Keep the web interface on your local network or reach it through a VPN.
  • Set a password. The images support securing the web or VNC interface; enable it, especially on shared networks.
  • Use HTTPS through a reverse proxy such as Traefik, Caddy or Nginx if you access Qdirstat from other devices regularly.
  • Mount the minimum necessary and prefer read-only access.
  • Stop the container when finished. A disk analyser rarely needs to run around the clock.

Performance Tips

Scans in a container are nearly as fast as native scans because the container reads the host filesystem directly. The main limits are the storage hardware and the number of files. Spinning disks with millions of small files take time; SSD-backed storage is far quicker. Exclude rules help considerably: skipping snapshot directories, thumbnail caches or backup archives you already understand shortens scans and keeps the treemap readable.

Memory usage grows with the number of files scanned. On small NAS devices with limited RAM, analyse one shared folder at a time rather than everything at once.

Using the LinuxServer.io Image

The LinuxServer.io Qdirstat image follows that team’s familiar conventions, which is convenient if you already run their other containers. A minimal Compose definition looks like this:

services:
  qdirstat:
    image: lscr.io/linuxserver/qdirstat:latest
    container_name: qdirstat
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - /docker/appdata/qdirstat:/config
      - /srv/data:/data:ro
    ports:
      - "3000:3000"
      - "3001:3001"
    restart: unless-stopped

Open http://your-server-ip:3000, or the HTTPS port 3001, to reach Qdirstat. Inside the application, browse to the path where you mounted your data, such as /data. The PUID and PGID values should match the user that owns the files on the host, which you can find with the id command.

Scanning Strategy for Large Storage

When a NAS holds many terabytes, a single scan of everything produces a huge tree and takes time. A layered strategy works better. Start by scanning each top-level share separately and note which share is largest. Then rescan only that share, zoom into its biggest folders and use the Discover menu’s largest and oldest files lists. This approach keeps memory use modest and helps you reach actionable findings faster.

Exclude rules make repeated scans efficient. Add patterns for snapshot folders such as #snapshot, .zfs or @eaDir thumbnail directories on Synology systems, so each Qdirstat scan reflects real user data.

Saving Results for Later

Qdirstat can write the current scan to a cache file from the File menu. Saving one inside the persistent /config volume lets you reopen a previous snapshot later and compare how storage has changed over weeks or months, without rescanning everything.

Updating the Container

To update with Compose, run docker compose pull followed by docker compose up -d. With plain Docker, pull the new image, stop and remove the old container, then start it again with the same command. Because settings live in the /config volume, your Qdirstat preferences remain intact.

Troubleshooting Qdirstat Docker

The Browser Shows a Blank Page

Check the container logs with docker logs qdirstat and confirm the port mapping matches the URL you are using.

/storage Is Empty

The volume mapping is missing or points to the wrong host path. Verify the left-hand side of each -v option.

Delete Actions Fail

The storage is mounted read-only, or the container user lacks permission. Switch to :rw only if you intend to delete, and set the user and group identifiers appropriately.

Frequently Asked Questions

Is there an official Qdirstat Docker image?

The popular images are maintained by the community, notably jlesage/qdirstat and the LinuxServer.io image. Review their documentation before use.

Which port does Qdirstat Docker use?

The jlesage/qdirstat image serves its web interface on port 5800, while the LinuxServer.io image uses ports 3000 and 3001.

Can Qdirstat in Docker delete files?

Yes, if the storage is mounted read-write and permissions allow it. Read-only mounts are recommended for safe analysis.

Does Qdirstat Docker work on ARM devices?

Community images provide builds for several architectures, including ARM, so many Raspberry Pi and ARM-based NAS devices can run them.

Conclusion

Qdirstat in Docker brings a full graphical disk analyser to servers and NAS devices that have no desktop. Mount storage read-only, open the web interface, and the familiar Qdirstat tree and treemap reveal exactly where space has gone. Keep the container private, use Docker’s own tools to clean container data, and Qdirstat becomes a powerful, low-maintenance addition to any home lab or server toolkit.