pegasus-core
v2.4.1
Published
π Professional SSH Node Management System with CLI
Maintainers
Readme
π Pegasus Core
Professional SSH Node Management System with Enterprise Security
A bulletproof, web-based SSH management platform with Pterodactyl-inspired UI, built for production environments with comprehensive security hardening.
β¨ Features
- π Beautiful Web Interface - Dark theme with modern UI
- π Enterprise Security - Rate limiting, JWT tokens, bcrypt hashing
- π₯οΈ SSH Management - Connect and manage multiple servers
- π Real-time Monitoring - System stats and performance metrics
- ποΈ Multi-Database Support - PostgreSQL, MySQL, SQLite, In-Memory
- βοΈ Fully Configurable - 25+ environment variables for customization
- π‘οΈ Zero Vulnerabilities - Comprehensive security hardening
- π Production Ready - OWASP Top 10 compliant
π Prerequisites
System Installation
Install Node.js and npm (Required):
Ubuntu 22.04:
# Update package index
sudo apt update
# Install curl (if not already installed)
sudo apt install curl
# Install NodeSource repository for latest Node.js
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
# Install Node.js and npm
sudo apt install nodejs
# Verify installation (should show v18.x.x and 9.x.x+)
node --version && npm --versionβ οΈ Important: The default Node.js in Ubuntu 22.04 repositories (v12.x) is too old and will cause compatibility issues. You must use Node.js v16+ from NodeSource as shown above.
System Requirements
- Node.js v16.0.0 or higher (v18+ recommended, tested up to v22)
- npm v8.0.0 or higher (comes with Node.js)
- Operating System: Ubuntu 22.04 LTS (officially supported)
- Memory: 512MB minimum, 1GB+ recommended
- Storage: 1GB minimum free space
π οΈ Development Setup
For developers who want to contribute or run from source:
# Clone the repository
git clone https://github.com/Daniel-Farmer/pegasus-core.git
cd pegasus-core
# Install all development dependencies
npm install
# Install all database drivers for testing
npm install sqlite3 pg mysql2
# Install development tools
npm install -g nodemon typescript @types/node
# Build the project
npm run build
# Run in development mode
npm run devπ Quick Start
Installation
# Install globally via npm (includes all core dependencies)
npm install -g pegasus-core@latest
# Create a new instance
pegasus-core init my-instance
# Start the server
pegasus-core start my-instanceWeb Setup
- Open your browser to
http://localhost(or your server IP) - Complete the 4-step installation wizard:
- Welcome & system check
- Create admin account
- Configure database
- Installation complete
π CLI Commands
Instance Management
# Create new instance
pegasus-core init <name> [--port 3001]
# List all instances
pegasus-core list
# Start instance
pegasus-core start <name>
# Stop instance
pegasus-core stop <name>
# Restart instance
pegasus-core restart <name>
# Remove instance (requires --force)
pegasus-core remove <name> --force
# Show instance status
pegasus-core status [name]System Management
# Update system
pegasus-core update [name]
# View logs
pegasus-core logs [name]
# Health check
pegasus-core health [name]
# Open in browser
pegasus-core open [name]π Auto-Update System
Pegasus Core includes a comprehensive auto-update system for self-hosted servers that ensures safe updates without data loss.
Features
- π Automatic Updates: Daily checks with automatic installation
- πΎ Smart Backups: Pre-update backups with rollback capability
- π‘οΈ Safe Operations: Graceful shutdown and health checks
- β° Scheduled Updates: Configurable maintenance windows
- π Health Monitoring: Post-update validation and status reporting
Quick Setup
# Download and install auto-update system
curl -fsSL https://raw.githubusercontent.com/Daniel-Farmer/pegasus-core/production/scripts/download-auto-update.sh | bash
# Or install from npm package
cd /usr/local/lib/node_modules/pegasus-core/scripts
sudo ./install-auto-update.shUsage
# Check for updates
pegasus-check
# Manual update
pegasus-update
# Create backup
pegasus-backup
# Restore from backup
pegasus-restore /path/to/backup.tar.gz
# View update status
systemctl status pegasus-auto-update.timerConfiguration
Edit /etc/pegasus-core/update-config.conf to customize:
- Maintenance windows
- Backup retention
- Health check timeouts
- Notification settings
For complete documentation, see scripts/AUTO-UPDATE-README.md.
π οΈ Troubleshooting
Common Issues
Port Already in Use
# Check what's using the port
sudo lsof -i :3001
# Use a different port
pegasus-core init my-instance --port 3002Database Connection Failed
# Check database status
pegasus-core status my-instance
# Reset database
pegasus-core remove my-instance --force
pegasus-core init my-instanceπ API Documentation
Authentication
POST /api/auth/login
{
"username": "admin",
"password": "your-password"
}Node Management
GET /api/nodes # List all nodes
POST /api/nodes # Create new node
PUT /api/nodes/:id # Update node
DELETE /api/nodes/:id # Delete nodeπ€ Contributing
Development Setup
## πΏ Branch Structure
This repository follows a simplified two-branch workflow:
- **`production`** - Stable production releases, used for NPM publishing and GitHub releases
- **`development`** - Active development branch, where new features and fixes are integrated
### Release Process
1. **Development** β Features and fixes are merged here first
2. **Production** β Stable code is merged from development for releases
3. **NPM Publishing** β Done from production branch with version tags
## π€ Contributing
```bash
# Fork and clone the repository
git clone https://github.com/YOUR-USERNAME/pegasus-core.git
cd pegasus-core
# Install dependencies
npm install
# Create feature branch from development
git checkout development
git checkout -b feature/your-feature-name
# Submit pull request to development branch
## π License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## π Support
- **GitHub Issues** - [Report bugs](https://github.com/Daniel-Farmer/pegasus-core/issues)
- **Documentation** - [Wiki](https://github.com/Daniel-Farmer/pegasus-core/wiki)
---
**Made with β€οΈ by Daniel Farmer**
*Pegasus Core - Professional SSH Management for the Modern Era*