File transfer

This commit is contained in:
2026-06-11 20:33:44 -05:00
parent 2cb1d58264
commit b362357bcb
58 changed files with 5096 additions and 4 deletions

107
docs/INSTALL.md Normal file
View File

@@ -0,0 +1,107 @@
# Installation Guide
> **Ball Studios** — https://git.balls.studio/BallStudios/pterodactyl_addon
## One-Line Install (Recommended)
Run as **root** on your Pterodactyl server:
```bash
bash <(curl -fsSL https://git.balls.studio/BallStudios/pterodactyl_addon/raw/branch/main/install.sh)
```
Custom panel path:
```bash
bash <(curl -fsSL https://git.balls.studio/BallStudios/pterodactyl_addon/raw/branch/main/install.sh) /path/to/pterodactyl
```
The script will:
1. Run preflight checks (PHP version, panel path, git)
2. Back up all files it will modify to `.addon_backup_<timestamp>/`
3. Clone the addon repository
4. Copy backend + frontend files
5. Apply 4 minimal patches to panel core files
6. Run database migrations
7. Seed default roles (Owner, Admin, Moderator, Viewer)
8. Run `yarn build:production`
9. Clear Laravel caches
---
## Manual Install
### Prerequisites
| Requirement | Version |
|---|---|
| Pterodactyl Panel | v1.12.x |
| PHP | 8.1+ |
| Node.js | 22.x |
| Yarn | 1.x |
| MySQL/MariaDB | 8.0+ / 10.4+ |
### Steps
```bash
# 1. Clone the addon (outside panel dir)
git clone https://git.balls.studio/BallStudios/pterodactyl_addon /tmp/ptero-addon
cd /tmp/ptero-addon
# 2. Copy files
cp -r app/Addons /var/www/pterodactyl/app/
cp config/advanced-admin.php /var/www/pterodactyl/config/
cp -r config/addon-commands /var/www/pterodactyl/config/
cp -r database/migrations/addon /var/www/pterodactyl/database/migrations/
cp routes/addon-client.php /var/www/pterodactyl/routes/
cp routes/addon-application.php /var/www/pterodactyl/routes/
cp -r resources/scripts/addons /var/www/pterodactyl/resources/scripts/
cp -r database/seeders/. /var/www/pterodactyl/database/seeders/
# 3. Register the service provider
# In /var/www/pterodactyl/app/Providers/AppServiceProvider.php
# Add inside the register() method:
# $this->app->register(\Pterodactyl\Addons\AdvancedAdmin\AddonServiceProvider::class);
# 4. Migrate
cd /var/www/pterodactyl
php artisan migrate --path=database/migrations/addon --force
# 5. Seed default roles
php artisan db:seed --class="Pterodactyl\\Addons\\AdvancedAdmin\\Database\\Seeders\\DefaultRolesSeeder" --force
# 6. Build frontend
export NODE_OPTIONS=--openssl-legacy-provider
yarn install --frozen-lockfile && yarn build:production
# 7. Clear caches
php artisan optimize:clear && php artisan optimize
# 8. Fix permissions
chown -R www-data:www-data storage bootstrap/cache app/Addons resources/scripts/addons
```
### Core Patches Applied
All patches are documented in `patches/PATCHES.md`. Each patch is **≤ 3 lines**:
| File | Change |
|---|---|
| `app/Providers/AppServiceProvider.php` | Register `AddonServiceProvider` |
| `resources/scripts/routers/ServerRouter.tsx` | Add Network tab route |
| `resources/scripts/components/server/files/FileEditContainer.tsx` | Import `FileHistoryButton` |
| `resources/scripts/components/server/console/ServerConsole.tsx` | Import `CommandInput` wrapper |
---
## Post-Install
1. Review `config/advanced-admin.php` — adjust retention, rate limits, and exclusions
2. Add `.env` overrides if needed (see [CONFIG.md](CONFIG.md))
3. Restart queue worker: `php artisan queue:restart`
4. Navigate to your panel — the **Network**, **History**, and **Autocomplete** features are now active
---
## Troubleshooting
See [TROUBLESHOOTING.md](TROUBLESHOOTING.md).