Counter-Strike 2 (CS2) dedicated servers power community servers, practice servers, scrims, and private matches with friends. Running your own on a Linux VPS gives you control over maps, game modes, configs and plugins, plus a stable server near your players for low ping.

Requirements

  • 2–4 vCPU with strong single-core performance, and 4 GB RAM or more for a 10–12 player server.
  • About 60 GB+ of disk: the CS2 install is large, and updates need room.
  • Ports 27015 UDP/TCP (game and RCON).
  • Low latency to your players matters most. Pick a nearby location, and test ping. See choosing a VPS location and game server VPS.

Install SteamCMD and CS2

sudo dpkg --add-architecture i386
sudo apt update && sudo apt install -y steamcmd lib32gcc-s1
sudo adduser --disabled-password --gecos "" cs2
sudo -iu cs2
/usr/games/steamcmd +force_install_dir ~/cs2 +login anonymous +app_update 730 validate +quit

CS2’s dedicated server is installed from app ID 730. Some Linux setups need the Steam client library linked:

mkdir -p ~/.steam/sdk64
ln -sf ~/.steam/steamcmd/linux64/steamclient.so ~/.steam/sdk64/steamclient.so   # path varies by SteamCMD install

Get a Game Server Login Token (GSLT)

Public servers that should appear in the server browser need a GSLT:

  1. Go to Steam’s Game Server Account Management page (steamcommunity.com/dev/managegameservers).
  2. Create a token for app ID 730, with a memo such as “my-cs2-server”.
  3. Use it with +sv_setsteamaccount <TOKEN>.

The Steam account must meet Valve’s requirements (for example, no limited account). Keep the token private.

Launch the server

cd ~/cs2/game/bin/linuxsteamrt64
./cs2 -dedicated -port 27015 -maxplayers 12 \
  +game_type 0 +game_mode 1 +map de_dust2 \
  +sv_setsteamaccount YOUR_GSLT \
  +exec server.cfg

Common game modes:

Mode game_type game_mode
Casual 0 0
Competitive 0 1
Wingman 0 2
Deathmatch 1 2
Arms Race 1 0

CS2 uses a sub-tick system: there’s no tickrate setting to tune like CS:GO’s 64/128 tick.

server.cfg

Create ~/cs2/game/csgo/cfg/server.cfg:

hostname "My CS2 Server"
sv_password ""                  // set for a private server
rcon_password "long-random-rcon-password"
sv_cheats 0
sv_lan 0
mp_autoteambalance 1
mp_limitteams 1
sv_hibernate_when_empty 1

Never share the RCON password. Admins use rcon_password <pw> in the console, then rcon <command>.

Run it as a systemd service

# /etc/systemd/system/cs2.service
[Unit]
Description=CS2 Dedicated Server
After=network-online.target

[Service]
User=cs2
WorkingDirectory=/home/cs2/cs2/game/bin/linuxsteamrt64
ExecStartPre=/usr/games/steamcmd +force_install_dir /home/cs2/cs2 +login anonymous +app_update 730 +quit
ExecStart=/home/cs2/cs2/game/bin/linuxsteamrt64/cs2 -dedicated -port 27015 +game_type 0 +game_mode 1 +map de_dust2 +sv_setsteamaccount YOUR_GSLT +exec server.cfg
Restart=on-failure

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload && sudo systemctl enable --now cs2
journalctl -u cs2 -f

Valve pushes updates often, and outdated servers reject players. The ExecStartPre line updates on each restart, so a daily restart keeps you current. See systemd timers.

Firewall

sudo ufw allow 27015/udp
sudo ufw allow 27015/tcp

See UFW.

Plugins and custom maps

  • Metamod:Source + CounterStrikeSharp is the common plugin framework for CS2 (admin tools, practice modes, retakes, and more). Follow each project’s install instructions, since they change with game updates.
  • Workshop maps: +host_workshop_map <id> loads a Workshop map. Workshop collections need a Steam Web API key.
  • Plugins often break after CS2 updates. Test after each update.

DDoS and abuse

Public game servers attract attacks and griefers. Use strong RCON passwords, keep the server updated, and consider a provider with DDoS protection for public communities. VPS.DO offers DDoS protection as a paid add-on for dedicated servers. See DDoS attack types and dedicated servers.

Quick reference

Item Value
SteamCMD app ID 730
Port 27015 UDP/TCP
Token GSLT for app 730 (+sv_setsteamaccount)
Config game/csgo/cfg/server.cfg
Binary game/bin/linuxsteamrt64/cs2 -dedicated

Related: Rust dedicated server and LinuxGSM.

  • Game Server
  • SteamCMD
  • Linux