v2.0.0: complete rewrite — fixes all bugs, adds CLI flags

CRITICAL FIXES:
- Actually writes DB credentials to .env (was missing entirely!)
- Runs 'php artisan migrate --seed --force' on fresh install
- Configures pg_hba.conf for PostgreSQL password auth over TCP
- Uses chmod 775 (not 755) on storage directories
- Generates APP_KEY via 'php artisan key:generate'
- Creates storage subdirectories before setting permissions
- Sets PHP-FPM pool user to match web server user

NEW FEATURES:
- Full CLI flag support (--panel, --wings, --domain, --database, etc.)
- Environment variable overrides for all settings
- Non-interactive mode (--yes / -y) for fully automated installs
- Step progress indicator [X/Y] throughout install
- Database credentials displayed in visible green box
- APP_KEY shown in red warning box
- Input validation for FQDN
- Interactive DB credential customization
- HTTP connectivity health check
- Artisan CLI health check
- Smart defaults (auto-detect DB port, auto-generate passwords)

UI IMPROVEMENTS:
- Menus start at [1] instead of [0]
- Credential boxes use visible colored borders
- help text with usage examples
- Cleaner step/section separators
This commit is contained in:
Pelican Installer Bot 2026-05-17 11:53:42 +00:00
parent ed0204a7a0
commit 9e4d1bf0c6
2 changed files with 1152 additions and 805 deletions

222
README.md
View file

@ -1,112 +1,144 @@
# 🐦 Pelican Installer
The **best** way to install [Pelican Panel](https://pelican.dev) & Wings — a single command, beautiful UI, and way more features than the old Pterodactyl installer.
The best way to install [Pelican Panel](https://pelican.dev) & Wings — one script, fully automated, production-ready.
## Quick Start
```bash
bash <(curl -s https://raw.githubusercontent.com/rosillathequeen/pelican-installer/main/install.sh)
# Interactive install (asks you everything)
sudo bash <(curl -sSL https://raw.githubusercontent.com/everestmcarthur/pelican-installer/main/install.sh)
# Or download first
curl -sSL -o install.sh https://raw.githubusercontent.com/everestmcarthur/pelican-installer/main/install.sh
sudo bash install.sh
```
## ✨ Features
## Automated Install (No Prompts)
| Feature | Pterodactyl Installer | Pelican Installer |
|---|---|---|
| Single-command install | ✅ | ✅ |
| Panel installation | ✅ | ✅ |
| Wings installation | ✅ | ✅ |
| Nginx support | ✅ | ✅ |
| Apache support | ✅ | ✅ |
| **Caddy support (auto-SSL)** | ❌ | ✅ |
| **SQLite support** | ❌ | ✅ |
| **PostgreSQL support** | ❌ | ✅ |
| MySQL/MariaDB support | ✅ | ✅ |
```bash
# Panel with Nginx + PostgreSQL + SSL
sudo bash install.sh install --panel \
--domain panel.example.com \
--webserver nginx \
--database postgres \
--ssl --email admin@example.com \
--timezone America/New_York \
-y
# Wings only
sudo bash install.sh install --wings -y
# Panel + Wings on same machine
sudo bash install.sh install --both \
--domain panel.example.com \
--webserver caddy \
--database postgres \
-y
```
## All CLI Flags
| Flag | Description | Default |
|------|-------------|---------|
| `install` / `update` / `uninstall` | Action to perform | `install` |
| `--panel` | Install/update Panel | — |
| `--wings` | Install/update Wings | — |
| `--both` | Install/update Panel + Wings | — |
| `--domain FQDN` | Panel domain name | *(asked)* |
| `--webserver WS` | `nginx`, `apache`, or `caddy` | *(asked)* |
| `--database DB` | `sqlite`, `mysql`, `mariadb`, or `postgres` | *(asked)* |
| `--db-host HOST` | Database host | `127.0.0.1` |
| `--db-port PORT` | Database port | *auto from DB type* |
| `--db-name NAME` | Database name | `pelican` |
| `--db-user USER` | Database user | `pelican` |
| `--db-password PASS` | Database password | *auto-generated* |
| `--ssl` | Enable SSL via Let's Encrypt | *(asked)* |
| `--no-ssl` | Disable SSL | — |
| `--email EMAIL` | Email for Let's Encrypt | *(asked if --ssl)* |
| `--timezone TZ` | Server timezone | `UTC` |
| `--yes`, `-y` | Skip all confirmation prompts | `false` |
## Environment Variables
Every flag can also be set via environment variable:
```bash
export FQDN="panel.example.com"
export WEBSERVER="nginx"
export DB_CHOICE="postgres"
export DB_PASSWORD="my_secure_password"
export CONFIGURE_SSL=true
export EMAIL="admin@example.com"
export ASSUME_YES=true
sudo -E bash install.sh install --panel
```
## Features
| Feature | This Installer | pterodactyl-installer.se |
|---------|:-:|:-:|
| Pelican Panel support | ✅ | ❌ (Pterodactyl only) |
| Full CLI flags (automated installs) | ✅ | ❌ |
| Environment variable config | ✅ | ❌ |
| Nginx | ✅ | ✅ |
| Apache | ✅ | ✅ |
| Caddy (auto-SSL) | ✅ | ❌ |
| SQLite | ✅ | ❌ |
| MySQL | ✅ | ✅ |
| MariaDB | ✅ | ✅ |
| PostgreSQL | ✅ | ❌ |
| Auto-configures `.env` | ✅ | ❌ |
| Runs database migrations | ✅ | ❌ |
| PostgreSQL `pg_hba.conf` auth | ✅ | ❌ |
| Writes DB password to `.env` | ✅ | ❌ |
| Let's Encrypt SSL | ✅ | ✅ |
| **Beautiful colored UI** | ❌ | ✅ |
| **Progress spinners** | ❌ | ✅ |
| **Post-install health checks** | ❌ | ✅ |
| **Update command** | ❌ | ✅ |
| **Uninstall command** | ❌ | ✅ |
| **Memory & disk checks** | ❌ | ✅ |
| **Virtualization detection** | ❌ | ✅ |
| **Comprehensive logging** | Partial | ✅ |
| **Single script (no lib downloads)** | ❌ | ✅ |
| **Queue worker auto-setup** | ❌ | ✅ |
| **Cron job auto-setup** | ❌ | ✅ |
| ARM64 support | ❌ | ✅ |
| Post-install health checks | ✅ | ❌ |
| HTTP connectivity check | ✅ | ❌ |
| Queue worker systemd service | ✅ | ❌ |
| Cron auto-setup | ✅ | ❌ |
| Step-by-step progress (X/Y) | ✅ | ❌ |
| Update command | ✅ | ❌ |
| Uninstall command | ✅ | ❌ |
| ARM64 support | ✅ | ❌ |
| Comprehensive logging | ✅ | ❌ |
| Single script (no deps) | ✅ | ✅ |
## 📋 Supported Operating Systems
## Update & Uninstall
| OS | Version | Panel | Wings |
|---|---|---|---|
| Ubuntu | 22.04, 24.04 | ✅ | ✅ |
| Debian | 11, 12 | ✅ | ✅ |
| AlmaLinux | 8, 9, 10 | ✅ | ✅ |
| Rocky Linux | 8, 9 | ✅ | ✅ |
| CentOS | 10 | ✅ | ✅ |
## 🚀 Quick Start
### Install Panel
```bash
bash <(curl -s https://raw.githubusercontent.com/rosillathequeen/pelican-installer/main/install.sh)
# Select option [0] — Install Panel
# Update panel
sudo bash install.sh update --panel
# Update wings
sudo bash install.sh update --wings
# Update both
sudo bash install.sh update --both -y
# Uninstall (interactive)
sudo bash install.sh uninstall
```
### Install Wings
## Supported Systems
| OS | Versions |
|----|----------|
| Ubuntu | 22.04, 24.04 |
| Debian | 11, 12 |
| AlmaLinux | 8, 9 |
| Rocky Linux | 8, 9 |
| CentOS Stream | 9 |
Both `x86_64` and `ARM64` architectures supported.
## Logs
All installer output is logged to `/var/log/pelican-installer.log`.
```bash
bash <(curl -s https://raw.githubusercontent.com/rosillathequeen/pelican-installer/main/install.sh)
# Select option [1] — Install Wings
tail -f /var/log/pelican-installer.log
```
### Install Both (same machine)
```bash
bash <(curl -s https://raw.githubusercontent.com/rosillathequeen/pelican-installer/main/install.sh)
# Select option [2] — Install Panel + Wings
```
## License
### Update
```bash
bash <(curl -s https://raw.githubusercontent.com/rosillathequeen/pelican-installer/main/install.sh)
# Select option [3/4/5] — Update Panel/Wings/Both
```
### Uninstall
```bash
bash <(curl -s https://raw.githubusercontent.com/rosillathequeen/pelican-installer/main/install.sh)
# Select option [6] — Uninstall
```
## 🛠 What It Does
### Panel Installation
1. Detects your OS and installs the right packages
2. Installs PHP 8.5/8.4/8.3 with all required extensions
3. Installs your chosen database (SQLite, MySQL, MariaDB, or PostgreSQL)
4. Installs and configures your web server (Nginx, Apache, or Caddy)
5. Obtains SSL certificate via Let's Encrypt (or auto-SSL with Caddy)
6. Downloads and configures Pelican Panel
7. Sets up the queue worker as a systemd service
8. Configures the cron scheduler
9. Runs health checks to verify everything works
### Wings Installation
1. Installs Docker CE
2. Downloads the Wings binary (auto-detects amd64/arm64)
3. Creates the systemd service for Wings
4. Guides you through connecting to your Panel
## 📝 Logs
All installer output is logged to `/var/log/pelican-installer.log` for troubleshooting.
## 🔄 Auto-Update Monitoring
This repository is automatically monitored for new Pelican releases. When a new version drops, the installer is tested and updated.
## 📜 License
GPL-3.0 — Free and open source.
## 🙏 Credits
- [Pelican Panel](https://pelican.dev) — The game server management panel
- Inspired by [pterodactyl-installer](https://pterodactyl-installer.se)
GPL-3.0 — See [LICENSE](LICENSE)

1735
install.sh

File diff suppressed because it is too large Load diff