How to Set Up a CS:GO / CS2 Server on VDS Print

  • 0

How to Set Up a CS:GO / CS2 Server on VDS

Running your own Counter-Strike 2 (CS2) server is a great way to play with friends, host private matches, or build a community. While CS2 has largely replaced CS:GO, the setup process is similar. This guide walks you through everything you need to know to get your server up and running on a VDS (Virtual Dedicated Server).


What You Need Before You Start

Before diving in, make sure you have:

 
 
Requirement Details
VDS with Linux Ubuntu 22.04 LTS or Debian 12 is recommended
At least 65GB storage CS2 server files are large — about 60GB
Minimum 2GB RAM 4GB or more recommended for smooth performance
Steam account Required to generate a Game Server Login Token (GSLT)
Open ports UDP 27015 (game) and UDP 27020 (SourceTV) by default

Why Host on a VDS?

A VDS gives you dedicated resources, full root access, and the ability to run the server exactly how you want. Unlike shared hosting, your performance isn't affected by other users, and you can install any software you need.


Two Ways to Set Up Your CS2 Server

There are two main approaches:

  1. Manual Setup with SteamCMD – Full control, suitable for Linux command-line users

  2. Automated Setup with LinuxGSM – Easier management with built-in update and monitoring features

We'll cover both methods.


Manual Setup with SteamCMD

Step 1: Connect to Your VDS

Connect via SSH:

ssh root@your-server-ip

Step 2: Install Dependencies

Update your package list and install required libraries:

sudo apt update
sudo apt install lib32gcc-s1 lib32stdc++6 steamcmd curl wget -y

The lib32gcc-s1 package is essential for running 32-bit applications like SteamCMD.

Step 3: Create a Steam User

It's safer to run SteamCMD under a dedicated user:

sudo useradd -m steam
sudo -u steam -s

Step 4: Install SteamCMD

Create a directory and download SteamCMD:

mkdir ~/Steam && cd ~/Steam
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

Step 5: Download the CS2 Server Files

Run SteamCMD and download the server:

./steamcmd.sh

Then at the Steam> prompt:

force_install_dir /home/steam/cs2-ds/
login anonymous
app_update 730 validate
quit

Important: The CS2 dedicated server and game client share App ID 730. The download is approximately 60GB, so this step may take some time.

Step 6: Configure Your Server

Navigate to the server directory and create or edit server.cfg:

cd /home/steam/cs2-ds/game/csgo/cfg/
nano server.cfg

Here's a basic configuration template:

hostname "My CS2 Server"
sv_password ""
sv_lan 0
sv_voiceenable 1
sv_alltalk 0
map de_dust2

To change the game mode, use these parameters when starting the server:

 
 
Game Mode Command Parameters
Casual +game_mode 0 +game_type 0
Competitive +game_mode 1 +game_type 0
Deathmatch +game_mode 2 +game_type 1
Wingman +game_mode 2 +game_type 0

Step 7: Generate a Game Server Login Token (GSLT)

For your server to be publicly visible, you need a GSLT:

  1. Visit the Steam Game Server Account Management page

  2. Log in with your Steam account

  3. Enter App ID: 730

  4. Add a descriptive memo

  5. Click Create

  6. Copy the token — keep it private!

Step 8: Start the Server

Navigate to the server directory and launch:

cd /home/steam/cs2-ds/game/bin/linuxsteamrt64/
./cs2.sh -dedicated +map de_dust2 +sv_setsteamaccount YOUR_TOKEN_HERE

For Linux, use the cs2.sh script rather than running the executable directly — it handles important setup tasks.


Automated Setup with LinuxGSM

If you prefer an automated approach with built-in management features, LinuxGSM is a great option.

Step 1: Install Dependencies

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install mailutils postfix curl wget file tar bzip2 gzip unzip bsdmainutils python3 util-linux ca-certificates binutils bc jq tmux lib32gcc-s1 lib32stdc++6 -y

Step 2: Download LinuxGSM and Install the Server

wget -O linuxgsm.sh https://linuxgsm.sh/
chmod +x linuxgsm.sh
bash linuxgsm.sh cs2server
./cs2server install

Step 3: Configure and Start

Edit the server configuration file at /lgsm/config-default/config-game/server.cfg, then:

./cs2server start

LinuxGSM automatically handles updates, backups, and monitoring. You can check server status with ./cs2server details.


Common Command-Line Parameters

 
 
Parameter Purpose Example
-dedicated Run as dedicated server Required
+map Starting map

Was this answer helpful?

« Back