How to View All Your Container Logs in One Place with Dozzle

When something's wrong with an app the answer is in docker compose logs -f (tutorial 25). With thirty containers that means remembering which folder, opening SSH, and scrolling. Dozzle is a tiny web page that shows every container's log live, with a search box, colouring, a split view to watch two at once, and nothing stored — it reads Docker's own logs. Open it on your phone when Uptime Kuma pages you.
Quick reference
| Task | What |
|---|---|
| Folder | ~/docker/dozzle/compose.yaml |
| Web | http://server-ip:8888 |
| Login | DOZZLE_AUTH_PROVIDER: simple + data/users.yml |
| Another server | the dozzle agent container there, DOZZLE_REMOTE_AGENT here |
| Search | the box at the top; regex supported |
| Download | the ⋯ menu on any container |
1. The compose file
mkdir -p ~/docker/dozzle/data && cd ~/docker/dozzle
nano compose.yaml
services:
dozzle:
image: amir20/dozzle:latest
container_name: dozzle
ports:
- "8888:8080"
environment:
DOZZLE_AUTH_PROVIDER: simple
DOZZLE_ENABLE_ACTIONS: "true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data:/data
restart: unless-stopped
The Docker socket, read-only, is how it sees the containers. ENABLE_ACTIONS adds start/stop/restart buttons — handy, and a reason to have the login.
2. A login
docker run --rm amir20/dozzle generate john --password 'your-password' --email john@example.com --name "John" > data/users.yml
docker compose up -d
sudo ufw allow from 192.168.1.0/24 to any port 8888
Open http://192.168.1.50:8888 and log in.
3. Using it
- The left sidebar lists running containers; click one and the log streams live, newest at the bottom, with timestamps.
- Search (the box, or /) filters lines; regular expressions work. Errors are coloured automatically.
- Split (the icon top right) shows two or three containers side by side — the proxy and the app behind it, say.
- Pin a container to keep it in view; ⋯ → Download saves the log; Show stopped containers finds the one that crashed.
- Stats per container (CPU, memory) in the header.
It keeps nothing: when the container's log rotates (tutorial 67), that's what you see. For long-term log storage, that's Loki (tutorial 155).
4. Another machine's logs
On the Pi:
docker run -d --name dozzle-agent -p 7007:7007 -v /var/run/docker.sock:/var/run/docker.sock:ro --restart unless-stopped amir20/dozzle:latest agent
On the server, add to Dozzle's environment:
DOZZLE_REMOTE_AGENT: 192.168.1.60:7007
Both hosts appear in one Dozzle, switchable at the top.
5. Behind the proxy
logs.example.com → 127.0.0.1:8888 with the WebSocket lines (it streams), HTTPS, and ideally Authelia (tutorial 95) or VPN-only — logs contain more than you'd think.
Troubleshooting
"No containers found." The socket isn't mounted or isn't readable; ls -l /var/run/docker.sock.
Login page loops. data/users.yml malformed; regenerate it with the generate command.
A container's log is empty. It logs to a file inside the container rather than stdout; check its docs for a "log to console" option.
Can't see the remote agent. Port 7007 blocked on the Pi (ufw allow from 192.168.1.50 to any port 7007).
Wrapping up
One container with the socket read-only, a generated login, a bookmark. The next time something misbehaves you open a page, type a word, and the error is on screen in five seconds — from the sofa, without SSH.
