Skip to content

ykrishhh/HarryPanel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HarryPanel

Self-Hosted Server Management Panel β€” Deploy, Monitor & Manage Infrastructure

Status Language Framework License Stars Forks Issues


🎯 Overview

HarryPanel is a lightweight, self-hosted server management dashboard built for developers and sysadmins who want full control over their infrastructure without the bloat of enterprise solutions. Deploy applications, monitor system health, manage services, and execute commands β€” all from a clean, terminal-inspired web interface.


πŸ—οΈ Architecture

graph TB
    subgraph "Frontend"
        UI[Dashboard UI]
        WS[WebSocket Client]
        TERM[Terminal Emulator]
    end

    subgraph "Backend (Flask)"
        API[REST API]
        AUTH[JWT Auth]
        PROC[Process Manager]
        MON[System Monitor]
        DEPLOY[Deployment Engine]
        WS_SRV[WebSocket Server]
    end

    subgraph "System Layer"
        SYSTEMD[systemd]
        DOCKER[Docker Engine]
        NGINX[Nginx]
        LOGS[Log Files]
        METRICS[/proc, /sys, psutil]
    end

    UI --> API
    UI --> WS
    TERM --> WS_SRV
    API --> AUTH
    API --> PROC
    API --> MON
    API --> DEPLOY
    WS_SRV --> PROC
    PROC --> SYSTEMD
    PROC --> DOCKER
    MON --> METRICS
    DEPLOY --> NGINX
    DEPLOY --> SYSTEMD
Loading

πŸš€ Features

πŸ“Š System Monitoring

Feature Description
Real-time CPU/RAM/Disk Live charts with WebSocket updates
Process List Searchable, sortable, kill/restart actions
Network I/O Per-interface bandwidth, connections
Temperature Sensors lm-sensors integration
Service Status systemd unit monitoring & control

🚒 Deployment Management

Feature Description
Git-based Deploys Pull, build, deploy from any git repo
Docker Support Compose up/down, image management
Static Sites One-click Hugo, Jekyll, Next.js exports
Nginx Config Auto-generate & manage vhosts
SSL/TLS Let's Encrypt integration (certbot)
Rollbacks One-click previous version restore

πŸ–₯️ Remote Terminal

  • Full PTY-based terminal in browser (xterm.js)
  • Multiple concurrent sessions
  • Command history & autocomplete
  • Copy/paste support

πŸ” Security

  • JWT-based authentication
  • Rate limiting on auth endpoints
  • Optional 2FA (TOTP)
  • Audit logging for all actions
  • IP allowlist support

⚑ Quick Start

Requirements

  • Linux server (Ubuntu 20.04+, Debian 11+, RHEL 8+)
  • Python 3.10+
  • systemd (for service management)
  • Docker (optional, for container deployments)
  • Nginx (for reverse proxy)

Installation

# Clone repository
git clone https://github.com/ykrishhh/HarryPanel.git
cd HarryPanel

# Create virtual environment
python -m venv venv && source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Initialize database
flask --app harrypanel db upgrade

# Create admin user
flask --app harrypanel create-admin --username admin --email admin@example.com

Configuration

# Copy config template
cp config.example.yaml config.yaml

# Edit configuration
# β”œβ”€β”€ secret_key: "your-secret-key"
# β”œβ”€β”€ database_url: "sqlite:///harrypanel.db"
# β”œβ”€β”€ jwt_expiry_hours: 24
# β”œβ”€β”€ allow_registration: false
# β”œβ”€β”€ ssh_key_path: "/home/user/.ssh/id_rsa"
# └── nginx_sites_path: "/etc/nginx/sites-available"

Running

# Development
flask --app harrypanel run --host 0.0.0.0 --port 5000

# Production (with gunicorn)
gunicorn -w 4 -b 0.0.0.0:5000 "harrypanel:create_app()"

# As systemd service
sudo cp harrypanel.service /etc/systemd/system/
sudo systemctl enable --now harrypanel

Nginx Reverse Proxy

server {
    listen 80;
    server_name panel.yourdomain.com;

    location / {
        proxy_pass http://127.0.0.1:5000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

πŸ“ Project Structure

HarryPanel/
β”œβ”€β”€ harrypanel/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ create_app.py           # Flask app factory
β”‚   β”œβ”€β”€ config.py               # Configuration
β”‚   β”œβ”€β”€ extensions.py           # SQLAlchemy, JWT, SocketIO
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ user.py             # User model
β”‚   β”‚   β”œβ”€β”€ server.py           # Server/host model
β”‚   β”‚   β”œβ”€β”€ deployment.py       # Deployment model
β”‚   β”‚   └── audit.py            # Audit log model
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ auth.py             # Login, register, 2FA
β”‚   β”‚   β”œβ”€β”€ servers.py          # Server CRUD
β”‚   β”‚   β”œβ”€β”€ deployments.py      # Deployment management
β”‚   β”‚   β”œβ”€β”€ monitoring.py       # Metrics endpoints
β”‚   β”‚   └── terminal.py         # WebSocket terminal
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ systemd.py          # systemd integration
β”‚   β”‚   β”œβ”€β”€ docker.py           # Docker API wrapper
β”‚   β”‚   β”œβ”€β”€ nginx.py            # Nginx config generator
β”‚   β”‚   β”œβ”€β”€ git.py              # Git operations
β”‚   β”‚   β”œβ”€β”€ ssl.py              # Let's Encrypt / certbot
β”‚   β”‚   └── monitor.py          # psutil-based metrics
β”‚   β”œβ”€β”€ cli/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ admin.py            # Admin commands
β”‚   β”‚   └── db.py               # Database commands
β”‚   β”œβ”€β”€ templates/
β”‚   β”‚   β”œβ”€β”€ base.html
β”‚   β”‚   β”œβ”€β”€ dashboard.html
β”‚   β”‚   β”œβ”€β”€ servers.html
β”‚   β”‚   β”œβ”€β”€ deployments.html
β”‚   β”‚   β”œβ”€β”€ terminal.html
β”‚   β”‚   └── auth/
β”‚   β”‚       β”œβ”€β”€ login.html
β”‚   β”‚       └── register.html
β”‚   └── static/
β”‚       β”œβ”€β”€ css/
β”‚       β”‚   └── main.css        # Terminal-inspired theme
β”‚       β”œβ”€β”€ js/
β”‚       β”‚   β”œβ”€β”€ app.js          # Alpine.js app
β”‚       β”‚   β”œβ”€β”€ terminal.js     # xterm.js integration
β”‚       β”‚   └── charts.js       # Chart.js dashboards
β”‚       └── fonts/
β”œβ”€β”€ migrations/                 # Alembic migrations
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ unit/
β”‚   └── integration/
β”œβ”€β”€ harrypanel.service          # systemd unit
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ config.example.yaml
β”œβ”€β”€ LICENSE
└── README.md

πŸ› οΈ Tech Stack

Layer Technology
Backend Flask 3.x, SQLAlchemy 2.x, Flask-SocketIO
Auth PyJWT, pyotp (TOTP), bcrypt
System psutil, docker-py, python-systemd
Git GitPython
Frontend Alpine.js, xterm.js, Chart.js, Tailwind CSS
Database SQLite (dev), PostgreSQL (prod)
Process gunicorn, systemd

πŸ—ΊοΈ Roadmap

  • v0.5 Multi-server management (agent-based)
  • v0.6 Kubernetes deployment support
  • v0.7 Database management (PostgreSQL, MySQL, Redis)
  • v0.8 Backup/restore scheduling
  • v0.9 Plugin system for custom modules
  • v1.0 Stable release with full documentation

🀝 Contributing

See CONTRIBUTING.md for guidelines.


πŸ“„ License

MIT License β€” see LICENSE for details.


Made with ❀️ by Krish | Portfolio | Twitter

About

Web hosting control panel: server management, database admin, file manager, and deployment tools

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages