Game Server Guide

    Deploying Pterodactyl

    Pterodactyl is a free, open-source game server management panel built with PHP, React, and Go. Deploy and manage game servers including Minecraft, Terraria, Counter-Strike, Rust, ARK, and many others in isolated Docker containers on RamNode's reliable VPS hosting.

    Minecraft
    Terraria
    Rust
    ARK
    CS2
    1

    Architecture Overview

    Pterodactyl consists of two main components that can run on separate servers or the same machine:

    Panel

    The web-based control panel built with Laravel and React. Users interact with this interface to create, manage, and monitor game servers.

    Wings

    The server daemon written in Go that manages Docker containers and executes commands from the Panel. Each node running game servers needs Wings installed.

    Deployment Tip

    For small deployments, both Panel and Wings can run on a single RamNode VPS. For production environments with multiple game servers, consider separating them onto dedicated VPS instances for better resource isolation.

    2

    System Requirements

    ComponentPanel ServerWings Server
    CPU1+ vCPU2+ vCPU
    RAM2 GB minimum4 GB minimum
    Storage10 GB SSD50+ GB SSD
    OSUbuntu 22.04/24.04Ubuntu 22.04/24.04
    NetworkStatic IP, ports 80/443Static IP, port 8080
    RamNode Recommendation

    For combined Panel + Wings deployment, a RamNode Standard VPS with 4 GB RAM and 80 GB SSD provides an excellent balance of performance and cost for hosting 5-10 game servers.

    Prerequisites

    • A RamNode VPS running Ubuntu 22.04 or 24.04 LTS
    • Root or sudo access to the server
    • A registered domain name pointed to your server's IP address
    • Basic familiarity with Linux command line
    • An email address for SSL certificate registration
    3

    Initial Server Setup

    Connect and update system
    ssh root@your-server-ip
    apt update && apt upgrade -y
    apt install -y software-properties-common curl apt-transport-https ca-certificates gnupg
    Configure firewall
    ufw allow 22/tcp       # SSH
    ufw allow 80/tcp       # HTTP
    ufw allow 443/tcp      # HTTPS
    ufw allow 8080/tcp     # Wings
    ufw allow 2022/tcp     # SFTP
    ufw --force enable
    4

    Panel Installation

    Installing PHP 8.3

    Add PHP repository and install
    # Add PHP repository
    add-apt-repository ppa:ondrej/php -y
    apt update
    
    # Install PHP and extensions
    apt install -y php8.3 php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip,intl}

    Installing Composer

    Install Composer
    curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

    Installing MariaDB

    Install and configure MariaDB
    apt install -y mariadb-server
    systemctl enable --now mariadb
    
    # Secure the installation
    mysql_secure_installation
    Create database and user
    mysql -u root -p
    
    # Run these SQL commands:
    CREATE USER 'pterodactyl'@'127.0.0.1' IDENTIFIED BY 'YourSecurePassword';
    CREATE DATABASE panel;
    GRANT ALL PRIVILEGES ON panel.* TO 'pterodactyl'@'127.0.0.1' WITH GRANT OPTION;
    EXIT;
    Security Note

    Replace 'YourSecurePassword' with a strong, unique password. Store this password securely as you'll need it during panel configuration.

    Installing Redis and Nginx

    Install Redis and Nginx
    apt install -y redis-server
    systemctl enable --now redis-server
    
    apt install -y nginx
    systemctl enable --now nginx

    Downloading the Panel

    Download and extract Pterodactyl
    mkdir -p /var/www/pterodactyl
    cd /var/www/pterodactyl
    
    # Download the latest release
    curl -Lo panel.tar.gz https://github.com/pterodactyl/panel/releases/latest/download/panel.tar.gz
    tar -xzvf panel.tar.gz
    chmod -R 755 storage/* bootstrap/cache/

    Installing Panel Dependencies

    Install dependencies and configure
    cd /var/www/pterodactyl
    cp .env.example .env
    COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader
    
    # Generate application key
    php artisan key:generate --force

    Configuring the Environment

    Run setup wizards
    php artisan p:environment:setup
    php artisan p:environment:database
    
    # Optional: Configure email settings
    php artisan p:environment:mail
    
    # Run database migrations
    php artisan migrate --seed --force

    Creating an Admin User

    Create admin account
    php artisan p:user:make

    Follow the prompts to enter email, username, and password. Select 'yes' when asked if the user should be an administrator.

    Setting File Permissions

    Set ownership
    chown -R www-data:www-data /var/www/pterodactyl/*
    5

    Nginx Configuration

    Create Nginx configuration
    # /etc/nginx/sites-available/pterodactyl.conf
    server {
        listen 80;
        server_name panel.example.com;
    
        root /var/www/pterodactyl/public;
        index index.html index.htm index.php;
        charset utf-8;
    
        location / {
            try_files $uri $uri/ /index.php?$query_string;
        }
    
        location = /favicon.ico { access_log off; log_not_found off; }
        location = /robots.txt  { access_log off; log_not_found off; }
    
        access_log off;
        error_log /var/log/nginx/pterodactyl.app-error.log error;
    
        client_max_body_size 100m;
        client_body_timeout 120s;
    
        sendfile off;
    
        location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/run/php/php8.3-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
            fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param HTTP_PROXY "";
            fastcgi_intercept_errors off;
            fastcgi_buffer_size 16k;
            fastcgi_buffers 4 16k;
            fastcgi_connect_timeout 300;
            fastcgi_send_timeout 300;
            fastcgi_read_timeout 300;
        }
    
        location ~ /\.ht {
            deny all;
        }
    }
    Enable site and install SSL
    ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/
    rm /etc/nginx/sites-enabled/default
    nginx -t
    systemctl restart nginx
    
    # Install Certbot and obtain SSL
    apt install -y certbot python3-certbot-nginx
    certbot --nginx -d panel.example.com

    Configuring the Queue Worker

    Create queue worker service
    # /etc/systemd/system/pteroq.service
    [Unit]
    Description=Pterodactyl Queue Worker
    After=redis-server.service
    
    [Service]
    User=www-data
    Group=www-data
    Restart=always
    ExecStart=/usr/bin/php /var/www/pterodactyl/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3
    StartLimitInterval=180
    StartLimitBurst=30
    RestartSec=5s
    
    [Install]
    WantedBy=multi-user.target
    Enable queue worker
    systemctl enable --now pteroq

    Setting Up Cron Jobs

    Add scheduler cron job
    crontab -e
    # Add this line:
    * * * * * php /var/www/pterodactyl/artisan schedule:run >> /dev/null 2>&1
    6

    Wings Installation

    Wings is the daemon that runs on each node where game servers will be hosted. It manages Docker containers and communicates with the Panel.

    Installing Docker

    Install Docker
    # Install Docker using the convenience script
    curl -sSL https://get.docker.com/ | CHANNEL=stable bash
    
    # Enable Docker to start on boot
    systemctl enable --now docker
    
    # Verify installation
    docker info
    Important

    Ensure your RamNode VPS is running a supported kernel. Most RamNode VPS instances use KVM virtualization which fully supports Docker. If using OpenVZ, Docker will not work.

    Downloading Wings

    Download and install Wings
    mkdir -p /etc/pterodactyl
    curl -L -o /usr/local/bin/wings \
      "https://github.com/pterodactyl/wings/releases/latest/download/wings_linux_amd64"
    chmod u+x /usr/local/bin/wings

    Creating a Node in the Panel

    1. Log in to your Pterodactyl Panel as an administrator
    2. Navigate to Admin → Nodes
    3. Click 'Create New' and fill in the node details:
      • Name: A descriptive name for the node
      • FQDN: The domain or IP for Wings (e.g., node1.example.com)
      • Memory: Total RAM available for game servers
      • Disk: Total disk space available
    4. After saving, go to the Configuration tab
    5. Copy the auto-deployment command or configuration file

    Configuring Wings

    Example Wings configuration
    # /etc/pterodactyl/config.yml
    debug: false
    uuid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    token_id: xxxxx
    token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    api:
      host: 0.0.0.0
      port: 8080
      ssl:
        enabled: true
        cert: /etc/letsencrypt/live/node1.example.com/fullchain.pem
        key: /etc/letsencrypt/live/node1.example.com/privkey.pem
    system:
      data: /var/lib/pterodactyl/volumes
      sftp:
        bind_port: 2022
    remote: https://panel.example.com

    SSL for Wings

    Generate SSL certificate for Wings
    # If Wings is on a separate server:
    certbot certonly --standalone -d node1.example.com

    Creating the Wings Service

    Create Wings systemd service
    # /etc/systemd/system/wings.service
    [Unit]
    Description=Pterodactyl Wings Daemon
    After=docker.service
    Requires=docker.service
    PartOf=docker.service
    
    [Service]
    User=root
    WorkingDirectory=/etc/pterodactyl
    LimitNOFILE=4096
    PIDFile=/var/run/wings/daemon.pid
    ExecStart=/usr/local/bin/wings
    Restart=on-failure
    StartLimitInterval=180
    StartLimitBurst=30
    RestartSec=5s
    
    [Install]
    WantedBy=multi-user.target
    Enable and start Wings
    systemctl enable --now wings
    7

    Configuring Allocations

    Allocations are IP:port combinations that game servers can use. Each server requires at least one allocation.

    1. In the Panel, go to Admin → Nodes → [Your Node] → Allocation
    2. Enter your server's IP address
    3. Add port ranges for game servers (e.g., 25565-25575 for Minecraft)
    4. Click 'Submit' to create the allocations
    Port Planning

    Plan your port allocations based on the games you'll host. Common ports: Minecraft (25565), Terraria (7777), CS2 (27015), Rust (28015). Reserve ranges to allow for multiple servers of each type.

    Open game server ports in firewall
    # Example: Open Minecraft port range
    ufw allow 25565:25575/tcp
    ufw allow 25565:25575/udp
    
    # Example: Open Terraria ports
    ufw allow 7777:7787/tcp
    ufw allow 7777:7787/udp
    8

    Creating Your First Game Server

    With the Panel and Wings configured, you can now create game servers:

    1. Navigate to Admin → Servers in the Panel
    2. Click 'Create New'
    3. Fill in the server details:
      • Server Name: A descriptive name
      • Owner: Select the user who will manage this server
      • Node: Select your Wings node
      • Allocation: Choose an available port
    4. Configure resource limits (RAM, CPU, Disk)
    5. Select a Nest and Egg (game type)
    6. Click 'Create Server'
    9

    Security Best Practices

    Enable 2FA

    Require two-factor authentication for all admin accounts

    Regular Updates

    Keep the Panel, Wings, and system packages updated

    Firewall Rules

    Only open ports that are actively needed

    SSL Everywhere

    Ensure both Panel and Wings use HTTPS

    Database Security

    Use strong passwords and restrict database access

    Backups

    Configure automated backups for server data and the database

    10

    Troubleshooting

    Pterodactyl Deployed Successfully!

    You now have a fully functional game server management platform. Features include:

    • Docker-based isolation for each game server
    • Built-in SFTP for file management
    • Real-time console access
    • Resource monitoring and management
    • Multi-user support with granular permissions
    • Scheduled tasks and backups