How To Install Dozzle on Ubuntu 24.04 LTS
Managing Docker container logs can become overwhelming, especially when dealing with multiple containers in production environments. Traditional log monitoring methods involve complex setups, expensive solutions, or time-consuming manual processes. Dozzle emerges as a game-changing solution that transforms Docker log management into a seamless, real-time experience through an intuitive web interface.
Understanding Dozzle: Features and Benefits
Dozzle revolutionizes Docker container log monitoring by providing a real-time, web-based interface that eliminates the complexity of traditional logging solutions. This innovative tool operates as a read-only log viewer, meaning it doesn’t store logs permanently, making it incredibly lightweight and secure for production environments.
Core Features Overview
The application excels in real-time log streaming, allowing administrators to monitor multiple containers simultaneously without performance degradation. Its intelligent search functionality supports both simple text queries and complex regex patterns, enabling precise log filtering for specific events or error patterns. The fuzzy search capability helps locate containers quickly, even with partial name matches.
Dozzle’s split-screen functionality stands out as a particularly valuable feature for DevOps teams managing microservices architectures. Users can monitor multiple container logs side-by-side, making it easier to trace requests across distributed systems or compare different service behaviors during troubleshooting sessions.
Advanced Capabilities
Beyond basic log viewing, Dozzle offers sophisticated features for enterprise environments. The SQL query support allows complex log analysis using familiar database syntax, while the statistics dashboard provides real-time CPU and memory usage metrics for monitored containers.
Authentication mechanisms include simple file-based user management and proxy forward authorization, making it suitable for team environments with role-based access requirements. The multi-host monitoring capability through agent mode extends Dozzle’s reach across Docker Swarm clusters or multiple Docker hosts, providing centralized log management for distributed infrastructures.
Prerequisites and System Requirements
Before installing Dozzle on Ubuntu 24.04 LTS, ensure your system meets the necessary requirements for optimal performance and compatibility.
Ubuntu 24.04 LTS System Requirements
Your Ubuntu 24.04 LTS system should have at least 1GB of available RAM and 2GB of free disk space. While Dozzle itself consumes minimal resources, adequate system memory ensures smooth operation when monitoring multiple containers with high log volumes. A stable network connection is essential for downloading Docker images and accessing the web interface.
Root or sudo privileges are mandatory for Docker installation and container management operations. Verify your user account has appropriate permissions by running sudo -v
in the terminal.
Docker Engine Prerequisites
Dozzle requires Docker Engine version 17.12.0 or later for full compatibility. The application supports both x86_64 and ARM64 architectures, making it suitable for various hardware configurations including Raspberry Pi deployments. Ensure your Docker daemon is properly configured and running before proceeding with Dozzle installation.
Port and Firewall Considerations
Dozzle’s default web interface operates on port 8080, though this can be customized during installation. Verify this port is available and not conflicting with existing services. If your system uses UFW (Uncomplicated Firewall) or iptables, prepare to configure appropriate rules for web interface access.
Installing Docker Engine on Ubuntu 24.04 LTS
Docker Engine forms the foundation for running Dozzle containers. Follow these detailed steps to install Docker on your Ubuntu 24.04 LTS system.
Dependency Installation
Begin by updating your package repository and installing essential dependencies:
sudo apt update
sudo apt install ca-certificates curl gnupg lsb-release -y
These packages provide SSL certificate validation, HTTP client functionality, GPG key management, and Linux Standard Base information required for Docker repository configuration.
Docker Repository Setup
Add Docker’s official GPG key to ensure package authenticity:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg
Configure the Docker APT repository for Ubuntu 24.04 LTS:
echo "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
This command automatically detects your system architecture and Ubuntu codename, ensuring correct repository configuration.
Docker Engine Installation Process
Update the package index and install Docker Engine components:
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
The installation includes Docker Community Edition, command-line interface, container runtime, and additional plugins for enhanced functionality.
Docker Service Configuration
Enable Docker service for automatic startup:
sudo systemctl enable docker
sudo systemctl start docker
Verify the installation by checking Docker version and running a test container:
docker --version
sudo docker run hello-world
Optionally, add your user to the docker group to run Docker commands without sudo:
sudo usermod -aG docker $USER
newgrp docker
Installing Dozzle Using Docker CLI
The Docker CLI method provides the quickest way to deploy Dozzle with minimal configuration requirements.
Basic Installation Command
Execute the following command to install and run Dozzle:
docker run --name dozzle -d \
--volume=/var/run/docker.sock:/var/run/docker.sock \
-p 8888:8080 amir20/dozzle:latest
This command creates a detached container named “dozzle” that mounts the Docker socket for container discovery and maps the internal port 8080 to external port 8888.
The volume mount /var/run/docker.sock:/var/run/docker.sock
is crucial as it provides Dozzle read access to Docker daemon information without requiring elevated privileges within the container.
Enhanced Installation with Restart Policy
For production environments, implement automatic container restart capabilities:
docker run --name dozzle -d \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--restart always \
-p 8888:8080 amir20/dozzle:latest
The --restart always
flag ensures Dozzle automatically restarts after system reboots or container failures, providing consistent log monitoring availability.
Command Verification Steps
Confirm successful installation by checking the downloaded image:
docker images
Verify the running container:
docker ps
Check port binding and network listening status:
ss -altnp | grep 8888
You should see output indicating Dozzle is listening on port 8888.
Alternative Installation Options
For networks with Docker Hub restrictions, use GitHub Container Registry:
docker run --name dozzle -d \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--restart always \
-p 8888:8080 ghcr.io/amir20/dozzle:latest
This alternative source ensures availability in restricted network environments.
Installing Dozzle Using Docker Compose
Docker Compose provides a more structured approach for Dozzle deployment, especially beneficial for complex configurations or integration with existing container orchestration setups.
Docker Compose File Creation
Create a docker-compose.yml
file in your preferred directory:
version: '3.8'
services:
dozzle:
image: amir20/dozzle:latest
container_name: dozzle
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- "8888:8080"
restart: unless-stopped
environment:
- DOZZLE_NO_ANALYTICS=true
The read-only mount (:ro
) enhances security by preventing write access to the Docker socket.
Environment Variables Configuration
Enhance your Docker Compose configuration with advanced features:
version: '3.8'
services:
dozzle:
image: amir20/dozzle:latest
container_name: dozzle
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- "8888:8080"
restart: unless-stopped
environment:
- DOZZLE_NO_ANALYTICS=true
- DOZZLE_ENABLE_ACTIONS=true
- DOZZLE_ENABLE_SHELL=true
- DOZZLE_AUTH_PROVIDER=simple
These environment variables enable container control actions, shell access, and simple authentication respectively.
Deployment Process
Deploy Dozzle using Docker Compose:
docker-compose up -d
Monitor the deployment process:
docker-compose logs -f dozzle
Verify service status:
docker-compose ps
Accessing and Configuring Dozzle Web Interface
Once Dozzle is running successfully, access the web interface to begin monitoring your Docker container logs.
Initial Web Access
Open your web browser and navigate to http://your-server-ip:8888
. Replace “your-server-ip” with your Ubuntu server’s IP address. For local installations, use http://localhost:8888
.