Dozzle

A lightweight real-time log viewer to monitor Docker logs.

Access

  • Visit the web interface: https://<IP> (replace IP with your server’s IP address)
  • Accept SSL warning (self-signed certificate).
  • Log in using credentials from /root/.cloudzy-creds

Environment & Configuration

  • Admin authentication is enabled using the simple provider.
  • User definitions are stored in /root/dozzle/data/users.yml
  • Passwords are stored as bcrypt hashes.
  • User roles: all, shell, actions, download, none (default: all).
  • Docker socket is mounted read/write: /var/run/docker.sock

Adding a New User

1. Generate bcrypt user:

docker run -it --rm amir20/dozzle generate <username> 
  --password <password> --email <email> --name "<Full Name>" 
  --user-roles <roles> --user-filter "<filter>"

2. Backup users.yml:

cp /root/dozzle/data/users.yml /root/dozzle/data/users.yml.bak

3. Append only the user entry under the existing users: block in users.yml — do not repeat users.

4. Validate YAML syntax to ensure the file is correct.

Important Files & Directories

  • Application installation: /root/dozzle
  • Docker Compose file: /root/dozzle/docker-compose.yml
  • Dozzle user database: /root/dozzle/data/users.yml
  • Stored credentials: /root/.cloudzy-creds

Service Management

List containers:

docker ps

Start or recreate services:

docker compose -f /root/dozzle/docker-compose.yml up -d

Restart Dozzle:

docker compose -f /root/dozzle/docker-compose.yml restart

Follow logs:

docker compose -f /root/dozzle/docker-compose.yml logs -f

Restart Nginx:

systemctl restart nginx

Enabling SSL with a Domain

1. Point your domain to the server IP.

2. Edit Nginx config and replace both server_name <IP>; with your domain (<your-domain>) for both HTTP (port 80) and HTTPS (port 443) blocks:

vim /etc/nginx/sites-available/dozzle

3. Install Certbot:

apt install -y certbot python3-certbot-nginx

4. Run the following command to generate a valid Let’s Encrypt certificate:

certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com

5. Replace SSL paths in Nginx config:

vim /etc/apache2/sites-available/dozzle
# Before:
    # ssl_certificate /etc/nginx/ssl/fullchain.pem;
    # ssl_certificate_key /etc/nginx/ssl/privkey.pem;
# After:
    # ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
    # ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;

6. Restart Nginx to apply the changes:

systemctl restart nginx

7. Open your browser and visit: https://yourdomain.com

Application Details