Secure your Docker container logs with password-protected access using Dozzle.
Protect your container logs with password authentication using Dozzle. This inline Docker Compose configuration requires no external files or volume mounts.
Generate Authentication CredentialsOn your local machine, generate a Dozzle user configuration with escaped dollar signs for Docker Compose:
docker run --rm amir20/dozzle generate \ --name "Admin Name" \ --email admin@example.com \ --password secret \ admin | sed 's/\$/\$\$/g'
This creates login credentials (username: admin, password: secret) with automatic $ escaping for Docker Compose. The output is ready to paste directly into your configuration.
Configure Dozzle in Docker ComposeCopy the output from step 1 and paste it into your docker-compose.yml:
Replace {app-id} with your App ID and {node-name} with your deployment target. You can also find the endpoint in your CVM’s View Details > Network > Endpoint section.Log in with the secrets (or whatever you set in step 1):
Username:admin
Password:secret
Only authorized users with valid credentials can view your container logs.
For production environments with advanced requirements, consider using the Loki and Grafana stack for centralized log aggregation, querying, and visualization.