docker.recipes

Dozzle Log Viewer

beginner

Real-time Docker container log viewer.

Overview

Dozzle is a lightweight, web-based Docker container log viewer created by Amir Raminfar that eliminates the need for complex logging infrastructure while providing real-time log monitoring capabilities. Unlike heavyweight solutions like ELK stack or Grafana Loki, Dozzle requires no database, no complex configuration, and consumes minimal system resources while delivering instant access to container logs through an intuitive web interface. This single-container deployment connects directly to the Docker daemon via the Docker socket, automatically discovering all running containers and streaming their logs in real-time with powerful search and filtering capabilities. Dozzle excels in scenarios where you need immediate log visibility without the overhead of enterprise logging solutions. It provides instant gratification for developers debugging applications, system administrators monitoring services, and homelab enthusiasts tracking container behavior. The application's strength lies in its simplicity - within seconds of deployment, you have a fully functional log viewer that requires zero configuration to start monitoring all your containers. This stack is perfect for small to medium Docker environments, development setups, and situations where you need quick log access without persistent storage requirements. Developers working with microservices, homelab enthusiasts running multiple services, and teams needing temporary log monitoring will find Dozzle's minimal resource footprint and instant deployment particularly valuable compared to heavier alternatives like Portainer's logging features or standalone log aggregation systems.

Key Features

  • Real-time log streaming with automatic container discovery via Docker socket
  • Advanced regex-based filtering and full-text search across container logs
  • Multi-container view with tabbed interface for monitoring multiple services simultaneously
  • Built-in authentication support using DOZZLE_USERNAME and DOZZLE_PASSWORD environment variables
  • Dark mode interface optimized for extended monitoring sessions
  • Multi-host Docker daemon support for monitoring remote Docker instances
  • Zero-dependency architecture requiring no database or external storage
  • Live log statistics showing container status and log volume metrics

Common Use Cases

  • 1Development debugging when troubleshooting application issues across multiple containers
  • 2Homelab monitoring for enthusiasts running self-hosted services like Plex, Home Assistant, or Pi-hole
  • 3Small business Docker environments where enterprise logging solutions are overkill
  • 4Temporary log monitoring during deployment processes or maintenance windows
  • 5Educational environments teaching Docker concepts where students need log visibility
  • 6Remote server monitoring where SSH access is limited but web access is available
  • 7Microservices development where developers need quick access to service logs without complex tooling

Prerequisites

  • Minimum 64MB RAM available for the Dozzle container (32MB minimum, 128MB recommended for heavy log volumes)
  • Docker daemon running with accessible Docker socket at /var/run/docker.sock
  • Port 8080 available on the host system (or alternative port for custom configuration)
  • Read access to Docker socket for container discovery and log streaming
  • Web browser with JavaScript enabled for the real-time streaming interface
  • Understanding that Dozzle shows only live logs, not historical logs from before container startup

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 dozzle:
3 image: amir20/dozzle:latest
4 container_name: dozzle
5 restart: unless-stopped
6 volumes:
7 - /var/run/docker.sock:/var/run/docker.sock:ro
8 ports:
9 - "8080:8080"

.env Template

.env
1# No environment variables required

Usage Notes

  1. 1Docs: https://dozzle.dev/
  2. 2Dashboard at http://localhost:8080 - shows all containers automatically
  3. 3Real-time log streaming with search and filters
  4. 4Add auth: DOZZLE_USERNAME and DOZZLE_PASSWORD env vars
  5. 5Multi-host support: connect to remote Docker daemons
  6. 6Lightweight single binary - no database required

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 dozzle:
5 image: amir20/dozzle:latest
6 container_name: dozzle
7 restart: unless-stopped
8 volumes:
9 - /var/run/docker.sock:/var/run/docker.sock:ro
10 ports:
11 - "8080:8080"
12EOF
13
14# 2. Create the .env file
15cat > .env << 'EOF'
16# No environment variables required
17EOF
18
19# 3. Start the services
20docker compose up -d
21
22# 4. View logs
23docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/dozzle/run | bash

Troubleshooting

  • "Permission denied" accessing Docker socket: Ensure the Dozzle container has read access to /var/run/docker.sock and check file permissions
  • No containers visible in Dozzle interface: Verify Docker socket is properly mounted and containers are actually running with active logs
  • High memory usage with many containers: Limit monitored containers using DOZZLE_FILTER environment variable to reduce resource consumption
  • Authentication not working: Ensure both DOZZLE_USERNAME and DOZZLE_PASSWORD environment variables are set correctly in the compose file
  • Logs not updating in real-time: Check browser JavaScript console for connection errors and verify WebSocket connectivity to port 8080
  • Cannot access Dozzle web interface: Confirm port 8080 is not blocked by firewall and the container is running with docker logs dozzle command

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space