How to install Dozzle on synology / linux / vps
Dozzle is log viewer for Docker containers. It allows you to view logs of Docker containers through a web interface and is useful for monitoring and debugging purposes without needing to use the command line.
Dozzle is a small lightweight application with a web based interface to monitor Docker logs. It doesn’t store any log files. It is for live monitoring of your container logs only. [1]
Version used in this documentation
There can be slight differences on installation processes if you are on different versions or hardware
Application | Version |
---|---|
Debian | 11 |
Synology DSM | 7.2.1-69057 Update 4 |
Linux Docker | 20.10.21 |
Synology Docker | 20.10.23-1437 |
Docker Compose | 1.29.2 |
Portainer | 2.19.5 |
Dozzle | 8.1.3 |
Prerequisites
The majority, if not all, of the Docker container guides on this website use Docker Compose with Portainer. You can, of course, take the provided Compose configuration and use it directly, instead of using Portainer, or use another manager, such as Dockge, for example.
Environments in the examples
Check these if you are not sure which environments you can safely change
Name | Mapped | Container |
---|---|---|
Container name | dozzle | |
Container image | amir20/dozzle:latest | |
Config directory mount | /volume1/docker/portainer | /data |
Http port | 20030 | 8080 |
I use different mapped port with the container port only to showcase how to change port. You can definitely use the default container port instead of changing them.
How to install Dozzle
- Open portainer i.e.
https://192.168.1.1:10000
, click on the environment i.e.local
, then click onStacks
- Click
+ Add stack
then fill in the name of yourDozzle
stack i.e.Dozzle
- Fill the editor with these:
Change every
${}
to your valuesversion: '3.3' services: dozzle: container_name: dozzle image: 'amir20/dozzle:latest' volumes: - '/var/run/docker.sock:/var/run/docker.sock' ports: - ${HTTP_PORT}:8080 restart: on-failure:5
- Click on
Deploy the stack
, wait a bit forPortainer
to download and run your container
How to open Dozzle
- Open it using
http://your_device_ip:your_dozzle_port
i.e.http://192.168.1.1:20030
Optional configurations
Adding authentication
- First create a hashed password, open up a linux/ssh terminal and enter this:
echo -n 'your_password_here' | sha256sum
- Create a configuration folder for dozzle, i.e.:
sudo mkdir /volume1/docker/dozzle
- Create a
user.yml
file inside that foldersudo touch /volume1/docker/dozzle/user.yml
- Fill the file with these:
users: # "admin" here is username admin: name: "Admin" # the hashed password you got from step 1 password: "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8" email: [email protected]
- Modify your docker compose with additional volume mapping and environment:
version: '3.3' services: dozzle: ... volumes: - '/var/run/docker.sock:/var/run/docker.sock' - ${YOUR_DOZZLE_PATH}:/data environment: - DOZZLE_AUTH_PROVIDER: simple ...
One dozzle for multiple docker instances
- Create a dozzle agent on the other device with this compose:
services: dozzle-agent: image: amir20/dozzle:latest command: agent volumes: - /var/run/docker.sock:/var/run/docker.sock:ro ports: - ${YOUR_AGENT_PORT}:7007
- Modify your main dozzle docker compose:
version: '3.3' services: dozzle: ... environment: - DOZZLE_REMOTE_AGENT=${OTHER_DEVICE_IP}:${YOUR_AGENT_PORT} ...
Healthcheck
- Dozzle has internal support for healthcheck using dozzle healthcheck command. It is not enabled by default as it adds extra CPU usage.
- Modify your docker compose:
version: '3.3' services: dozzle: ... healthcheck: test: ["CMD", "/dozzle", "healthcheck"] interval: 3s timeout: 30s retries: 5 start_period: 30s ...
How to open Dozzle
- Open your web browser
- Go to
http://your-device-ip:your-dozzle-port
i.e. http://192.168.1.1:20030
How to update Dozzle
- In
Portainer
click onStacks
then click on yourDozzle
stack - Click
Update the stack
, toggle onRe-pull image and redeploy
then clickUpdate