Skip to content

MNDL-27/docker-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🚒 Docker Dashboard

GitHub stars GitHub forks GitHub watchers

Contributors

A fully containerized web app to monitor, manage, and view live stats/logs for all your Docker containers.
100% Docker-based | No local dependencies | Linux optimized

Docker Linux License Last Commit


✨ Features

  • πŸ“Š Live Monitoring: Real-time CPU, RAM, Network, and Disk usage with interactive charts
  • πŸ“‘ Bandwidth Tracking: Monitor total data downloaded/uploaded by each container
  • πŸ”— qBittorrent Integration: Accurate bandwidth tracking for VPN-bound qBittorrent containers
  • ⏱️ Time Range Controls: View bandwidth stats for Last 24h, Week, Month, or All Time
  • πŸ“ Log Streaming: View live container logs with WebSocket streaming
  • πŸŽ›οΈ Container Management: Start, stop, and restart containers with one click
  • 🎨 Modern UI: Ultra-modern glass-morphism design with animated gradients
  • πŸ” Authentication: Optional login system with bcrypt password hashing
  • 🐳 Portainer Integration: Use Portainer as a gateway for multi-host support
  • πŸ“¦ Fully Containerized: No Node.js, npm, or any local dependencies required
  • 🐧 Linux Optimized: Designed and tested for Linux servers

πŸ“Έ Screenshots

Dashboard Overview

Dashboard Overview Monitor all your containers at a glance with real-time stats

Container Details & Live Charts

Container Details Detailed metrics with interactive charts and live updates

CPU Usage Breakdown

CPU Breakdown See which containers are using the most CPU

Data Usage Analytics

Data Usage Track download and upload for each container


πŸš€ Quick Start (Docker Only)

# Clone the repository
git clone https://github.com/MNDL-27/docker-dashboard.git
cd docker-dashboard

# Copy the example compose file
cp docker-compose.example.yml docker-compose.yml

# Edit docker-compose.yml if needed (optional authentication, port changes, etc.)
nano docker-compose.yml

# Build and start
docker compose up -d --build

That's it! πŸŽ‰ Access the dashboard at http://localhost:3002


βš™οΈ Configuration

Authentication (Optional)

By default, authentication is disabled. To enable it:

  1. Set AUTH_ENABLED=true in docker-compose.yml
  2. Add user credentials:
    environment:
      - AUTH_ENABLED=true
      - AUTH_USER=admin
      - AUTH_PASSWORD=yourpassword
  3. Restart: docker compose restart dashboard

qBittorrent Integration

For accurate bandwidth tracking of VPN-bound qBittorrent containers:

  1. Ensure your qBittorrent WebUI is accessible from the Dashboard container
  2. Add these environment variables to docker-compose.yml:
    environment:
      - QBITTORRENT_URL=http://qbittorrent:8080
      - QBITTORRENT_USERNAME=admin
      - QBITTORRENT_PASSWORD=adminpass
  3. Restart: docker compose restart dashboard

Portainer Integration (Optional)

To manage containers across multiple Docker hosts:

  1. Ensure you have Portainer running
  2. Add these environment variables:
    environment:
      - PORTAINER_ENABLED=true
      - PORTAINER_URL=http://portainer:9000
      - PORTAINER_API_KEY=your_api_key
  3. Restart: docker compose restart dashboard

πŸ› οΈ How It Works

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Docker Dashboard Container       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚     Node.js Backend (Express)    β”‚    β”‚
β”‚  β”‚  - WebSocket for live updates    β”‚    β”‚
β”‚  β”‚  - Docker API integration        β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚     Frontend (HTML/CSS/JS)       β”‚    β”‚
β”‚  β”‚  - Chart.js for visualizations   β”‚    β”‚
β”‚  β”‚  - Modern glass-morphism UI      β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         ↓ Docker Socket (Mounted)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          Host Docker Daemon              β”‚
β”‚    (monitors all containers)             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Collection

  1. Container Stats: Fetched via Docker API using /var/run/docker.sock
  2. Network Bandwidth: Calculated from container network interface stats
  3. qBittorrent Stats: Retrieved from qBittorrent WebUI API (if configured)
  4. Real-time Updates: Pushed to frontend via WebSocket every second

πŸ“‹ Requirements

  • 🐳 Docker with Compose V2
  • 🐧 Linux host (Ubuntu, Debian, etc.)
  • πŸ’Ύ 50MB disk space
  • πŸ”Œ Port 3002 available (or customizable)

Note: This dashboard is designed for Linux servers. Some features may not work correctly on macOS or Windows due to Docker networking differences.


πŸ”§ Advanced Usage

Custom Port

Edit docker-compose.yml:

ports:
  - "8080:3002"  # Access at localhost:8080

Data Persistence

Bandwidth stats are stored in /app/data/bandwidth.db (SQLite). Mount a volume to persist data:

volumes:
  - ./data:/app/data
  - /var/run/docker.sock:/var/run/docker.sock:ro

Reverse Proxy (Nginx/Caddy)

For WebSocket support, ensure your proxy passes upgrade headers:

Nginx:

location / {
    proxy_pass http://localhost:3002;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

Caddy:

dashboard.example.com {
    reverse_proxy localhost:3002
}

πŸ› Troubleshooting

Container stats not updating

  • Ensure /var/run/docker.sock is mounted correctly
  • Check container logs: docker compose logs dashboard

qBittorrent stats not showing

  • Verify WebUI is accessible from the Dashboard container
  • Test: docker exec dashboard curl http://qbittorrent:8080
  • Check credentials in environment variables

WebSocket connection fails

  • If behind a reverse proxy, ensure WebSocket upgrade headers are passed
  • Check firewall rules

πŸ“š Project Structure

docker-dashboard/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ server.js           # Main Express server
β”‚   β”œβ”€β”€ public/             # Frontend files
β”‚   β”‚   β”œβ”€β”€ index.html
β”‚   β”‚   β”œβ”€β”€ styles.css
β”‚   β”‚   └── script.js
β”‚   └── utils/
β”‚       β”œβ”€β”€ dockerStats.js  # Docker API wrapper
β”‚       └── bandwidthDB.js  # SQLite database handler
β”œβ”€β”€ docker-compose.example.yml
β”œβ”€β”€ Dockerfile
└── README.md

πŸ“¦ Related Files


πŸ™Œ Contributing

Contributions are welcome! We'd love your help to make Docker Dashboard even better.

How to Contribute

Getting Started

  1. Fork the repository
  2. Read our Contributing Guide
  3. Create a feature branch
  4. Make your changes
  5. Test thoroughly
  6. Submit a pull request

Please read CONTRIBUTING.md for detailed guidelines.


πŸ“„ License

This project is licensed under the Apache 2.0 License with Commons Clause.

  • βœ… Free to use for personal and educational purposes
  • βœ… Open source - view, modify, and contribute to the code
  • βœ… Share and redistribute with proper attribution
  • ❌ Cannot be sold or offered as a commercial service

What is Commons Clause?
Commons Clause prevents companies from selling this software as a product or service without contributing back. You can use it freely, but you cannot monetize it commercially.

See LICENSE for full details.


Made with ❀️ for the Docker community

⭐ Star this repo β€’ πŸ› Report Bug β€’ πŸ’‘ Request Feature