Almost every CS2 server guide online is really a MatchZy guide: a full competitive match plugin, knife rounds, and a pile of config. This is the opposite. You want a private CS2 dedicated server for you and your friends, plain vanilla, no plugins. It is a much shorter setup than the internet makes it look, and it comes down to one thing most people miss: the login token is mandatory now.
First: the GSLT token (not optional)
CS2 will not accept connections on a public IP without a Game Server Login Token (GSLT). This is the single most common reason a fresh server "boots fine but nobody can join". Get one for free:
- Go to the Steam Game Server Account Management page (steamcommunity.com/dev/managegameservers).
- Create a token for app ID 730 (Counter-Strike 2). You get a long string back.
- It ties to your Steam account. One token per server. Do not share it; a leaked token can get your account’s servers banned.
Install the server
The CS2 dedicated server is app 730 (same as the game). Install it with SteamCMD:
./steamcmd.sh +login anonymous \
+app_update 730 validate \
+quitAnonymous login works; you do not need to own the game on the server account. The config lives at:
<install>/game/csgo/cfg/server.cfgA vanilla server.cfg
Paste this, change the three values marked CHANGE ME. No plugins, no MatchZy.
// --- Identity ---
hostname "My Private CS2 Server" // CHANGE ME
sv_setsteamaccount "YOUR_GSLT_TOKEN" // CHANGE ME - the token from above
// --- Lock it down ---
sv_password "friends-only" // CHANGE ME - join password
rcon_password "pick-a-long-secret" // admin console over RCON
// --- Vanilla behaviour ---
sv_cheats 0
sv_pure 1
sv_lan 0
mp_autoteambalance 1
mp_limitteams 2
// --- A sane private match ---
mp_maxrounds 24
mp_roundtime 1.92
mp_freezetime 15
mp_warmuptime 30
sv_alltalk 0
sv_deadtalk 1That is a complete private competitive config. The game mode and starting map are NOT in here: CS2 sets those on the launch line, because game_type and game_mode must be known before the map loads.
The launch line
Start the server from the install folder. Note it is the cs2 binary with -dedicated, not srcds_run anymore:
./game/bin/linuxsteamrt64/cs2 -dedicated \
-ip 0.0.0.0 -port 27015 \
+game_type 0 +game_mode 1 \
+map de_dust2 \
-maxplayers 10 \
+exec server.cfg- game_type 0 + game_mode 1 is standard 5v5 Competitive. See the table below for the other modes.
- map de_dust2 is the starting map. Any official map works (de_mirage, de_inferno, cs_office…).
- exec server.cfg runs your cvars, including sv_setsteamaccount, before players connect.
- Port 27015 is the game and A2S query port. Open it in your firewall (UDP + TCP).
The game_type / game_mode pairs
CS2 does not have a single "mode" cvar. Every mode is a pair of two numbers:
game_type game_mode Mode
0 0 Casual
0 1 Competitive (5v5)
0 2 Wingman (2v2)
0 3 Hostage / Casual (cs_ maps)
1 0 Arms Race
1 1 Demolition
1 2 DeathmatchChanging game_type on a live server is unstable in CS2, so pick your mode on the launch line and restart the process to switch. Changing only the map (changelevel de_mirage) within the same mode is fine.
Loading a workshop map
Workshop maps are not a launch argument. You load them at runtime with host_workshop_map and the map’s workshop ID, and the server downloads and hosts it. Add -disable_workshop_command_filtering to the launch line first, then in the server console (or over RCON):
host_workshop_map 3070315466The number is the ID from the workshop page URL. The first load pulls the map from Steam, so give it a moment. This is the one CS2 gotcha that trips everyone up: putting a workshop map name after +map on the launch line does nothing; it has to be host_workshop_map.
Keeping it private
With sv_password set, only people who type the password can connect. Share your server’s IP and the password with your group and have them use the console: connect your.server.ip:27015; password friends-only. A password also keeps the server out of the public quick-play pool, which is what you want for a private game.