Pterodactyl Panel Installation for Game Servers
Pterodactyl is a professional game server panel that provides a web interface for managing multiple game servers. This guide covers complete installation of the Pterodactyl Panel (control panel) and Wings daemon (server management), configuration of game eggs, setup of nodes, and integration with game servers. Pterodactyl is designed for hosting providers and enables efficient multi-server management.
Table of Contents
- Overview
- System Requirements
- Panel Installation
- Wings Daemon Installation
- Database Setup
- Web Server Configuration
- Node Configuration
- Game Eggs
- User Management
- Server Creation
- Security Hardening
- Monitoring
- Conclusion
Overview
Pterodactyl provides:
- Web-based server management interface
- Multi-user support with roles and permissions
- Node-based architecture for scalability
- Game egg support (configurations for 100+ games)
- File management and editing
- Console access and command execution
- Backup and restore functionality
- Resource monitoring and allocation
- API for integration
This professional system is used by many game hosting providers.
System Requirements
Panel Server Requirements
- Ubuntu 20.04 LTS or 22.04 LTS
- 2GB RAM minimum (4GB recommended)
- 20GB disk space
- PHP 8.0+ with extensions
- MySQL 5.7 or MariaDB 10.2+
- Redis (optional but recommended)
Wings Node Requirements (per node)
- Ubuntu 20.04 LTS or 22.04 LTS
- 2GB+ RAM (depending on servers)
- 10GB+ disk space per server
- Docker engine
- Stable internet connection
Panel Installation
Install system dependencies:
sudo apt-get update
sudo apt-get install -y software-properties-common
# Add PHP repository
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
# Install PHP and extensions
sudo apt-get install -y \
php8.1-cli php8.1-common php8.1-fpm \
php8.1-pdo php8.1-mysql php8.1-mbstring \
php8.1-tokenizer php8.1-bcmath php8.1-xml \
php8.1-curl php8.1-zip php8.1-gd \
php8.1-json php8.1-redis
# Install Nginx
sudo apt-get install -y nginx
# Install MySQL
sudo apt-get install -y mysql-server
# Install other dependencies
sudo apt-get install -y curl wget git unzip
Download Pterodactyl Panel:
# Create application directory
sudo mkdir -p /var/www/pterodactyl
cd /var/www/pterodactyl
# Download latest release
sudo wget https://github.com/pterodactyl/panel/releases/download/v1.9.0/panel.tar.gz
sudo tar -xzf panel.tar.gz
sudo chown -R www-data:www-data /var/www/pterodactyl
Configure environment:
cd /var/www/pterodactyl
# Copy configuration template
sudo cp .env.example .env
# Generate application key
sudo php artisan key:generate
# Edit configuration
sudo nano .env
Edit .env file:
APP_NAME=Pterodactyl
APP_ENV=production
APP_KEY=base64:xxxxx # Generated by key:generate
APP_URL=https://panel.myhost.com
# Database configuration
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=pterodactyl
DB_USERNAME=pterodactyl
DB_PASSWORD=secure_password
# Redis configuration (optional)
CACHE_DRIVER=redis
SESSION_DRIVER=redis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
# Mail configuration
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=your_username
MAIL_PASSWORD=your_password
MAIL_FROM="[email protected]"
Create database:
# Start MySQL
sudo systemctl start mysql
# Create database and user
sudo mysql -e "CREATE DATABASE pterodactyl;"
sudo mysql -e "CREATE USER 'pterodactyl'@'localhost' IDENTIFIED BY 'secure_password';"
sudo mysql -e "GRANT ALL PRIVILEGES ON pterodactyl.* TO 'pterodactyl'@'localhost';"
sudo mysql -e "FLUSH PRIVILEGES;"
Run migrations:
cd /var/www/pterodactyl
# Install dependencies
sudo composer install --no-dev --optimize-autoloader
# Run migrations
sudo php artisan migrate --force
# Seed initial data
sudo php artisan seed:run --force
# Create admin user
sudo php artisan make:user
Wings Daemon Installation
Wings is the daemon that runs on each node to manage game servers. Install Docker first:
sudo apt-get install -y docker.io
sudo systemctl enable docker
sudo systemctl start docker
# Add user to docker group
sudo usermod -aG docker $USER
Install Wings:
# Create wings directory
sudo mkdir -p /etc/pterodactyl
cd /etc/pterodactyl
# Download wings
sudo wget https://github.com/pterodactyl/wings/releases/download/v1.11.0/wings_linux_amd64
sudo chmod +x wings_linux_amd64
# Create symlink
sudo ln -s /etc/pterodactyl/wings_linux_amd64 /usr/local/bin/wings
Create systemd service:
sudo tee /etc/systemd/system/wings.service > /dev/null <<'EOF'
[Unit]
Description=Pterodactyl Wings Daemon
After=docker.service
Requires=docker.service
PartOf=docker.service
[Service]
User=root
WorkingDirectory=/etc/pterodactyl
ExecStart=/usr/local/bin/wings
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable wings
Create wings configuration:
sudo tee /etc/pterodactyl/config.yml > /dev/null <<'EOF'
debug: false
uuid: "node-uuid-here"
token_id: "token-id-here"
token: "token-here"
system:
data: /var/lib/pterodactyl
arch: amd64
username: pterodactyl
remote: https://panel.myhost.com
api:
host: 0.0.0.0
port: 8080
ssl:
enabled: false
cert: /etc/pterodactyl/certs/server.crt
key: /etc/pterodactyl/certs/server.key
allowlist:
0.0.0.0/0: []
docker:
network:
name: pterodactyl_nw
driver: bridge
registries: {}
throttles:
enabled: true
limit: 100
period: 60
EOF
sudo chown root:root /etc/pterodactyl/config.yml
sudo chmod 600 /etc/pterodactyl/config.yml
Web Server Configuration
Configure Nginx for Pterodactyl:
sudo tee /etc/nginx/sites-available/pterodactyl > /dev/null <<'EOF'
upstream backend {
server unix:/var/run/php/php8.1-fpm.sock;
}
server {
listen 80;
server_name panel.myhost.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name panel.myhost.com;
root /var/www/pterodactyl/public;
index index.html index.htm index.php;
charset utf-8;
ssl_certificate /path/to/ssl/cert.pem;
ssl_certificate_key /path/to/ssl/key.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass backend;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_PROXY "";
fastcgi_intercept_errors off;
}
location ~ /\.ht {
deny all;
}
location ~* ^/uploads/ {
client_max_body_size 100m;
}
}
EOF
# Enable site
sudo ln -s /etc/nginx/sites-available/pterodactyl /etc/nginx/sites-enabled/
sudo rm -f /etc/nginx/sites-enabled/default
# Test and reload
sudo nginx -t
sudo systemctl reload nginx
Node Configuration
Add node from Panel:
- Login to Pterodactyl panel as admin
- Navigate to Admin > Nodes
- Create New Node with settings:
- Name: Node 1
- FQDN: node1.myhost.com
- Description: Primary game server node
- Location: datacenter location
- Memory: 32GB
- Disk: 500GB
- Port: 8080
Get configuration token:
# In panel, click node and get configuration token
# Copy token and paste into wings config.yml
sudo nano /etc/pterodactyl/config.yml
# Replace:
token_id: "actual-token-id"
token: "actual-token"
# Start wings
sudo systemctl start wings
sudo systemctl status wings
Game Eggs
Pterodactyl uses "eggs" to define game server configurations. Popular eggs include:
# View installed eggs via web panel
# Admin > Eggs
# Popular game eggs:
# - Counter-Strike 2
# - Rust
# - Valheim
# - ARK Survival Evolved
# - Minecraft Java/Bedrock
# - Terraria
# - 7 Days to Die
# - And 100+ more
Create custom egg:
# Via web panel: Admin > Eggs > Create New
# Define:
# - Name
# - Description
# - Author
# - Docker image
# - Install script
# - Startup command
# - Variables (port, password, etc.)
Example egg JSON:
{
"meta": {
"version": "PTDL_v2"
},
"exported_at": "2024-01-01T00:00:00Z",
"name": "Valheim",
"author": "pterodactyl",
"description": "Valheim Dedicated Server",
"docker_image": "ghcr.io/pterodactyl/yolks:java_18",
"startup": "./start_server.sh",
"config": {
"files": "{}",
"startup": "{\n \"done\": \"Server running\"\n}",
"logs": "{}",
"stop": "^C"
},
"scripts": {
"installation": {
"container": "ghcr.io/pterodactyl/yolks:debian",
"entrypoint": "bash",
"script": "#!/bin/bash\ncd /mnt/server\necho 'Installing Valheim server...'"
}
},
"variables": [
{
"name": "Server Name",
"description": "The name of your server",
"env_variable": "SERVER_NAME",
"default_value": "MyValheimServer",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20"
},
{
"name": "World Name",
"description": "Name of the world to use",
"env_variable": "WORLD_NAME",
"default_value": "Dedicated",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20"
}
]
}
User Management
Create admin user:
cd /var/www/pterodactyl
# Create via command line
sudo php artisan make:user
# Follow prompts for:
# - Email
# - Username
# - First name
# - Last name
# - Password
# - Admin (yes/no)
User roles and permissions (via web panel):
- Admin: Full access
- Manager: Server and node management
- User: Limited to assigned servers
- Subuser: Guest access to servers
Server Creation
Create game server via panel:
- Admin > Servers > Create New
- Configure:
- Server name
- Owner (user account)
- Node (select node)
- Egg (select game type)
- Memory allocation
- Disk allocation
- CPU limit
- Set variables (server name, password, etc.)
Monitor server:
# Via web panel:
# Console tab: View and execute console commands
# Files tab: Upload/manage files
# Database tab: Manage databases
# Backups tab: Create/restore backups
# Settings tab: Modify server configuration
Security Hardening
Enable SSL/TLS:
# Install certbot
sudo apt-get install certbot python3-certbot-nginx
# Generate certificate
sudo certbot certonly --nginx -d panel.myhost.com
# Auto-renewal
sudo systemctl enable certbot.timer
Configure firewall:
sudo ufw default deny incoming
sudo ufw default allow outgoing
# Panel access
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
# SSH
sudo ufw allow 22/tcp
# Wings API
sudo ufw allow 8080/tcp
# Game server ports (example)
sudo ufw allow 2456:3000/tcp
sudo ufw allow 2456:3000/udp
sudo ufw enable
Secure panel:
# Set strong admin password
# Enable two-factor authentication (2FA in panel settings)
# Disable user registration
# Restrict API access
# Via .env:
APP_ENVIRONMENT=production
APP_DEBUG=false
APP_TRUST_PROXIES=127.0.0.1
Monitoring
Monitor panel health:
# Check services
sudo systemctl status nginx
sudo systemctl status mysql
sudo systemctl status php8.1-fpm
# Check logs
sudo tail -f /var/log/nginx/error.log
sudo tail -f /var/log/mysql/error.log
# Wings logs
sudo journalctl -u wings -f
Monitor node resources:
# Via panel: Admin > Nodes > View node
# Shows CPU, memory, disk usage
# Active servers and player counts
Create monitoring script:
sudo tee /root/monitor_pterodactyl.sh > /dev/null <<'EOF'
#!/bin/bash
echo "=== Pterodactyl Health Check ==="
echo "Time: $(date)"
echo ""
# Services check
echo "=== Services Status ==="
for service in nginx mysql php8.1-fpm wings; do
if systemctl is-active --quiet $service; then
echo "✓ $service: Running"
else
echo "✗ $service: Stopped"
fi
done
# Disk space
echo ""
echo "=== Disk Usage ==="
df -h /var/www/pterodactyl /var/lib/pterodactyl | tail -2
# Database check
echo ""
echo "=== Database ==="
mysql -e "SELECT COUNT(*) as servers FROM servers;" 2>/dev/null
# Panel connectivity
echo ""
echo "=== Panel Access ==="
curl -s -I https://panel.myhost.com | head -1
# Wings connectivity
echo ""
echo "=== Wings Access ==="
curl -s -I http://localhost:8080/api/system 2>/dev/null | head -1 || echo "Wings not responding"
EOF
sudo chmod +x /root/monitor_pterodactyl.sh
Schedule monitoring:
sudo crontab -e
# Add monitoring every 5 minutes
*/5 * * * * /root/monitor_pterodactyl.sh >> /var/log/pterodactyl-monitor.log 2>&1
Conclusion
Pterodactyl provides a professional, scalable solution for managing game servers at scale. Its web interface, role-based access, and integration capabilities make it ideal for hosting providers and larger communities.
Key takeaways:
- Pterodactyl separates panel (control) from Wings (execution)
- Node-based architecture allows horizontal scaling
- Game eggs define server configurations
- User roles enable delegated management
- API enables integration with external systems
- Monitor panel and nodes continuously
- Implement SSL/TLS and firewall security
- Regular backups of panel database
A properly deployed Pterodactyl installation can manage hundreds of game servers efficiently.


