How to Host a CS2 Dedicated Server
The CS2 dedicated server is part of the game files, so you can run one on a PC or a rented machine. These are the steps and numbers from Valve's Developer Community page, which Valve itself marks as needing updates, so check it for anything that has changed.
What you need
- At least 2 GB of RAM and 65 GB of storage.
- A CPU that supports x86-64-v2 (POPCNT and SSE4.2).
- Windows 10 or 11, or Linux with glibc 2.31 or newer. That means Ubuntu 20.04, Debian 11 or Enterprise Linux 9 at the least.
- Steam installed on the machine. The server will not start without it.
- A Steam account that can make a Game Server Login Token (below).
The download is about 60 GB, because the server and the game client are now one package.
Install it with SteamCMD
- Install SteamCMD and start it.
- At the
Steam>prompt, set the install folder withforce_install_dir. On some Linux systems the path cannot contain capital letters. - Run
login anonymous. - Run
app_update 730 validatethe first time. Later updates useapp_update 730. Repeat the update every time the game updates. - Type
quitto log off.
App 730 is the game's own app, the same as the client. Counter-Strike: Global Offensive used a separate server app, 740, which CS2 no longer does.
Get a Game Server Login Token
Other players can only join if your server has a Game Server Login Token. Make one on Steam's game server accounts page using 730 as the game ID. Steam says your account must not be limited or community banned, must have a qualifying phone number registered and must own the game.
Treat the token like a password. Steam warns that you are responsible for it, and that you should not give it to anyone else. A token unused for a long time expires and can be made again on the same page.
Start the server
Add the token to the launch line with +sv_setsteamaccount followed by your token. The server needs -dedicated, or it starts the game instead.
| System | Run this from the game folder |
|---|---|
| Windows | .\cs2.exe -dedicated +map de_dust2 (from game/bin/win64) |
| Linux | ./cs2.sh -dedicated +map de_dust2 (from the game folder) |
On Linux use the cs2.sh script, not the executable inside the bin folder, because the script does set-up the program needs. With no mode given, the server starts as competitive.
Settings to start with
| Setting | What it does |
|---|---|
| -ip 1.2.3.4 | Binds the server to one IP address. |
| -port 27015 | Sets the game and query port. |
| -maxplayers 64 | Sets the number of slots. |
| -insecure | Turns VAC off. |
| hostname "My CS2 Server" | The name shown in server lists. |
| game_alias deathmatch | Sets the game mode and type together. The page lists the aliases competitive, wingman, casual, deathmatch and custom. |
| sv_lan 0 | Makes it a public server instead of a LAN one. |
Modes like retakes, surf, KZ and bhop are not built-in aliases on that page. Community servers add them with their own maps and plugins, which this page does not cover. To see how running servers describe themselves, look at the live lists.
Hosting a CS2 server FAQ
Can I host a CS2 server for free?
The server software is part of the game files and needs no extra purchase. You do need a machine with enough RAM and storage, and a Steam account that owns the game for the login token.
What is the app ID for the CS2 dedicated server?
It is 730, the same as the game. CS:GO used 730 for the client and 740 for the server.
Why can nobody join my server?
Valve says a Game Server Login Token is needed for other players to join. Make sure the token is on the launch line with +sv_setsteamaccount, and check the ports your server uses are open.
Do I need to update the server?
Yes. Run app_update 730 again each time the game updates.
Where can I read the full instructions?
On Valve's Developer Community page for CS2 dedicated servers, linked at the top of this page.