Dozzle
Docker Compose deployment guide for Dozzle on Ubuntu.
Dozzle is a lightweight web-based log viewer for Docker containers. It provides real-time access to container logs through a simple browser interface without requiring SSH access to the host.
I use Dozzle to monitor containers across multiple servers from a single interface.
Official project:
Create the Project
Create a directory for Dozzle:
/opt/docker/dozzle
Move into it:
cd /opt/docker/dozzle
Create the Docker Compose File
Create:
/opt/docker/dozzle/docker-compose.yml
Paste:
services:
dozzle:
image: amir20/dozzle:latest
container_name: dozzle
ports:
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
Start Dozzle
Start the container:
docker compose up -d
Check the logs:
docker logs -f dozzle
Access the Web Interface
Open:
http://SERVER-IP:8080
Example:
http://192.168.1.100:8080
You should see a list of running Docker containers and be able to view logs in real time.
Features
Dozzle provides:
- Live Docker container logs
- Search and filtering
- Multi-container viewing
- Automatic log streaming
- Mobile-friendly interface
- Lightweight resource usage
It is particularly useful when troubleshooting container issues without needing to SSH into the host.
Monitoring Multiple Servers
Dozzle supports remote agents, allowing logs from multiple Docker hosts to be viewed from a single interface.
Example homelab setup:
micropc
micro2pc
minipc
Each remote server runs a Dozzle Agent, while the primary Dozzle instance connects to all agents and displays their logs in one dashboard.
Dozzle Agent
On remote servers, create:
/opt/docker/dozzle-agent/docker-compose.yml
Paste:
services:
dozzle-agent:
image: amir20/dozzle:latest
container_name: dozzle_agent
command: agent
network_mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
Start the agent:
docker compose up -d
The agent will automatically listen on port 7007.
Reverse Proxy (Optional)
If you already use a reverse proxy such as Caddy, you may prefer to expose Dozzle through a subdomain.
Example:
https://logs.example.com
This avoids exposing the raw port directly.
If you are new to reverse proxies, see:
Security Considerations
Dozzle requires access to the Docker socket:
/var/run/docker.sock
This effectively grants visibility into Docker containers running on the host.
For internet-facing deployments, it is strongly recommended to:
- Use authentication
- Restrict access through a reverse proxy
- Enable HTTPS
- Limit access to trusted users
Advanced Example (Reference Only)
This is the configuration I currently use in my own homelab.
services:
dozzle:
container_name: dozzle
stop_grace_period: 30s
image: amir20/dozzle:latest
restart: unless-stopped
ports:
- 8892:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /opt/docker/dozzle/data:/data
environment:
DOZZLE_AUTH_PROVIDER: simple
DOZZLE_REMOTE_AGENT: 192.168.86.15:17007,192.168.86.100:7007,192.168.86.61:7007
security_opt:
- no-new-privileges:true
This configuration adds:
- Authentication
- Persistent application data
- Multiple remote Docker hosts
- Additional container security restrictions
Remote agents are deployed using:
services:
dozzle-agent:
container_name: dozzle_agent
stop_grace_period: 30s
image: amir20/dozzle:latest
command: agent
network_mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
Updating Dozzle
Pull the latest image:
docker compose pull
Restart the container:
docker compose up -d
Backups
Back up:
/opt/docker/dozzle/data
if you are using persistent storage.
For simple deployments that only mount the Docker socket, there may be little or nothing to back up.
Final Thoughts
Dozzle is one of the simplest and most useful Docker management tools available. It provides instant access to container logs, makes troubleshooting easier, and scales well from a single server to multiple Docker hosts using remote agents.