How to Set Up a CS2 Dedicated Server
SteamCMD, the app id everyone gets wrong, the login token, and the launch line
Install it with SteamCMD using an anonymous login and app id 730 — the same app id as the game, not a separate server app the way CS:GO had. Then get a Game Server Login Token from steamcommunity.com/dev/managegameservers and pass it to the server with sv_setsteamaccount. Without a token you are limited to a LAN-only server.
A CS2 dedicated server is just the game's server build running headless on a machine you control. There is no licence to buy and no application to fill in. There are, however, two details that quietly break most first attempts: the app id changed from CS:GO, and Valve requires a login token before your server counts as a real, publicly listed server rather than an anonymous one.
Everything below is checked against Valve's own data — Steam's app configuration for 730, the game's shipped steam.inf, the CS2 console command dump, Steam's game server account page and the Steamworks game server API docs.
The app id: 730, not 740
CS:GO's dedicated server was a separate Steam application — app 740, which Steam still lists under the name "Counter-Strike Global Offensive - Dedicated Server", typed as a Tool. Every CS:GO server tutorial ever written says app_update 740, and every one of them is now wrong for CS2.
CS2 folded the server back into the game application. The version file shipped inside the CS2 install reports appID=730, Steam's launch configuration for app 730 carries both the client and the server executables, and — the clinching check — Valve's own public server directory reports live CS2 community servers as appid 730 with gamedir "csgo". The game directory is still literally called csgo, which trips people up separately.
| CS:GO | CS2 | |
|---|---|---|
| SteamCMD app id | 740 (separate tool app) | 730 (the game app) |
| Reported to the server list as | appid 730 | appid 730 |
| Game directory | csgo | csgo |
| Plugin stack | SourceMod | Metamod:Source + CounterStrikeSharp |
Step 1: install with SteamCMD
SteamCMD is Valve's command-line Steam client. Download it for your platform, run it, and point it at an install directory before you update — setting the directory after the app id is a classic silent failure.
- Install SteamCMD and launch it.
- Set the install path first:
force_install_dir /path/to/cs2-server. - Log in anonymously:
login anonymous. The CS2 server content is available without an account. - Pull the files:
app_update 730 validate. The first run downloads the full game content, so budget real disk space and time. quitwhen it finishes.
The same command run again is how you patch. CS2 servers are version-locked against the client, so after every game update you re-run app_update 730 or players simply cannot connect. If you want to know how big "full game content" is on the client side, our page on how much space CS2 takes is the closest reference point.
When it lands, the executables are where Steam's own app configuration says they are: game\bin\win64\cs2.exe on Windows and game/cs2.sh on Linux, inside your install directory.
Step 2: get a Game Server Login Token
This is the part that has nothing to do with files. Steam distinguishes between a server that logs in to a generic, anonymous account and one that logs in to a persistent game server account— that is Valve's own wording in the Steamworks game server API, where the token-taking login call is documented as beginning the process of logging in to a persistent account. The token is what makes your server a known, identifiable thing on Steam's network with its own Steam ID.
You generate one yourself at Valve's Steam Game Server Account Management page, steamcommunity.com/dev/managegameservers, signed in with your Steam account. The requirements listed there are:
- Your account must not be currently community banned or locked.
- Your account must not be limited.
- Your account must have a qualifying registered phone.
- Your account must own the game you are creating the server account for.
- You may create up to 1,000 game server accounts.
Three warnings from the same page, all of which bite people in practice. A token that goes unused for a long period expires and has to be regenerated. Resetting your Steam password through Steam's help site — or having Support reset it — regenerates allof your tokens at once, deliberately, to stop misuse. And Valve states you are solely responsible for your tokens: if the game server accounts are banned, you may be restricted from playing the associated games. Do not paste your token into a Discord, and do not hand it to a host who offers to "set it up for you".
Step 3: the launch command
CS2 servers are configured almost entirely from the command line and a config file, not a GUI. The shape of the line is:
./cs2.sh -dedicated -port 27015 +game_alias deathmatch +map de_dust2 +sv_setsteamaccount YOUR_TOKEN +exec server.cfg
Piece by piece:
-dedicated— run headless, with no client window.-port— the game port. Live CS2 community servers report27015as the standard, and operators running several instances on one box simply step upwards from there.+game_alias— the CS2 command whose own description reads "Set the configuration of game type and mode based on game alias like 'deathmatch'". It setsgame_typeandgame_modetogether, which is far less error-prone than setting those two numbers by hand.+map— the map to start on. For Workshop content, usehost_workshop_mapinstead, which the game describes as getting the latest version of the map and hosting it;host_workshop_collectiondoes the same for a whole collection as a map group. Both need a Steam Web API key passed to the server. See workshop maps for what is worth hosting.+sv_setsteamaccount— your GSLT. The command's description in the game is exactly "Set game server account token to use for logging in to a persistent game server account".+exec— run a config file, which is where everything else should live.
What belongs in server.cfg
These are all real CS2 server convars, not CS:GO leftovers:
| Convar | What the game says it does |
|---|---|
hostname | Hostname for server — the name in the browser |
rcon_password | Remote console password |
sv_password | Server password for entry into multiplayer games |
sv_lan | Server is a lan server (no heartbeat, no authentication, no non-class C addresses) |
sv_region | The region of the world to report this server in |
sv_hibernate_when_empty | Puts the server into extremely low CPU usage mode when no clients connected |
sv_steamgroup | The ID of the Steam group that this server belongs to |
sv_visiblemaxplayers | Overrides the max players reported to prospective clients |
Note sv_lan carefully. Turning it on is what a genuinely private, local-only server does, and it removes the heartbeat and authentication — which is also why a LAN server does not need a login token. Leave it off for anything public. Set rcon_password to something long; the console is a full remote shell over your server.
For gameplay convars — round times, buy rules, warmup, friendly fire — our CS2 commands reference is the faster lookup, and the autoexec generator will build a clean config file rather than a pile of half-remembered lines.
Step 4: check it is actually public
A server that starts without errors is not the same as a server anyone can reach. Work through it in this order:
- Confirm the console reports a successful Steam login rather than falling back to anonymous. If it did not take your token, nothing downstream will work.
- Forward the game port — and, if you are running one, the separate spectator port — through your router or your host's firewall, on UDP.
- From another machine, connect by console:
connect ip:port. - Look for it in a public list. Our CS2 server browser reads Steam's public game-server directory live, so if your server shows up there, it is genuinely visible to the world.
If you only wanted a private lobby for friends and this is all more machinery than you expected, it probably is — making a private match in CS2 takes about a minute and needs none of the above.
Then: making it do something interesting
A stock dedicated server runs stock Counter-Strike. Retakes, surf, KZ, 1v1 arenas, ranking systems and everything else people actually run community servers for are plugins, and in CS2 that means Metamod:Source with CounterStrikeSharp on top. SourceMod has no CS2 build, so ignore anything that tells you to install it.
We cover that stack, its install order and the one maintenance trap that silently un-installs it after a game update in how to install CS2 mods and plugins. Do it in that order: get a plain server logging in and joinable first, then add plugins. Debugging a token problem and a plugin problem at the same time is miserable.
Frequently Asked Questions
- What is the app id for the CS2 dedicated server?
- It is 730 — the same app id as the game itself. This is the single most common mistake people carry over from CS:GO, where the dedicated server was a separate Steam application (app 740, listed on Steam as "Counter-Strike Global Offensive - Dedicated Server"). CS2 dropped that split, so SteamCMD installs the server from app 730 under an anonymous login.
- Do I need a GSLT to run a CS2 server?
- For anything reachable from the internet, yes. A Game Server Login Token is what lets the server log into a persistent game server account rather than a generic anonymous one, which is what gives the server its own Steam identity in the public server list. You set it with sv_setsteamaccount. A purely local LAN server can skip it, because sv_lan disables the heartbeat and authentication entirely.
- Where do I get a Game Server Login Token?
- From Valve, at steamcommunity.com/dev/managegameservers, signed in with your own Steam account. Valve’s requirements on that page are that your account is not community banned or locked, is not limited, has a qualifying registered phone, and owns the game you are creating the server account for. One account can create up to 1,000 game server accounts.
- Can a GSLT get banned?
- Yes, and Valve is blunt about the consequences. The management page states that you are solely responsible for your tokens and that if your game server accounts are banned for any reason you may be restricted from playing the associated games. It also tells you not to distribute tokens to third parties — so do not hand yours to a host or a stranger setting your server up.
- Why did my GSLT stop working?
- Two documented reasons. A token that goes unused for a long period — meaning the game server never logs in with it — will expire, and can be regenerated on the same page. Separately, resetting your Steam password through the Steam help site, or having Steam Support reset it, regenerates every one of your tokens at once, so every server using them needs the new value.
- What operating system should I run it on?
- Valve ships both. Steam’s own launch configuration for app 730 lists a Windows 64-bit executable at game\bin\win64\cs2.exe and a Linux one at game/cs2.sh, so either works. Linux is the more common choice for hosted servers, and it is what most community server operators and management tooling assume.