CS2 Dedicated Server Setup Guide
In this article
This guide walks you through setting up your own Counter-Strike 2 dedicated server, giving you full control over game modes, maps, and player slots. You'll need a Windows or Linux machine with a public IP address (or port forwarding on your router) and a Steam account that owns CS2. By the end, you'll have a server that friends or the public can join directly via IP.
What You'll Need
- A PC or VPS running Windows 10/11, Ubuntu 20.04+, or Debian 11+
- At least 4 GB of RAM (8 GB recommended for 10+ players)
- Steam account with CS2 in your library (free to play)
- Open ports: 27015 (game), 27020 (client), 27005 (steam query)
- Basic command line familiarity
Step-by-Step
- Install SteamCMD
Download SteamCMD from Valve's official site. On Windows, extract toC:\steamcmd. On Linux, run:mkdir ~/steamcmd && cd ~/steamcmd && wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz && tar -xvzf steamcmd_linux.tar.gz - Login to SteamCMD
Runsteamcmd(or./steamcmd.shon Linux). Typelogin anonymous– CS2 dedicated servers don't require a paid account. - Download CS2 Dedicated Server
In SteamCMD, run:force_install_dir ./cs2thenapp_update 730 validate. This downloads the server files (about 10 GB). Wait for "Success! App '730' fully installed." - Create a server config file
Navigate tocs2/game/csgo/cfg/and createserver.cfgwith a text editor. Add basic settings like:hostname "My CS2 Server" rcon_password "change_me" sv_password "" mp_roundtime 1.92 mp_maxrounds 30 bot_quota 5 sv_cheats 0
- Start the server
On Windows, run from thecs2folder:game\bin\win64\cs2.exe -dedicated -console -usercon +map de_dust2 +maxplayers 10
On Linux:./game/bin/linuxsteamrt64/cs2 -dedicated -console -usercon +map de_dust2 +maxplayers 10 - Verify the server is running
Look for "Connection to Steam servers successful" in the console. The server will appear in the community server browser after a few minutes. - Connect to your server
In CS2, open console (~) and typeconnect your_public_ip:27015. If testing locally, useconnect 127.0.0.1:27015.
Common Mistakes
- Forgetting to open ports – Without UDP 27015 forwarded, players outside your LAN can't join.
- Using wrong launch arguments – Missing
-dedicatedwill launch a client instead of a server. - Not updating the server – After CS2 patches, your server may become incompatible. Re-run
app_update 730regularly. - Setting sv_cheats 1 – This makes the server unranked and often blocks public listing.
- Ignoring firewall prompts – Windows Firewall may block inbound connections; allow cs2.exe.
Tips
- Use
+exec server.cfgin your launch line to auto-load your config. - Set
sv_lan 0in server.cfg to ensure the server is visible on the internet. - Add
+sv_setsteamaccount YOUR_TOKENto get a public listing (get a token from Steam Game Server Account Management). - For better performance, set
sv_clockcorrection_msecs 0andfps_max 0. - Back up your
server.cfg– updates sometimes overwrite it.
Troubleshooting
Server won't start – Check that you're in the correct directory and that the binary path is right. On Linux, ensure you have lib32-gcc-libs installed. Run chmod +x cs2 if permission denied.
Can't connect from outside – Verify your router forwards UDP 27015 to your machine's local IP. Use an online port checker. Also check your ISP isn't blocking inbound connections.
Server not showing in browser – Wait 5-10 minutes. If still missing, add +sv_setsteamaccount with a valid token. Ensure sv_lan 0.
High ping or lag – Close bandwidth-heavy applications. Set sv_minrate 196608 and sv_maxrate 786432. Consider lowering maxplayers.
RCON not working – Make sure you set rcon_password in server.cfg and restart. Use rcon_password yourpass in client console first.
Frequently Asked Questions
Do I need a paid CS2 copy to host? No, CS2 is free-to-play, and the dedicated server files are also free via SteamCMD.
Can I run a server on the same PC I play on? Yes, but it will use CPU/RAM and may affect your FPS. Allocate at least 2 cores and 4 GB RAM to the server.
How do I add bots? Use bot_quota in server.cfg or type bot_add in console. Bots require sv_cheats 0 to be allowed.
How do I change the map? Use changelevel de_inferno in console, or add +map de_inferno to launch args.
Can I host custom game modes like surf or bhop? Yes, download workshop maps and add them to your server's workshop collection, then use +host_workshop_map.
Why does my server restart every few hours? Some hosting providers do this, but if self-hosting, check for memory leaks or set sv_hibernate_when_empty 0 to prevent idle shutdown.