docker.recipes

Pterodactyl Game Server Panel

advanced

Open source game server management panel with Wings daemon, MariaDB, Redis, and Nginx reverse proxy.

Overview

Pterodactyl Panel is a modern, open-source game server management panel that revolutionizes how administrators deploy and manage game servers. Originally created to address the limitations of traditional game hosting panels, Pterodactyl provides a Docker-native architecture with its Wings daemon handling server isolation and resource management. The panel offers an intuitive web interface for managing multiple game servers across different nodes, supporting popular games like Minecraft, ARK: Survival Evolved, Rust, Garry's Mod, and Counter-Strike servers with automated backups, file management, and real-time console access. This comprehensive stack combines Pterodactyl Panel with MariaDB for storing server configurations, user accounts, and game data, while Redis handles session management and caching for improved panel performance. The Wings daemon (deployed separately on game server nodes) communicates with the panel through secure APIs, managing Docker containers that isolate individual game servers. NGINX serves as the reverse proxy, providing SSL termination, load balancing for multiple panel instances, and efficient static file delivery for the panel's modern React-based frontend. This configuration is ideal for game hosting companies, community server networks, and advanced homelab enthusiasts who need enterprise-grade game server management. The combination of Pterodactyl's resource isolation through Docker, MariaDB's reliable data persistence, Redis's high-performance caching, and NGINX's robust proxy capabilities creates a scalable platform that can manage hundreds of game servers across multiple physical nodes while providing users with a streamlined server management experience.

Key Features

  • Multi-node game server management with Wings daemon communication
  • Docker-based server isolation with automatic resource limiting
  • Redis-powered session management and panel performance caching
  • MariaDB storage for user accounts, server configurations, and audit logs
  • Real-time server console access through WebSocket connections
  • Automated game server backups with configurable retention policies
  • Pterodactyl's egg system for easy game server template deployment
  • NGINX reverse proxy with SSL termination and static asset optimization

Common Use Cases

  • 1Game hosting companies managing customer Minecraft, ARK, and Rust servers
  • 2Community gaming networks with multiple servers across different games
  • 3Educational institutions hosting game servers for computer science courses
  • 4Homelab enthusiasts running family/friend gaming servers with proper management
  • 5Development teams testing multiplayer games across isolated server instances
  • 6Gaming communities migrating from shared hosting to dedicated infrastructure
  • 7Server administrators consolidating multiple game panel solutions

Prerequisites

  • Minimum 4GB RAM (2GB for panel stack, 2GB+ per game server)
  • Docker Engine 20.10+ with compose plugin support
  • Ports 80/443 available for NGINX reverse proxy
  • Valid SSL certificates or domain for HTTPS panel access
  • Understanding of game server administration and Docker concepts
  • Separate Wings daemon installation on game server nodes

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 environment:
5 APP_URL: ${APP_URL}
6 APP_TIMEZONE: ${APP_TIMEZONE}
7 APP_SERVICE_AUTHOR: ${APP_SERVICE_AUTHOR}
8 DB_HOST: database
9 DB_PORT: 3306
10 DB_DATABASE: ${MYSQL_DATABASE}
11 DB_USERNAME: ${MYSQL_USER}
12 DB_PASSWORD: ${MYSQL_PASSWORD}
13 REDIS_HOST: cache
14 CACHE_DRIVER: redis
15 SESSION_DRIVER: redis
16 QUEUE_CONNECTION: redis
17 volumes:
18 - panel_var:/app/var
19 - panel_nginx:/etc/nginx/http.d
20 - panel_logs:/app/storage/logs
21 depends_on:
22 database:
23 condition: service_healthy
24 cache:
25 condition: service_healthy
26 networks:
27 - pterodactyl
28 restart: unless-stopped
29
30 database:
31 image: mariadb:10.11
32 environment:
33 MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
34 MYSQL_DATABASE: ${MYSQL_DATABASE}
35 MYSQL_USER: ${MYSQL_USER}
36 MYSQL_PASSWORD: ${MYSQL_PASSWORD}
37 volumes:
38 - database:/var/lib/mysql
39 healthcheck:
40 test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
41 interval: 10s
42 timeout: 5s
43 retries: 5
44 networks:
45 - pterodactyl
46 restart: unless-stopped
47
48 cache:
49 image: redis:alpine
50 volumes:
51 - cache:/data
52 healthcheck:
53 test: ["CMD", "redis-cli", "ping"]
54 interval: 10s
55 timeout: 5s
56 retries: 5
57 networks:
58 - pterodactyl
59 restart: unless-stopped
60
61 nginx:
62 image: nginx:alpine
63 ports:
64 - "80:80"
65 - "443:443"
66 volumes:
67 - ./nginx.conf:/etc/nginx/nginx.conf:ro
68 - ./certs:/etc/nginx/certs:ro
69 depends_on:
70 - panel
71 networks:
72 - pterodactyl
73 restart: unless-stopped
74
75volumes:
76 panel_var:
77 panel_nginx:
78 panel_logs:
79 database:
80 cache:
81
82networks:
83 pterodactyl:
84 driver: bridge

.env Template

.env
1# App Configuration
2APP_URL=https://panel.example.com
3APP_TIMEZONE=UTC
4APP_SERVICE_AUTHOR=admin@example.com
5
6# Database
7MYSQL_ROOT_PASSWORD=secure_root_password
8MYSQL_DATABASE=pterodactyl
9MYSQL_USER=pterodactyl
10MYSQL_PASSWORD=secure_db_password

Usage Notes

  1. 1Panel available at https://panel.example.com
  2. 2Create admin user: docker compose exec panel php artisan p:user:make
  3. 3Wings daemon runs on game servers separately
  4. 4Supports Minecraft, ARK, Rust, and more

Individual Services(4 services)

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

panel
panel:
  image: ghcr.io/pterodactyl/panel:latest
  environment:
    APP_URL: ${APP_URL}
    APP_TIMEZONE: ${APP_TIMEZONE}
    APP_SERVICE_AUTHOR: ${APP_SERVICE_AUTHOR}
    DB_HOST: database
    DB_PORT: 3306
    DB_DATABASE: ${MYSQL_DATABASE}
    DB_USERNAME: ${MYSQL_USER}
    DB_PASSWORD: ${MYSQL_PASSWORD}
    REDIS_HOST: cache
    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:
    database:
      condition: service_healthy
    cache:
      condition: service_healthy
  networks:
    - pterodactyl
  restart: unless-stopped
database
database:
  image: mariadb:10.11
  environment:
    MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
    MYSQL_DATABASE: ${MYSQL_DATABASE}
    MYSQL_USER: ${MYSQL_USER}
    MYSQL_PASSWORD: ${MYSQL_PASSWORD}
  volumes:
    - database:/var/lib/mysql
  healthcheck:
    test:
      - CMD
      - healthcheck.sh
      - "--connect"
      - "--innodb_initialized"
    interval: 10s
    timeout: 5s
    retries: 5
  networks:
    - pterodactyl
  restart: unless-stopped
cache
cache:
  image: redis:alpine
  volumes:
    - cache:/data
  healthcheck:
    test:
      - CMD
      - redis-cli
      - ping
    interval: 10s
    timeout: 5s
    retries: 5
  networks:
    - pterodactyl
  restart: unless-stopped
nginx
nginx:
  image: nginx:alpine
  ports:
    - "80:80"
    - "443:443"
  volumes:
    - ./nginx.conf:/etc/nginx/nginx.conf:ro
    - ./certs:/etc/nginx/certs:ro
  depends_on:
    - panel
  networks:
    - pterodactyl
  restart: unless-stopped

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 environment:
7 APP_URL: ${APP_URL}
8 APP_TIMEZONE: ${APP_TIMEZONE}
9 APP_SERVICE_AUTHOR: ${APP_SERVICE_AUTHOR}
10 DB_HOST: database
11 DB_PORT: 3306
12 DB_DATABASE: ${MYSQL_DATABASE}
13 DB_USERNAME: ${MYSQL_USER}
14 DB_PASSWORD: ${MYSQL_PASSWORD}
15 REDIS_HOST: cache
16 CACHE_DRIVER: redis
17 SESSION_DRIVER: redis
18 QUEUE_CONNECTION: redis
19 volumes:
20 - panel_var:/app/var
21 - panel_nginx:/etc/nginx/http.d
22 - panel_logs:/app/storage/logs
23 depends_on:
24 database:
25 condition: service_healthy
26 cache:
27 condition: service_healthy
28 networks:
29 - pterodactyl
30 restart: unless-stopped
31
32 database:
33 image: mariadb:10.11
34 environment:
35 MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
36 MYSQL_DATABASE: ${MYSQL_DATABASE}
37 MYSQL_USER: ${MYSQL_USER}
38 MYSQL_PASSWORD: ${MYSQL_PASSWORD}
39 volumes:
40 - database:/var/lib/mysql
41 healthcheck:
42 test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
43 interval: 10s
44 timeout: 5s
45 retries: 5
46 networks:
47 - pterodactyl
48 restart: unless-stopped
49
50 cache:
51 image: redis:alpine
52 volumes:
53 - cache:/data
54 healthcheck:
55 test: ["CMD", "redis-cli", "ping"]
56 interval: 10s
57 timeout: 5s
58 retries: 5
59 networks:
60 - pterodactyl
61 restart: unless-stopped
62
63 nginx:
64 image: nginx:alpine
65 ports:
66 - "80:80"
67 - "443:443"
68 volumes:
69 - ./nginx.conf:/etc/nginx/nginx.conf:ro
70 - ./certs:/etc/nginx/certs:ro
71 depends_on:
72 - panel
73 networks:
74 - pterodactyl
75 restart: unless-stopped
76
77volumes:
78 panel_var:
79 panel_nginx:
80 panel_logs:
81 database:
82 cache:
83
84networks:
85 pterodactyl:
86 driver: bridge
87EOF
88
89# 2. Create the .env file
90cat > .env << 'EOF'
91# App Configuration
92APP_URL=https://panel.example.com
93APP_TIMEZONE=UTC
94APP_SERVICE_AUTHOR=admin@example.com
95
96# Database
97MYSQL_ROOT_PASSWORD=secure_root_password
98MYSQL_DATABASE=pterodactyl
99MYSQL_USER=pterodactyl
100MYSQL_PASSWORD=secure_db_password
101EOF
102
103# 3. Start the services
104docker compose up -d
105
106# 4. View logs
107docker 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/pterodactyl-panel/run | bash

Troubleshooting

  • Panel shows 'Redis connection failed': Verify cache service is healthy and Redis port 6379 is accessible within Docker network
  • Database connection errors on panel startup: Check MariaDB healthcheck status and ensure MYSQL_* environment variables match between services
  • Wings daemon cannot connect to panel: Ensure APP_URL is accessible from Wings nodes and API tokens are correctly configured
  • NGINX 502 Bad Gateway errors: Confirm panel service is running and listening on correct port, check Docker network connectivity
  • Game server deployment fails: Verify Wings daemon is running on target node and Docker socket is accessible
  • Panel performance issues with multiple users: Increase Redis memory allocation and enable MariaDB query cache optimization

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