The CS2 server is the game itself in dedicated mode: it takes about 60 GB, so check your free space first. For a 10-player match without plugins, 4 GB of RAM is usually enough.
1. Download it
With SteamCMD:
# Windows
C:\steamcmd\steamcmd.exe +force_install_dir C:\cs2 +login anonymous +app_update 730 validate +quit
# Linux (as the steam user)
~/steamcmd/steamcmd.sh +force_install_dir ~/cs2 +login anonymous +app_update 730 validate +quit
2. Get your token (GSLT)
Without it, nobody from outside your network can join:
- Go to
steamcommunity.com/dev/managegameserverswith your Steam account. - In App ID enter
730and add a memo so you recognise it. - Copy the token it gives you. One per server.
Steam only issues them to accounts that are not limited, have a phone number attached and have no bans.
3. Linux only: the steamclient.so fix
Without this, the server complains it cannot find Steam:
mkdir -p ~/.steam/sdk64
ln -sf ~/steamcmd/linux64/steamclient.so ~/.steam/sdk64/steamclient.so
4. Start it
# Windows
C:\cs2\game\bin\win64\cs2.exe -dedicated -usercon +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2 +sv_setsteamaccount YOUR_TOKEN
# Linux
~/cs2/game/cs2.sh -dedicated -usercon +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2 +sv_setsteamaccount YOUR_TOKEN
On Linux, always use cs2.sh rather than the binary itself: it sets up the environment it needs.
| Mode | game_type | game_mode |
|---|---|---|
| Casual | 0 | 0 |
| Competitive | 0 | 1 |
| Wingman | 0 | 2 |
| Deathmatch | 1 | 2 |
5. Name, password and RCON
Create game/csgo/cfg/server.cfg:
hostname "My CS2 server"
sv_password ""
rcon_password "A_LONG_PASSWORD"
Leave sv_password empty for an open server. The -usercon in the start line is what enables RCON.
6. Ports
- 27015 UDP: the game. Required.
- 27015 TCP: RCON, only if you use it from outside.
- 27020 UDP: SourceTV, only if you enable it.
# Windows (PowerShell as administrator)
New-NetFirewallRule -DisplayName "CS2 UDP 27015" -Direction Inbound -Protocol UDP -LocalPort 27015 -Action Allow -Profile Any
# Linux
ufw allow 27015/udp
To join: open the console in the game and type connect YOUR_IP:27015.