diff --git a/README.md b/README.md index 1250841..5590282 100644 --- a/README.md +++ b/README.md @@ -1,144 +1,204 @@ # 🐦 Pelican Installer -The best way to install [Pelican Panel](https://pelican.dev) & Wings — one script, fully automated, production-ready. +The best way to install [Pelican Panel](https://pelican.dev) & Wings — one command, fully automated. -## Quick Start +> Better than the pterodactyl-installer. Every option configurable via CLI flags, full web server configs, Redis support, auto admin creation, and more. + +## Quick Install ```bash -# 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 +curl -sSL https://install.jarviscli.dev | sudo bash ``` -## Automated Install (No Prompts) +Or directly from GitHub: ```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 +curl -sSL https://raw.githubusercontent.com/everestmcarthur/pelican-installer/main/install.sh | sudo bash ``` -## 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: +## Fully Automated Install (Non-Interactive) ```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 +curl -sSL https://install.jarviscli.dev | sudo bash -s -- install \ + --panel \ + --domain panel.example.com \ + --webserver nginx \ + --database postgres \ + --ssl --email you@example.com \ + --cache-driver redis \ + --session-driver redis \ + --queue-driver redis \ + --admin-email admin@example.com \ + --admin-user admin \ + --admin-pass S3cureP@ss \ + --timezone America/New_York \ + -y ``` -## Features +## Panel + Wings (Same Machine) -| 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 | ✅ | ✅ | -| 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) | ✅ | ✅ | +```bash +curl -sSL https://install.jarviscli.dev | sudo bash -s -- install \ + --both \ + --domain panel.example.com \ + --wings-domain node.example.com \ + --wings-proxy --wings-ssl \ + --webserver nginx \ + --database postgres \ + --ssl --email you@example.com \ + -y +``` + +## Wings Only (With Reverse Proxy) + +```bash +curl -sSL https://install.jarviscli.dev | sudo bash -s -- install \ + --wings \ + --wings-domain node.example.com \ + --wings-proxy \ + --webserver caddy \ + -y +``` ## Update & Uninstall ```bash -# Update panel -sudo bash install.sh update --panel - -# Update wings -sudo bash install.sh update --wings - -# Update both +# Update everything sudo bash install.sh update --both -y -# Uninstall (interactive) +# Uninstall sudo bash install.sh uninstall ``` -## Supported Systems +## All CLI Flags -| OS | Versions | -|----|----------| -| Ubuntu | 22.04, 24.04 | -| Debian | 11, 12 | -| AlmaLinux | 8, 9 | -| Rocky Linux | 8, 9 | -| CentOS Stream | 9 | +### Components +| Flag | Description | +|------|-------------| +| `--panel` | Install Panel | +| `--wings` | Install Wings | +| `--both` | Install Panel + Wings | -Both `x86_64` and `ARM64` architectures supported. +### Panel — General +| Flag | Description | Default | +|------|-------------|---------| +| `--domain FQDN` | Panel domain name | *(required)* | +| `--app-name NAME` | Application name | `Pelican` | +| `--webserver WS` | `nginx`, `apache`, or `caddy` | *(asked)* | +| `--ssl` | Enable SSL via Let's Encrypt | *(asked)* | +| `--no-ssl` | Disable SSL | | +| `--email EMAIL` | Let's Encrypt email | *(asked if SSL)* | +| `--timezone TZ` | Timezone | `UTC` | -## Logs +### Panel — Admin User (Skip Web Installer) +| Flag | Description | +|------|-------------| +| `--admin-email EMAIL` | Admin email | +| `--admin-user USER` | Admin username | +| `--admin-pass PASS` | Admin password | -All installer output is logged to `/var/log/pelican-installer.log`. +> If all three are provided, the admin user is created automatically and the web installer is skipped entirely. -```bash -tail -f /var/log/pelican-installer.log -``` +### Panel — Database +| Flag | Description | Default | +|------|-------------|---------| +| `--database DB` | `sqlite`, `mysql`, `mariadb`, `postgres` | *(asked)* | +| `--db-host HOST` | Database host | `127.0.0.1` | +| `--db-port PORT` | Database port | *auto-detected* | +| `--db-name NAME` | Database name | `pelican` | +| `--db-user USER` | Database user | `pelican` | +| `--db-password PASS` | Database password | *auto-generated* | + +### Panel — Cache +| Flag | Description | Default | +|------|-------------|---------| +| `--cache-driver DRV` | `file` or `redis` | `file` | +| `--redis-host HOST` | Redis host | `127.0.0.1` | +| `--redis-port PORT` | Redis port | `6379` | +| `--redis-user USER` | Redis username (ACL) | | +| `--redis-password PW` | Redis password | | + +> When using Redis + localhost, Redis server is auto-installed. + +### Panel — Session +| Flag | Description | Default | +|------|-------------|---------| +| `--session-driver DRV` | `file`, `database`, `cookie`, `redis` | `file` | + +### Panel — Queue +| Flag | Description | Default | +|------|-------------|---------| +| `--queue-driver DRV` | `database`, `redis`, `sync` | `database` | + +### Wings +| Flag | Description | Default | +|------|-------------|---------| +| `--wings-domain FQDN` | Wings node domain | | +| `--wings-port PORT` | Wings daemon port | `8080` | +| `--wings-proxy` | Set up reverse proxy | | +| `--wings-ssl` | SSL for Wings proxy | | + +### General +| Flag | Description | +|------|-------------| +| `--yes`, `-y` | Skip all confirmation prompts | +| `--help`, `-h` | Show help | + +## Features + +- **Interactive & Non-Interactive** — Full wizard for beginners, CLI flags for automation +- **3 Web Servers** — Nginx, Apache, Caddy (with auto-SSL) +- **4 Databases** — SQLite, MySQL, MariaDB, PostgreSQL +- **Redis Everything** — Cache, session, and queue with auto-install +- **Wings Reverse Proxy** — Full config with WebSocket support for console/file manager on all 3 web servers +- **Auto Admin User** — Skip the web installer entirely +- **SSL Everywhere** — Let's Encrypt for Panel + Wings in one pass +- **Health Checks** — Verifies PHP, web server, database, Redis, .env, HTTP response +- **Update & Uninstall** — Built-in commands for lifecycle management +- **ARM64 Support** — Works on x86_64 and ARM machines +- **Progress Indicators** — Step counter, spinners, color-coded output +- **Credential Boxes** — Database password, APP_KEY, admin creds displayed clearly +- **Comprehensive Logging** — Everything logged to `/var/log/pelican-installer.log` + +## Supported Operating Systems + +- Ubuntu 20.04, 22.04, 24.04 +- Debian 11, 12 +- AlmaLinux 8, 9 +- Rocky Linux 8, 9 +- CentOS Stream 8, 9 +- RHEL 8, 9 + +## What It Does + +### Panel Install +1. Detects OS and architecture +2. Runs preflight checks (root, memory, disk, tools) +3. Installs PHP 8.2/8.3/8.4 with all required extensions +4. Installs Redis (if selected for cache/session/queue) +5. Installs and configures your chosen database +6. Installs and configures your chosen web server +7. Obtains SSL certificates (if enabled) +8. Downloads Pelican Panel + Composer dependencies +9. Writes full `.env` configuration (no web installer needed) +10. Runs database migrations and seeders +11. Creates admin user (if credentials provided) +12. Sets up queue worker systemd service +13. Configures cron job for scheduled tasks +14. Runs health checks + +### Wings Install +1. Installs Docker CE +2. Downloads Wings binary for your architecture +3. Creates systemd service +4. Configures reverse proxy (if selected) ## License -GPL-3.0 — See [LICENSE](LICENSE) +GPL-3.0 — see [LICENSE](LICENSE). + +## Credits + +Built for [JarvisCLI](https://jarviscli.dev) by the Pelican Installer team. + +Pelican Panel is created by [pelican-dev](https://github.com/pelican-dev) and is licensed under AGPL-3.0. diff --git a/cloudflare-worker/worker.js b/cloudflare-worker/worker.js new file mode 100644 index 0000000..e5e6b7d --- /dev/null +++ b/cloudflare-worker/worker.js @@ -0,0 +1,159 @@ +/** + * Cloudflare Worker for install.jarviscli.dev + * + * curl -sSL https://install.jarviscli.dev | sudo bash → serves install.sh + * Browser visit → shows landing page + */ + +const SCRIPT_URL = 'https://raw.githubusercontent.com/everestmcarthur/pelican-installer/main/install.sh'; + +function isCurl(request) { + const ua = (request.headers.get('User-Agent') || '').toLowerCase(); + const accept = (request.headers.get('Accept') || ''); + // curl, wget, httpie, fetch without html accept + return ua.includes('curl') || ua.includes('wget') || ua.includes('httpie') || + ua.includes('powershell') || !accept.includes('text/html'); +} + +async function handleRequest(request) { + const url = new URL(request.url); + + // Direct script path always returns script + if (url.pathname === '/install.sh' || url.pathname === '/script') { + return serveScript(); + } + + // Root: detect curl vs browser + if (url.pathname === '/' || url.pathname === '') { + if (isCurl(request)) { + return serveScript(); + } + return serveLanding(); + } + + // 404 + return new Response('Not Found', { status: 404 }); +} + +async function serveScript() { + const resp = await fetch(SCRIPT_URL, { + cf: { cacheTtl: 300, cacheEverything: true } + }); + + if (!resp.ok) { + return new Response('#!/bin/bash\necho "Error: Could not fetch installer. Try: curl -sSL https://raw.githubusercontent.com/everestmcarthur/pelican-installer/main/install.sh | sudo bash"\nexit 1', { + status: 502, + headers: { 'Content-Type': 'text/plain' } + }); + } + + const script = await resp.text(); + return new Response(script, { + headers: { + 'Content-Type': 'text/plain; charset=utf-8', + 'Cache-Control': 'public, max-age=300', + 'X-Content-Type-Options': 'nosniff' + } + }); +} + +function serveLanding() { + const html = ` + + + + + Pelican Installer — install.jarviscli.dev + + + +
+

🐦 Pelican Installer

+

The best way to install Pelican Panel & Wings — one command, fully automated.

+ +
+
Quick Install
+
+ curl -sSL https://install.jarviscli.dev | sudo bash + click to copy +
+
+ +
+
Or with options
+
+ curl -sSL https://install.jarviscli.dev | sudo bash -s -- install \\
--panel --domain panel.example.com --webserver nginx \\
--database postgres --ssl --email you@example.com \\
--cache-driver redis --session-driver redis \\
--queue-driver redis --admin-email admin@example.com \\
--admin-user admin --admin-pass MyPassword -y
+ click to copy +
+
+ +
+
Features
+
+
Nginx, Apache & Caddy
+
MySQL, MariaDB, PostgreSQL, SQLite
+
Auto SSL via Let's Encrypt
+
Redis cache, session & queue
+
Wings reverse proxy (all 3 web servers)
+
Fully non-interactive mode
+
Auto admin user creation
+
Post-install health checks
+
Update & uninstall commands
+
ARM64 support
+
+
+ + + +

Powered by JarvisCLI

+
+ + + +`; + return new Response(html, { + headers: { 'Content-Type': 'text/html; charset=utf-8' } + }); +} + +addEventListener('fetch', event => { + event.respondWith(handleRequest(event.request)); +});