📚 Navigation

Overview 🔌 Ports Installation ⚙️ Configuration Parameters Plugins & Mods 🔧 Troubleshooting Game Modes

Counter-Strike: Global Offensive & CS2 Server Hosting Guide

Overview

Counter-Strike: Global Offensive (CS:GO) and Counter-Strike 2 (CS2) are competitive tactical first-person shooters developed by Valve. CS2 replaced CS:GO in September 2023, transitioning from Source 1 to Source 2 engine.

Quick Reference

🔌 Ports Required

Port Protocol Purpose Required
27015 UDP Main game server port (client connections) ✓ Yes
27015 TCP RCON (Remote Console) access Optional
27020 UDP SourceTV (GOTV) spectator port Optional
27005 UDP Client port (Steam connection) Optional
27035-27036 TCP Steam P2P communication (outbound) Optional

Firewall Configuration Examples

UFW (Ubuntu/Debian)

sudo ufw allow 27015/udp comment 'CS:GO/CS2 game port'
sudo ufw allow 27015/tcp comment 'CS:GO/CS2 RCON'
sudo ufw allow 27020/udp comment 'CS:GO/CS2 SourceTV'
sudo ufw allow 27005/udp comment 'CS:GO/CS2 client port'
sudo ufw reload

FirewallD (CentOS/RHEL/Fedora)

sudo firewall-cmd --permanent --add-port=27015/udp --add-port=27015/tcp
sudo firewall-cmd --permanent --add-port=27020/udp --add-port=27005/udp
sudo firewall-cmd --reload

Windows Firewall

# Run in PowerShell as Administrator
New-NetFirewallRule -DisplayName "CS:GO/CS2 UDP" -Direction Inbound -Protocol UDP -LocalPort 27015,27020,27005 -Action Allow
New-NetFirewallRule -DisplayName "CS:GO/CS2 TCP" -Direction Inbound -Protocol TCP -LocalPort 27015 -Action Allow

iptables (Legacy Linux)

sudo iptables -A INPUT -p udp --dport 27015 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 27015 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 27020 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 27005 -j ACCEPT
sudo service iptables save

Installation & Setup

System Requirements

CS:GO Server

CS2 Server

Installation via SteamCMD (Linux)

Install SteamCMD

# Ubuntu/Debian
sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install lib32gcc-s1 steamcmd

# Create steam user
sudo useradd -m -s /bin/bash steam
sudo su - steam

# CentOS/RHEL
sudo yum install glibc.i686 libstdc++.i686
mkdir ~/steamcmd && cd ~/steamcmd
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xvzf steamcmd_linux.tar.gz

CS:GO Server Installation

# Run SteamCMD
./steamcmd.sh

# Login anonymously
login anonymous

# Set install directory
force_install_dir ./csgo-server

# Install CS:GO dedicated server (App ID 740)
app_update 740 validate

# Exit
quit

CS2 Server Installation

# Run SteamCMD
./steamcmd.sh

# Login (CS2 may require Steam account with CS2)
login anonymous
# Or: login  

# Set install directory
force_install_dir ./cs2-server

# Install CS2 dedicated server (App ID 730)
app_update 730 validate

# Exit
quit

Windows Installation

  1. Download SteamCMD for Windows
  2. Extract to C:\steamcmd\
  3. Run steamcmd.exe
  4. Execute same commands as Linux (use Windows paths)

⚙️ Server Configuration

server.cfg - Essential Settings

Create csgo/cfg/server.cfg (CS:GO) or game/csgo/cfg/server.cfg (CS2):

// ========================================
// Server Information
// ========================================
hostname "My CS:GO/CS2 Server [128 Tick]"
sv_password ""                      // Server password (blank = public)
sv_region "1"                       // 0=US East, 1=US West, 2=SA, 3=EU, 4=Asia, etc.
sv_tags "128tick,competitive"       // Server browser tags

// ========================================
// RCON Configuration
// ========================================
rcon_password "YourSecurePasswordHere"  // CHANGE THIS!
sv_rcon_banpenalty 0
sv_rcon_maxfailures 5
sv_rcon_minfailures 3
sv_rcon_minfailuretime 30

// ========================================
// Server Core Settings
// ========================================
sv_cheats 0
sv_lan 0
sv_pure 1                           // 0=off, 1=on, 2=strict file consistency
sv_pure_kick_clients 1
sv_minrate 128000                   // Min bandwidth rate (128 tick)
sv_maxrate 0                        // Max bandwidth (0=unlimited)
sv_mincmdrate 128                   // Min client update rate
sv_maxcmdrate 128                   // Max client update rate
sv_minupdaterate 128                // Min server update rate
sv_maxupdaterate 128                // Max server update rate

// ========================================
// Game Settings - Competitive 5v5
// ========================================
game_type 0                         // 0=Classic, 1=Arms Race, etc.
game_mode 1                         // 0=Casual, 1=Competitive, 2=Wingman
mp_teamcashawards 1
mp_playercashawards 1
mp_maxmoney 16000
mp_startmoney 800
mp_buytime 90
mp_buy_anywhere 0
mp_freezetime 15
mp_friendlyfire 0
mp_autoteambalance 1
mp_limitteams 1
mp_maxrounds 30
mp_roundtime 1.92                   // Round time (minutes)
mp_roundtime_defuse 1.92
mp_roundtime_hostage 1.92
mp_c4timer 40                       // C4 bomb timer (seconds)

// ========================================
// Overtime Settings
// ========================================
mp_overtime_enable 1
mp_overtime_maxrounds 6
mp_overtime_startmoney 10000
mp_overtime_halftime_pausetimer 1

// ========================================
// Warmup & Match Settings
// ========================================
mp_do_warmup_period 1
mp_warmuptime 30
mp_warmup_pausetimer 1
mp_halftime 1
mp_halftime_duration 15
mp_match_end_restart 1
mp_match_restart_delay 15

// ========================================
// Communication
// ========================================
sv_alltalk 0                        // Dead players can't talk to alive
sv_deadtalk 0                       // Dead players can't be heard
sv_full_alltalk 0
sv_talk_enemy_dead 1                // Dead can hear enemy team
sv_talk_enemy_living 0              // Living can't hear enemy team

// ========================================
// Voting
// ========================================
sv_vote_issue_kick_allowed 0        // Disable kick votes
sv_vote_issue_changelevel_allowed 0
sv_vote_issue_nextlevel_allowed 0
sv_vote_allow_spectators 0

// ========================================
// SourceTV (GOTV) Configuration
// ========================================
tv_enable 1
tv_delay 90                         // 90 second delay (anti-cheat)
tv_advertise_watchable 1            // List in server browser
tv_name "GOTV"
tv_title "Source TV"
tv_autorecord 1                     // Auto-record matches
tv_allow_camera_man 1
tv_maxclients 10                    // Max GOTV spectators

// ========================================
// Logging
// ========================================
log on
sv_logbans 1
sv_logecho 1
sv_logfile 1
sv_log_onefile 0                    // New log file each map

// ========================================
// Security & Protection
// ========================================
sv_steamauth_enforce 2              // Strict Steam authentication
sv_allow_wait_command 0             // Disable wait command (anti-exploit)
sv_maxconsecutive losses_max 2      // Disconnect laggy players

// ========================================
// Execute Additional Configs
// ========================================
exec banned_user.cfg
exec banned_ip.cfg

Game Mode Configuration

Competitive 5v5 (server.cfg above already configured)

game_type 0
game_mode 1
mp_maxrounds 30
mp_roundtime 1.92

Casual 10v10

game_type 0
game_mode 0
mp_maxrounds 10
mp_roundtime 3
mp_friendlyfire 0

Wingman 2v2

game_type 0
game_mode 2
mp_maxrounds 16
mp_roundtime 1.92

Deathmatch

game_type 1
game_mode 2
mp_respawn_on_death_ct 1
mp_respawn_on_death_t 1

Startup Parameters

Linux Start Script (srcds_run)

#!/bin/bash
# CS:GO/CS2 Server Startup Script

cd /home/steam/csgo-server  # or cs2-server

./srcds_run \
    -game csgo \
    -console \
    -usercon \
    +ip 0.0.0.0 \
    -port 27015 \
    +game_type 0 \
    +game_mode 1 \
    +mapgroup mg_active \
    +map de_dust2 \
    -tickrate 128 \
    +maxplayers 10 \
    +sv_setsteamaccount "YOUR_GSLT_TOKEN_HERE" \
    +sv_lan 0 \
    +exec server.cfg \
    +tv_port 27020 \
    +tv_enable 1

Windows Startup (srcds.exe)

srcds.exe ^
    -game csgo ^
    -console ^
    -usercon ^
    +ip 0.0.0.0 ^
    -port 27015 ^
    +game_type 0 ^
    +game_mode 1 ^
    +mapgroup mg_active ^
    +map de_dust2 ^
    -tickrate 128 ^
    +maxplayers 10 ^
    +sv_setsteamaccount "YOUR_GSLT_TOKEN_HERE" ^
    +exec server.cfg

Parameter Reference

Parameter Description
-game csgo Specify game directory (csgo for both CS:GO and CS2)
-console Enable console output
-usercon Enable RCON (remote console)
+ip 0.0.0.0 Bind to all network interfaces
-port 27015 Server port (default 27015)
+map de_dust2 Starting map
-tickrate 128 Server tick rate (64 default, 128 competitive)
+maxplayers 10 Maximum player slots
+sv_setsteamaccount Game Server Login Token (REQUIRED for public servers)
+game_type 0=Classic, 1=Arms Race, 2=Demolition, 3=Deathmatch
+game_mode 0=Casual, 1=Competitive, 2=Wingman/Skirmish
+mapgroup Map rotation group (mg_active, mg_reserves, etc.)
+tv_port 27020 SourceTV (GOTV) port
+exec server.cfg Execute server configuration file

Plugins & Mods

SourceMod & MetaMod:Source

Most popular server modification framework for Source engine games.

Installation

  1. Download MetaMod:Source (get latest stable build)
  2. Download SourceMod (get latest stable build)
  3. Extract both to csgo/ directory (they merge with existing folders)
  4. Restart server
  5. Type sm version in console to verify

Popular SourceMod Plugins

Installing Plugins

# Download .smx file (compiled plugin)
# Place in: csgo/addons/sourcemod/plugins/

# If .sp file (source):
cd csgo/addons/sourcemod/scripting
./compile.sh pluginname.sp
# Compiled .smx appears in compiled/ directory
mv compiled/pluginname.smx ../plugins/

# Reload plugins without restart
sm plugins reload pluginname

Workshop Maps (CS:GO/CS2)

# Add to server.cfg or startup params
host_workshop_collection "COLLECTION_ID"
workshop_start_map "MAP_ID"

# Or in startup command
+host_workshop_collection 125499818 +workshop_start_map 125488374

🔧 Troubleshooting

Server Won't Start

Missing GSLT Token

[ERROR] Failed to contact master server

# Fix: Get GSLT token from Steam
# https://steamcommunity.com/dev/managegameservers
# Add to startup: +sv_setsteamaccount "YOUR_TOKEN"

Port Already in Use

# Check what's using port 27015
sudo lsof -i :27015
# Or on Windows:
netstat -ano | findstr :27015

# Kill existing process or change port
./srcds_run -game csgo -port 27016 ...

Missing Libraries (Linux)

# Ubuntu/Debian
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install lib32gcc-s1 lib32stdc++6

# CentOS/RHEL
sudo yum install glibc.i686 libstdc++.i686

Connection Issues

Server Not Listed in Browser

Players Can't Connect

# Test from external location
nc -u -v YOUR_SERVER_IP 27015

# Check server status
status
sv_lan

High Ping / Lag

Performance Issues

Low FPS / Stuttering

Memory Usage High

# Monitor memory
free -h
htop

# CS2 uses more RAM than CS:GO (Source 2 engine)
# Ensure 8GB+ available for CS2, 4GB+ for CS:GO

Plugin/Mod Issues

SourceMod Not Loading

# Check MetaMod loaded first
meta list

# Check SourceMod
sm version

# Enable developer mode
developer 1

# Check logs
tail -f csgo/logs/latest.log
tail -f csgo/addons/sourcemod/logs/errors_*.txt

Plugin Crashes Server

Map Issues

Workshop Map Won't Download

# Verify server can access Steam Workshop
# Check firewall allows outbound HTTPS (443)

# Manual workshop download
# Use tool like DepotDownloader or CSGO Server Launcher
# Place .bsp in csgo/maps/
# Place .nav in csgo/maps/
# Place other files in csgo/maps/workshop/

Custom Map Missing Resources

Security Issues

Server Hacked / Unauthorized Access

Game Modes

Competitive 5v5

game_type 0
game_mode 1
mp_maxrounds 30
mp_roundtime 1.92
mp_c4timer 40
mp_startmoney 800
mp_maxmoney 16000
-tickrate 128

Casual 10v10

game_type 0
game_mode 0
mp_maxrounds 10
mp_roundtime 3
mp_friendlyfire 0
mp_autokick 0
-tickrate 64

Wingman 2v2

game_type 0
game_mode 2
mp_maxrounds 16
mp_roundtime 1.92
mp_maxplayers 4
-tickrate 128

Deathmatch

game_type 1
game_mode 2
mp_respawn_on_death_ct 1
mp_respawn_on_death_t 1
mp_respawnwavetime_ct 0
mp_respawnwavetime_t 0
mp_timelimit 10
-tickrate 64

Retakes (Requires Plugin)

Install Retakes plugin via SourceMod.

sm_retakes_enabled 1
sm_retakes_scramble_teams 1
sm_retakes_max_players 10

1v1 Arena (Requires Plugin)

Install Multi-1v1 plugin via SourceMod.

Performance Optimization

Security Best Practices

Updating Server

# Stop server gracefully
rcon quit
# Or: killall srcds_linux (Linux) / taskkill /IM srcds.exe (Windows)

# Run SteamCMD update
cd /home/steam/steamcmd
./steamcmd.sh +login anonymous +force_install_dir /path/to/csgo-server +app_update 740 validate +quit

# Restart server
cd /path/to/csgo-server
./srcds_run -game csgo +map de_dust2 ...

Popular server modifications compatible with Counter-Strike: Global Offensive:

Additional Resources

Important Notes

Last updated: January 2025 | Covers CS:GO & CS2 | Complete guide with ports, configs, troubleshooting