8000 GitHub - amir20/dtop: Terminal dashboard for Docker monitoring across multiple hosts with Dozzle integration. · GitHub
[go: up one dir, main page]

Skip to content
amir20Public

About

Terminal dashboard for Docker monitoring across multiple hosts with Dozzle integration.

Resources

Stars

1.5k stars

Watchers

5 watching

Forks

Repository files navigation

dtop logo

🖥️ dtop

A terminal based dashboard for Docker that monitors multiple hosts in real-time.

dtop screenshot

Overview

dtop provides a comprehensive summary of all Docker containers running on your system, displayed directly in your terminal. Get instant visibility into container status, resource usage, and key metrics without leaving the command line. It supports ssh, tcp and local connections and integrates with Dozzle for container logs.

Features

  • 💻 Real-time monitoring - Live updates of container status and metrics
  • ⚡ Lightweight - Insanely fast and lightweight using Rust
  • 🌍 Multi-host support - Monitor containers across multiple hosts
  • 🔍 Dozzle - Supports opening Dozzle links via keyboard shortcuts
  • 📝 Log streaming - View container logs in real-time
  • 🪟 Native panes - Shells and logs open in a tmux or Rex pane beside the list with --panes
  • 🦖 Native Rex support - App logos and tab status

Roadmap

  • Sort containers by name and status
  • Implement log view streaming (basic)
  • Support mouse scrolling
  • Support TLS certs via DOCKER_CERT_PATH
  • Responsive columns for narrow view
  • Support stopping, starting and removing containers
  • Support container health status
  • Search or filter for containers
  • Support simple JSON parsing and formatting
  • Configurable columns and saving preferences
  • Add support for disk IO.
  • Add support for Kubernetes clusters

Installation

dtop can be installed through multiple package managers or by downloading the binary directly.

Homebrew

Install using Homebrew for macOS or Linux (recommended):

brew install dtop

Note

Homebrew is recommended as dtop is in active development with frequent updates. Using Homebrew will automatically upgrade dtop.

Docker

dtop is released as a docker image. You can pull it from Github.

docker run -v /var/run/docker.sock:/var/run/docker.sock -it ghcr.io/amir20/dtop

Currently, the image is available for amd64 and arm64 architectures.

Install Script

Downloads the latest release from GitHub.

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/amir20/dtop/releases/latest/download/dtop-installer.sh | sh

Nix

Run directly without installing:

nix run github:amir20/dtop

Or install to your profile:

nix profile install github:amir20/dtop

For NixOS or home-manager, add to your configuration:

# In your flake inputs
inputs.dtop.url = "github:amir20/dtop";

# Then use
inputs.dtop.packages.${system}.default

Install from Source

dtop is written in Rust can be installed using Cargo.

cargo install dtop

Self-Update

dtop includes a built-in self-update feature to easily upgrade to the latest version:

dtop update

This command will:

  • Check GitHub releases for the latest version
  • Download and install the update if a newer version is available
  • Automatically replace the current binary with the new version

Note

The self-update feature is only available in binaries installed via the install script or downloaded from GitHub releases. Docker images should be updated by pulling the latest image, and cargo installations should use cargo install dtop --force.

Command Line Options

By default, dtop will connect to the local Docker daemon using /var/run/docker.sock. DOCKER_HOST is also supported to connect to other hosts.

❯ dtop --help
A terminal-based Docker container monitoring tool with real-time CPU and memory metrics

Usage: dtop [OPTIONS] [COMMAND]

Commands:
  update  Update dtop to the latest version
  shell   Open a shell in a container, then exit (used by --panes)
  logs    Show a container's logs in dtop's log view, then exit (used by --panes)
  help    Print this message or the help of the given subcommand(s)

Options:
  -c, --config <PATH>
          Path to a config file to use instead of the default locations

          The file must exist. --host still replaces its hosts, and Ctrl-S saves
          preferences back to it.

  -H, --host <HOST>
          Docker host(s) to connect to. Can be specified multiple times.

          Examples:
            --host local                    (Connect to local Docker daemon / active Docker context)
            --host unix:///path/docker.sock (Connect to a specific Unix socket)
            --host ssh://user@host          (Connect via SSH)
            --host ssh://user@host:2222     (Connect via SSH with custom port)
            --host tcp://host:2375          (Connect via TCP to remote Docker daemon)
            --host tls://host:2376          (Connect via TLS)
            --host local --host ssh://user@server1 --host tls://server2:2376  (Multiple hosts)

          For TLS connections, set DOCKER_CERT_PATH to a directory containing:
            key.pem, cert.pem, and ca.pem

          "local" follows the Docker CLI's endpoint resolution: it honors DOCKER_HOST,
          DOCKER_CONTEXT, and the active `docker context` from ~/.docker/config.json.

          If not specified, will use config file or default to "local"

  -i, --icons <ICONS>
          Icon style to use for the UI

          Options:
            auto     - Nerd Font icons on terminals that ship them built in
                       (Ghostty, WezTerm, Rex, kitty >= 0.36), Unicode elsewhere (default)
            unicode  - Standard Unicode icons (works everywhere)
            nerd     - Nerd Font icons (requires Nerd Font installed)

      --hyperlinks <MODE>
          Render container names as clickable OSC 8 hyperlinks to Dozzle

          Only applies to hosts with a `dozzle` URL configured. Unlike the 'o' key,
          this works over SSH because the link is resolved by your local terminal.

          Options:
            auto    - Enable on terminals known to support OSC 8 (default)
            always  - Always render links (use inside tmux with
                      `set -ga terminal-features "*:hyperlinks"`)
            never   - Never render links

  -f, --filter <FILTER>
          Filter containers (can be specified multiple times)

          Examples:
            --filter status=running
            --filter name=nginx
            --filter label=com.example.version=1.0
            --filter ancestor=ubuntu:24.04

          Multiple filters of the same type use OR logic:
            --filter status=running --filter status=paused

          Different filter types use AND logic:
    
8000
        --filter status=running --filter name=nginx

          Available filters:
            id, name, label, status, ancestor, before, since,
            volume, network, publish, expose, health, exited

          Note: Some filters only work with container listing, not events.
          Warnings will be shown if a filter is incompatible with events.

  -a, --all
          Show all containers (default shows only running containers)

          By default, dtop only shows running containers.
          Use this flag to show all containers including stopped, exited, and paused containers.

          Note: This flag can only enable showing all containers, not disable it.
          If your config file has 'all: true', you'll need to edit the config file
          or press 'a' in the UI to toggle back to showing only running containers.

          This is equivalent to pressing 'a' in the UI to toggle show all.

      --panes
          Open Shell and Logs in a terminal pane beside dtop instead of taking over its screen. Applies inside tmux, or inside Rex with its CLI on PATH

  -s, --sort <SORT>
          Default sort field for container list

          Options:
            uptime  - Sort by time since the container last started (default, newest first)
            name    - Sort by container name (alphabetically)
            cpu     - Sort by CPU usage (highest first)
            memory  - Sort by memory usage (highest first)

          You can also use short forms: u, n, c, m

          The sort direction can be toggled in the UI by pressing the same key again.

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Configuration File

dtop supports command line flags or configuration file. The configuration file reads from the following locations (in priority order):

  1. ./config.yaml or ./config.yml
  2. ./.dtop.yaml or ./.dtop.yml
  3. ~/.config/dtop/config.yaml or ~/.config/dtop/config.yml
  4. ~/.dtop.yaml or ~/.dtop.yml

To use a file somewhere else, such as a config shared by every user on a host, pass --config /path/to/dtop.yaml. The default locations are then skipped.

Note

Both yaml and yml files are supported.

Here's an example configuration:

# Monitor production servers with filters and Dozzle integration
hosts:
  - host: ssh://user@prod-server1
    name: prod-1 # optional label shown in the UI (defaults to user@prod-server1)
    dozzle: https://dozzle.prod-server1.com/
    filter:
      - status=running
      - label=environment=production

  - host: ssh://user@prod-server2
    name: prod-2
    dozzle: https://dozzle.prod-server2.com/
    filter:
      - status=running
      - label=environment=production

# Use Nerd Font icons for better visuals
icons: nerd

Or monitor specific application stacks:

# Development environment - only show healthy web services
hosts:
  - host: local
    filter:
      - label=app=web
      - status=running
      - health=healthy

See config.example.yaml for more examples.

Nerd Font Icons

dtop supports Nerd Fonts for enhanced icon display. Nerd Fonts are fonts that have been patched to include additional glyphs and icons commonly used in terminal applications.

By default (icons: auto), dtop asks the terminal what it is at startup and uses Nerd Font icons on terminals that draw them without a patched font: Ghostty, WezTerm, Rex and kitty 0.36+. This works over SSH too, since the question travels through the SSH session to your local terminal. Inside tmux (3.3+), dtop uses the terminal name tmux recorded when you attached, so tmux in Ghostty gets Nerd Font icons too. The choice is made at startup, so reattaching from a different terminal doesn't change it. Inside screen, auto uses Unicode icons.

Installing Nerd Fonts

  1. Visit nerdfonts.com/font-downloads
  2. Download a patched font (e.g., "FiraCode Nerd Font", "JetBrainsMono Nerd Font")
  3. Install the font on your system
  4. Configure your terminal emulator to use the Nerd Font

Using Nerd Font Icons

On other terminals, once you have a Nerd Font installed and configured, enable Nerd Font icons in dtop:

# Via command line
dtop --icons nerd

# Or in config file
icons: nerd

Note

If icons appear as boxes or question marks, ensure your terminal is using a Nerd Font, or set icons: unicode, which works with any terminal font.

Rex

dtop has native support for Rex. Everything below is detected at startup, and works over SSH since it travels through the SSH session to your local terminal.

  • App logos - each container's image logo is drawn next to its name (also kitty 0.28+ and Ghostty). Turn them off with app_logos: false.
  • Tab status - Rex flags dtop's tab while a bulk action runs, when it finishes or fails, when a host disconnects, and when a running container turns unhealthy (Program Status Protocol).
  • Tab title - dtop, dtop · <host>, or the container whose logs you're reading.
  • Nerd Font icons and clickable names - with icons: auto and hyperlinks: auto.

Shells and logs in panes

With --panes, Shell (from the action menu) and Logs (→) open in a new pane to the right of dtop, so the container list stays on screen. This works inside tmux and inside Rex:

dtop --panes
dtop --panes --host ssh://user@nas

The pane runs dtop again (dtop --host <host> shell <id> or dtop --host <host> logs <id>), so it works on every host dtop can reach, SSH and TLS included, with no Docker CLI needed. Closing the shell, or leaving the log view with Esc, closes the pane.

  • tmux (3.0+): uses tmux split-window. tmux runs where dtop runs, so this also works when you SSH into a server and run dtop in tmux there. The pane starts with the tmux server's environment, not your shell's: if you set DOCKER_HOST or DOCKER_CONTEXT after tmux started, the pane's dtop won't see it, so pass the host explicitly with --host.
  • Rex: uses rex split, which needs the rex CLI on your PATH, so it applies when dtop runs on the same machine as Rex.

In tmux inside Rex, panes open in tmux. Anywhere else dtop opens shells and logs in place as usual.

Supported Connections

Local Docker

Monitor containers running on the local Docker daemon using --host local. dtop respects the DOCKER_HOST environment variable. If DOCKER_HOST is not set, it falls back to the default Docker socket location (/var/run/docker.sock on Linux/macOS).

dtop --host local
# or simply
dtop

Remote HTTP Docker

Connect to remote Docker daemons over unencrypted TCP connections. This is useful for development environments but should only be used on trusted networks.

dtop --host tcp://host2:2375

Warning

TCP connections are unencrypted. Only use on trusted networks or with proper firewall rules.

Remote TLS Docker

Connect to remote Docker daemons over encrypted TLS connections. Requires certificates to be configured via the DOCKER_CERT_PATH environment variable.

export DOCKER_CERT_PATH=/path/to/certs  # Directory containing key.pem, cert.pem, and ca.pem
dtop --host tls://host2:2376

SSH

Establish an SSH connection to a remote host and monitor containers running on it. This is the recommended method for secure remote connections.

dtop --host ssh://user@host
# With custom port
dtop --host ssh://user@host:2222

Multiple Hosts

You can monitor multiple Docker hosts simultaneously by specifying multiple --host flags:

dtop --host local --host tcp://host2:2375 --host ssh://user@host

Note

Currently, Dozzle url can only be configured in the configuration file. There is no way to provide it directly in the command line flags.

Coolify and Dozzle labels

dtop reads display names and groups directly from Docker labels, with no additional configuration:

  • Container name: dev.dozzle.name → coolify.serviceName → Docker container name.
  • Compose column: dev.dozzle.group → coolify.projectName → com.docker.compose.project.

Empty or whitespace-only labels are skipped. This works even without a Dozzle URL configured, including after container restarts and host reconnections.

Related Projects & Inspirations

I am a big fan of ctop. ctop inspired me to create Dozzle but in the browser. However, it seems like ctop is no longer maintained. I considered forking ctop but deploying with same name would be challenging. I created dtop for my personal use case. I often want to see all my containers at a glance across multiple hosts. dtop achieves that by supporting remote hosts via ssh or tcp. Additionally, since I use Dozzle, I integrated Dozzle into dtop to provide a seamless experience for monitoring container logs.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details.

About

Terminal dashboard for Docker monitoring across multiple hosts with Dozzle integration.

Resources

Stars

1.5k stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages

0