Skip to main content

Overview

Game Server Nodes provide automated CS2 server deployment, scaling, and management through Kubernetes integration. Nodes handle server provisioning, CS2 installation, plugin management, and infrastructure monitoring.
Game Server Nodes require Kubernetes infrastructure. This feature may not be available in all deployment configurations. Check with your system administrator for availability.

Creating a Game Server Node

Click Create on the Game Server Nodes page to provision a new node.

Setup Process

1

Generate Setup Link

5Stack generates a unique installation script URL:
curl -sSL https://setup.5stack.gg/install?token=unique-token | bash
2

Run Installation Script

Execute the script on your target server. The installer will:
  • Configure Kubernetes pod
  • Install required dependencies
  • Establish connection to 5Stack panel
  • Report hardware specifications
3

Wait for Connection

The dialog displays connection status. Once connected, the node status changes from “Setup” to “Online”.
4

Configure Node

Complete initial configuration:
  • Set region
  • Configure port range
  • Install CS2 (if not already installed)
  • Set plugin version pinning (optional)

Node Configuration

Region Assignment

Assign the node to a geographic region:
// Update node region
mutation UpdateNodeRegion($nodeId: String!, $region: String!) {
  update_game_server_nodes_by_pk(
    pk_columns: { id: $nodeId }
    _set: { region: $region }
  ) {
    id
    region
  }
}
Region configuration affects match server selection. Ensure nodes are assigned to the correct geographic region for optimal player latency.

Port Range Configuration

Define the port range for server allocation:

Port Configuration

Nodes allocate ports incrementally from the start port:
  • Start Port: First available port (e.g., 27015)
  • End Port: Last available port (e.g., 27115)
  • Port Spacing: Each server uses 2 ports (game + GOTV)
Example: Range 27015-27115 supports 50 servers
// Example port calculation
const startPort = 27015;
const endPort = 27115;
const maxServers = Math.floor((endPort - startPort + 1) / 2);
// Result: 50 servers
Ensure your firewall rules allow connections on the entire port range. Both TCP and UDP protocols are required.

Hardware Detection

Nodes automatically detect and report hardware specifications:

CPU Information

interface CPUInfo {
  cpu_sockets: number;              // Number of CPU sockets
  cpu_cores_per_socket: number;     // Cores per socket
  cpu_threads_per_core: number;     // Threads per core (SMT/HT)
  cpu_frequency_info: {
    model: string;                  // CPU model name
    max_frequency: number;          // Maximum frequency in GHz
  };
  cpu_governor_info: {
    governor: string;               // CPU governor (performance/powersave)
  };
}

Performance Features

Low Latency Kernel

Kernel compiled with real-time optimizations for reduced input lag.

CPU Pinning

Ability to pin server processes to specific CPU cores for consistent performance.

GPU Acceleration

GPU detected for accelerated physics and rendering (if available).

CPU Governor Optimization

For optimal performance, CPU governor should be set to “performance” mode:
# Check current governor
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

# Set performance governor (requires root)
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
See CPU Governance Documentation for detailed configuration guides.

Capacity Management

Server Capacity Calculation

Nodes calculate maximum server capacity based on CPU resources:
// Capacity calculation
const calculateMaxServers = (node: GameServerNode): number => {
  if (!node.supports_cpu_pinning) {
    return null; // Unlimited without CPU pinning
  }
  
  const totalCores = 
    node.cpu_sockets * 
    node.cpu_cores_per_socket * 
    node.cpu_threads_per_core;
  
  // Reserve 1 core for Kubernetes
  const availableCores = totalCores - 1;
  
  // 2 cores per CS2 server instance
  return Math.floor(availableCores / 2);
};

Overprovisioning Detection

The system warns when server count exceeds recommended capacity. Overprovisioned nodes may experience:
  • Increased CPU contention
  • Performance degradation
  • Server instability
  • Higher tick rate variance
Example warning calculation:
const overPrevisionedServers = 
  node.total_server_count > maxServers;

if (overPrevisionedServers) {
  console.warn(
    `Node ${node.label} is overprovisioned: ` +
    `${node.total_server_count} servers > ${maxServers} recommended`
  );
}

CS2 Version Management

Installing CS2

For new nodes without CS2:
  1. Click Install CS2 button
  2. Wait for download and installation to complete
  3. Monitor progress in update logs

Version Pinning

Pin nodes to specific CS2 versions:
// Pin to specific build
mutation PinBuildVersion($nodeId: String!, $buildId: Int!) {
  update_game_server_nodes_by_pk(
    pk_columns: { id: $nodeId }
    _set: { pin_build_id: $buildId }
  ) {
    id
    build_id
    pin_build_id
  }
}

// Unpin (use latest version)
mutation UnpinBuildVersion($nodeId: String!) {
  update_game_server_nodes_by_pk(
    pk_columns: { id: $nodeId }
    _set: { pin_build_id: null }
  ) {
    id
    pin_build_id
  }
}
Version pinning allows testing new updates on specific nodes before rolling out to production.

Update Process

Nodes automatically update CS2 when:
  1. New version is released (if not pinned)
  2. Pinned version changes
  3. Manual update is triggered
Update Status Values:
  • pending: Update queued
  • downloading: Downloading CS2 files
  • installing: Installing update
  • completed: Update successful
  • failed: Update failed (check logs)

Plugin Management

Plugin Version Pinning

Pin specific 5Stack plugin versions:
mutation PinPluginVersion($nodeId: String!, $version: String!) {
  update_game_server_nodes_by_pk(
    pk_columns: { id: $nodeId }
    _set: { pin_plugin_version: $version }
  ) {
    id
    pin_plugin_version
  }
}

Plugin Compatibility

Each plugin version specifies minimum CS2 build requirements:
interface PluginVersion {
  version: string;              // Plugin version (e.g., "2.0.1")
  min_game_build_id: number;    // Minimum CS2 build required
  published_at: string;         // Release date
}
Using incompatible plugin versions may cause:
  • Server crashes
  • Feature malfunctions
  • Match connection issues

Server Scheduling

Enable/Disable Scheduling

Control whether the node accepts new matches:
// Disable scheduling (drain node)
mutation DisableScheduling($nodeId: String!) {
  update_game_server_nodes_by_pk(
    pk_columns: { id: $nodeId }
    _set: { status: "NotAcceptingNewMatches" }
  ) {
    id
    status
  }
}
Use Cases:
  • Maintenance windows
  • Gradual node decommissioning
  • Testing and troubleshooting
  • Load balancing adjustments

Node Status

enum NodeStatus {
  Setup = 'Setup',                          // Initial setup
  Online = 'Online',                        // Active and accepting matches
  NotAcceptingNewMatches = 'NotAcceptingNewMatches',  // Draining
  Offline = 'Offline'                       // Disconnected
}

Demo Network Limiter

Control bandwidth usage for demo file uploads:

Network Limiting

Limit upload speed to prevent saturating network connections:
  • Configure in Mbps (e.g., 100 Mbps)
  • Set to null for unlimited
  • Applied per-node across all servers
mutation SetNetworkLimit($nodeId: String!, $limit: Int) {
  update_game_server_nodes_by_pk(
    pk_columns: { id: $nodeId }
    _set: { demo_network_limiter: $limit }
  ) {
    id
    demo_network_limiter
  }
}

File Management

Access node file system:
  1. Navigate to Game Server Nodes
  2. Select a node from the list
  3. Click Files in the dropdown menu
  4. Browse CS2 installation directory
Common File Operations:
  • View configuration files
  • Edit server settings
  • Download logs
  • Upload custom content

Monitoring

Node Metrics

Enable real-time metrics display:
interface NodeMetrics {
  cpu_usage: number;        // CPU utilization percentage
  memory_usage: number;     // Memory utilization percentage
  disk_usage: number;       // Disk space utilization
  network_rx: number;       // Network receive rate (Mbps)
  network_tx: number;       // Network transmit rate (Mbps)
}
Toggle metrics display with the Display Metrics switch.

Service Logs

View real-time logs for:
  • Node connection events
  • CS2 update progress
  • Server provisioning
  • Error diagnostics
The node list supports advanced filtering:
interface NodeFilters {
  name: string;              // Search by node label
  regions: string[];         // Filter by region(s)
  onlyEnabled: boolean;      // Show only enabled nodes
  hideOffline: boolean;      // Hide offline nodes
}
Filter Persistence: Filters are saved to browser localStorage and persist across sessions.

GraphQL API

Subscribe to Nodes

subscription GetGameServerNodes(
  $limit: Int!
  $offset: Int!
  $where_clause: game_server_nodes_bool_exp!
  $label_order: order_by!
) {
  game_server_nodes(
    limit: $limit
    offset: $offset
    where: $where_clause
    order_by: { label: $label_order }
  ) {
    id
    label
    status
    region
    enabled
    build_id
    pin_build_id
    pin_plugin_version
    lan_ip
    public_ip
    start_port_range
    end_port_range
    supports_low_latency
    supports_cpu_pinning
    gpu
    cpu_sockets
    cpu_cores_per_socket
    cpu_threads_per_core
    total_server_count
    available_server_count
    demo_network_limiter
    offline_at
  }
}

Update Node Configuration

mutation UpdateGameServerNode(
  $id: String!
  $label: String
  $region: String
  $enabled: Boolean
  $start_port_range: Int
  $end_port_range: Int
) {
  update_game_server_nodes_by_pk(
    pk_columns: { id: $id }
    _set: {
      label: $label
      region: $region
      enabled: $enabled
      start_port_range: $start_port_range
      end_port_range: $end_port_range
    }
  ) {
    id
  }
}

Best Practices

Always set CPU governor to “performance” mode for game server nodes:
  • Ensures consistent clock speeds
  • Reduces tick rate variance
  • Improves input responsiveness
  • Eliminates frequency scaling delays
See CPU Governance Guide for automation scripts.
Follow capacity recommendations:
  • Monitor overprovisioning warnings
  • Reserve 1 CPU core for Kubernetes overhead
  • Allocate 2 cores per CS2 server instance
  • Consider CPU pinning for consistent performance
  • Leave 10-20% headroom for burst capacity
Use version pinning for staged rollouts:
  1. Pin test nodes to new CS2 versions
  2. Verify stability and compatibility
  3. Gradually update production nodes
  4. Keep backup nodes on stable versions
Optimize network settings:
  • Configure demo network limiter based on bandwidth
  • Use LAN IPs for intra-datacenter communication
  • Ensure firewall rules allow full port range
  • Monitor network utilization during peak hours

Troubleshooting

Symptoms: Node stuck in “Setup” statusSolutions:
  1. Verify installation script ran successfully
  2. Check network connectivity to panel API
  3. Review node logs for connection errors
  4. Confirm Kubernetes pod is running
  5. Validate firewall rules allow outbound connections
Symptoms: Update status shows “failed”Solutions:
  1. Check available disk space
  2. Verify Steam credentials (if required)
  3. Review update logs for specific errors
  4. Ensure internet connectivity
  5. Retry update manually
Symptoms: High CPU usage, server lag, tick rate dropsSolutions:
  1. Verify CPU governor is set to “performance”
  2. Check for overprovisioning warnings
  3. Monitor system metrics during matches
  4. Consider reducing server count
  5. Enable CPU pinning if supported
  6. Upgrade hardware if consistently overloaded
Symptoms: Servers fail to start, port binding errorsSolutions:
  1. Verify port range is correctly configured
  2. Check for port conflicts with other services
  3. Ensure firewall allows the full port range
  4. Confirm no external processes are using ports
  5. Restart node to clear port allocations

Dedicated Servers

Manage individual CS2 server instances

CPU Pinning

Configure CPU affinity for optimal performance

Low Latency Kernel

Install and configure low-latency kernel patches

Regions

Configure geographic regions for node placement

Build docs developers (and LLMs) love