From 7fe56d207fec96074580a8d001fdb56e3c5b0e00 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 22 Nov 2025 22:38:03 +0000 Subject: [PATCH] Fix troubleshooting section anchor in generated docs Move start script, service setup, and troubleshooting sections outside the conditional block to ensure they appear in all generated documentation regardless of whether detailed XML startup params exist. Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com> --- modules/billing/docs/csgo/index.php | 378 ++++++++++++++++++++--- modules/billing/docs/minecraft/index.php | 106 ++----- tools/generate_game_docs.py | 3 + 3 files changed, 366 insertions(+), 121 deletions(-) diff --git a/modules/billing/docs/csgo/index.php b/modules/billing/docs/csgo/index.php index d9c8f479..cfce7485 100644 --- a/modules/billing/docs/csgo/index.php +++ b/modules/billing/docs/csgo/index.php @@ -26,17 +26,14 @@
27015Varies (see configuration)740csgo/cfg/server.cfg - Server settingscsgo/cfg/autoexec.cfg - Server settingscsgo/gamemodes_server.txt - Server settingscsgo/mapcycle.txt - Mapcycleworkshop_installed.txt - Steam WorkshopThe following ports are used by this game server:
-| Port | -Protocol | -Purpose | -
|---|---|---|
27015 |
- UDP | -Game/Query port | -
27015 |
- TCP | -RCON | -
27020 |
- UDP | -SourceTV (if enabled) | -
27005 |
- UDP | -Client port (outbound) | -
The Counter-Strike: Global Offensive & CS2 server typically uses a configurable port. Check your server configuration files for the specific port settings.
Allow server ports through your firewall:
@@ -193,8 +159,340 @@ steamcmd.exe +login anonymous ^Important configuration files for this server:
csgo/cfg/server.cfg - Server settingscsgo/cfg/autoexec.cfg - Server settingscsgo/gamemodes_server.txt - Server settingscsgo/mapcycle.txt - Mapcycleworkshop_installed.txt - Steam WorkshopCommon administrative commands (access via console or RCON):
+# Kick player
+kick [player_name]
+
+# Ban player
+ban [player_name]
+
+# Change map/level (syntax varies by game)
+changelevel [map_name]
+
+# Set admin password (if supported)
+setadminpassword [password]
+
+
+The server uses the following command line template:
+%GAME_TYPE% -console -usercon %MAP% %MAPGROUP% %IP% %PORT% %PLAYERS% -pidfile ogp_game_startup.pid
+
+The following parameters can be configured when starting the server:
+ ++sv_setsteamaccount
+ - Steam Account Login Token
+ Manage your steam tokens here
++mapgroup
+ - Map Group
+ Default groups: mg_bomb, mg_hostage, mg_armsrace and mg_demolition, to add more maps or mapgroups download "Gamemodes Helper" at http://csgodev.com/downloads/Helper.zip
++game_type
+ - Game Type
+ Select a Game Type.
+Options:
+0 - Classic1 - Arms/DeathMatch+game_mode
+ - Game Mode
+ Select a Game Mode.
+Options:
+0 - Casual/Race1 - Competitive/Demolition2 - DeathMatch+host_workshop_collection
+ - Workshop Collection
+ Set the collection id http://steamcommunity.com/workshop/browse/?appid=730§ion=collections ( Add the api key as a single line into the file webapi_authkey.txt under the mod directory csgo. http://steamcommunity.com/dev/apikey )
++host_workshop_map
+ - Workshop Map
+ Set the map id http://steamcommunity.com/workshop/browse/?appid=730 ( Add the api key as a single line into the file webapi_authkey.txt under the mod directory csgo. http://steamcommunity.com/dev/apikey )
++workshop_start_map
+ - Workshop Start Map
+ Set the id of the workshop map ( this will override the selected map ), you can find the file id for a workshop map in its workshop page URL.
+-tickrate
+ - -tickrate
+ Specifies server tickrate.
+Options:
+64 - 64128 - 128-nohltv
+ - No SourceTV
+ Disables SourceTV and closes its port.
+Default: checked
Linux (start.sh):
+#!/bin/bash
+cd /path/to/server
+./server_executable [parameters] 2>&1 | tee server.log
+
+chmod +x start.sh
+./start.sh
+
+
+Windows (start.bat):
+@echo off
+cd /d "%~dp0"
+server_executable.exe [parameters]
+pause
+
+
+Linux (systemd):
+# Create service file: /etc/systemd/system/gameserver.service
+[Unit]
+Description=Counter-Strike: Global Offensive & CS2 Server
+After=network.target
+
+[Service]
+Type=simple
+User=gameserver
+WorkingDirectory=/home/gameserver/server
+ExecStart=/home/gameserver/server/start.sh
+Restart=on-failure
+RestartSec=10
+
+[Install]
+WantedBy=multi-user.target
+
+
+# Enable and start service
+sudo systemctl daemon-reload
+sudo systemctl enable gameserver
+sudo systemctl start gameserver
+sudo systemctl status gameserver
+
+
+# View recent log entries
+tail -f server.log
+
+# Or check system logs
+journalctl -u gameserver -f
+
+
+# Find what's using the port
+sudo lsof -i :[PORT]
+sudo netstat -tulpn | grep [PORT]
+
+# Kill the process or change server port
+
+
+Ensure all required dependencies are installed. Check the error messages for missing libraries or packages.
+ +ps aux | grep servernetstat -an | grep [PORT]htop or topiotop# Monitor memory usage
+free -h
+top -p $(pgrep -f server)
+
+# Restart server regularly via cron if needed
+0 4 * * * /home/gameserver/restart.sh
+
+
+# Increase file descriptor limits
+echo "* soft nofile 65536" >> /etc/security/limits.conf
+echo "* hard nofile 65536" >> /etc/security/limits.conf
+
+# Network tuning
+sysctl -w net.core.rmem_max=16777216
+sysctl -w net.core.wmem_max=16777216
+sysctl -w net.ipv4.tcp_rmem="4096 87380 16777216"
+sysctl -w net.ipv4.tcp_wmem="4096 87380 16777216"
+
+
+Set up monitoring to track server health:
+#!/bin/bash
+# backup.sh - Run via cron
+DATE=$(date +%Y%m%d_%H%M%S)
+BACKUP_DIR="/backups/gameserver"
+SERVER_DIR="/home/gameserver/server"
+
+# Create backup
+tar -czf $BACKUP_DIR/backup_$DATE.tar.gz -C $SERVER_DIR .
+
+# Keep only last 7 days
+find $BACKUP_DIR -name "backup_*.tar.gz" -mtime +7 -delete
+
+
+# Minimal firewall - only allow necessary ports
+sudo ufw default deny incoming
+sudo ufw default allow outgoing
+sudo ufw allow [SERVER_PORT]/tcp
+sudo ufw allow [SERVER_PORT]/udp
+sudo ufw allow 22/tcp # SSH
+sudo ufw enable
+
+
++ Last updated: November 2025 | For Counter-Strike: Global Offensive & CS2 server hosting +
diff --git a/modules/billing/docs/minecraft/index.php b/modules/billing/docs/minecraft/index.php index a763b85c..a328451f 100644 --- a/modules/billing/docs/minecraft/index.php +++ b/modules/billing/docs/minecraft/index.php @@ -26,7 +26,7 @@25565Varies (see configuration)The following ports are used by this game server:
-| Port | -Protocol | -Purpose | -
|---|---|---|
25565 |
- TCP | -Game/Query port | -
25575 |
- TCP | -RCON (if enabled) | -
The Minecraft Server server typically uses a configurable port. Check your server configuration files for the specific port settings.
Allow server ports through your firewall:
@@ -149,68 +128,33 @@ setadminpassword [password]# Generic startup command structure
-./server_executable [parameters]
-
+The server uses the following command line template:
+java %XMS% %XMX% -jar minecraft_server.jar nogui
--port [number] - Set the server port-maxplayers [number] - Maximum player slots-map [name] - Starting map/level-console - Enable console output-nographics - Run without graphics (headless mode)The following parameters can be configured when starting the server:
-Linux (start.sh):
-#!/bin/bash
-cd /path/to/server
-./server_executable [parameters] 2>&1 | tee server.log
-
-chmod +x start.sh
-./start.sh
-
+ -Xms
+ - -Xms
+ Initial memory size for Java can be specified.
+Default: 1024M
Windows (start.bat):
-@echo off
-cd /d "%~dp0"
-server_executable.exe [parameters]
-pause
-
-
-Linux (systemd):
-# Create service file: /etc/systemd/system/gameserver.service
-[Unit]
-Description=Minecraft Server Server
-After=network.target
-
-[Service]
-Type=simple
-User=gameserver
-WorkingDirectory=/home/gameserver/server
-ExecStart=/home/gameserver/server/start.sh
-Restart=on-failure
-RestartSec=10
-
-[Install]
-WantedBy=multi-user.target
-
-
-# Enable and start service
-sudo systemctl daemon-reload
-sudo systemctl enable gameserver
-sudo systemctl start gameserver
-sudo systemctl status gameserver
-
-
--Xmx
+ - -Xmx
+ Maximum memory size for Java can be specified.
+Default: 1024M
# View recent log entries
diff --git a/tools/generate_game_docs.py b/tools/generate_game_docs.py
index 67513991..8f30242b 100755
--- a/tools/generate_game_docs.py
+++ b/tools/generate_game_docs.py
@@ -677,7 +677,10 @@ setadminpassword [password]
-console - Enable console output
-nographics - Run without graphics (headless mode)
+'''
+ # Common sections for all games (whether they have XML params or not)
+ php_doc += '''
Creating a Start Script
Linux (start.sh):