keepcalculator

06 Numbers and Powers

How to Create a Counter-Strike 2 Server

Card No. 06·69264 · Updated · Standard formula, shown below

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

  1. Install SteamCMD
    On Windows: download SteamCMD from the official Valve site and extract it to a folder like C:\steamcmd. On Linux: open a terminal and run sudo apt update && sudo apt install steamcmd (Ubuntu/Debian) or use your package manager.
  2. Create a directory for the server
    Make a dedicated folder, e.g., C:\cs2server or /home/user/cs2server. This is where game files will live.
  3. Log in to SteamCMD anonymously
    Run SteamCMD, then type login anonymous and press Enter. For a public server, anonymous login works fine.
  4. Download the Counter-Strike 2 dedicated server files
    In SteamCMD, run:
    force_install_dir C:\cs2server (Windows) or force_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.
  5. Exit SteamCMD
    Type quit and press Enter.
  6. Create a server configuration file
    Navigate to the cs2server/game/csgo/cfg folder. Create a file named server.cfg using a text editor. Add basic settings like:
    hostname "My CS2 Server"
    sv_cheats 0
    sv_password ""
    mp_roundtime 2
    mp_maxrounds 30
    Save the file.
  7. 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
    Replace YOUR_LOGIN_TOKEN with a token from Steam Game Server Account Management (see Tips).
  8. 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, use ufw allow 27015/tcp and ufw allow 27015/udp.
  9. 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.
  10. Test the server
    In CS2, open the console (~) and type connect YOUR_PUBLIC_IP:27015. If you’re on the same network, try connect localhost:27015 first.

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.cfg with 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 0 to allow internet connections; sv_lan 1 for LAN-only.
  • Add +exec server.cfg to 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 0 is 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 validate again 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

The whole Numbers and Powers drawer →