Folder Structure
Tree
/opt/PegaProx/
├── pegaprox_multi_cluster.py # Entry point (gevent monkey-patch + CLI)
├── pegaprox/ # Application package
│ ├── __init__.py
│ ├── app.py # Flask app factory
│ ├── constants.py # Configuration constants (Layer 0)
│ ├── globals.py # Shared mutable state (Layer 1)
│ ├── api/ # REST API Blueprints (36 modules)
│ │ ├── auth.py # Authentication endpoints
│ │ ├── clusters.py # Cluster management
│ │ ├── vms.py # VM/CT operations (~6000 lines)
│ │ ├── nodes.py # Node management + SMBIOS
│ │ ├── storage.py # Storage operations
│ │ ├── datacenter.py # Datacenter overview
│ │ ├── alerts.py # Alert configuration
│ │ ├── history.py # Action history
│ │ ├── reports.py # Reports & exports
│ │ ├── schedules.py # Task scheduling
│ │ ├── search.py # Global search
│ │ ├── settings.py # Server settings + updates
│ │ ├── users.py # User management
│ │ ├── groups.py # User groups
│ │ ├── pbs.py # PBS integration
│ │ ├── ceph.py # Ceph management
│ │ ├── vmware.py # ESXi migration
│ │ ├── site_recovery.py # Disaster recovery plans (v0.9.2)
│ │ ├── xhm.py # Cross-hypervisor migration (v0.9.2)
│ │ ├── metrics_exporter.py # Prometheus /metrics exporter
│ │ ├── webauthn.py # WebAuthn / FIDO2
│ │ ├── siem.py # SIEM log forwarder
│ │ ├── drift.py # Config drift detection
│ │ ├── costs.py # Per-tenant quotas & chargeback
│ │ ├── snapshots.py # Snapshot schedules
│ │ ├── dr_drill.py # DR drill orchestration
│ │ ├── topology.py # Network topology graph
│ │ ├── insights.py # Capacity / right-sizing insights
│ │ ├── push.py # Push notifications
│ │ ├── power.py # Power & carbon tracking
│ │ ├── audit_search.py # Audit-log search
│ │ ├── templates_lib.py # Cloud-init template library
│ │ ├── plugins.py # Plugin loader
│ │ ├── realtime.py # SSE + WebSocket
│ │ ├── helpers.py # Shared API utilities
│ │ └── static_files.py # Static file serving
│ ├── core/ # Business logic (Layer 5)
│ │ ├── db.py # SQLite database (PegaProxDB singleton)
│ │ ├── manager.py # Proxmox API wrapper (PegaProxManager)
│ │ ├── cache.py # In-memory cache
│ │ ├── config.py # Configuration management
│ │ ├── pbs.py # PBS operations
│ │ ├── vmware.py # ESXi/pyvmomi integration
│ │ ├── xcpng.py # XCP-ng / XAPI integration (v0.9.2)
│ │ ├── xhm.py # Cross-hypervisor migration engine (v0.9.2)
│ │ ├── acme.py # Let's Encrypt ACME client
│ │ ├── esxi_cluster.py # ESXi cluster adapter for XHM (v0.9.2)
│ │ └── v2p.py # V2P migration engine
│ ├── background/ # Background tasks (Layer 7)
│ │ ├── scheduler.py # Cron-like task scheduler
│ │ ├── alerts.py # Alert monitoring
│ │ ├── metrics.py # Metrics collection
│ │ ├── broadcast.py # SSE broadcasting
│ │ ├── site_recovery.py # DR failover orchestration (v0.9.2)
│ │ ├── cross_cluster_lb.py # Cross-cluster load balancing
│ │ ├── cross_cluster_replication.py
│ │ └── password_expiry.py # Password expiry checks
│ ├── utils/ # Utility modules (Layer 3-4)
│ │ ├── auth.py # Authentication helpers
│ │ ├── rbac.py # Role-based access control
│ │ ├── audit.py # Audit logging
│ │ ├── ldap.py # LDAP integration
│ │ ├── oidc.py # OIDC/SSO integration
│ │ ├── ssh.py # SSH connection helpers
│ │ ├── email.py # Email notifications
│ │ ├── sanitization.py # Input sanitization
│ │ ├── concurrent.py # Concurrency helpers
│ │ └── realtime.py # SSE utility functions
│ └── models/ # Data models (Layer 0)
│ ├── permissions.py # Permission definitions
│ └── tasks.py # Task & config models
├── web/
│ ├── index.html # Compiled frontend (single-file SPA)
│ ├── index.html.original # HTML shell template
│ └── src/ # Frontend source (JSX)
│ ├── constants.js # Version, API URL, translations
│ ├── auth.js # Login, 2FA, sessions
│ ├── dashboard.js # Main dashboard view
│ ├── datacenter.js # Datacenter overview
│ ├── vm_config.js # VM configuration editor
│ ├── vm_modals.js # VM action modals
│ ├── create_modals.js # VM/CT creation
│ ├── node_modals.js # Node management modals
│ ├── settings_modal.js # Settings dialog
│ ├── storage.js # Storage views
│ ├── security.js # Security settings
│ ├── tables.js # Table components
│ ├── ui.js # Layout & navigation
│ ├── icons.js # Icon components
│ ├── translations.js # i18n translations (DE/EN)
│ └── contexts.js # React contexts
├── config/
│ ├── pegaprox.db # SQLite database (encrypted credentials)
│ └── ssl/ # SSL certificates (cert.pem / key.pem)
├── static/ # JS/CSS libraries (offline mode)
│ ├── css/ # Tailwind, xterm.css
│ └── js/ # React, Babel, Chart.js, noVNC, xterm
├── images/ # Logo, favicon, sponsors
├── plugins/ # Plugins, each with its config.json (settings)
├── logs/ # Application logs
├── deploy.sh # System deployment script
├── update.sh # Update script
├── Dockerfile # Docker image definition
├── requirements.txt # Python dependencies
└── version.json # Version info + update manifest
The config/ directory contains the SQLite
database with all settings, encrypted credentials, sessions, and audit
logs. Back up this directory regularly.
This is the layout of a deploy.sh install in /opt/PegaProx. The Debian package puts the program into /usr/lib/pegaprox and keeps config/, logs/ and plugins/ in /var/lib/pegaprox; the Docker image keeps the plugins in the config volume (/app/config/plugins). Back up the plugin folder too: each plugin's config.json holds its settings. Details: Plugin System.
Config Files
| File | Purpose |
|---|---|
config/pegaprox.db |
SQLite DB (clusters, users, sessions, settings) |
config/ssl/cert.pem |
SSL certificate |
config/ssl/key.pem |
SSL private key |
version.json |
Version info + 144-file update manifest |
requirements.txt |
Python package dependencies |