CS2 Dedicated Server Setup (Linux + SteamCMD)
This guide walks through standing up a Counter-Strike 2 dedicated server on Linux using SteamCMD. CS2's dedicated-server install is roughly 60 GB and requires a few setup steps that didn't apply to CSGO — most notably a steamclient.so symlink and a Game Server Login Token (GSLT) bound to your Steam account.
Steam app ID for CS2 dedicated server: 730 (same as the CS2 client; the dedicated server is published under the same app). Anonymous SteamCMD login is sufficient for the install.
Step 1: Install SteamCMD
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
sudo apt install -y steamcmd
Step 2: Pull the CS2 Server Files (~60 GB)
mkdir -p ~/cs2-server
steamcmd +force_install_dir ~/cs2-server +login anonymous +app_update 730 validate +quit
Expect 10-30 minutes on a fast connection. The download is large; budget storage accordingly.
Step 3: Create the steamclient.so Symlink
CS2 (and most modern Steam-based dedicated servers) needs a steamclient.so symlink at a specific path. Without it, the server fails on boot with steamclient.so: cannot open shared object file.
mkdir -p ~/.steam/sdk64
ln -s ~/.local/share/Steam/steamcmd/linux64/steamclient.so ~/.steam/sdk64/steamclient.so
Adjust the source path if your SteamCMD is installed elsewhere — the destination path (~/.steam/sdk64/steamclient.so) is what CS2 looks for.
Step 4: Generate a Game Server Login Token (GSLT)
CS2 dedicated servers require a GSLT — a per-server token bound to your Steam account — for clients to be able to connect from the public internet. Without one, your server runs but won't accept normal player connections.
- Visit steamcommunity.com/dev/managegameservers
- Sign in with the Steam account you want to bind the server to (it must have purchased CS2 historically and be in good standing).
- Create a new token with App ID
730. - Save the token — it's a hex string you'll pass to the server at launch.
You'll need a fresh GSLT for each unique server you run.
Step 5: Edit gameserver.cfg / server.cfg
CS2 server config lives in the standard Source-engine config locations. Common starter values:
hostname "My CS2 Server"
sv_password ""
rcon_password "RconPasswordHere"
sv_lan 0
sv_region 0 // 0 = Worldwide; pick a region or leave Worldwide
mp_autoteambalance 1
mp_limitteams 2
mp_maxrounds 24
sv_visiblemaxplayers 10
mp_warmuptime 30
Drop CS2-specific cvars in game/csgo/cfg/gameserver.cfg; classic CS server.cfg conventions apply.
Step 6: Launch via cs2.sh
Use the provided cs2.sh script rather than running the binary directly — it sets up environment variables CS2 needs (paths, library handling) before exec'ing the server binary.
cd ~/cs2-server/game/bin/linuxsteamrt64
./cs2.sh -dedicated +map de_dust2 +sv_setsteamaccount YOUR_GSLT_TOKEN_HERE
The +sv_setsteamaccount cvar is what binds the GSLT to the running server.
Step 7: Open Required Ports
| Port | Protocol | Purpose |
|---|---|---|
| 27015 | UDP + TCP | Game traffic |
| 27016 | UDP + TCP | Steam query / secondary |
If you're hosting multiple CS2 servers, increment by at least 2 (e.g., second instance on 27017/27018).
First Boot Verification
- Watch the log for
VAC secure mode is activatedand the GSLT acceptance line. - Try connecting from your CS2 client via
connect IP:27015in the in-game console. - If clients can find the server in the in-game browser, your GSLT and ports are wired correctly.
Common Boot Failures
| Symptom | Likely cause | Fix |
|---|---|---|
steamclient.so: cannot open shared object file | Symlink missing or wrong path | Re-do Step 3; verify ~/.steam/sdk64/steamclient.so exists and points to a real file |
| Server boots but no players can connect from the internet | GSLT missing or invalid | Generate a fresh GSLT and pass it via +sv_setsteamaccount |
| Connection rejected: VAC issues | GSLT bound to a banned account | Use a different Steam account |
Could not load library | LD_LIBRARY_PATH not set | Use cs2.sh, don't run binary directly |
| Wrong port used (default fallback) | Each launch flag and value must be a separate argument | Use -port 28720 not "-port 28720" |
Frequently Asked Questions
Why do I need a GSLT for CS2?
Valve introduced GSLT to deter abuse and bind public servers to identifiable Steam accounts. Without one, your server effectively runs in LAN mode for public connections.
Can I run multiple CS2 servers from one GSLT?
One GSLT per server. Generate a fresh token for each instance.
Is steamclient.so really mandatory?
Yes — CS2 won't start without it. The error message is unambiguous; the fix is the symlink in Step 3.
What's the difference between cs2.sh and the bare binary?
cs2.sh sets LD_LIBRARY_PATH, cwd, and a few other env bits CS2 needs. Running the bare binary often produces "Could not load library" errors. Always launch via cs2.sh.
Related Reading
- CS2 Map Callouts
- CounterStrikeSharp Transition
- Official: Valve Developer Community — CS2 Dedicated Servers
Quick Start with Supercraft
Supercraft hosts Counter-Strike 2 dedicated servers with the install (~60 GB), steamclient.so symlink, GSLT binding, and cs2.sh launch all pre-configured. You provide your GSLT token via the panel; we handle the rest. Maps, server.cfg, and rcon are all panel-driven.