# Pterodactyl Panel + Wings

> Complete game server management panel with Wings daemon for container orchestration.

- Category: Home Lab & Self-Hosting
- Difficulty: advanced
- Components: pterodactyl-panel, wings, mariadb, redis, nginx
- Tags: pterodactyl, gaming, management, game-servers, panel
- Source: https://docker.recipes/homelab/pterodactyl-panel-complete

## Overview

Pterodactyl Panel is a modern, open-source game server management platform built with PHP and designed to simplify the deployment and administration of game servers. Originally created to manage Minecraft servers, Pterodactyl has evolved into a comprehensive solution supporting dozens of game types including Rust, CS:GO, Garry's Mod, ARK, and many others. The panel provides a clean web interface for server creation, file management, console access, and user permissions, while Wings serves as the daemon that handles the actual container orchestration and server lifecycle management.

This stack combines Pterodactyl Panel with Wings daemon, creating a complete game server hosting platform where the panel handles the web interface and API while Wings manages Docker containers running the actual game servers. MariaDB stores all panel data including users, servers, and configurations, while Redis provides high-performance caching for sessions and queues. NGINX serves the panel's web interface and handles SSL termination, creating a production-ready game server management platform that can scale from single servers to multi-node deployments.

This configuration is ideal for game server hosting companies, community administrators running multiple servers, and homelab enthusiasts who want professional-grade game server management. The combination provides enterprise-level features like resource limiting, automated backups, scheduled tasks, and multi-user access control, making it valuable for anyone moving beyond basic game server hosting to a managed platform approach.

## Features

- Multi-game server support with pre-configured eggs for Minecraft, Rust, CS:GO, ARK, and 50+ other games
- Wings daemon integration for Docker-based game server containers with automatic resource management
- Web-based file manager with syntax highlighting for configuration files and real-time editing
- SFTP access on port 2022 for secure file transfers and automated deployment scripts
- Redis-powered session management and queue processing for improved panel responsiveness
- MariaDB backend with optimized queries for handling thousands of servers and users
- Real-time server console access through WebSocket connections with command history
- Comprehensive API for automation, billing system integration, and custom management tools

## Use cases

- Game server hosting providers offering managed Minecraft, Rust, or Source engine servers
- Gaming communities managing multiple dedicated servers with different games and configurations
- Educational institutions providing game development environments for students
- Homelab administrators centralizing game server management for friends and family
- Development teams testing multiplayer games across different server configurations
- Tournament organizers needing rapid deployment and teardown of competitive game servers
- Modded game server communities requiring complex configuration management and file sharing

## Prerequisites

- Docker host with minimum 4GB RAM (8GB+ recommended for multiple game servers)
- Port access for 80/443 (panel), 8080 (Wings API), 2022 (SFTP), and game server ports
- Domain name or static IP for proper SSL certificate configuration and Wings communication
- Basic understanding of game server configuration files and networking concepts
- Docker socket access for Wings container management and game server orchestration
- Environment variables configured for DB_PASSWORD and MYSQL_ROOT_PASSWORD before deployment

## docker-compose.yml

```yaml
services:
  panel:
    image: ghcr.io/pterodactyl/panel:latest
    environment:
      - APP_URL=http://localhost
      - APP_TIMEZONE=UTC
      - APP_SERVICE_AUTHOR=admin@example.com
      - DB_HOST=mariadb
      - DB_PORT=3306
      - DB_DATABASE=panel
      - DB_USERNAME=pterodactyl
      - DB_PASSWORD=${DB_PASSWORD}
      - CACHE_DRIVER=redis
      - SESSION_DRIVER=redis
      - QUEUE_DRIVER=redis
      - REDIS_HOST=redis
    volumes:
      - panel-var:/app/var
      - panel-nginx:/etc/nginx/http.d
      - panel-logs:/app/storage/logs
    ports:
      - "80:80"
      - "443:443"
    depends_on:
      - mariadb
      - redis
    networks:
      - pterodactyl-network
    restart: unless-stopped

  mariadb:
    image: mariadb:10.11
    environment:
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - MYSQL_DATABASE=panel
      - MYSQL_USER=pterodactyl
      - MYSQL_PASSWORD=${DB_PASSWORD}
    volumes:
      - mariadb-data:/var/lib/mysql
    networks:
      - pterodactyl-network
    restart: unless-stopped

  redis:
    image: redis:alpine
    volumes:
      - redis-data:/data
    networks:
      - pterodactyl-network
    restart: unless-stopped

  wings:
    image: ghcr.io/pterodactyl/wings:latest
    environment:
      - TZ=UTC
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /var/lib/docker/containers:/var/lib/docker/containers
      - wings-config:/etc/pterodactyl
      - wings-data:/var/lib/pterodactyl
      - /tmp/pterodactyl:/tmp/pterodactyl
    ports:
      - "8080:8080"
      - "2022:2022"
    networks:
      - pterodactyl-network
    restart: unless-stopped

volumes:
  panel-var:
  panel-nginx:
  panel-logs:
  mariadb-data:
  redis-data:
  wings-config:
  wings-data:

networks:
  pterodactyl-network:
    driver: bridge
```

## .env

```bash
# Pterodactyl Panel
DB_PASSWORD=secure_db_password
MYSQL_ROOT_PASSWORD=secure_root_password

# Panel URL
APP_URL=http://localhost
```

## Usage notes

- Panel at http://localhost
- Wings daemon at port 8080
- Create admin user: docker exec -it panel php artisan p:user:make
- Configure Wings in panel admin
- SFTP at port 2022

## Troubleshooting

- Wings shows 'failed to connect to panel' error: Verify APP_URL matches your domain and Wings can reach panel on port 80/443
- Game servers fail to start with permission errors: Ensure Wings container has proper Docker socket access and /tmp/pterodactyl directory permissions
- Panel shows 500 errors after startup: Check MariaDB connection and run 'docker exec -it panel php artisan migrate' to initialize database schema
- SFTP connections refused on port 2022: Verify Wings container is running and port 2022 is not blocked by host firewall
- Session timeouts and slow panel performance: Check Redis container health and ensure CACHE_DRIVER and SESSION_DRIVER are set to redis
- Wings API unreachable from panel: Confirm Wings daemon is configured in panel admin with correct API endpoint and authentication token

