Add Dozzle for simple, real-time Docker container log viewing. Features: - Real-time log streaming from all containers - Search and filter capabilities - Multi-container side-by-side view - Container resource statistics (CPU, memory) - No database required (reads directly from Docker) - Minimal footprint (~4MB image) Configuration: - Restricted to local network only (local-only middleware) - Auto-discovery of all running containers - Dark/light theme support Includes quickstart guide and comprehensive documentation. |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| compose.yaml | ||
| QUICKSTART.md | ||
| README.md | ||
Dozzle - Simple Docker Log Viewer
A lightweight, web-based Docker log viewer with real-time streaming.
Features
- ✅ Real-time log streaming - See logs as they happen
- ✅ Search and filter - Find specific log entries instantly
- ✅ Multi-container view - View multiple containers side-by-side
- ✅ No database required - Reads directly from Docker
- ✅ Tiny footprint - Only ~4MB image size
- ✅ Container stats - CPU, memory usage per container
- ✅ Dark/Light themes - Easy on the eyes
Access
URL: https://logs-docker.fig.systems
Quick Start
Deploy
cd /home/eduardo_figueroa/homelab/compose/services/dozzle
docker compose up -d
View Logs
- Open https://logs-docker.fig.systems
- Click on any container to view logs
- Use search box to filter logs
- Click "Settings" to change theme, tail size, etc.
Features Guide
Real-Time Streaming
- Logs update automatically as new entries arrive
- Pause/resume streaming with the pause button
- Auto-scrolls to latest logs (disable to scroll through history)
Search & Filter
Search box features:
- Simple text search:
error - Case-sensitive toggle
- Regex support:
HTTP [45]\d{2} - Multi-word:
error database connection
Quick filters:
- Click container name to filter to that container
- Use dropdown to switch between containers
- Multi-container view: Click "+" to add more containers
Container Stats
Click "Stats" tab to view:
- CPU usage %
- Memory usage (MB)
- Network I/O
- Block I/O
Multi-Container View
View logs from multiple containers simultaneously:
- Click container to open logs
- Click "+" button in header
- Select another container
- View side-by-side or stacked
Download Logs
- Click "Download" button (top right)
- Downloads current view as .txt file
- Includes visible log lines only
Settings
Click gear icon to configure:
- Theme: Dark or light mode
- Tail size: Number of lines to load (default: 300)
- Datetime format: Customize timestamp display
- Font size: Adjust log text size
Log Retention
Note: Dozzle shows logs from Docker's log driver. By default, Docker keeps logs indefinitely, which can consume disk space.
Check Current Log Size
# See total size of all container logs
sudo du -sh /var/lib/docker/containers/
# Size per container
sudo du -sh /var/lib/docker/containers/*
Configure Log Rotation (Recommended)
Create/edit /etc/docker/daemon.json:
{
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}
This keeps:
- Max 10MB per log file
- Max 3 files per container
- ~30MB total per container
Then restart Docker:
sudo systemctl restart docker
Note: Existing containers need to be recreated to use new settings.
Limitations
Log History
Dozzle shows what Docker has stored. To view logs from the last week:
- Ensure Docker is keeping enough logs (see log rotation above)
- Increase tail size in Dozzle settings (default: 300 lines)
- Scroll up in log view to see older entries
If you need longer-term log storage and analysis, continue using Loki/Grafana for historical queries.
vs Loki/Grafana
Use Dozzle for:
- Quick log checks
- Real-time monitoring
- Simple searching
- Single-server setups
Use Loki/Grafana for:
- Long-term log retention
- Complex queries across time ranges
- Multi-server log aggregation
- Alerts based on log patterns
- Historical analysis
Authentication
To enable basic auth (recommended for external access):
-
Edit
.env:DOZZLE_USERNAME=admin DOZZLE_PASSWORD=your-secure-password -
Uncomment auth lines in
compose.yaml:environment: DOZZLE_USERNAME: ${DOZZLE_USERNAME} DOZZLE_PASSWORD: ${DOZZLE_PASSWORD} -
Restart:
docker compose up -d
Multi-Host Setup
To view logs from multiple Docker hosts:
- Configure remote Docker hosts to expose API (carefully!)
- Add to compose.yaml:
environment: DOZZLE_REMOTE_HOST: tcp://remote-host:2375|Remote Server Name
Or add via UI: Settings → Hosts → Add host
Troubleshooting
No containers showing
Check Docker socket access:
docker logs dozzle
Should see: "Dozzle version X.X.X"
Slow performance
Reduce tail size: Settings → Tail size → 100
Old logs not showing
Check Docker log retention:
docker inspect <container> | grep -A 10 "LogConfig"
If max-size is too small, increase it in /etc/docker/daemon.json
Keyboard Shortcuts
/- Focus search boxEsc- Clear searchSpace- Pause/resume streaming↑/↓- Scroll logsCtrl+F- Browser find
Tips
- Bookmark frequently-checked containers - Use browser bookmarks for direct URLs
- Use browser tabs - Open multiple containers in separate tabs
- Combine with Loki - Use Dozzle for live monitoring, Loki for historical queries
- Set up log rotation - Prevent disk space issues
- Enable auth - If exposed to internet
Links
- Documentation: https://dozzle.dev/
- GitHub: https://github.com/amir20/dozzle
- Docker Hub: https://hub.docker.com/r/amir20/dozzle