Das Pterodactyl Panel ist das Control-Panel zur Verwaltung aller Gameserver. Es läuft in PHP und benötigt eine MySQL/MariaDB-Datenbank sowie Redis.
1. Verzeichnisstruktur & Datenbank erstellen
Wechsle in das Container-Verzeichnis und erstelle den Ordner für Pterodactyl:
mkdir -p /opt/containers/pterodactyl/panel
cd /opt/containers/pterodactyl/panel
2. Docker Compose Datei erstellen
Wir nutzen das offizielle Docker-Setup für Pterodactyl. Erstelle die Konfigurationsdatei docker-compose.yml:
cat << 'EOF' > docker-compose.yml
services:
database:
image: mariadb:10.11
container_name: pterodactyl-db
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password --skip-ssl
volumes:
- ./database:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: "STARKES_ROOT_PASSWORT_HIER"
MYSQL_DATABASE: "panel"
MYSQL_USER: "pterodactyl"
MYSQL_PASSWORD: "STARKES_DB_PASSWORT_HIER"
cache:
image: redis:alpine
container_name: pterodactyl-redis
restart: unless-stopped
panel:
image: ghcr.io/pterodactyl/panel:latest
container_name: pterodactyl-panel
restart: unless-stopped
ports:
- "8080:80"
links:
- database
- cache
volumes:
- ./var/:/app/var/
- ./env/:/app/data/
environment:
APP_URL: "[https://panel.orbis-craft.de](https://panel.orbis-craft.de)"
APP_TIMEZONE: "Europe/Berlin"
APP_SERVICE_AUTHOR: "noreply@orbis-craft.de"
APP_ENV: "production"
APP_ENVIRONMENT_ONLY: "false"
CACHE_DRIVER: "redis"
SESSION_DRIVER: "redis"
QUEUE_DRIVER: "redis"
REDIS_HOST: "cache"
DB_HOST: "database"
DB_PORT: "3306"
DB_DATABASE: "panel"
DB_USERNAME: "pterodactyl"
DB_PASSWORD: "STARKES_DB_PASSWORT_HIER"
DB_SSL: "false"
networks:
- default
- proxy-net
networks:
proxy-net:
external: true
EOF
⚠️ Wichtig: Tausche STARKES_ROOT_PASSWORT_HIER und STARKES_DB_PASSWORT_HIER gegen sichere Passwörter aus!
3. Container starten & MySQL-Client SSL Fix anwenden
- Container im Hintergrund starten:
docker compose up -d
- Client-seitigen SSL-Zwang im Panel-Container deaktivieren:
docker exec -it pterodactyl-panel sh -c 'echo -e "[client]\nssl=0\nskip-ssl" >> /etc/my.cnf'
4. Datenbank-Migration & Administrator anlegen
- Encryption Key generieren:
docker exec -it pterodactyl-panel php artisan key:generate --force
- Datenbank-Tabellen und Schemas migrieren:
docker exec -it pterodactyl-panel php artisan migrate --seed --force```
3. Administrator-Account erstellen (neuer p: Namespace):
```bash
docker exec -it pterodactyl-panel php artisan p:user:make
(E-Mail, Benutzername, Vor-/Nachname, Passwort eingeben und Admin-Status bestätigen).
5. Reverse Proxy im Nginx Proxy Manager anlegen
Öffne die NPM Web-Oberfläche (http://<SERVER-IP>:81):
-
Navigiere zu Hosts ➔ Proxy Hosts ➔ Add Proxy Host.
-
Details Tab:
- Domain Names:
panel.orbis-craft.de(oder deine gewünschte Subdomain) - Scheme:
http - Forward Hostname / IP:
pterodactyl-panel - Forward Port:
80 - Aktiviere Block Common Exploits und Websockets Support (essenziell für die Live-Konsole).
- Domain Names:
-
SSL Tab:
- SSL Certificate: Request a new SSL Certificate
- Aktiviere Force SSL und HTTP/2 Support.
-
Klicke auf Save.
6. Status-Checklist
- [ ] Verzeichnis und docker-compose.yml (inkl. --skip-ssl) angelegt.
- [ ] Client-Fix (/etc/my.cnf) ausgeführt.
- [ ] Artisan Migration erfolgreich durchgelaufen.
- [ ] Admin-User via php artisan p:user:make erstellt.
- [ ] Reverse Proxy mit SSL konfiguriert und Login unter https://panel.orbis-craft.de erreichbar.