This guide walks you through setting up your own Counter-Strike 2 dedicated server on Windows or Linux. You’ll learn how to install the server files, configure game modes and settings, and get your server online for friends or the public. No prior server experience is needed, but basic comfort with command lines and file editing helps.
What You’ll Need
- A PC or VPS with at least 4 GB of RAM (8 GB recommended) and 30 GB free disk space.
- Windows 10/11, or a Linux distribution like Ubuntu 22.04 or Debian 12.
- SteamCMD – the command-line tool for downloading server files.
- Port forwarding access to your router if hosting on a home connection.
- A stable internet connection with decent upload speed (10 Mbps+ recommended).
Step-by-Step
- Install SteamCMD
On Windows: download SteamCMD from the official Valve site and extract it to a folder likeC:\steamcmd. On Linux: open a terminal and runsudo apt update && sudo apt install steamcmd(Ubuntu/Debian) or use your package manager. - Create a directory for the server
Make a dedicated folder, e.g.,C:\cs2serveror/home/user/cs2server. This is where game files will live. - Log in to SteamCMD anonymously
Run SteamCMD, then typelogin anonymousand press Enter. For a public server, anonymous login works fine. - Download the Counter-Strike 2 dedicated server files
In SteamCMD, run:force_install_dir C:\cs2server(Windows) orforce_install_dir /home/user/cs2server(Linux)
Then:app_update 730 validate
Wait for the download to complete – this can take 15–30 minutes depending on your connection. - Exit SteamCMD
Typequitand press Enter. - Create a server configuration file
Navigate to thecs2server/game/csgo/cfgfolder. Create a file namedserver.cfgusing a text editor. Add basic settings like:hostname "My CS2 Server"sv_cheats 0sv_password ""mp_roundtime 2mp_maxrounds 30
Save the file. - Start the server
On Windows, create a batch file (start.bat) in the server root with:cs2server\game\bin\win64\cs2.exe -dedicated -console -game csgo +map de_dust2 +sv_setsteamaccount YOUR_LOGIN_TOKEN
On Linux, run:./game/bin/linuxsteamrt64/cs2 -dedicated -console -game csgo +map de_dust2 +sv_setsteamaccount YOUR_LOGIN_TOKEN
ReplaceYOUR_LOGIN_TOKENwith a token from Steam Game Server Account Management (see Tips). - Allow the server through your firewall
Open ports 27015 (TCP and UDP) and 27016 (UDP) in your firewall. On Windows, use Windows Defender Firewall; on Linux, useufw allow 27015/tcpandufw allow 27015/udp. - Port forward your router (if hosting at home)
Log into your router’s admin page, find Port Forwarding, and forward TCP/UDP 27015 and UDP 27016 to your PC’s local IP address. - Test the server
In CS2, open the console (~) and typeconnect YOUR_PUBLIC_IP:27015. If you’re on the same network, tryconnect localhost:27015first.
Common Mistakes
- Forgetting to set the Steam account token – without it, the server won’t appear in the public list.
- Using the wrong path in
force_install_dir– double-check the folder exists. - Not opening both TCP and UDP ports – the server needs both.
- Starting the server without
-dedicated– it will run as a client and not work properly. - Editing
server.cfgwith the wrong encoding – use plain text, not rich text.
Tips
- Get a Steam Game Server Login Token from Steam’s management page – it’s free and required for public listing.
- Use a config generator or copy a known-good config from a community guide to avoid syntax errors.
- Set
sv_lan 0to allow internet connections;sv_lan 1for LAN-only. - Add
+exec server.cfgto your start command to load your config automatically. - For better performance, consider a VPS with a dedicated CPU – CS2 servers are CPU-bound.
Troubleshooting
- Server not showing in the list: Verify your Steam token is correct and that
sv_lan 0is set. Also check that the server is fully started (look for “Server is running” in the console). - Can’t connect from outside: Check port forwarding and firewall. Use an online port checker to see if 27015 is open.
- Server crashes on start: Check the console output for missing files or invalid config lines. Run
app_update 730 validateagain to repair files. - High ping for players: Ensure your upload speed is sufficient and that no other devices are saturating bandwidth. Consider a server location closer to players.
- Server runs but no one can join: Confirm that the game mode and map are valid. Try a different map like
de_mirage.
Frequently Asked Questions
Do I need a paid Steam account to host a CS2 server?
No, you can use the anonymous login in SteamCMD. However, you need a free Steam Game Server Login Token for public listing.
Can I host a CS2 server on a Raspberry Pi?
Not recommended. CS2 servers require a 64-bit x86 processor and at least 4 GB of RAM. A Pi won’t meet the requirements.
How do I change the map on my server?
Use the console command changelevel de_dust2 or add +map de_dust2 to the start command. You can also set a map cycle in a config file.
What is the default port for CS2 servers?
The default is 27015 (UDP and TCP). You can change it with -port 27016 in the start command.
Can I run multiple CS2 servers on one machine?
Yes, but each needs its own port and separate game files. Use a different force_install_dir and add -port to each start command.
How do I add bots to my server?
Set bot_add in the console or add bot_add to your server.cfg. Use bot_difficulty to adjust skill level.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Business partnership due diligence checklist what to verify before you sign?
- Does the FCC Protect Internet Privacy?
- Disaster Robbers Codes? Meaning & Origin
- Repair a Disk with Mac Disk Utility
- Sharp Smart TV TiVo OS Available February?
- Streamlabs Stream Boss: Setup Guide