Get Started with Docker - Part 7: Real-Time Container Log Monitoring with Dozzle

Learn how to deploy Dozzle in Docker for real-time, searchable container log streaming across your fleet

Get Started with Docker - Part 7: Real-Time Container Log Monitoring with Dozzle

You've built up an impressive self-hosted container stack—deploying Pi-Hole for DNS, Nginx Proxy Manager for local routing, Cloudflare Tunnel for secure remote ingress, and Apache Guacamole for remote desktop access.

But as your container fleet grows, troubleshooting startup errors or checking application activity can quickly become tedious. Opening terminal windows and running manual docker logs -f <container_name> commands for every service gets old fast.

This is where Dozzle comes in. Dozzle is a lightweight, real-time log viewer for Docker containers that streams color-coded, searchable logs directly to a clean web dashboard—making container debugging a breeze!

We're going to:

  • Look at what Dozzle is and why it's essential for homelab logging
  • Understand the Docker Socket (/var/run/docker.sock:ro) and read-only container security
  • Set up your persistent Docker Config folders (Files/AppData/Config/dozzle)
  • Create our Docker Compose file using Nano Text Editor
  • Spin up Dozzle in Docker Compose
  • Route a custom local hostname (http://logs.this) using Pi-Hole & Nginx Proxy Manager (Part 5)
  • Search, filter, and monitor container log streams in real-time

What's Dozzle?

Dozzle (amir20/dozzle) is a web-based log viewer designed specifically for Docker containers.

Instead of heavy logging stacks (like ElasticSearch or Loki) that consume gigabytes of RAM, Dozzle is ultra-lightweight (using under 15MB of RAM). It hooks directly into the local Docker API and streams live container logs straight to your web browser.

Key Dozzle Features:

  • Live Real-Time Streaming: Watch container logs update instantly as events happen.
  • 🔍 Fuzzy & Regex Search: Filter millions of log lines for errors (ERROR, WARN, 500) across all containers.
  • 📊 Memory & CPU Stats: View real-time resource utilization for every running container.
  • 🌓 Split-Screen Viewing: Compare logs from multiple containers side-by-side.

💡 Previous Series Guides:
If you haven't set up your Docker environment yet, catch up with our earlier guides:


Where can I install this?

In this guide, we'll be using our Linux Docker host. You can run the exact same steps on a Raspberry Pi, an Ubuntu server, or inside WSL2 on Windows 11.


Set up your persistent Docker Config folders

In this guide and throughout our Get Started with Docker series, we'll be using the following folder structure to store all of our persistent configuration files:

/home/$yourusername/Files/AppData/Config

It's best practice to keep a structured folder setup to make organizing, updating, and backing up your Docker data volumes easy.

Create our Dozzle Config folder

  • SSH into your Docker server installation.
  • Check you are in your home folder by running pwd.
  • Copy and paste the below command and press Enter to create the folder:
mkdir -p Files/AppData/Config/dozzle
  • Change into the newly created folder:
cd Files/AppData/Config/dozzle
  • You should now be in /home/$yourusername/Files/AppData/Config/dozzle.

Understanding the Docker Socket (/var/run/docker.sock:ro)

To read log streams from your container fleet, Dozzle needs to communicate with the Docker daemon. It does this by mounting the UNIX socket located at /var/run/docker.sock.

Security Best Practice: Read-Only Socket Flag (:ro)
Giving a container access to the Docker socket can carry security risks if the container is compromised. To harden Dozzle, we attach the :ro (read-only) flag to the volume mount:
- /var/run/docker.sock:/var/run/docker.sock:ro
This allows Dozzle to read container logs and status metadata, but prevents it from creating, stopping, or modifying host containers!


Creating our Docker Compose file

Now that we're inside /home/$yourusername/Files/AppData/Config/dozzle, open your text editor to create your compose file:

nano docker-compose.yml

💡 Tip: If you don't have nano installed on your system, run sudo apt-get install nano.

Copy and paste the below code block into your terminal window:

version: '3.8'

services:
  dozzle:
    container_name: dozzle
    image: amir20/dozzle:latest
    restart: unless-stopped
    ports:
      - "8080:8080" # Exposed locally for web UI / reverse proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
  • Press Ctrl + X, type Y, and press Enter to save the file.

Starting up Dozzle

With your docker-compose.yml file created, spin up Dozzle:

docker compose up -d

Docker will download the amir20/dozzle image and launch the container.

Open your web browser and navigate to your server's IP address on port 8080:

http://192.168.0.23:8080

You will be greeted by Dozzle's clean dark-mode dashboard, listing every running container on your host!


Adding logs.this in Pi-Hole & Nginx Proxy Manager (Part 5 Integration)

Instead of typing IP addresses and port numbers, let's use the local DNS setup we built in Part 5 to create a custom local hostname (http://logs.this).

1. Add CNAME Record in Pi-Hole

  • Log in to your Pi-Hole web admin interface.
  • Navigate to Local DNS > CNAME Records.
  • Domain: logs.this
  • Target Domain: proxy.this (Your Nginx Proxy Manager IP from Part 5).
  • Click Add.

2. Add Proxy Host in Nginx Proxy Manager

  • Log in to Nginx Proxy Manager (http://proxy.this:81).
  • Click Proxy Hosts > Add Proxy Host.
  • Domain Names: logs.this
  • Scheme: http
  • Forward Hostname / IP: 192.168.0.23 (Your Docker host IP)
  • Forward Port: 8080
  • Toggle Block Common Exploits and click Save.

Now open a new browser tab and go to http://logs.this. You now have instant, beautiful log monitoring accessible via a clean local hostname!


Using Dozzle Like a Pro

Now that Dozzle is up and running, here are a few built-in features to help you debug containers like a DevOps engineer:

1. Instant Container Search (Command + K / Ctrl + K)

Press Ctrl + K anywhere in the UI to open the quick launcher. Type any container name (e.g. pihole, guacamole, cloudflared) to switch log streams instantly.

2. Live Regex Filtering

In the search bar at the top of any log stream, type regex patterns or keywords like error, failed, or panic to isolate troubleshooting issues across thousands of log lines.

3. Clear Log Memory

Click the Clear Logs icon to reset the visible buffer while keeping live streaming active—great when restarting a container to watch its boot sequence cleanly.


Congratulations! You've deployed Dozzle in Docker using our standard Files/AppData/Config folder hierarchy and integrated it with your local DNS and reverse proxy network.


Don't forget to explore the rest of our website as we build out more content. Stay tuned for more tutorials, tips, and tricks to help you make tech work for you.

If you want to stay up-to-date with regular updates, make sure to subscribe to our free mailing list.