A modern, comprehensive text-based user interface (TUI) installer for Pelican Panel and Wings (game server manager). Built with Python and Textual for beautiful terminal interfaces.
✨ Modern Multi-Screen TUI
- Beautiful, color-coded interface with multiple installation phases
- Responsive keyboard and mouse navigation
- Real-time progress indicators
- Always-accessible Close button (press
c)
🚀 Complete Installation Flow
- Main menu with detection of existing installations
- Webserver selection (Nginx/Apache/Caddy)
- Protocol selection (HTTP/HTTPS)
- Domain/IP configuration
- SSL certificate setup (Let's Encrypt)
- Dependency installation with progress tracking
- Installation summary screen
🛡️ Smart Detection
- Auto-detects existing Panel/Wings installations
- Shows Update/Reinstall options for existing components
- System information detection (OS, version, architecture)
- Port availability checking
- Sudo privilege verification
👥 User-Friendly Navigation
- Keyboard:
↑↓arrows,1-9quick select,Enterconfirm,bback,cclose,nnext - Mouse: Click options, buttons, and input fields
- Context-aware hints on every screen
- Smooth navigation between screens
- OS: Ubuntu 22.04+ (24.04 recommended) or Debian 12+
- Python: 3.9 or later
- Memory: 2GB minimum (4GB+ recommended)
- Disk Space: 5GB minimum
- Network: Outbound access to package repositories and GitHub
- Privileges: Root or sudo access
# Install dependencies
pip install -r requirements.txt
# Run the installer with sudo
sudo python main.pyNote: The installer will:
- Install system packages (PHP, Nginx/Apache/Caddy, Docker)
- Configure webservers
- Set up SSL certificates
- Modify system files and permissions
- Create systemd services
pelican-installer/
├── main.py # Entry point
├── requirements.txt # Python dependencies
├── README.md # This file
└── lib/
└── pelican_installer/
├── __init__.py
├── app.py # Main application orchestration
├── styles.tcss # Textual CSS styling
├── components/ # Reusable UI components
│ ├── __init__.py
│ └── menu.py # InstallerMenu component
├── screens/ # Installation screens
│ ├── __init__.py
│ ├── menu.py # Main menu with detection
│ ├── webserver.py # Webserver selection
│ ├── protocol.py # HTTP/HTTPS selection
│ ├── domain.py # Domain/IP configuration
│ ├── ssl.py # SSL certificate setup
│ ├── install.py # Dependency installation
│ └── summary.py # Installation complete
└── utils/ # Utility modules
├── __init__.py
├── state.py # Installation state management
└── system.py # System detection utilities
- Detects existing installations
- Shows Install/Update/Uninstall options
- Choose between Panel and Wings
- Nginx (recommended) - Fast, lightweight
- Apache - Traditional, feature-rich
- Caddy - Modern, auto-HTTPS
- HTTPS (recommended) - Secure, encrypted
- HTTP - Development only
- Enter domain name or IP address
- Validation for proper format
- Let's Encrypt certificate generation
- Email for certificate notifications
- Automatic renewal setup
- Real-time progress bar
- Status updates for each phase:
- System requirements check
- Package list updates
- Dependency installation
- Service configuration
- Permission setup
- Finalization
- Complete installation report
- Access information
- Next steps guide
↑/↓- Navigate menu options1-9- Quick select menu itemsEnter- Confirm selection / Submit inputb- Go back to previous screenn- Proceed to next stepc- Close/Exit application
The installer maintains state across screens:
- Selected component (Panel/Wings)
- Webserver choice
- Protocol (HTTP/HTTPS)
- Domain/IP address
- SSL configuration
- Installation progress
The installer automatically detects:
- OS name and version
- System architecture
- Existing Panel installation (
/var/www/pelican) - Existing Wings installation (
/usr/local/bin/wings) - Available commands (curl, docker, etc.)
- Port availability (80, 443)
- Sudo privileges
The TUI uses a consistent color scheme:
- Background: Dark gray with subtle hatch pattern
- Card: Centered panel with rounded borders
- Highlighted options: Teal background
- Buttons: Gray with focus states
- Text: White titles, blue-gray hints
- Inputs: Dark background with focus indicators
- Create screen class in
lib/pelican_installer/screens/ - Inherit from
Screen[str] - Implement
compose()for layout - Add navigation handlers (
@ondecorators) - Use
self.dismiss(result)to return to app - Register in
screens/__init__.py - Wire navigation in
app.py
- Create component in
lib/pelican_installer/components/ - Inherit from appropriate Textual widget
- Add custom behavior and styling
- Export from
components/__init__.py
Edit lib/pelican_installer/styles.tcss:
- Use CSS-like syntax for Textual CSS
- Target by ID (
#card) or class (.summary-item) - Supported properties: colors, borders, padding, alignment, etc.
- See Textual docs for full CSS reference
Edit styles.tcss to change colors:
- Background:
background: #222222; - Borders:
border: round #777777; - Highlights:
background: #0f2e3a; - Text:
color: #e9f6ff;
Adjust in styles.tcss:
#card {
width: 70;
min-height: 20;
max-height: 28;
}Adjust timer interval in install.py:
self.set_interval(1 / 10, self.advance_progress) # 10 updates/secIf you see "textual" import errors, ensure dependencies are installed:
pip install -r requirements.txtTry running in a modern terminal:
- macOS: iTerm2, Ghostty, Kitty, WezTerm
- Windows: Windows Terminal
- Linux: Most terminals support Textual
- Ensure focus is not on an input field (press
Esc) - Check keyboard shortcuts are not conflicting with terminal
Run a full flow test:
python main.pyNavigate through all screens:
- Select "Install Panel"
- Choose webserver
- Select HTTPS
- Enter domain
- Provide SSL email
- Watch dependency installation
- Review summary
- Actual installation logic (currently placeholders)
- Support for more Linux distributions
- Database configuration screen
- Firewall configuration
- Health check dashboard
- Backup/restore functionality
- Multi-language support
- Remote deployment wizard
- Pelican Panel: https://pelican.dev
- Documentation: https://pelican.dev/docs
- Textual Framework: https://textual.textualize.io
- Discord Community: https://discord.gg/pelican
This installer is provided as-is for the Pelican Panel community.
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Test thoroughly
- Submit a pull request
Built with ❤️ using Textual