CS2 Dedicated Server
Counter-Strike 2 uses the Source 2 engine and requires SteamCMD for server installation. This guide covers setting up a CS2 server with custom maps, competitive configurations, and workshop map support.
Installation
# Install SteamCMD
sudo apt install -y steamcmd
# Install CS2 dedicated server
steamcmd +force_install_dir /opt/cs2 \
+login anonymous \
+app_update 730 validate \
+quit
Server Configuration
# /opt/cs2/game/csgo/cfg/server.cfg
hostname "My CS2 Server"
sv_password ""
sv_cheats 0
sv_lan 0
mp_autoteambalance 1
mp_limitteams 1
mp_maxrounds 30
mp_roundtime 1.92
mp_freezetime 15
mp_buytime 20
sv_minrate 128000
sv_maxrate 0
sv_mincmdrate 128
sv_maxcmdrate 128
tv_enable 1
tv_delay 30
Workshop Maps
# Get a Steam Web API key from steamcommunity.com/dev/apikey
# Add to launch options:
# +host_workshop_collection COLLECTION_ID
# +workshop_start_map MAP_ID
# Create a map cycle with workshop maps
# gamemodes_server.txt can reference workshop maps
Launch Script
cat > /opt/cs2/start.sh << EOF
#!/bin/bash
cd /opt/cs2
./game/bin/linuxsteamrt64/cs2 \
-dedicated \
-port 27015 \
+game_type 0 +game_mode 1 \
+map de_dust2 \
+sv_setsteamaccount YOUR_GSLT_TOKEN \
-maxplayers 10
EOF
chmod +x /opt/cs2/start.sh
Game Server Login Token
# Required for public servers
# Get GSLT from: steamcommunity.com/dev/managegameservers
# App ID: 730
# Add to launch: +sv_setsteamaccount YOUR_TOKEN
Firewall
ufw allow 27015/tcp
ufw allow 27015/udp
ufw allow 27020/udp # SourceTV
Best Practices
- Use 128-tick rate for competitive play
- Set up auto-update via cron with SteamCMD
- Configure GOTV for match recording
- Use server plugins like MetaMod/CounterStrikeSharp for customization