Hosting Guides

Deploying a Lightweight CS2 Server via LinuxGSM (Ubuntu 24.04)

5 min readUbuntu 24.04LinuxGSMSource
Once your server is online, jump to the Counter-Strike 2 command and config reference.

Pterodactyl is the right pick when you need a visual panel to juggle dozens of game servers across multiple nodes. LinuxGSM (the Linux Game Server Managers project) sits at the opposite end of the spectrum. It is a collection of battle tested bash scripts that install, configure, and supervise a game server process directly on the host OS, with zero virtualization layer and no container filesystem to traverse. For a single CS2 community server running on modest VPS hardware, that minimalism translates directly into more headroom for the engine.

About the network tuning: CS2 ships with a hardcoded sub-tick architecture, so you cannot ask the engine to run at a higher legacy tickrate. What you absolutely can (and should) tune are the bandwidth ceilings, snapshot rates, and process priorities. Done correctly through the LinuxGSM configuration files, the result is the crisp, predictable hit registration that veteran admins associate with well maintained legacy 128 tick boxes.

Prerequisites

  • A fresh Ubuntu 24.04 LTS installation on a VPS or dedicated box.
  • Root access (or a sudo capable user) to install system dependencies.
  • A dedicated non-root system user named cs2server.
  • At least 4 GB of RAM (8 GB recommended for 24 slot servers).

Step 1: System Dependencies and User Creation

Running any internet exposed game server as root is a massive security hazard. A compromised srcds binary or a malicious plugin would inherit full control of the host. The fix is boring and effective: install dependencies as root, then drop privileges to a dedicated unprivileged user that owns nothing except the game files.

SteamCMD is a 32-bit binary even when it fetches a 64-bit game, so you need both 32 and 64 bit C and SDL libraries on the host. Refresh the package index, install the toolchain, then create the isolated account.

root@host
apt update && apt upgrade -y
dpkg --add-architecture i386
apt update
apt install -y curl wget file tar bzip2 gzip unzip bsdmainutils python3 \
util-linux ca-certificates binutils bc jq tmux netcat-openbsd \
lib32gcc-s1 lib32stdc++6 libstdc++6 libsdl2-2.0-0:i386 libsdl2-2.0-0 \
glibc-source libcurl4-gnutls-dev:i386
adduser --system --shell /bin/bash --group --home /home/cs2server cs2server

Switch into the new account and confirm you land in its home directory before continuing. Everything from this point forward runs as cs2server.

root@host
su - cs2server
cd ~
pwd

Step 2: Installing LinuxGSM

LinuxGSM ships a single bootstrap script per game. For Counter Strike 2 the script is named linuxgsm.sh and it self renames into cs2server on first run, which becomes the entry point for every lifecycle command from now on.

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

The bootstrap pulls the LinuxGSM repository into the home directory, lays out the standard folder tree (lgsm/, serverfiles/, log/), and registers the CS2 specific module set.

Step 3: Executing the CS2 Server Installation

With the manager wired up, kick off the actual game install. A single command triggers the full pipeline.

cs2server@host
./cs2server install

In the background, LinuxGSM downloads and unpacks SteamCMD into ~/.steam, performs an anonymous Steam login, points it at AppID 730 (Counter Strike 2), and fetches the dedicated server asset files. This is the largest single step in the build (roughly 35 GB at the time of writing) and saturates the box's download pipe. Expect ten to twenty minutes on a 1 Gbps uplink, longer on commodity VPS plans. When the installer asks for a hostname and an RCON password, fill them in, and it writes the answers into the default config.

Step 4: Network and Performance Optimization

LinuxGSM keeps administrator overrides in a dedicated config directory so that upstream updates never clobber your tuning. The file you want is here:

cs2server@host
nano ~/lgsm/config-lgsm/cs2server/cs2server.cfg

Drop the following block in. It pins the server to port 27015, locks in a Game Server Login Token, raises the bandwidth and snapshot ceilings to the levels the sub-tick simulation can actually exploit, sets a sane fps_max, and runs the process at an elevated scheduling priority so the kernel does not preempt it for less important work.

cs2server.cfg
# LinuxGSM CS2 production overrides
ip="0.0.0.0"
port="27015"
clientport="27005"
sourcetvport="27020"
defaultmap="de_dust2"
maxplayers="12"
gslt="YOUR_GAME_SERVER_LOGIN_TOKEN"
rconpassword="CHANGE_ME_STRONG"
# Launch parameters passed to the CS2 binary
startparameters="-dedicated -usercon -nohltv \
-port ${port} +clientport ${clientport} \
+map ${defaultmap} +maxplayers ${maxplayers} \
+sv_setsteamaccount ${gslt} +rcon_password ${rconpassword} \
+sv_minrate 196608 +sv_maxrate 786432 \
+sv_mincmdrate 128 +sv_maxcmdrate 128 \
+sv_minupdaterate 128 +sv_maxupdaterate 128 \
+fps_max 600 +game_type 0 +game_mode 1 \
+exec server.cfg"
# Run the process at elevated scheduling priority
nice="-10"

The sv_maxrate ceiling of 786432 bytes per second per client is intentionally generous; sub-tick payloads are denser than the old fixed tick snapshots, and starving the client of bandwidth manifests as the exact stutter players will blame on "the server feeling off." Pair these settings with a real server.cfg living under ~/serverfiles/game/csgo/cfg/server.cfg for the gameplay rules (rounds, money, friendly fire).

Step 5: Managing the Server Lifecycle

Every LinuxGSM command is invoked on the renamed entry point. Memorize these five, you will use almost nothing else day to day.

Start the server
./cs2server start
Stop the server
./cs2server stop
Restart the server
./cs2server restart
Attach to the live console (tmux)
./cs2server console

The console command attaches your terminal to the background tmux session that LinuxGSM uses to supervise the process. Detach with Ctrl-b then d. Never kill the session with Ctrl-c, that takes the server down with it.

Update server files via SteamCMD
./cs2server update
Update LinuxGSM itself
./cs2server update-lgsm

Conclusion

That is the whole build. Ubuntu 24.04 underneath, an unprivileged cs2server user holding the game files, LinuxGSM supervising the process inside tmux, and a configuration block that lets the sub-tick simulation deliver snapshots without hitting an artificial bandwidth ceiling. To verify the build, open Counter Strike 2, drop the developer console with the tilde key, and run:

In game developer console
connect your.server.ip:27015

Finish by wiring up a system crontab as the cs2server user to keep things healthy without manual intervention. The following entries restart the server on boot, monitor for crashes every five minutes, and pull game and LinuxGSM updates nightly at 04:00.

crontab -e (as cs2server)
@reboot /home/cs2server/cs2server start > /dev/null 2>&1
*/5 * * * * /home/cs2server/cs2server monitor > /dev/null 2>&1
0 4 * * * /home/cs2server/cs2server update > /dev/null 2>&1
30 4 * * * /home/cs2server/cs2server update-lgsm > /dev/null 2>&1

From here the server is genuinely hands off. Layer in Sourcemod or MatchZy if you need league features, but the infrastructure underneath should fade into the background, which is exactly what a community server is supposed to do.