Dozzle Log Viewer on AlmaLinux 9 (Docker + Nginx + SSL)

Dozzle is a lightweight, real-time log viewer for Docker containers. Instead of manually tailing logs with docker logs -f, Dozzle provides a clean web-based dashboard where you can stream and filter logs from all your containers instantly. It runs as a single Docker container, requires no database, and is designed for developers and sysadmins who need quick insights without deploying a full logging stack.

AlmaLinux 9 is a stable, enterprise-grade distribution that serves as a 1:1 RHEL (Red Hat Enterprise Linux) binary-compatible alternative. It’s widely used in production environments, providing long-term support, SELinux enforcement, and enterprise security updates. Combined with Dozzle, AlmaLinux 9 gives you a reliable, secure platform for managing container logs.


Architecture Overview

LayerComponentRole
OSAlmaLinux 9Enterprise-grade RHEL-compatible base; systemd service management
RuntimeDocker EngineRuns Dozzle container in isolation
ApplicationDozzleWeb UI for real-time Docker logs
Reverse ProxyNginx (optional)TLS termination, HTTP/2, compression, and access control
TLSLet’s Encrypt / PKISecure HTTPS access to the log viewer

Why Use Dozzle?

  • Simple deployment – one container, no database, no extra services.
  • Real-time visibility – instantly stream logs from multiple containers.
  • Low resource usage – much lighter than ELK or Loki.
  • User-friendly – accessible web interface, no SSH required.
  • Flexible – can run standalone or alongside enterprise observability stacks.

Dozzle vs Other Logging Tools

Feature/CapabilityDozzleLoki + GrafanaELK/EFK StackDocker CLI
Setup complexityVery low (1 container)Medium (multi-service)High (Elasticsearch, Beats, Kibana)None
Log storageNo (stream only)Yes (time-series DB)Yes (Elasticsearch DB)No
User interfaceBuilt-in Web UIGrafana dashboardsFull dashboardsNone (terminal)
Best use caseQuick log accessCentralized loggingEnterprise-scale loggingDebug only

Dozzle is the right choice when you need live logs at a glance, without the complexity of heavy log management systems. For long-term log storage or analytics, it complements centralized solutions like Loki or ELK.


Security & Best Practices

  • Run Dozzle behind Nginx with HTTPS in production.
  • Add basic authentication or integrate SSO/OAuth if accessed publicly.
  • Limit access with firewall rules and SELinux policies.
  • Keep Dozzle updated (amir20/dozzle:latest).
  • Combine with Prometheus/Grafana for a full observability stack.

Typical Use Cases

  • Local or staging environments for quick debugging.
  • Small production servers where ELK or Loki are overkill.
  • Real-time log streaming for CI/CD pipelines or microservices.
  • Complementing centralized logging with fast, live visibility.

1. Create a Shape.Host VPS Instance

Go to https://shape.host and log in.

Click “Create” → “Instance”.

Shape.host Resources dashboard with Create > Instance highlighted.

Select the server location closest to your users.

Shape.host instance form with the data center location selector highlighted.

Choose AlmaLinux 9 (64-bit) as the OS.

Pick a plan with at least 2 CPUs, 4 GB RAM, and 20 GB SSD.

Shape.host instance form with the operating system image selector highlighted.

Click “Create Instance”.

Shape.host instance form with the Create Instance button highlighted.

Copy the IP address of your instance from the Resources section.

Shape.host Resources dashboard with the server IP address highlighted.

2. Connect to Your VPS

On Linux/macOS

ssh root@your-server-ip

On Windows

  • If using PowerShell on Windows 10/11: ssh root@your-server-ip
  • On older Windows, use PuTTY and log in as root with your server’s IP.

3. Update the System and Install Required Tools

dnf update

Updates all system packages.

Terminal showing DNF/YUM package management commands and output.
dnf install yum-utils device-mapper-persistent-data lvm2 curl wget

Installs required tools for managing repositories and storage.

Terminal showing DNF/YUM package management commands and output.

4. Install Docker and Docker Compose

Add the official Docker repository:

dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Install Docker and related components:

dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Terminal showing DNF/YUM package management commands and output.

Enable and start Docker:

systemctl enable --now docker

Check versions:

docker --version
docker compose version
Terminal showing systemd service management commands or output.

5. Deploy Dozzle with Docker Compose

Create a directory for Dozzle:

mkdir -p /opt/dozzle
cd /opt/dozzle

Create the docker-compose.yml file:

cat > /opt/dozzle/docker-compose.yml <<'YML'
services:
  dozzle:
    image: amir20/dozzle:latest
    container_name: dozzle
    ports:
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    healthcheck:
      test: ["CMD", "wget", "-qO-", "http://localhost:8080/health"]
      interval: 15s
      timeout: 3s
      retries: 5
    restart: unless-stopped
YML
Terminal showing file and directory setup commands.

Remove old Dozzle container if it exists:

docker rm -f dozzle 2>/dev/null || true

Start Dozzle:

docker compose up -d

Check running containers:

docker compose ps
Terminal showing container image download progress.

View logs:

docker logs dozzle --tail=50

Verify Dozzle health:

curl -s http://127.0.0.1:8080/health
Terminal showing hostname configuration or system identification details.

6. Configure Nginx as Reverse Proxy

Install Nginx:

dnf install nginx
Terminal showing DNF/YUM package management commands and output.

Enable and start Nginx:

systemctl enable --now nginx

Create the Dozzle configuration:

cat > /etc/nginx/conf.d/dozzle.conf <<'NGINX'
server {
    listen 80;
    server_name your-domain.com;

    # Optional Basic Auth (see 4.4)
    # auth_basic "Restricted";
    # auth_basic_user_file /etc/nginx/.htpasswd;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
NGINX

Test and reload Nginx:

nginx -t && systemctl reload nginx
Terminal showing systemd service management commands or output.

7. Enable SSL with Let’s Encrypt

Install Certbot:

dnf install certbot python3-certbot-nginx
Terminal showing DNF/YUM package management commands and output.

Run Certbot to obtain SSL:

certbot --nginx -d your-domain.com
Terminal showing Certbot certificate commands and messages.

8. Access Dozzle

Open your browser and visit:

https://your-domain.com

You should see the Dozzle web UI, showing real-time Docker logs. 🎉

Dozzle container monitoring screen.

This tutorial was tested on a Shape.Host Linux SSD VPS.

With Shape.Host, you can:

  • Deploy fast Cloud VPS globally
  • Run Linux distributions like AlmaLinux, Debian, Ubuntu, and Rocky Linux
  • Scale resources instantly (CPU, RAM, Storage)
  • Use backups, snapshots, and monitoring for reliability

Start your project today with Shape.Host and set up Dozzle in minutes.