Skip to content

Linux Server Dashboard is a lightweight, responsive monitoring tool built with Python (Flask) and Docker. It displays real-time system info such as hostname, OS, uptime, CPU, memory, and processes through a clean web interface. Ideal for personal servers or remote Linux machines, it provides an easy way to view system health from any browser.

Notifications You must be signed in to change notification settings

Ravindulakmina/Linux-monitor-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


README.md

Linux Monitor Dashboard

A simple dashboard to monitor Linux system resources using Flask.

🔍 Screenshot

Linux Monitor Dashboard

🖥️ Linux System Monitor Dashboard

A beautiful, responsive system dashboard to monitor your Linux server's performance in real-time — built with HTML, Tailwind CSS, Chart.js, and a Flask backend. It supports standalone mode or can be deployed easily using Docker.


📌 Project Overview

This lightweight dashboard displays real-time server statistics:

  • ✅ CPU Usage
  • ✅ Memory Usage
  • ✅ Disk Usage
  • ✅ Uptime, OS info, Process count
  • ✅ Temperature (if available)

Built for Linux systems, and perfect for both local monitoring or deploying on a remote server.


📂 Project Structure


└── 📁linux-monitor-dashboard
    └── 📁backend
        ├── app.py                # Flask API
        ├── requirements.txt      # Python dependencies
    └── 📁frontend
        ├── index.html            # Dashboard UI
        ├── script.js             # Chart rendering + API fetching
        ├── style.css             # Optional extra styles (or Tailwind via CDN)
    ├── .DS_Store
    ├── docker-compose.yml        # Optional for multi-container setup
    └── Dockerfile                # Multi-stage Docker build
    └── README.md

📥 Clone the Repository

git clone https://github.com/Ravindulakmina/Linux-monitor-dashboard.git
cd linux-monitor-dashboard

⚙️ Run Locally (Without Docker)

🧠 Backend Setup (Flask API)

# Go to the backend folder
cd backend

# Create virtual environment (Mac/Linux)
python3 -m venv venv

# Activate it
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run the Flask app
python app.py

Flask server will run on http://localhost:5000 or similar.


🎨 Frontend Setup (HTML + JS)

In a new terminal tab/window:

cd frontend

# Run simple HTTP server (Python 3)
python3 -m http.server 8080

Open browser at: http://localhost:8080


🐳 Run with Docker (Recommended)

Make sure Docker is installed on your system.

Step 1: Build Docker Image

docker build -t linux-dashboard .

Step 2: Run the Container

docker run -d -p 5000:5000 --name dashboard linux-dashboard

Step 3: Serve Frontend Separately (Optional)

cd frontend
python3 -m http.server 8080

Now open: ➡️ http://localhost:8080 → Loads HTML ➡️ HTML fetches stats from: http://localhost:5000/api/stats


🚀 Deploy on Remote Linux Server with Docker

  1. SSH into your server.
  2. Clone this repository or upload project files.
  3. Run the following:
docker build -t linux-dashboard .
docker run -d -p 5000:5000 --name dashboard linux-dashboard
  1. Allow the firewall port:
sudo ufw allow 5000
  1. Serve the frontend (index.html) via NGINX, Apache or Python HTTP server:
cd frontend
python3 -m http.server 80
  1. Access via browser:
http://<your-server-ip>/

Make sure script.js points to your Flask API:

const res = await fetch('http://<your-server-ip>:5000/api/stats');

🧾 requirements.txt

Save this file under /backend/requirements.txt

flask
psutil
flask-cors

Install with:

pip install -r requirements.txt

🌐 Example Usage

Once everything is running:

  • Flask API: http://localhost:5000/api/stats
  • Frontend: http://localhost:8080 (locally)
  • Remote: http://<server-ip>

🧑‍💻 Author


📃 License

This project is licensed under the MIT License.


🙏 Feedback

Found a bug? Have an idea? Feel free to open an issue or contribute via pull request!


---

🎁 **Extra Tips**:

- Want to bundle frontend + backend in a single Docker container? I can update the Dockerfile and give you `nginx + flask` in one container.
- If you deploy on a VPS, ensure ports `80` (frontend) and `5000` (backend API) are open.


About

Linux Server Dashboard is a lightweight, responsive monitoring tool built with Python (Flask) and Docker. It displays real-time system info such as hostname, OS, uptime, CPU, memory, and processes through a clean web interface. Ideal for personal servers or remote Linux machines, it provides an easy way to view system health from any browser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published