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>
This commit is contained in:
copilot-swe-agent[bot] 2025-11-22 22:38:03 +00:00
parent f8ae24e87b
commit 7fe56d207f
3 changed files with 366 additions and 121 deletions

View file

@ -26,17 +26,14 @@
<h2 id="quick-info">Quick Info</h2>
<div style="background: #1e3a5f; padding: 20px; border-left: 4px solid #3b82f6; margin: 20px 0; border-radius: 4px;">
<ul style="color: #e5e7eb; line-height: 1.8; margin: 0;">
<li><strong style="color: #ffffff;">Default Port:</strong> <code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">27015</code></li>
<li><strong style="color: #ffffff;">Default Port:</strong> <code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">Varies (see configuration)</code></li>
<li><strong style="color: #ffffff;">Protocol:</strong> TCP/UDP</li>
<li><strong style="color: #ffffff;">Minimum RAM:</strong> 1GB</li>
<li><strong style="color: #ffffff;">Engine:</strong> Various</li>
<li><strong style="color: #ffffff;">Steam App ID:</strong> <code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">740</code></li>
<li><strong style="color: #ffffff;">Recommended OS:</strong> Linux (Ubuntu/Debian) or Windows Server</li>
<li><strong style="color: #ffffff;">Configuration Files:</strong><ul style="margin-top: 8px;">
<li><strong style="color: #ffffff;">Configuration Files:</strong><ul style="margin-top: 8px;">
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">csgo/cfg/server.cfg</code> - Server settings</li>
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">csgo/cfg/autoexec.cfg</code> - Server settings</li>
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">csgo/gamemodes_server.txt</code> - Server settings</li>
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">csgo/mapcycle.txt</code> - Mapcycle</li>
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">workshop_installed.txt</code> - Steam Workshop</li>
</ul></li>
</ul>
@ -45,38 +42,7 @@
<h2 id="ports">🔌 Network Ports</h2>
<div style="background: #1e3a5f; padding: 20px; border-left: 4px solid #3b82f6; margin: 20px 0; border-radius: 4px;">
<h3 style="color: #ffffff; margin-top: 0;">Required Ports</h3>
<p style="color: #e5e7eb;">The following ports are used by this game server:</p>
<table style="width: 100%; color: #e5e7eb; border-collapse: collapse;">
<thead>
<tr style="background: #0f172a;">
<th style="padding: 10px; text-align: left; color: #ffffff;">Port</th>
<th style="padding: 10px; text-align: left; color: #ffffff;">Protocol</th>
<th style="padding: 10px; text-align: left; color: #ffffff;">Purpose</th>
</tr>
</thead>
<tbody>
<tr style="border-bottom: 1px solid #374151;">
<td style="padding: 10px;"><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px;">27015</code></td>
<td style="padding: 10px;">UDP</td>
<td style="padding: 10px;">Game/Query port</td>
</tr>
<tr style="border-bottom: 1px solid #374151;">
<td style="padding: 10px;"><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px;">27015</code></td>
<td style="padding: 10px;">TCP</td>
<td style="padding: 10px;">RCON</td>
</tr>
<tr style="border-bottom: 1px solid #374151;">
<td style="padding: 10px;"><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px;">27020</code></td>
<td style="padding: 10px;">UDP</td>
<td style="padding: 10px;">SourceTV (if enabled)</td>
</tr>
<tr style="border-bottom: 1px solid #374151;">
<td style="padding: 10px;"><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px;">27005</code></td>
<td style="padding: 10px;">UDP</td>
<td style="padding: 10px;">Client port (outbound)</td>
</tr>
</tbody>
</table>
<p style="color: #e5e7eb;">The Counter-Strike: Global Offensive & CS2 server typically uses a configurable port. Check your server configuration files for the specific port settings.</p>
<h3 style="color: #ffffff; margin-top: 20px;">Firewall Configuration</h3>
<p style="color: #e5e7eb;">Allow server ports through your firewall:</p>
@ -193,8 +159,340 @@ steamcmd.exe +login anonymous ^
<p>Important configuration files for this server:</p>
<ul>
<li><strong><code>csgo/cfg/server.cfg</code></strong> - Server settings</li>
<li><strong><code>csgo/cfg/autoexec.cfg</code></strong> - Server settings</li>
<li><strong><code>csgo/gamemodes_server.txt</code></strong> - Server settings</li>
<li><strong><code>csgo/mapcycle.txt</code></strong> - Mapcycle</li>
<li><strong><code>workshop_installed.txt</code></strong> - Steam Workshop</li>
</ul>
<h3>Server Commands</h3>
<p>Common administrative commands (access via console or RCON):</p>
<pre><code># 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]
</code></pre>
<h2 id="parameters">⚙️ Startup Parameters</h2>
<h3>Command Line Template</h3>
<p>The server uses the following command line template:</p>
<pre><code>%GAME_TYPE% -console -usercon %MAP% %MAPGROUP% %IP% %PORT% %PLAYERS% -pidfile ogp_game_startup.pid</code></pre>
<h3>Available Startup Parameters</h3>
<p>The following parameters can be configured when starting the server:</p>
<div style="background: #1e3a5f; padding: 20px; border-left: 4px solid #3b82f6; margin: 20px 0; border-radius: 4px;">
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">+sv_setsteamaccount</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Steam Account Login Token</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Manage your steam tokens here</p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">+mapgroup</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Map Group</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">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 </p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">+game_type</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Game Type</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Select a Game Type.</p>
<p style="color: #e5e7eb;"><strong>Options:</strong></p>
<ul style="color: #e5e7eb; margin-left: 20px;">
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">0</code> - Classic</li>
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">1</code> - Arms/DeathMatch</li>
</ul>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">+game_mode</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Game Mode</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Select a Game Mode.</p>
<p style="color: #e5e7eb;"><strong>Options:</strong></p>
<ul style="color: #e5e7eb; margin-left: 20px;">
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">0</code> - Casual/Race</li>
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">1</code> - Competitive/Demolition</li>
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">2</code> - DeathMatch</li>
</ul>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">+host_workshop_collection</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Workshop Collection</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Set the collection id http://steamcommunity.com/workshop/browse/?appid=730&amp;section=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 )</p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">+host_workshop_map</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Workshop Map</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">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 )</p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">+workshop_start_map</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Workshop Start Map</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">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.</p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-tickrate</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - -tickrate</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Specifies server tickrate.</p>
<p style="color: #e5e7eb;"><strong>Options:</strong></p>
<ul style="color: #e5e7eb; margin-left: 20px;">
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">64</code> - 64</li>
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">128</code> - 128</li>
</ul>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-nohltv</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - No SourceTV</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Disables SourceTV and closes its port.</p>
<p style="color: #fbbf24;"><strong>Default:</strong> <code style="background: #0f172a; padding: 2px 6px; border-radius: 3px;">checked</code></p>
</div>
</div>
<h3>Creating a Start Script</h3>
<p><strong>Linux (start.sh):</strong></p>
<pre><code>#!/bin/bash
cd /path/to/server
./server_executable [parameters] 2>&1 | tee server.log
</code></pre>
<pre><code>chmod +x start.sh
./start.sh
</code></pre>
<p><strong>Windows (start.bat):</strong></p>
<pre><code>@echo off
cd /d "%~dp0"
server_executable.exe [parameters]
pause
</code></pre>
<h3>Running as a Service</h3>
<p><strong>Linux (systemd):</strong></p>
<pre><code># 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
</code></pre>
<pre><code># Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable gameserver
sudo systemctl start gameserver
sudo systemctl status gameserver
</code></pre>
<h2 id="troubleshooting">🔧 Troubleshooting</h2>
<h3>Server Won't Start</h3>
<h4>Check Server Logs</h4>
<pre><code># View recent log entries
tail -f server.log
# Or check system logs
journalctl -u gameserver -f
</code></pre>
<h4>Port Already in Use</h4>
<pre><code># Find what's using the port
sudo lsof -i :[PORT]
sudo netstat -tulpn | grep [PORT]
# Kill the process or change server port
</code></pre>
<h4>Missing Dependencies</h4>
<p>Ensure all required dependencies are installed. Check the error messages for missing libraries or packages.</p>
<h3>Connection Issues</h3>
<h4>Can't Connect to Server</h4>
<ol>
<li><strong>Verify server is running:</strong> <code>ps aux | grep server</code></li>
<li><strong>Check port is listening:</strong> <code>netstat -an | grep [PORT]</code></li>
<li><strong>Verify firewall rules</strong> (see Ports section above)</li>
<li><strong>Check server IP:</strong> Use external IP, not localhost</li>
<li><strong>Router/NAT:</strong> Ensure port forwarding is configured</li>
</ol>
<h4>High Latency/Lag</h4>
<ul>
<li>Check server resource usage (CPU, RAM, disk I/O)</li>
<li>Verify network bandwidth is adequate</li>
<li>Consider server location relative to players</li>
<li>Check for background processes consuming resources</li>
</ul>
<h3>Performance Issues</h3>
<h4>Server Lag</h4>
<ol>
<li><strong>Monitor resources:</strong> Use <code>htop</code> or <code>top</code></li>
<li><strong>Check disk I/O:</strong> Use <code>iotop</code></li>
<li><strong>Review server logs</strong> for errors or warnings</li>
<li><strong>Reduce player count</strong> or increase server resources</li>
<li><strong>Optimize configuration</strong> based on server capacity</li>
</ol>
<h4>Memory Leaks</h4>
<pre><code># Monitor memory usage
free -h
top -p $(pgrep -f server)
# Restart server regularly via cron if needed
0 4 * * * /home/gameserver/restart.sh
</code></pre>
<h2 id="performance">Performance Optimization</h2>
<h3>Server Tuning</h3>
<ul>
<li><strong>CPU:</strong> Ensure adequate CPU allocation; most game servers are single-threaded</li>
<li><strong>RAM:</strong> Allocate sufficient memory; monitor usage and adjust as needed</li>
<li><strong>Disk:</strong> Use SSD storage for better I/O performance</li>
<li><strong>Network:</strong> Ensure stable, low-latency connection</li>
</ul>
<h3>Operating System Optimization</h3>
<pre><code># 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"
</code></pre>
<h3>Monitoring</h3>
<p>Set up monitoring to track server health:</p>
<ul>
<li>CPU and memory usage</li>
<li>Network traffic and latency</li>
<li>Player count and activity</li>
<li>Error rates and crash logs</li>
</ul>
<h3>Backup Strategy</h3>
<pre><code>#!/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
</code></pre>
<h2 id="security">Security Best Practices</h2>
<h3>Firewall Configuration</h3>
<pre><code># 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
</code></pre>
<h3>Strong Passwords</h3>
<ul>
<li>Use strong, unique passwords for admin/RCON access</li>
<li>Never use default passwords</li>
<li>Change passwords regularly</li>
<li>Don't share admin credentials unnecessarily</li>
</ul>
<h3>Regular Updates</h3>
<ul>
<li>Keep server software updated to the latest stable version</li>
<li>Update operating system and dependencies regularly</li>
<li>Subscribe to security advisories for your game</li>
<li>Test updates on a staging server before production deployment</li>
</ul>
<h3>Access Control</h3>
<ul>
<li>Limit SSH access to specific IPs if possible</li>
<li>Use SSH keys instead of passwords</li>
<li>Disable root login via SSH</li>
<li>Implement fail2ban or similar intrusion prevention</li>
</ul>
<h3>DDoS Protection</h3>
<ul>
<li>Consider DDoS protection services (Cloudflare, OVH, etc.)</li>
<li>Implement rate limiting where supported</li>
<li>Monitor for unusual traffic patterns</li>
<li>Have an incident response plan</li>
</ul>
<h2>Additional Resources</h2>
<ul>
<li>Official Counter-Strike: Global Offensive & CS2 documentation and forums</li>
<li>Community wikis and guides</li>
<li>Game-specific Discord or Reddit communities</li>
<li>Server hosting provider documentation</li>
</ul>
<div style="background: #78350f; padding: 20px; border-left: 4px solid #f59e0b; margin: 20px 0; border-radius: 4px;">
<h3 style="color: #ffffff; margin-top: 0;"><i class="fas fa-exclamation-triangle" style="color: #fbbf24; margin-right: 8px;"></i>Important Notes</h3>
<ul style="color: #fef3c7; line-height: 1.8; margin: 0;">
<li>Always make backups before making configuration changes</li>
<li>Keep your server and dependencies updated</li>
<li>Monitor server resources and player activity</li>
<li>Follow the game's End User License Agreement (EULA) and Terms of Service</li>
<li>Join community forums for support and best practices</li>
</ul>
</div>
<p style="text-align: center; margin-top: 30px; color: #666;">
<em>Last updated: November 2025 | For Counter-Strike: Global Offensive & CS2 server hosting</em>
</p>

View file

@ -26,7 +26,7 @@
<h2 id="quick-info">Quick Info</h2>
<div style="background: #1e3a5f; padding: 20px; border-left: 4px solid #3b82f6; margin: 20px 0; border-radius: 4px;">
<ul style="color: #e5e7eb; line-height: 1.8; margin: 0;">
<li><strong style="color: #ffffff;">Default Port:</strong> <code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">25565</code></li>
<li><strong style="color: #ffffff;">Default Port:</strong> <code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">Varies (see configuration)</code></li>
<li><strong style="color: #ffffff;">Protocol:</strong> TCP/UDP</li>
<li><strong style="color: #ffffff;">Minimum RAM:</strong> 1GB</li>
<li><strong style="color: #ffffff;">Engine:</strong> Various</li>
@ -38,28 +38,7 @@
<h2 id="ports">🔌 Network Ports</h2>
<div style="background: #1e3a5f; padding: 20px; border-left: 4px solid #3b82f6; margin: 20px 0; border-radius: 4px;">
<h3 style="color: #ffffff; margin-top: 0;">Required Ports</h3>
<p style="color: #e5e7eb;">The following ports are used by this game server:</p>
<table style="width: 100%; color: #e5e7eb; border-collapse: collapse;">
<thead>
<tr style="background: #0f172a;">
<th style="padding: 10px; text-align: left; color: #ffffff;">Port</th>
<th style="padding: 10px; text-align: left; color: #ffffff;">Protocol</th>
<th style="padding: 10px; text-align: left; color: #ffffff;">Purpose</th>
</tr>
</thead>
<tbody>
<tr style="border-bottom: 1px solid #374151;">
<td style="padding: 10px;"><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px;">25565</code></td>
<td style="padding: 10px;">TCP</td>
<td style="padding: 10px;">Game/Query port</td>
</tr>
<tr style="border-bottom: 1px solid #374151;">
<td style="padding: 10px;"><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px;">25575</code></td>
<td style="padding: 10px;">TCP</td>
<td style="padding: 10px;">RCON (if enabled)</td>
</tr>
</tbody>
</table>
<p style="color: #e5e7eb;">The Minecraft Server server typically uses a configurable port. Check your server configuration files for the specific port settings.</p>
<h3 style="color: #ffffff; margin-top: 20px;">Firewall Configuration</h3>
<p style="color: #e5e7eb;">Allow server ports through your firewall:</p>
@ -149,68 +128,33 @@ setadminpassword [password]
<h2 id="parameters">⚙️ Startup Parameters</h2>
<h3>Basic Startup</h3>
<pre><code># Generic startup command structure
./server_executable [parameters]
</code></pre>
<h3>Command Line Template</h3>
<p>The server uses the following command line template:</p>
<pre><code>java %XMS% %XMX% -jar minecraft_server.jar nogui</code></pre>
<h3>Common Parameters</h3>
<ul>
<li><code>-port [number]</code> - Set the server port</li>
<li><code>-maxplayers [number]</code> - Maximum player slots</li>
<li><code>-map [name]</code> - Starting map/level</li>
<li><code>-console</code> - Enable console output</li>
<li><code>-nographics</code> - Run without graphics (headless mode)</li>
</ul>
<h3>Available Startup Parameters</h3>
<p>The following parameters can be configured when starting the server:</p>
<h3>Creating a Start Script</h3>
<div style="background: #1e3a5f; padding: 20px; border-left: 4px solid #3b82f6; margin: 20px 0; border-radius: 4px;">
<p><strong>Linux (start.sh):</strong></p>
<pre><code>#!/bin/bash
cd /path/to/server
./server_executable [parameters] 2>&1 | tee server.log
</code></pre>
<pre><code>chmod +x start.sh
./start.sh
</code></pre>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-Xms</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - -Xms</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Initial memory size for Java can be specified.</p>
<p style="color: #fbbf24;"><strong>Default:</strong> <code style="background: #0f172a; padding: 2px 6px; border-radius: 3px;">1024M</code></p>
</div>
<p><strong>Windows (start.bat):</strong></p>
<pre><code>@echo off
cd /d "%~dp0"
server_executable.exe [parameters]
pause
</code></pre>
<h3>Running as a Service</h3>
<p><strong>Linux (systemd):</strong></p>
<pre><code># 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
</code></pre>
<pre><code># Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable gameserver
sudo systemctl start gameserver
sudo systemctl status gameserver
</code></pre>
<h2 id="troubleshooting">🔧 Troubleshooting</h2>
<h3>Server Won't Start</h3>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-Xmx</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - -Xmx</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Maximum memory size for Java can be specified.</p>
<p style="color: #fbbf24;"><strong>Default:</strong> <code style="background: #0f172a; padding: 2px 6px; border-radius: 3px;">1024M</code></p>
</div>
</div>
<h4>Check Server Logs</h4>
<pre><code># View recent log entries