Skip to main content

Overview

GamePanelX supports hundreds of game and voice servers through a flexible game configuration system. Each game type is defined with startup parameters, configuration files, update methods, and query protocols.

Steam Games

Automatic installation and updates via SteamCMD

Custom Games

Manual and HTTP-based installation for non-Steam games

Voice Servers

TeamSpeak, Mumble, Ventrilo support

Template System

Deploy pre-configured servers instantly

Game Types

GamePanelX categorizes servers into three types:

Game Servers

Characteristics:
  • Multiplayer game servers (CS:GO, Minecraft, TF2, etc.)
  • Player slots and maps
  • RCON password support
  • GameQ query integration
Examples:
  • Counter-Strike: Source / Global Offensive
  • Team Fortress 2
  • Minecraft
  • Garry’s Mod
  • Left 4 Dead 2
  • ARK: Survival Evolved

Voice Servers

Characteristics:
  • Voice communication servers
  • Slot-based licensing
  • Channel management
  • Admin tokens/passwords
Examples:
  • TeamSpeak 3
  • Mumble
  • Ventrilo

Other Servers

Characteristics:
  • Non-game applications
  • Custom server software
  • Utility servers

Game Configuration

Each game is configured in the default_games database table:

Game Database Schema

CREATE TABLE default_games (
  id INT UNSIGNED AUTO_INCREMENT,
  cloudid INT UNSIGNED,              -- Cloud game repository ID
  port SMALLINT UNSIGNED,            -- Default port number
  maxplayers SMALLINT UNSIGNED,      -- Default max players
  startup TINYINT(1) DEFAULT 1,      -- Auto-start on boot
  steam TINYINT(1) DEFAULT 0,        -- Steam-based game?
  type ENUM('game','voice','other'), -- Server type
  
  -- Configuration file settings
  cfg_separator VARCHAR(1),          -- Config separator (= or space)
  config_file VARCHAR(255),          -- Path to config file
  cfg_ip VARCHAR(64),                -- Config key for IP
  cfg_port VARCHAR(64),              -- Config key for port
  cfg_maxplayers VARCHAR(64),        -- Config key for max players
  cfg_map VARCHAR(64),               -- Config key for map
  cfg_hostname VARCHAR(64),          -- Config key for hostname
  cfg_rcon VARCHAR(64),              -- Config key for RCON
  cfg_password VARCHAR(64),          -- Config key for password
  
  -- Server settings
  name VARCHAR(64),                  -- Display name
  intname VARCHAR(12),               -- Internal name (unique)
  working_dir VARCHAR(64),           -- Working directory
  pid_file VARCHAR(64),              -- PID file location
  banned_chars VARCHAR(64),          -- Banned characters in hostname
  gameq_name VARCHAR(64),            -- GameQ protocol name
  
  -- Defaults
  map VARCHAR(255),                  -- Default map
  hostname VARCHAR(255),             -- Default hostname
  steam_name VARCHAR(255),           -- Steam app name
  description VARCHAR(600),          -- Description
  
  -- Installation
  install_mirrors VARCHAR(600),      -- Download mirrors (URLs)
  install_cmd VARCHAR(600),          -- Install command
  update_cmd VARCHAR(600),           -- Update command
  simplecmd VARCHAR(600),            -- Startup command template
  
  PRIMARY KEY (id),
  KEY intname (intname)
);

Key Fields Explained

Unique identifier for the game, used for:
  • Game icon paths: /images/gameicons/small/{intname}.png
  • Template lookups
  • URL parameters
Examples: css, tf2, mcraft, csgo, ts3
For Steam-based games:
  • steam = 1
  • steam_name = Steam app name (e.g., “Counter-Strike Source Dedicated Server”)
  • update_cmd = SteamCMD app ID (e.g., “232330” for CS:GO)
Updates are handled automatically via SteamCMD.
Defines how to update game configuration files:
  • cfg_separator - Character between key and value (=, , or X for XML)
  • config_file - Relative path to config (e.g., cstrike/cfg/server.cfg)
  • cfg_* fields - Configuration file keys to update
Example (Counter-Strike):
hostname = My Server Name
rcon_password = mypassword
sv_password = serverpass
maxplayers = 24
  • working_dir - Directory to cd into before starting (optional)
  • pid_file - File containing process ID for stopping (optional)
Example: Source games use working_dir = orangebox

Installation Methods

GamePanelX supports multiple installation methods:

Steam-Based Installation

For games with steam = 1:
1

SteamCMD Check

Verifies SteamCMD is installed on network server
2

Steam Login

Authenticates using credentials from configuration:
  • Steam username
  • Steam password
  • Steam Guard token (optional)
3

App Download

# SteamCMD installation command
./steamcmd.sh +login <user> <pass> +force_install_dir <path> \
  +app_update <appid> validate +quit
4

Validation

SteamCMD validates downloaded files
5

Callback

Installation script calls back to panel when complete
Steam credentials are configured in Settings and encrypted in the database. Steam Guard authentication codes can be saved to avoid repeated prompts.

Automatic Installation (Non-Steam)

For games with install_mirrors and install_cmd:
Example: Minecraft
install_mirrors: https://launcher.mojang.com/v1/objects/.../server.jar
install_cmd: wget -O minecraft_server.jar {MIRROR}
Process:
  1. Downloads from mirror URL
  2. Executes install command
  3. Extracts/prepares server files
  4. Calls back on completion

Manual Installation

For games without automatic installation:
1

Template Creation

Admin manually creates a template with server files
2

File Upload

Uses file manager or FTP to upload server files
3

Configuration

Sets startup command and working directory
4

Deployment

Template is copied when creating new servers

Startup Commands

Each game has a configurable startup command with parameters:

Startup Parameters

Stored in default_startup and servers_startup tables:
CREATE TABLE default_startup (
  id INT UNSIGNED AUTO_INCREMENT,
  defid INT UNSIGNED,              -- Game ID
  sort_order SMALLINT UNSIGNED,    -- Parameter order
  single TINYINT(1),               -- Single flag (no value)
  usr_edit TINYINT(1) DEFAULT 0,   -- User can edit?
  cmd_item VARCHAR(128),           -- Parameter name (e.g., "-port")
  cmd_value VARCHAR(255),          -- Parameter value (e.g., "27015")
  PRIMARY KEY (id)
);

Building Startup Commands

GamePanelX constructs the startup command from ordered parameters:
Command Construction
// Example for Counter-Strike: Source
$simplecmd = '';
$params = [
    ['cmd_item' => './srcds_run', 'cmd_value' => ''],
    ['cmd_item' => '-game', 'cmd_value' => 'cstrike'],
    ['cmd_item' => '+ip', 'cmd_value' => '%IP%'],
    ['cmd_item' => '-port', 'cmd_value' => '%PORT%'],
    ['cmd_item' => '+map', 'cmd_value' => '%MAP%'],
    ['cmd_item' => '+maxplayers', 'cmd_value' => '%MAXPLAYERS%'],
];

foreach($params as $param) {
    $simplecmd .= $param['cmd_item'] . ' ';
    if($param['cmd_value']) {
        $simplecmd .= $param['cmd_value'] . ' ';
    }
}

// Result:
// ./srcds_run -game cstrike +ip 192.168.1.1 -port 27015 +map de_dust2 +maxplayers 24

Variable Replacement

Supported variables in startup commands and config files:
VariableReplaced WithExample
%IP%Server IP address192.168.1.1
%PORT%Server port27015
%MAP%Default mapde_dust2
%MAXPLAYERS%Max players24
%HOSTNAME%Server hostnameMy Game Server
%RCON%RCON passwordadminpass
%PASSWORD%Server passwordserverpass

GameQ Integration

GamePanelX uses GameQ v2 for real-time server queries:

Supported Protocols

GameQ supports 100+ game protocols. The gameq_name field specifies which protocol to use: Common GameQ Names:
  • csgo - Counter-Strike: Global Offensive
  • css - Counter-Strike: Source
  • tf2 - Team Fortress 2
  • minecraft - Minecraft
  • arkse - ARK: Survival Evolved
  • rust - Rust
  • gmod - Garry’s Mod
  • mta - Multi Theft Auto
  • ts3 - TeamSpeak 3
  • none - No query (TCP check only)

Query Implementation

GameQ Server Query
// Query a server with GameQ
require(DOCROOT.'/includes/GameQ/GameQ.php');

$server = [
    'id' => $srv_arr[0]['id'],
    'type' => $srv_arr[0]['gameq_name'],  // e.g., 'csgo'
    'host' => $srv_arr[0]['ip'].':'.$srv_arr[0]['port']
];

$gq = new GameQ();
$gq->addServer($server);
$gq->setOption('timeout', 5);
$gq->setFilter('normalise');
$results = $gq->requestData();

// Returns:
// [
//   'gq_online' => 1,
//   'gq_hostname' => 'My Server',
//   'gq_numplayers' => 12,
//   'gq_maxplayers' => 24,
//   'gq_map' => 'de_dust2',
//   'players' => [...],
// ]
If GameQ fails or the game doesn’t support queries, GamePanelX falls back to a simple TCP port check to determine online/offline status.

Configuration File Management

GamePanelX automatically updates game configuration files:

Standard Config Format

For key-value configs with separators:
Counter-Strike server.cfg
hostname = My Server Name
rcon_password = secretpass
sv_password = serverpass
maxplayers = 24
Configuration:
  • cfg_separator = (space) or =
  • cfg_hostname = hostname
  • cfg_rcon = rcon_password
  • cfg_password = sv_password
  • cfg_maxplayers = maxplayers

XML Config Format

For XML-based configs (Multi Theft Auto):
mtaserver.conf
<config>
  <serverip>192.168.1.1</serverip>
  <serverport>22003</serverport>
  <servername>MTA Server</servername>
  <maxplayers>32</maxplayers>
</config>
Configuration:
  • cfg_separator = X (uppercase X enables XML mode)
  • cfg_ip = serverip
  • cfg_port = serverport
  • cfg_hostname = servername
  • cfg_maxplayers = maxplayers

Config Update Process

1

File Read

Reads current config file from server directory
2

Pattern Matching

Uses regex to find configuration lines:
// Standard format
preg_replace("/^$cfg_key.*/", "$cfg_key$separator$new_value", $line);

// XML format
preg_replace("/<$cfg_key>.*</", "<$cfg_key>$new_value</$cfg_key>", $line);
3

Value Replacement

Replaces old values with current settings from database
4

File Write

Writes updated config back to file
Config updates happen automatically before server restarts. Manual config edits may be overwritten if they match configured keys.

Template System

Templates provide base server installations for quick deployment:

Template Types

  • Marked as default for a game (is_default = 1)
  • Used when creating servers without specifying template
  • One default per game type recommended

Template Storage

Templates are stored in _SERVERS/templates/:
_SERVERS/templates/
├── 1/          # Template ID 1 (CS:S Default)
├── 2/          # Template ID 2 (TF2 Default)
├── 5/          # Template ID 5 (Minecraft Default)
└── 12/         # Template ID 12 (CS:S + Mods)

Creating Servers from Templates

When creating a server:
  1. Selects template (default or specified)
  2. Executes CreateServer script with template ID
  3. Script copies template directory to server location
  4. Replaces variables in config files
  5. Sets ownership to server user account
  6. Calls back when complete

Adding New Games

To add support for a new game:
1

Game Configuration

Add entry to default_games table with:
  • Name and internal name
  • Default port and max players
  • Steam settings (if applicable)
  • Config file paths and keys
  • Startup command template
2

GameQ Protocol

Find matching GameQ protocol or use none for TCP check
3

Installation Method

Configure:
  • Steam app ID for Steam games
  • Download mirrors for HTTP installation
  • Leave empty for manual template creation
4

Create Template

  • Install game server files
  • Upload to template directory
  • Mark as default template
5

Add Game Icon

Add icon images:
  • /images/gameicons/small/{intname}.png (20x20)
  • /images/gameicons/medium/{intname}.png (32x32)
6

Test

  • Create test server
  • Verify startup command
  • Test start/stop/restart
  • Confirm config updates work
Use the admin panel’s “Add Game” feature to configure games through the UI rather than editing the database directly.

Game-Specific Features

Minecraft

Special handling for Minecraft servers:
  • Forces enable-query=true in server.properties
  • Supports Java-based startup commands
  • Handles JAR file execution

Multi Theft Auto (MTA)

XML config file support:
  • Uses cfg_separator = X for XML mode
  • Custom query port (22126)
  • XML tag-based configuration

Source Engine Games

Counter-Strike, TF2, etc.:
  • Working directory: orangebox
  • SteamCMD auto-updates
  • RCON support
  • GameQ integration for detailed queries

Best Practices

  • Use descriptive internal names (max 12 characters)
  • Set realistic default ports and player counts
  • Test config file updates before deploying
  • Document special requirements in description field
  • Create one default template per game
  • Keep templates updated with latest game versions
  • Remove unnecessary files to reduce template size
  • Test templates before marking as default
  • Order parameters correctly (executable first)
  • Use variables instead of hardcoded values
  • Test commands manually before configuring
  • Document user-editable parameters
  • Schedule Steam game updates during maintenance windows
  • Test updates on development servers first
  • Keep SteamCMD credentials current
  • Monitor disk space during updates

Troubleshooting

Server Won’t Start

  1. Check startup command syntax
  2. Verify executable file exists and is executable
  3. Review working directory path
  4. Check console output for error messages
  5. Test command manually via SSH

Config Updates Not Working

  1. Verify config file path is correct
  2. Check separator character matches file format
  3. Ensure config keys match actual file
  4. Review file permissions (must be writable)
  5. Test regex patterns manually

GameQ Shows Offline

  1. Verify server is actually running
  2. Check GameQ protocol name is correct
  3. Test query manually using GameQ debug mode
  4. Verify firewall allows query port
  5. Fall back to TCP check if GameQ unsupported

Steam Updates Failing

  1. Verify Steam credentials in configuration
  2. Check Steam Guard token is current
  3. Test SteamCMD manually on network server
  4. Review disk space availability
  5. Check Steam app ID is correct
Game-specific documentation and community forums often provide valuable troubleshooting information for server configuration issues.

Build docs developers (and LLMs) love