Counter-Strike 2 gameplay

Host a Counter-Strike 2 Dedicated Server

For over two decades, Counter-Strike has offered an elite competitive experience, one shaped by millions of players from across the globe. And now the next chapter in the CS story is about to begin. This is Counter-Strike 2.

Hardware Requirements

Here's what you need to run a Counter-Strike 2 dedicated server.

Economy

Wingman / small matches, 2-10 players

CPU0.5 cores
RAM2 GB
Storage40 GB SSD

Standard

Competitive 5v5, 10-24 players

CPU1 core
RAM3 GB
Storage40 GB SSD

Pro

Large casual/deathmatch, 24-64 players

CPU2 cores
RAM4 GB
Storage40 GB SSD

Start hosting from your own computer

Run a Counter-Strike 2 server on your desktop, laptop, VPS, or dedicated machine — GameCP automates Docker setup, resource allocation, and Counter-Strike 2 configuration instantly. Automatic port forwarding means your friends can connect without touching your router. Start local, scale to a VPS when you're ready.

Get Started FreeNo credit card required

Setup in 4 Steps

Skip the manual SteamCMD installation, port forwarding, and systemd configuration. Install on your own computer and start hosting instantly.

The Manual Way vs. GameCP

Manual Setup

  • Install SteamCMD manually
  • Configure 2+ firewall ports and router settings
  • Write systemd service files
  • SSH into server to edit configs
  • Requires a VPS or dedicated server
  • 30-60 minutes if experienced

With GameCP

  • One-click SteamCMD install
  • Automatic port forwarding — no router config
  • Host from your own PC, VPS, or dedicated server
  • Docker container with auto-restart
  • Visual config editor in browser
  • Under 5 minutes total

Under the Hood

The full manual process to host a Counter-Strike 2 dedicated server on a VPS. Or install GameCP on your own computer and skip all of this.

Step 1

Configure & Prepare

Set your server settings, then install Docker, SteamCMD, and pull the Counter-Strike 2 container image.

Server ConfigurationEdit values to update all commands
terminal
# Update system and install Docker
sudo apt update && sudo apt install -y docker.io
sudo systemctl enable --now docker

# Create game server directory
sudo mkdir -p /opt/gameserver

# Install SteamCMD
sudo mkdir -p /opt/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | sudo tar zxvf - -C /opt/steamcmd

# Server configuration
export MAX_PLAYERS="12"
export VAC_ENABLED="1"
export RCON_ENABLED="0"
export SRCDS_MAP="de_dust2"
export GAME_MODE="1"
export GAME_TYPE="0"
export BOT_QUOTA="0"
export BOT_QUOTA_MODE="fill"
export BOT_DIFFICULTY="1"
export AUTO_UPDATE="1"

# Pull the container image
docker pull ghcr.io/ptero-eggs/steamcmd:sniper
Step 2

Install Server Files via SteamCMD

Download the Counter-Strike 2 dedicated server using Steam App ID 730.

terminal
# Download Counter-Strike 2 server files (App ID: 730)
/opt/steamcmd/steamcmd.sh \
  +force_install_dir /opt/gameserver \
  +login anonymous \
  +app_update 730 validate \
  +quit
Step 3

Open Firewall Ports

Counter-Strike 2 requires 2 ports to be open for game traffic and queries.

terminal
sudo ufw allow 27015/both
sudo ufw allow 27020/both
27015/BOTH(PORT)27020/BOTH(TV_PORT)
Step 4

Launch the Server

Start the Counter-Strike 2 server using the configuration from Step 1.

Create the startup script

terminal
# Create the startup script
cat > /opt/gameserver/start.sh << 'EOF'
#!/bin/bash

# 1. Setup Environment
export LD_LIBRARY_PATH="/game/bin/linuxsteamrt64:"

# 2. Build Argument Array
PARAMS=(
"-dedicated"
"-ip" "0.0.0.0"
"-port" "27015"
"-tv_port" ""
"-maxplayers" "12:-12}"
)

# 3. Add Conditional Arguments
[[ "1" == "1" ]] || PARAMS+=("-insecure")
[[ "0" == "1" ]] && PARAMS+=("-usercon")

# 4. Add CVARs
PARAMS+=(
"+game_mode" "1:-1}"
"+game_type" "0:-0}"
"+map" "de_dust2:-de_dust2}"
"+hostname" ""
"+sv_password" ":-}"
"+rcon_password" ""
"+bot_quota" "0:-0}"
"+bot_quota_mode" "0_MODE:-fill}"
"+bot_difficulty" "1:-1}"
)

# 5. GSLT Logic
[[ -n "" ]] && PARAMS+=("+sv_setsteamaccount" "")

# 6. Execution Loop (Auto-Restart on Crash)
echo "Starting CS2 Server: "

until ./game/bin/linuxsteamrt64/cs2 "[@]}"; do
echo "Server crashed with exit code $?. Respawning in 5 seconds..."
sleep 5
done
EOF
chmod +x /opt/gameserver/start.sh

Run the container

terminal
docker run -d \
  --name counter-strike-2-server \
  -p 27015:27015/both \
  -p 27020:27020/both \
  -e MAX_PLAYERS="12" \
  -e VAC_ENABLED="1" \
  -e RCON_ENABLED="0" \
  -e SRCDS_MAP="de_dust2" \
  -e GAME_MODE="1" \
  -e GAME_TYPE="0" \
  -e BOT_QUOTA="0" \
  -e BOT_QUOTA_MODE="fill" \
  -e BOT_DIFFICULTY="1" \
  -e AUTO_UPDATE="1" \
  -v /opt/gameserver:/opt/gameserver \
  -w /opt/gameserver \
  ghcr.io/ptero-eggs/steamcmd:sniper \
  ./start.sh

Alternative startup profiles:

  • Competitive (128 Tick)Optimized for competitive play. Higher tickrate for more responsive gameplay. Best for 5v5 matches.
  • Casual (64 Tick)Standard casual server settings. Lower resource usage, suitable for public servers with many players.

GameCP lets you switch between these profiles with one click.

Or skip all of this

GameCP automates every step above: Docker, SteamCMD, port forwarding, startup, and config. Install on your own PC and deploy a Counter-Strike 2 server in under 5 minutes.

Deploy with GameCP

Ready to Host Your Counter-Strike 2 Server?

Install GameCP on your own computer and start hosting in minutes. Automatic port forwarding, zero config — your friends connect instantly.

No credit card required · Free tier available · Install local, scale later

Deploy Free