Skip to content
View K2Panel's full-sized avatar
  • K2Panel
  • Joined Oct 2, 2025

Block or report K2Panel

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 250 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this userโ€™s behavior. Learn more about reporting abuse.

Report abuse
K2Panel/README.md
K2Panel - Manage Servers Like A Pro

K2Panel

๐Ÿš€ MANAGE SERVERS LIKE A PRO

GitHub Actions Docker Security Python

Powerful server management panel with automated deployment, monitoring, and enterprise-grade security

Quick Start โ€ข Documentation โ€ข Features โ€ข Deployment



๐ŸŒŸ Overview

K2Panel is a comprehensive server management solution designed for professional server administration with enterprise-grade features.

๐Ÿ”ง Development

  • Fast testing and iteration
  • Replit environment support
  • Quick prototyping
  • Debug-friendly setup

๐Ÿš€ Production

  • High availability deployment
  • VPS/Cloud infrastructure
  • Auto-scaling ready
  • 99.9%+ uptime target

โœจ Key Features

๐Ÿ”„ CI/CD Pipeline

  • Automated deployments
  • GitHub Actions workflows
  • Pre-deployment validation
  • Rollback mechanisms

๐Ÿ” Security First

  • MITM attack prevention
  • SSH fingerprint verification
  • Secrets management
  • Security hardening guides

๐Ÿ“Š Monitoring

  • Real-time metrics
  • Prometheus & Grafana
  • Centralized logging
  • Smart alerts

๐ŸŽฏ Zero Downtime

  • Blue-Green deployment
  • Health checks
  • Automatic rollback
  • Traffic switching

๐Ÿ’พ Backup & Recovery

  • Automated backups
  • Integrity verification
  • Point-in-time recovery
  • Disaster recovery

๐Ÿšข Docker Ready

  • Containerized deployment
  • Docker Compose support
  • Image optimization
  • Multi-stage builds

๐Ÿš€ Quick Start

ุนู„ู‰ Replit (ู„ู„ุชุทูˆูŠุฑ)

  1. Fork ุงู„ู…ุดุฑูˆุน ุนู„ู‰ Replit
  2. ุงุถุบุท Run - ูŠุจุฏุฃ ุชู„ู‚ุงุฆูŠุงู‹
  3. ุงูุชุญ Preview ู„ู„ูˆุตูˆู„ ู„ู„ุชุทุจูŠู‚
# ุฃูˆ ูŠุฏูˆูŠุงู‹
python3 runserver.py

ุนู„ู‰ VPS (ู„ู„ุฅู†ุชุงุฌ)

# 1. Clone ุงู„ู…ุดุฑูˆุน
git clone https://github.com/K2Panel/K2Panel.git
cd K2Panel

# 2. ุชุซุจูŠุช ุงู„ู…ุชุทู„ุจุงุช
pip3 install -r requirements.txt

# 3. ุฅุนุฏุงุฏ ุงู„ุจูŠุฆุฉ
cp .env.example .env
nano .env  # ุนุฏู‘ู„ ุงู„ู…ุชุบูŠุฑุงุช

# 4. ุชุดุบูŠู„
python3 runserver.py

# 5. ู„ู„ุฅู†ุชุงุฌ: ุงุณุชุฎุฏู… systemd + Nginx
sudo ./setup_systemd.sh
sudo ./setup_nginx.sh

๐Ÿ“š ุฏู„ูŠู„ ุดุงู…ู„: VPS_DEPLOYMENT_GUIDE.md


๐Ÿ“š Documentation

Document Description When to Use
DEPLOYMENT.md Complete deployment guide Production setup
DEPLOYMENT_SECRETS.md GitHub Secrets setup CI/CD configuration
BLUE_GREEN_DEPLOYMENT.md Zero-downtime deployment Advanced deployment
TROUBLESHOOTING.md Common issues & solutions When problems occur
SECURITY_HARDENING_GUIDE.md Security best practices Production security

๐Ÿ” Security Features

SSH Host Fingerprint Verification (NEW)

  • MITM Attack Protection - Mandatory host fingerprint verification
  • StrictHostKeyChecking - Enforced on all SSH connections
  • Automated Testing - Pre-deployment connection validation

Required GitHub Secrets (4)

VPS_HOST              # VPS IP address
VPS_USER              # SSH username
VPS_SSH_KEY           # SSH private key
VPS_HOST_FINGERPRINT  # ๐Ÿ” SSH fingerprint (REQUIRED for MITM protection)

Get fingerprint:

ssh-keyscan -H YOUR_VPS_IP 2>/dev/null | ssh-keygen -lf - | awk '{print $2}'

๐Ÿงช Testing & CI/CD

Test VPS Connection

# In GitHub Repository:
Actions โ†’ Test VPS Connection โ†’ Run workflow

# Validates:
โœ… All GitHub Secrets are configured
โœ… SSH connection works
โœ… Host fingerprint verified (MITM protection)
โœ… Docker installed
โœ… Deployment path exists

Automated Deployment

  • Trigger: Push to main branch
  • Workflow: Build โ†’ Test โ†’ Deploy (Blue-Green)
  • Rollback: Automatic on failure

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           K2Panel Architecture              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚   Frontend  โ”‚ โ—„โ”€โ”€โ”€โ”€โ”€โ–บ โ”‚   Backend    โ”‚  โ”‚
โ”‚  โ”‚   (Vite)    โ”‚         โ”‚   (Python)   โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚         โ”‚                        โ”‚          โ”‚
โ”‚         โ–ผ                        โ–ผ          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚         Nginx (Reverse Proxy)       โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                     โ”‚                       โ”‚
โ”‚         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”‚
โ”‚         โ–ผ                       โ–ผ          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ PostgreSQL  โ”‚         โ”‚    Redis     โ”‚  โ”‚
โ”‚  โ”‚  Database   โ”‚         โ”‚    Cache     โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                                             โ”‚
โ”‚  Monitoring: Prometheus + Grafana + Loki   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“Š Deployment Strategies

1. Basic Deployment (VPS + Docker)

  • Simple setup for small projects
  • Direct deployment to VPS
  • Manual rollback if needed

2. Blue-Green Deployment (Recommended)

  • Zero-downtime deployment
  • Automatic health checks
  • Instant rollback capability
  • Traffic switching with Nginx

3. CI/CD Pipeline (Advanced)

  • Automated testing
  • Multi-environment support
  • Slack/Email notifications
  • Automated backups

๐Ÿ› ๏ธ Tech Stack

  • Backend: Python, Flask
  • Frontend: Vite, Modern JavaScript
  • Database: PostgreSQL, Redis
  • Deployment: Docker, Docker Compose
  • CI/CD: GitHub Actions
  • Monitoring: Prometheus, Grafana, Loki
  • Reverse Proxy: Nginx
  • SSL/TLS: Let's Encrypt

๐Ÿ“ˆ Monitoring & Alerts

  • Prometheus - Metrics collection
  • Grafana - Visualization dashboards
  • Loki - Centralized logging
  • Alertmanager - Smart notifications
  • Integrations: Slack, Email, PagerDuty

๐Ÿค Contributing

See CONTRIBUTING.md for contribution guidelines.


๐Ÿ“„ License

This project is proprietary. See LICENSE file for details.


๐Ÿ“ž Support


๐ŸŽฏ Why K2Panel?

Feature Traditional Setup K2Panel
Deployment Time Hours to days Minutes โšก
Security Setup Manual, error-prone Automated โœ…
Monitoring Separate tools Built-in ๐Ÿ“Š
Zero Downtime Complex setup One command ๐Ÿš€
Rollback Manual, risky Automatic ๐Ÿ”„
Documentation Scattered Comprehensive ๐Ÿ“š

๐ŸŒŸ K2Panel - Professional Server Management Made Simple

Built with โค๏ธ for developers who value automation, security, and reliability

โญ Star this repo if you find it useful!


Made with Python ๐Ÿ | Powered by Docker ๐Ÿณ | Secured by Design ๐Ÿ”

Popular repositories Loading

  1. K2Panel K2Panel Public

    Python