Counter-Strike 2 Servidor dedicado Setup
Counter-Strike 2 is Valve's latest entry in the legendary competitive first-person shooter series. Esta guía cubre the complete setup of a dedicated Counter-Strike 2 server on Linux, including SRCDS installation, game mode configuration, GSLT token setup for competitive play, and console management. Counter-Strike 2 servers require proper configuration to enable ranked matchmaking, demonstrations, and custom gameplay modes.
Tabla de contenidos
- System Requirements
- Instalaing SteamCMD and CS2
- Server Configuration
- Obtaining a GSLT Token
- Game Modes and Settings
- Map Configuration
- Competitive Settings
- Console Commands
- Firewall and Ports
- Running with Systemd
- Monitoring and Management
- Conclusion
Requisitos del sistema
Counter-Strike 2 has modest but specific requirements:
- Ubuntu 20.04 LTS or later
- 4GB RAM minimum (8GB recommended)
- 50GB disk space
- Dual-core CPU minimum (quad-core recommended)
- Stable internet connection with good upload bandwidth
- Root or sudo access
Unlike some servidores de juegos, CS2 is relatively lightweight and efficient.
Instalaing SteamCMD and CS2
Instala dependencies:
sudo apt-get update
sudo apt-get install -y curl wget file bzip2 gzip unzip python3 util-linux ca-certificates binutils lib32gcc1 lib32stdc++6 libsdl2-2.0-0:i386
Create dedicated steam user:
sudo useradd -m -s /bin/bash steam
sudo -u steam mkdir -p /home/steam/steamcmd
Instala SteamCMD:
cd /home/steam/steamcmd
sudo -u steam curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | sudo -u steam tar zxvf -
Test SteamCMD:
sudo -u steam /home/steam/steamcmd/steamcmd.sh +quit
Create CS2 directory:
sudo -u steam mkdir -p /home/steam/cs2
Instala Counter-Strike 2 server (app ID 730):
sudo -u steam /home/steam/steamcmd/steamcmd.sh \
+force_install_dir /home/steam/cs2 \
+login anonymous \
+app_update 730 \
+quit
Verifica la instalación:
ls -la /home/steam/cs2/
ls -la /home/steam/cs2/game/bin/linuxsteamrt64/
Create necessary directories:
sudo -u steam mkdir -p /home/steam/cs2-data/{configs,maps,logs}
Server Configuration
Create main server configuration file:
sudo tee /home/steam/cs2/game/csgo/cfg/server.cfg > /dev/null <<'EOF'
// ============================================================================
// Counter-Strike 2 Server Configuration
// ============================================================================
// ============================================================================
// SERVER IDENTIFICATION
// ============================================================================
hostname "My CS2 Server"
sv_password ""
sv_tags "cs2,competitive,deathmatch"
sv_motd_unload_on_dismissal 1
// ============================================================================
// GAME RULES
// ============================================================================
game_type 0
game_mode 1
mp_friendlyfire 0
mp_teamfriendlyfire 0
mp_autoteambalance 1
mp_limitteams 1
// ============================================================================
// GAMEPLAY SETTINGS
// ============================================================================
sv_alltalk 0
sv_deadtalk 0
sv_talk_enemy_dead 0
sv_maxspeed 250
sv_accelerate 5.5
sv_friction 4
sv_stopspeed 75
// ============================================================================
// DAMAGE AND WEAPONS
// ============================================================================
mp_damage_scale 1.0
sv_showimpacts 0
ff_damage_bullet_penetration 0
sv_showbulletholes 1
// ============================================================================
// TIME LIMITS
// ============================================================================
mp_timelimit 45
mp_roundtime 1.92
mp_buytime 20
mp_freezetime 15
mp_maxmoney 16000
mp_startmoney 2400
mp_afterroundmoney 3250
// ============================================================================
// ECONOMY
// ============================================================================
mp_halftime 1
mp_match_can_clinch 1
mp_team_timeout_time 60
mp_team_intro_time 15
// ============================================================================
// LOGGING
// ============================================================================
log on
sv_logdir "logs"
sv_logfile "server.log"
sv_logbans 1
sv_log_onefile 0
// ============================================================================
// CVARS
// ============================================================================
sv_allow_wait_command 1
sv_pure 1
sv_consistency 1
sv_downloadurl ""
net_splitrate 2
host_writeconfig
// ============================================================================
// EXECUTE GAME MODE CONFIGS
// ============================================================================
// Uncomment the desired game mode:
// exec gamemodes_server.cfg
// exec gamemode_competitive.cfg
// exec gamemode_deathmatch.cfg
EOF
sudo chown steam:steam /home/steam/cs2/game/csgo/cfg/server.cfg
Create competitive game mode configuration:
sudo tee /home/steam/cs2/game/csgo/cfg/gamemode_competitive.cfg > /dev/null <<'EOF'
// ============================================================================
// COMPETITIVE GAME MODE
// ============================================================================
game_type 0
game_mode 1
mp_maxmoney 16000
mp_startmoney 2400
mp_afterroundmoney 3250
mp_buytime 20
mp_freezetime 15
mp_roundtime 1.92
mp_roundtime_defuse 1.92
mp_friendlyfire 1
mp_autoteambalance 0
mp_limitteams 1
mp_teams_unbalance_limit 1
mp_halftime 1
mp_match_can_clinch 1
mp_team_intro_time 15
mp_warmuptime 60
sv_talk_enemy_dead 0
sv_deadtalk 0
sv_alltalk 0
sv_showimpacts 0
sv_allow_wait_command 1
sv_pure 1
sv_consistency 1
log on
sv_logdir "logs"
sv_logfile "server.log"
sv_logbans 1
host_writeconfig
EOF
sudo chown steam:steam /home/steam/cs2/game/csgo/cfg/gamemode_competitive.cfg
Create deathmatch configuration:
sudo tee /home/steam/cs2/game/csgo/cfg/gamemode_deathmatch.cfg > /dev/null <<'EOF'
// ============================================================================
// DEATHMATCH GAME MODE
// ============================================================================
game_type 1
game_mode 2
mp_maxmoney 16000
mp_startmoney 8000
mp_buytime 9999
mp_freezetime 5
mp_roundtime 9999
mp_friendlyfire 1
mp_autoteambalance 1
mp_limitteams 0
mp_respawn_on_death_t 1
mp_respawn_on_death_ct 1
mp_death_drop_gun 1
mp_death_drop_grenade 1
sv_talk_enemy_dead 1
sv_deadtalk 1
sv_alltalk 1
sv_showimpacts 0
sv_pure 0
sv_consistency 1
log on
sv_logdir "logs"
sv_logfile "server.log"
sv_logbans 1
host_writeconfig
EOF
sudo chown steam:steam /home/steam/cs2/game/csgo/cfg/gamemode_deathmatch.cfg
Obtaining a GSLT Token
A Game Server Login Token (GSLT) is required for official ranked matchmaking and some features:
- Visit https://steamcommunity.com/dev/managegameservers
- Enter app ID "730" for Counter-Strike 2
- Crea un token and note the generated token string
- Use the token in the server launch command
This is critical for competitive play and anti-cheat integration.
Game Modes and Settings
Create game modes configuration file:
sudo tee /home/steam/cs2/game/csgo/cfg/gamemodes_server.cfg > /dev/null <<'EOF'
// ============================================================================
// GAME MODES CONFIGURATION
// ============================================================================
"GameTypes"
{
"0" // game_type 0
{
"0" // game_mode 0 (Classic Casual)
{
"name" "CSGO_GameType_Classic_Casual"
"@gameplay/gamemode_casual"
{
"fun_envglow_enabled" "0"
"fun_envglow_ghost" "0"
}
}
"1" // game_mode 1 (Classic Competitive)
{
"name" "CSGO_GameType_Classic_Competitive"
"@gameplay/gamemode_competitive"
{
"fun_envglow_enabled" "0"
"fun_envglow_ghost" "0"
}
}
}
"1" // game_type 1
{
"2" // game_mode 2 (Deathmatch)
{
"name" "CSGO_GameType_Deathmatch"
"@gameplay/gamemode_deathmatch"
{
"fun_envglow_enabled" "1"
"fun_envglow_ghost" "0"
}
}
}
}
EOF
sudo chown steam:steam /home/steam/cs2/game/csgo/cfg/gamemodes_server.cfg
Map Configuration
Create map rotation configuration:
sudo tee /home/steam/cs2/game/csgo/cfg/maplist.cfg > /dev/null <<'EOF'
// ============================================================================
// MAP ROTATION
// ============================================================================
// Vote maps
// mp_custom_map_rotation "de_mirage de_inferno de_nuke de_vertigo de_ancient"
// Forced maps
mp_maplist "de_mirage de_inferno de_nuke de_vertigo de_ancient de_overpass cs_office de_cache de_train"
// Map match time
mp_match_time_max 60
// Map vote settings
sv_vote_maps_allow_current 1
host_writeconfig
EOF
sudo chown steam:steam /home/steam/cs2/game/csgo/cfg/maplist.cfg
Popular competitive maps:
# Defuse maps (5v5 competitive)
de_mirage
de_inferno
de_nuke
de_vertigo
de_ancient
de_overpass
de_cache
de_train
# Casual maps
cs_office
cs_assault
de_lake
de_shortnuke
Competitive Settings
Configura competitive-specific settings:
sudo tee /home/steam/cs2/game/csgo/cfg/competitive.cfg > /dev/null <<'EOF'
// ============================================================================
// COMPETITIVE SETTINGS
// ============================================================================
// Disable console
sv_cheats 0
// Anti-cheat
sv_anti_cheat 1
sv_anticheat_force_updates 1
// Server behavior
sv_hibernate_when_empty 0
sv_hibernation_mode 0
net_maxroutable 1200
net_splitrate 2
// Gameplay enforcement
mp_solid_teammates 1
mp_teammates_are_enemies 0
// Round settings
mp_maxrounds 30
mp_match_can_clinch 1
mp_windifference_match_all_maps 0
// Warmup
mp_warmuptime 300
mp_warmup_online 300
mp_warmuptime_all_players_connected 60
// Pause settings
mp_pause_match 0
sv_allow_votes 1
sv_vote_issue_extendlimit_allowed_rounds 0
// Damage scale
sv_damage_scale 1.0
ff_damage_bullet_penetration 1
// Demo and POV recording
tv_enable 0
sv_always_open_console 0
sv_log_onefile 0
// Kick settings
mp_autokick 1
mp_kick_ban_type 1
// Balancing
mp_autoteambalance 1
mp_limitteams 1
mp_teams_unbalance_limit 1
host_writeconfig
EOF
sudo chown steam:steam /home/steam/cs2/game/csgo/cfg/competitive.cfg
Console Commands
Common CS2 server console commands:
# Start server (requires SSH access)
ssh steam@server "cd /home/steam/cs2 && rcon_address 127.0.0.1; rcon_password admin; status"
# Player management
rcon kick playername
rcon ban playername 0 # Permanent ban
rcon banid steamid 60 # Ban by Steam ID (60 minutes)
rcon unban steamid
rcon addip steamip # IP ban
# Server control
rcon changelevel de_mirage
rcon mp_restartgame 1 # Restart current game
rcon say "Message to all players"
rcon say_team "Message to team"
# Map functions
rcon map de_inferno # Change map
rcon map_random # Random map
# Game settings
rcon sv_password "newpass" # Change server password
rcon sv_pure 1 # Enable pure mode
rcon log on # Enable logging
# Status and info
rcon status # Show player info
rcon stats # Show game statistics
rcon net_status # Network status
rcon info # Server information
rcon version # Show server version
Firewall and Ports
Configura firewall for CS2:
# Game port (UDP)
sudo ufw allow 27015/udp
# Game port (TCP)
sudo ufw allow 27015/tcp
# RCON port (TCP)
sudo ufw allow 27005/tcp
# Optional: TV port (UDP)
sudo ufw allow 27020/udp
# Verify
sudo ufw status numbered
For iptables:
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 tcp --dport 27005 -j ACCEPT
sudo iptables-save | sudo tee /etc/iptables/rules.v4
Verifica listening ports:
sudo netstat -tulnp | grep -E "27015|27005|27020"
ss -tulnp | grep cs2
Ejecución con Systemd
Create servicio systemd:
sudo tee /etc/systemd/system/cs2.service > /dev/null <<'EOF'
[Unit]
Description=Counter-Strike 2 Dedicated Server
After=network.target
Wants=network-online.target
[Service]
Type=simple
User=steam
Group=steam
WorkingDirectory=/home/steam/cs2
EnvironmentFile=/home/steam/cs2/server.env
ExecStart=/home/steam/cs2/game/bin/linuxsteamrt64/cs2 \
-dedicated \
+sv_lan 0 \
+sv_hibernation_mode 0 \
+sv_rcon_banpenalty_factor 1 \
+sv_rcon_maxfailures 10 \
+sv_rcon_minfailuretime 30 \
+sv_logfile 1 \
+map de_mirage
Restart=on-failure
RestartSec=10
StandardOutput=journal
StandardError=journal
# Resource limits
LimitNOFILE=65536
LimitNPROC=4096
# Security
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=yes
ReadWritePaths=/home/steam/cs2-data
[Install]
WantedBy=multi-user.target
EOF
Create environment file:
sudo tee /home/steam/cs2/server.env > /dev/null <<'EOF'
GSLT_TOKEN=YOUR_GSLT_TOKEN_HERE
RCON_PASSWORD=secure_rcon_pass
SV_PASSWORD=
EOF
sudo chown steam:steam /home/steam/cs2/server.env
sudo chmod 600 /home/steam/cs2/server.env
Enable and start servicio:
sudo systemctl daemon-reload
sudo systemctl enable cs2.service
sudo systemctl start cs2.service
sudo systemctl status cs2.service
Monitor logs:
sudo journalctl -u cs2.service -f
Supervisión and Management
Create monitoreo script:
sudo tee /home/steam/monitor_cs2.sh > /dev/null <<'EOF'
#!/bin/bash
echo "=== Counter-Strike 2 Server Status ==="
echo ""
# Process check
if pgrep -f "cs2.*-dedicated" > /dev/null; then
echo "✓ CS2 server is running"
# Get memory usage
MEM=$(ps aux | grep "cs2.*-dedicated" | grep -v grep | awk '{print $6}')
echo "Memory: ${MEM}KB"
# Get CPU
CPU=$(ps aux | grep "cs2.*-dedicated" | grep -v grep | awk '{print $3}')
echo "CPU: ${CPU}%"
else
echo "✗ CS2 server is NOT running"
fi
# Port check
echo ""
echo "Port status:"
if ss -tulnp | grep -q 27015; then
echo "✓ Game port 27015 listening"
else
echo "✗ Game port 27015 not listening"
fi
# Disk space
echo ""
echo "Disk space:"
df -h /home/steam/cs2 | awk 'NR==2 {printf "Used: %s / %s (%s)\n", $3, $2, $5}'
# Connection count (if server has players)
echo ""
echo "Server info:"
if [ -S /tmp/csgo_rcon.sock ]; then
echo "✓ RCON socket available"
fi
EOF
sudo chmod +x /home/steam/monitor_cs2.sh
Run monitoreo:
/home/steam/monitor_cs2.sh
watch -n 5 '/home/steam/monitor_cs2.sh'
Update server to latest version:
sudo systemctl stop cs2.service
sudo -u steam /home/steam/steamcmd/steamcmd.sh \
+force_install_dir /home/steam/cs2 \
+login anonymous \
+app_update 730 \
+quit
sudo systemctl start cs2.service
Conclusión
You now have a fully functional Counter-Strike 2 servidor dedicado with proper competitive settings, GSLT token integration, and systematic management. Counter-Strike 2 is excellent for competitive communities and provides stable, well-balanced gameplay.
Key points to remember:
- Obtain and configure your GSLT token for matchmaking features
- Use appropriate game mode configurations for your community
- Enable registro for match records and anti-cheat purposes
- Monitor server rendimiento regularly
- Keep the server updated with the latest CS2 build
- Configura map rotation to match your community preferences
- Use RCON for remote administration
A well-maintained CS2 server provides years of engaging competitive multiplayer experiences.


