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.
27015 (UDP)csgo/logs/ or game/csgo/logs/server.cfgsudo 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
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
# 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
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
# 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
# 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
# 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
C:\steamcmd\steamcmd.exeCreate 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_type 0
game_mode 1
mp_maxrounds 30
mp_roundtime 1.92
game_type 0
game_mode 0
mp_maxrounds 10
mp_roundtime 3
mp_friendlyfire 0
game_type 0
game_mode 2
mp_maxrounds 16
mp_roundtime 1.92
game_type 1
game_mode 2
mp_respawn_on_death_ct 1
mp_respawn_on_death_t 1
#!/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
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
Most popular server modification framework for Source engine games.
csgo/ directory (they merge with existing folders)sm version in console to verifyconfigs/admins_simple.ini)# 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
# 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
[ERROR] Failed to contact master server
# Fix: Get GSLT token from Steam
# https://steamcommunity.com/dev/managegameservers
# Add to startup: +sv_setsteamaccount "YOUR_TOKEN"
# 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 ...
# 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
sv_lan 0 (not LAN mode)connect IP:27015 in console# Test from external location
nc -u -v YOUR_SERVER_IP 27015
# Check server status
status
sv_lan
sv_pure 1 (file consistency checking)sv_minrate 128000 for 128 ticktop or htop - CPU at 100%?-tickrate 64 instead of 128maxplayerstv_enable 0 saves resources# Monitor memory
free -h
htop
# CS2 uses more RAM than CS:GO (Source 2 engine)
# Ensure 8GB+ available for CS2, 4GB+ for CS:GO
# 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
plugins/ folderaddons/sourcemod/logs/errors_*.txt# 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/
sv_downloadurl "http://yoursite.com/csgo/"configs/admins_simple.iniapp_update 740 validategame_type 0
game_mode 1
mp_maxrounds 30
mp_roundtime 1.92
mp_c4timer 40
mp_startmoney 800
mp_maxmoney 16000
-tickrate 128
game_type 0
game_mode 0
mp_maxrounds 10
mp_roundtime 3
mp_friendlyfire 0
mp_autokick 0
-tickrate 64
game_type 0
game_mode 2
mp_maxrounds 16
mp_roundtime 1.92
mp_maxplayers 4
-tickrate 128
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
Install Retakes plugin via SourceMod.
sm_retakes_enabled 1
sm_retakes_scramble_teams 1
sm_retakes_max_players 10
Install Multi-1v1 plugin via SourceMod.
tv_maxclients 5htop, iotop, nethogsapp_update via SteamCMDsv_pure 1 or 2 for competitive integrity# 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:
app_update 740 validate)Last updated: January 2025 | Covers CS:GO & CS2 | Complete guide with ports, configs, troubleshooting