Skip to content

Instantly share code, notes, and snippets.

@salmanasiddiqui
Created June 8, 2025 20:18
Show Gist options
  • Select an option

  • Save salmanasiddiqui/4e5467a21f3cafe47d14ed30aea21f32 to your computer and use it in GitHub Desktop.

Select an option

Save salmanasiddiqui/4e5467a21f3cafe47d14ed30aea21f32 to your computer and use it in GitHub Desktop.
Instructions to setup CS2 dedicated server

Hardware Requirements

  1. 65gb of storage
  2. server equivalent of AWS EC2 t3.xlarge

Installation

  1. Follow the "Install" instructions at https://linuxgsm.com/servers/cs2server/

Ports configuration

  1. Update security group associated with your EC2 instance to open the following ports for incoming traffic
    • 27010 - 27020 for both TCP and UDP

Frequently used commands

cs2server

  1. ./cs2server start to start server, use restart if you want to restart
  2. ./cs2server stop to stop server
  3. ./cs2server console to run in-game server commands for CS2
    • To exit the console press CTRL+b d. Pressing CTRL+c will terminate the server.
  4. ./cs2server update to update CS2 server

For more details check out Basic Usage at https://linuxgsm.com/servers/cs2server/

cs2 server commands

mp_limitteams  "0"        // Allow free team-switching
bot_quota      "0"        // Disable bots
mp_restartgame "1"        // Restart game and go live

Check following gist for more commands: https://gist.github.com/ar1a/0abaa6d6225fb3c98451aa0c85dc08b9

Copying those configs in game directory will allow you to quickly execute those configs, all instructions are in above gist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment