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.
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
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
~/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
- Visit Steam Game Server Account Management
- Log in with your Steam account
- Create a new game server account with App ID: 730
- 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:
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
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
# 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
[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_type | game_mode | Mode |
|---|---|---|
| 0 | 0 | Casual |
| 0 | 1 | Competitive |
| 1 | 0 | Arms Race |
| 1 | 1 | Demolition |
| 4 | 0 | Deathmatch |
Updating the Server
~/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.
Related Articles
How to Set Up a FiveM Server: Step-by-Step Guide
Complete FiveM server setup guide on REXE VDS: installation, txAdmin configuration, port settings, and performance optimization tips for GTA V roleplay servers.
How to Set Up a Minecraft Server: Paper Installation Guide
Complete Minecraft server setup guide on REXE VDS: Paper/Spigot installation, Java configuration, plugin management, and performance optimization for stable gameplay.
How to Set Up a Rust Server: Oxide Plugin Guide
Complete Rust dedicated server setup guide on REXE VDS: SteamCMD installation, Oxide/uMod plugin system, server configuration, performance tuning, and wipe management.