Skip to main content
Back to Category

How to Set Up a CS2 Dedicated Server: Complete Guide

Complete CS2 dedicated server setup guide on REXE VDS: SteamCMD installation, GSLT token, server configuration, game modes, and DDoS protection with Path Panel.

Read time: 10 min Game Server Setup
cs2counter-strikesteamcmdgsltgame servercompetitivecs2 dedicated server

Table of Contents

Introduction

Counter-Strike 2 (CS2) is one of the most popular competitive FPS games. Running your own dedicated server gives you full control over game settings, maps, and plugins. This guide covers the complete CS2 server setup on your REXE VDS.

Recommended specs: 2-4 CPU cores, 4GB RAM, 30GB disk space.

Step 1: Install SteamCMD

hljs bash
sudo apt update
sudo apt install -y lib32gcc-s1 lib32stdc++6

sudo adduser cs2 --disabled-password --gecos ""
sudo su - cs2

mkdir -p ~/steamcmd && cd ~/steamcmd
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xzf steamcmd_linux.tar.gz
rm steamcmd_linux.tar.gz

Step 2: Install CS2 Server

hljs bash
~/steamcmd/steamcmd.sh +force_install_dir ~/cs2server +login anonymous +app_update 730 validate +quit

The download is approximately 30GB. This may take some time depending on your server's bandwidth.

Step 3: Get a GSLT Token

  1. Visit Steam Game Server Account Management
  2. Log in with your Steam account
  3. Create a new game server account with App ID: 730
  4. Copy the generated GSLT token

A GSLT token is required for your server to appear in the server browser. Each server needs its own unique token.

Step 4: Server Configuration

Create or edit the server configuration:

hljs bash
nano ~/cs2server/game/csgo/cfg/server.cfg
hostname "My REXE CS2 Server"
sv_cheats 0
sv_lan 0
sv_maxrate 0
sv_minrate 128000
sv_maxupdaterate 128
sv_minupdaterate 128
game_type 0
game_mode 1
mapgroup mg_active
map de_dust2

Step 5: Start the Server

hljs bash
cd ~/cs2server
./game/bin/linuxsteamrt64/cs2 -dedicated \
  -port 27015 \
  +game_type 0 \
  +game_mode 1 \
  +map de_dust2 \
  +sv_setsteamaccount YOUR_GSLT_TOKEN \
  -maxplayers 10

Step 6: Path Panel Firewall

hljs yaml
# Game port
Protocol: UDP
Destination Port: 27015
Filter: L4D2/CS:GO
Comment: "CS2 game port"

# RCON (restrict to your IP)
Protocol: TCP
Destination Port: 27015
Comment: "CS2 RCON"

Step 7: Systemd Service

hljs ini
[Unit]
Description=CS2 Dedicated Server
After=network.target

[Service]
Type=simple
User=cs2
WorkingDirectory=/home/cs2/cs2server
ExecStart=/home/cs2/cs2server/game/bin/linuxsteamrt64/cs2 -dedicated -port 27015 +game_type 0 +game_mode 1 +map de_dust2 +sv_setsteamaccount YOUR_GSLT -maxplayers 10
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Game Modes

game_typegame_modeMode
00Casual
01Competitive
10Arms Race
11Demolition
40Deathmatch

Updating the Server

hljs bash
~/steamcmd/steamcmd.sh +force_install_dir ~/cs2server +login anonymous +app_update 730 validate +quit

Set up a cron job to check for updates regularly, or update manually before major tournaments.