Navigation

Quick Info 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. This guide covers everything needed to host a dedicated CS:GO or CS2 server on Linux or Windows.

Note: CS2 replaced CS:GO in September 2023. Most concepts apply to both, but CS2 uses Source 2 engine with some differences. This guide covers both versions.

Quick Info

Installation & Setup

System Requirements

CS:GO

CS2

Installing SteamCMD

Linux Installation

# Install dependencies (Ubuntu/Debian)
sudo apt update
sudo apt install lib32gcc-s1 lib32stdc++6 steamcmd

# Or manual install
mkdir ~/steamcmd
cd ~/steamcmd
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xvzf steamcmd_linux.tar.gz

Windows Installation

Download SteamCMD from: SteamCMD for Windows

Installing CS:GO/CS2 Server

CS:GO Server

# Run SteamCMD
./steamcmd.sh

# Login anonymously
login anonymous

# Set install directory
force_install_dir ./csgo-server

# Install CS:GO dedicated server
app_update 740 validate

# Exit
quit

CS2 Server

# Run SteamCMD
./steamcmd.sh

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

# Set install directory
force_install_dir ./cs2-server

# Install CS2 dedicated server
app_update 730 validate

# Exit
quit

Server Configuration

server.cfg - Essential Settings

Create csgo/cfg/server.cfg or cs2/cfg/server.cfg:

// Server Information
hostname "My CS:GO/CS2 Server"
sv_password ""                  // Server password (leave blank for public)
sv_region "1"                   // 0=US East, 1=US West, 2=South America, 3=Europe, etc.

// RCON Configuration
rcon_password "YourSecurePassword"
sv_rcon_banpenalty 0
sv_rcon_maxfailures 5

// Server Settings
sv_cheats 0
sv_lan 0
sv_pure 1                       // File consistency checking (0=off, 1=on, 2=strict)
sv_pure_kick_clients 1
sv_minrate 128000
sv_maxrate 0                    // 0=unlimited

// Game Settings
mp_autoteambalance 1
mp_limitteams 1
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_c4timer 40
mp_roundtime 5
mp_roundtime_defuse 1.92
mp_maxrounds 30
mp_overtime_enable 1
mp_overtime_maxrounds 6
mp_overtime_startmoney 10000

// Competitive Settings (5v5)
mp_match_end_restart 1
mp_halftime 1
mp_warmuptime 30
mp_do_warmup_period 1
mp_warmup_pausetimer 1

// Communication
sv_alltalk 0
sv_deadtalk 0
sv_full_alltalk 0
sv_talk_enemy_dead 1
sv_talk_enemy_living 0

// Voting
sv_vote_issue_kick_allowed 0
sv_vote_issue_changelevel_allowed 0
sv_vote_issue_nextlevel_allowed 0

// SourceTV (GOTV)
tv_enable 1
tv_delay 90
tv_advertise_watchable 1
tv_name "GOTV"
tv_title "Source TV"
tv_autorecord 1
tv_allow_camera_man 1

// Logging
log on
sv_logbans 1
sv_logecho 1
sv_logfile 1
sv_log_onefile 0

// Execute additional configs
exec banned_user.cfg
exec banned_ip.cfg

Game Mode Configuration Files

gamemode_competitive.cfg (5v5 Competitive)

mp_maxrounds 30
mp_roundtime 1.92
mp_roundtime_defuse 1.92
mp_freezetime 15
mp_buytime 90
mp_startmoney 800
mp_maxmoney 16000
mp_timelimit 0
sv_alltalk 0
sv_talk_enemy_dead 1
sv_deadtalk 0

gamemode_casual.cfg (10v10 Casual)

mp_maxrounds 15
mp_roundtime 3
mp_roundtime_defuse 3
mp_freezetime 15
mp_buytime 90
mp_startmoney 1000
mp_maxmoney 16000
sv_alltalk 0
mp_autoteambalance 1
mp_limitteams 2

mapcycle.txt

List maps to rotate through:

de_dust2
de_mirage
de_inferno
de_nuke
de_overpass
de_vertigo
de_ancient
de_anubis

Startup Parameters

Basic Linux Startup (CS:GO)

#!/bin/bash
cd /path/to/csgo-server
./srcds_run -game csgo \
    -console \
    -usercon \
    +ip 0.0.0.0 \
    +game_type 0 \
    +game_mode 1 \
    +mapgroup mg_active \
    +map de_dust2 \
    -port 27015 \
    +tv_port 27020 \
    -tickrate 128 \
    +maxplayers 10 \
    +sv_setsteamaccount YOUR_GSLT_TOKEN

Basic Linux Startup (CS2)

#!/bin/bash
cd /path/to/cs2-server
./game/bin/linuxsteamrt64/cs2 \
    -dedicated \
    -console \
    +ip 0.0.0.0 \
    +map de_dust2 \
    -port 27015 \
    +maxplayers 10 \
    +sv_setsteamaccount YOUR_GSLT_TOKEN \
    +game_type 0 \
    +game_mode 1

Windows Startup (CS:GO)

@echo off
cd C:\csgo-server
srcds.exe -game csgo -console -usercon +ip 0.0.0.0 +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2 -port 27015 -tickrate 128 +maxplayers 10 +sv_setsteamaccount YOUR_GSLT_TOKEN
pause

Parameter Breakdown

Game Server Login Token (GSLT)

Required for public servers to appear in server browser!

  1. Go to Steam Game Server Account Management
  2. Login with your Steam account
  3. Click "Create New Game Server Account"
  4. App ID: 730 (CS:GO) or 730 (CS2)
  5. Memo: Your server name/description
  6. Copy the generated token
  7. Use in +sv_setsteamaccount parameter

Plugins & Mods

SourceMod & MetaMod:Source

The standard plugin framework for Source engine servers.

Installation

  1. Download MetaMod:Source: SourceMM.net
  2. Download SourceMod: SourceMod.net
  3. Extract to server directory:
    # Both extract to csgo/ or cs2/ folder
    cd /path/to/csgo-server/csgo
    wget https://mms.alliedmods.net/mmsdrop/...
    tar -xzf mmsource-...tar.gz
    
    wget https://sm.alliedmods.net/smdrop/...
    tar -xzf sourcemod-...tar.gz
    
  4. Restart server
  5. Add yourself as admin:
    # Edit addons/sourcemod/configs/admins_simple.ini
    "STEAM_0:1:12345678" "99:z"  // Your Steam ID
    

Essential Plugins

Practice Mode

For practicing smokes, flashes, and aim.

Get5

Competitive match plugin with knife rounds, veto, and more.

RetakesPlugin

Retake game mode - defenders defend bombsite, attackers retake.

RankMe

Player ranking and statistics system.

In-Game Admin Menu

Built into SourceMod. Access with !admin or sm_admin in chat.

Workshop Maps & Collections

# In server.cfg or startup parameters
host_workshop_collection 123456789  // Workshop collection ID
workshop_start_map 123456789         // Workshop map ID

Troubleshooting

Server Won't Start

Missing Libraries (Linux)

# Install 32-bit libraries
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install lib32gcc-s1 lib32stdc++6

# CS:GO specific
sudo apt install libsdl2-2.0-0:i386

# CS2 specific
sudo apt install libtinfo5:i386

Port Already in Use

# Check what's using port 27015
sudo netstat -tulpn | grep 27015
sudo lsof -i :27015

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

Server Not in Browser

  1. Check GSLT is set: +sv_setsteamaccount YOUR_TOKEN
  2. Verify sv_lan is 0: sv_lan 0 in server.cfg
  3. Check firewall allows UDP 27015:
    sudo ufw allow 27015/udp
    sudo ufw allow 27015/tcp
    sudo ufw allow 27020/udp  # SourceTV
    
  4. Wait 5-10 minutes: Can take time to appear in browser
  5. Direct connect test: In CS:GO/CS2 console: connect your.server.ip:27015

High Ping / Lag

Server-Side

  1. Check server load: top or htop
  2. Increase rates:
    sv_minrate 128000
    sv_maxrate 0  // unlimited
    
  3. Enable multi-core (CS:GO):
    host_thread_mode 2
    
  4. Reduce bots if present
  5. Check network saturation

Client-Side

// Player client commands
rate 786432
cl_interp 0
cl_interp_ratio 1
cl_updaterate 128
cl_cmdrate 128

VAC Authentication Error

  1. Ensure sv_lan 0
  2. Verify GSLT is valid and not banned
  3. Check server files integrity:
    ./steamcmd.sh
    login anonymous
    force_install_dir /path/to/csgo-server
    app_update 740 validate
    quit
    
  4. Restart server after updates

Can't Hear Voice Chat

  1. Check voice settings in server.cfg:
    sv_use_steam_voice 1
    sv_voiceenable 1
    
  2. Verify UDP ports open: 27015, 27020
  3. Test with different voice_loopback values:
    voice_loopback 1  // Hear yourself (testing)
    

Game Modes Configuration

Competitive 5v5 (128 tick)

+game_type 0 +game_mode 1 -tickrate 128 +maxplayers 10
exec gamemode_competitive.cfg

Casual 10v10

+game_type 0 +game_mode 0 +maxplayers 20
exec gamemode_casual.cfg

Deathmatch

+game_type 1 +game_mode 2 +maxplayers 20
mp_respawn_on_death_t 1
mp_respawn_on_death_ct 1
mp_respawnwavetime 3
mp_timelimit 10
mp_dm_bonus_length_max 30

Arms Race

+game_type 1 +game_mode 0 +maxplayers 12
mp_ggprogressive_round_restart_delay 3
mp_timelimit 20
mp_maxrounds 3

Wingman 2v2

+game_type 0 +game_mode 2 +maxplayers 4
exec gamemode_competitive.cfg
mp_maxrounds 16
mp_overtime_maxrounds 4

Custom Modes

Surf

Download surf maps and configure:

sv_airaccelerate 150
sv_staminajumpcost 0
sv_staminalandcost 0
sv_accelerate 10
sv_friction 4

Bunny Hop

sv_enablebunnyhopping 1
sv_autobunnyhopping 1
sv_airaccelerate 1000
sv_staminajumpcost 0
sv_staminalandcost 0

1v1 Arena

Use arena plugin and configure multiple arenas on one map.

Performance Optimization

CPU Affinity (Linux)

# Bind server to specific CPU cores
taskset -c 0,1,2,3 ./srcds_run -game csgo ...

Process Priority

# Run with higher priority
nice -n -10 ./srcds_run -game csgo ...

Network Optimization

# Increase network buffers (Linux)
sudo sysctl -w net.core.rmem_max=16777216
sudo sysctl -w net.core.wmem_max=16777216
sudo sysctl -w net.ipv4.tcp_rmem="4096 87380 16777216"
sudo sysctl -w net.ipv4.tcp_wmem="4096 65536 16777216"

Automate Updates

#!/bin/bash
# update_csgo.sh
cd /home/steam/steamcmd
./steamcmd.sh +login anonymous +force_install_dir /path/to/csgo-server +app_update 740 validate +quit

# Kill and restart server
killall -9 srcds_linux
sleep 5
cd /path/to/csgo-server
./srcds_run -game csgo +map de_dust2 ...

Additional Resources

Important Notes

Last updated: November 2024 | Covers CS:GO & CS2