docker.recipes

Game Server Stack

advanced

Pterodactyl game server panel with Wings daemon for hosting multiple game servers

Overview

Pterodactyl Panel is an open-source game server management platform built on Laravel and React, designed to provide a modern web interface for managing multiple game servers from a single dashboard. Originally created in 2015, Pterodactyl has become one of the most popular self-hosted game server management solutions, offering features like resource monitoring, file management, user permissions, and automated backups. The platform consists of two main components: the Panel (web interface) and Wings (daemon that actually manages the game servers). This stack combines Pterodactyl Panel with Wings daemon, MariaDB for data persistence, and Redis for session management and caching. MariaDB serves as the primary database storing server configurations, user accounts, and operational data, while Redis handles session storage and caches frequently accessed data to improve panel responsiveness. Wings daemon communicates with the panel via API and manages Docker containers for individual game servers, providing isolation and resource control. The combination creates a comprehensive game hosting platform that can manage everything from small Minecraft servers to large-scale multiplayer game deployments. This stack is ideal for gaming communities, hosting providers, educational institutions, and developers who need reliable game server management with modern tooling. The architecture supports horizontal scaling, allowing multiple Wings nodes to be managed from a single panel instance, making it suitable for everything from home labs to commercial hosting operations.

Key Features

  • Web-based game server management with real-time console access and file manager
  • Multi-node support allowing Wings daemons on different servers managed from one panel
  • Docker-based game server isolation with configurable resource limits and networking
  • Built-in support for 15+ games including Minecraft, CS:GO, ARK, Rust, and Garry's Mod
  • Redis-powered session management and caching for improved panel performance
  • MariaDB with Aria storage engine for enhanced crash recovery and performance
  • RESTful API for automated server provisioning and management integrations
  • Advanced user permission system with subuser access and role-based controls

Common Use Cases

  • 1Gaming community hosting multiple Minecraft, CS:GO, or Rust servers with centralized management
  • 2Educational institutions providing game development servers for computer science courses
  • 3Commercial game hosting providers offering managed server services to customers
  • 4Esports organizations managing practice and tournament servers across multiple games
  • 5Home lab enthusiasts running personal game servers for friends and family
  • 6Discord communities providing dedicated servers for various multiplayer games
  • 7Game development studios hosting playtesting and development servers

Prerequisites

  • Minimum 4GB RAM (2GB for panel/database, 2GB+ for game servers)
  • Docker Engine with privileged container support for Wings daemon
  • Port 80/443 available for panel web interface and 8080/2022 for Wings API
  • Understanding of game server configuration and Docker container concepts
  • SSL certificate for production deployments (Let's Encrypt recommended)
  • Basic knowledge of MySQL/MariaDB for database maintenance and backups

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 panel:
3 image: ghcr.io/pterodactyl/panel:latest
4 container_name: pterodactyl-panel
5 restart: unless-stopped
6 ports:
7 - "${PANEL_PORT:-80}:80"
8 - "${PANEL_SSL:-443}:443"
9 environment:
10 - DB_HOST=panel-db
11 - DB_PORT=3306
12 - DB_DATABASE=panel
13 - DB_USERNAME=pterodactyl
14 - DB_PASSWORD=${DB_PASSWORD}
15 - APP_URL=http://localhost:${PANEL_PORT:-80}
16 - APP_TIMEZONE=${TZ:-UTC}
17 - REDIS_HOST=panel-redis
18 - CACHE_DRIVER=redis
19 - SESSION_DRIVER=redis
20 - QUEUE_CONNECTION=redis
21 volumes:
22 - panel_var:/app/var
23 - panel_nginx:/etc/nginx/http.d
24 - panel_logs:/app/storage/logs
25 depends_on:
26 - panel-db
27 - panel-redis
28
29 panel-db:
30 image: mariadb:10.11
31 container_name: panel-db
32 restart: unless-stopped
33 environment:
34 - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
35 - MYSQL_DATABASE=panel
36 - MYSQL_USER=pterodactyl
37 - MYSQL_PASSWORD=${DB_PASSWORD}
38 volumes:
39 - panel_db_data:/var/lib/mysql
40
41 panel-redis:
42 image: redis:7-alpine
43 container_name: panel-redis
44 restart: unless-stopped
45
46 wings:
47 image: ghcr.io/pterodactyl/wings:latest
48 container_name: pterodactyl-wings
49 restart: unless-stopped
50 ports:
51 - "8080:8080"
52 - "2022:2022"
53 environment:
54 - TZ=${TZ:-UTC}
55 volumes:
56 - /var/run/docker.sock:/var/run/docker.sock
57 - /var/lib/docker/containers:/var/lib/docker/containers
58 - ./wings/config:/etc/pterodactyl
59 - /var/lib/pterodactyl:/var/lib/pterodactyl
60 - /tmp/pterodactyl:/tmp/pterodactyl
61
62volumes:
63 panel_var:
64 panel_nginx:
65 panel_logs:
66 panel_db_data:

.env Template

.env
1# Pterodactyl Game Server Stack
2PANEL_PORT=80
3PANEL_SSL=443
4TZ=UTC
5
6# Database
7DB_PASSWORD=pterodactyl_password
8DB_ROOT_PASSWORD=root_password

Usage Notes

  1. 1Panel at http://localhost (create admin user)
  2. 2Wings daemon connects to panel for game servers
  3. 3Create admin: docker exec pterodactyl-panel php artisan p:user:make
  4. 4Configure Wings node in Panel settings
  5. 5Supports Minecraft, ARK, Rust, CS:GO, and more
  6. 6Each game server runs in isolated container

Individual Services(4 services)

Copy individual services to mix and match with your existing compose files.

panel
panel:
  image: ghcr.io/pterodactyl/panel:latest
  container_name: pterodactyl-panel
  restart: unless-stopped
  ports:
    - ${PANEL_PORT:-80}:80
    - ${PANEL_SSL:-443}:443
  environment:
    - DB_HOST=panel-db
    - DB_PORT=3306
    - DB_DATABASE=panel
    - DB_USERNAME=pterodactyl
    - DB_PASSWORD=${DB_PASSWORD}
    - APP_URL=http://localhost:${PANEL_PORT:-80}
    - APP_TIMEZONE=${TZ:-UTC}
    - REDIS_HOST=panel-redis
    - CACHE_DRIVER=redis
    - SESSION_DRIVER=redis
    - QUEUE_CONNECTION=redis
  volumes:
    - panel_var:/app/var
    - panel_nginx:/etc/nginx/http.d
    - panel_logs:/app/storage/logs
  depends_on:
    - panel-db
    - panel-redis
panel-db
panel-db:
  image: mariadb:10.11
  container_name: panel-db
  restart: unless-stopped
  environment:
    - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
    - MYSQL_DATABASE=panel
    - MYSQL_USER=pterodactyl
    - MYSQL_PASSWORD=${DB_PASSWORD}
  volumes:
    - panel_db_data:/var/lib/mysql
panel-redis
panel-redis:
  image: redis:7-alpine
  container_name: panel-redis
  restart: unless-stopped
wings
wings:
  image: ghcr.io/pterodactyl/wings:latest
  container_name: pterodactyl-wings
  restart: unless-stopped
  ports:
    - "8080:8080"
    - "2022:2022"
  environment:
    - TZ=${TZ:-UTC}
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock
    - /var/lib/docker/containers:/var/lib/docker/containers
    - ./wings/config:/etc/pterodactyl
    - /var/lib/pterodactyl:/var/lib/pterodactyl
    - /tmp/pterodactyl:/tmp/pterodactyl

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 panel:
5 image: ghcr.io/pterodactyl/panel:latest
6 container_name: pterodactyl-panel
7 restart: unless-stopped
8 ports:
9 - "${PANEL_PORT:-80}:80"
10 - "${PANEL_SSL:-443}:443"
11 environment:
12 - DB_HOST=panel-db
13 - DB_PORT=3306
14 - DB_DATABASE=panel
15 - DB_USERNAME=pterodactyl
16 - DB_PASSWORD=${DB_PASSWORD}
17 - APP_URL=http://localhost:${PANEL_PORT:-80}
18 - APP_TIMEZONE=${TZ:-UTC}
19 - REDIS_HOST=panel-redis
20 - CACHE_DRIVER=redis
21 - SESSION_DRIVER=redis
22 - QUEUE_CONNECTION=redis
23 volumes:
24 - panel_var:/app/var
25 - panel_nginx:/etc/nginx/http.d
26 - panel_logs:/app/storage/logs
27 depends_on:
28 - panel-db
29 - panel-redis
30
31 panel-db:
32 image: mariadb:10.11
33 container_name: panel-db
34 restart: unless-stopped
35 environment:
36 - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
37 - MYSQL_DATABASE=panel
38 - MYSQL_USER=pterodactyl
39 - MYSQL_PASSWORD=${DB_PASSWORD}
40 volumes:
41 - panel_db_data:/var/lib/mysql
42
43 panel-redis:
44 image: redis:7-alpine
45 container_name: panel-redis
46 restart: unless-stopped
47
48 wings:
49 image: ghcr.io/pterodactyl/wings:latest
50 container_name: pterodactyl-wings
51 restart: unless-stopped
52 ports:
53 - "8080:8080"
54 - "2022:2022"
55 environment:
56 - TZ=${TZ:-UTC}
57 volumes:
58 - /var/run/docker.sock:/var/run/docker.sock
59 - /var/lib/docker/containers:/var/lib/docker/containers
60 - ./wings/config:/etc/pterodactyl
61 - /var/lib/pterodactyl:/var/lib/pterodactyl
62 - /tmp/pterodactyl:/tmp/pterodactyl
63
64volumes:
65 panel_var:
66 panel_nginx:
67 panel_logs:
68 panel_db_data:
69EOF
70
71# 2. Create the .env file
72cat > .env << 'EOF'
73# Pterodactyl Game Server Stack
74PANEL_PORT=80
75PANEL_SSL=443
76TZ=UTC
77
78# Database
79DB_PASSWORD=pterodactyl_password
80DB_ROOT_PASSWORD=root_password
81EOF
82
83# 3. Start the services
84docker compose up -d
85
86# 4. View logs
87docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/game-server-stack/run | bash

Troubleshooting

  • Wings daemon shows 'connection refused' in panel: Verify Wings configuration file contains correct panel URL and API tokens match between panel and Wings config
  • Game servers fail to start with 'Docker socket permission denied': Add pterodactyl user to docker group or run Wings container with proper Docker socket permissions
  • Panel shows 500 error during installation: Check MariaDB connection and ensure database credentials in panel environment variables match database container settings
  • Redis connection timeout in panel logs: Verify panel-redis container is running and panel Redis host environment variable points to correct container name
  • Wings node appears offline in panel: Check Wings daemon logs for API authentication errors and verify panel URL is accessible from Wings container
  • Game servers consume excessive memory: Configure Wings daemon memory limits in node configuration and ensure Docker container resource constraints are properly set

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space