How to Set Up a Counter-Strike 2 Dedicated Server
A step-by-step guide to running your own CS2 dedicated server on a Linux VPS with SteamCMD, a Game Server Login Token, and clean systemd startup.

Running your own Counter-Strike 2 dedicated server means practice servers, private scrims, and community maps that never fill up with strangers. This guide takes you from a fresh Ubuntu VPS to a public CS2 server you control, using SteamCMD and a Game Server Login Token (GSLT).
What you need first
- A Linux VPS: Ubuntu 22.04 or Debian 12, at least 2 vCPU and 4 GB RAM for a comfortable competitive server. CS2 is CPU-sensitive, so single-thread performance matters more than core count.
- A Steam GSLT: create one for App ID 730 at steamcommunity.com/dev/managegameservers. Without it your server can run on a LAN but will not appear publicly.
- Open ports: CS2 uses UDP/TCP 27015 for game traffic and UDP 27005 for clients. You will open these on the firewall below.
Step 1: Create a non-root user and install dependencies
Never run a game server as root. Create a dedicated account and install the 32-bit libraries SteamCMD needs:
sudo adduser --disabled-password --gecos "" cs2
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y lib32gcc-s1 lib32stdc++6 steamcmd curl
Step 2: Install the CS2 server with SteamCMD
Switch to the cs2 user and pull the server files. The CS2 dedicated server is App ID 730:
sudo su - cs2
steamcmd +force_install_dir /home/cs2/server +login anonymous +app_update 730 validate +quit
The first download is several gigabytes, so give it a few minutes. When it finishes you will have the game binaries under /home/cs2/server/game.

Step 3: Open the firewall
If you use UFW, allow the CS2 ports:
sudo ufw allow 27015/udp
sudo ufw allow 27015/tcp
sudo ufw allow 27005/udp
sudo ufw reload
If your VPS provider has a separate network firewall (many do), open the same ports there too, or clients will time out even though the server is running.
Step 4: Start the server
CS2 launches through a shell script in the game directory. Paste your GSLT after +sv_setsteamaccount:
cd /home/cs2/server/game/bin/linuxsteamrt64
./cs2 -dedicated -console \
+ip 0.0.0.0 -port 27015 \
+map de_dust2 \
+sv_setsteamaccount YOUR_GSLT_TOKEN \
+game_type 0 +game_mode 1
Game type/mode 0/1 is competitive. Use 0/0 for casual. Once you see the map load, connect from the CS2 console with connect YOUR_SERVER_IP:27015.
Step 5: Run it as a systemd service
So the server survives reboots and restarts on crash, create /etc/systemd/system/cs2.service:
[Unit]
Description=CS2 Dedicated Server
After=network.target
[Service]
Type=simple
User=cs2
WorkingDirectory=/home/cs2/server/game/bin/linuxsteamrt64
ExecStart=/home/cs2/server/game/bin/linuxsteamrt64/cs2 -dedicated -console +ip 0.0.0.0 -port 27015 +map de_dust2 +sv_setsteamaccount YOUR_GSLT_TOKEN +game_type 0 +game_mode 1
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Enable and start it:
sudo systemctl daemon-reload
sudo systemctl enable --now cs2
sudo journalctl -u cs2 -f
For a deeper pattern that also handles scheduled restarts, see our guide on how to automate game server restarts with systemd and cron.
Configuring the server
Drop a server.cfg into /home/cs2/server/game/csgo/cfg/ with your basics:
hostname "My Nxeon CS2 Server"
sv_password ""
rcon_password "change-this-strong-password"
sv_cheats 0
mp_autoteambalance 1
mp_maxrounds 24
Set a strong RCON password and never share it — RCON is remote admin control over the whole server. If you plan to run several games on one box, our guide to hosting multiple game servers on one VPS shows how to keep ports and users separated cleanly.
Picking the right hardware
CS2's 64-tick (or higher, with community configs) simulation rewards fast cores. A 4 GB / 2–4 vCPU plan handles a full 10-player match well; move up if you run 128-tick or multiple servers. For a fuller breakdown, read Game Server Specs Explained: CPU, RAM and Bandwidth. Nxeon's NVMe VPS plans give you full root access and the single-thread headroom CS2 likes.
Handy launch options and match configs
A few extra parameters and console variables tailor how the server runs:
- +tv_enable 1 turns on GOTV so matches can be spectated or recorded as demos.
- -maxplayers_override 12 hard-caps the slot count regardless of the game mode's default.
- +exec gamemode_competitive_server.cfg loads a competitive ruleset at boot.
- +sv_hibernate_when_empty 1 parks the server at low CPU when nobody is connected.
For scrims, keep match configs in csgo/cfg and load them from RCON mid-session — a knife/warmup config, then a live config that runs mp_restartgame 1 and enables overtime. That's how most pug and practice servers switch phases without a full restart.
Troubleshooting a CS2 server
- Starts then quits instantly: almost always an invalid or missing GSLT. Regenerate the token for App ID 730.
- "Unable to verify" or VAC errors: re-run
+app_update 730 validateto repair corrupted files. - Tick drops under load: CS2's simulation is single-thread heavy — move to a faster core or lower the tickrate, and watch load with
top. - Visible in the browser but times out on join: the client port (UDP 27005) or a second firewall is blocking traffic.
Valve patches CS2 regularly, and clients can't join an out-of-date server, so re-run the SteamCMD app_update 730 command after each major patch and restart the service.
FAQ
Do I need a GSLT for a CS2 server?
For a public, internet-visible server, yes. A Game Server Login Token tied to App ID 730 is required for the server to register with Steam. LAN-only servers can skip it.
Why can players not connect even though the server is running?
Almost always a firewall issue. Confirm UDP/TCP 27015 is open both in UFW and in your provider's network firewall, and that you started the server with +ip 0.0.0.0.
How much RAM does a CS2 server need?
A single competitive server is comfortable with about 2 GB in use; 4 GB total gives headroom for the OS, plugins, and demos. Multiple servers scale roughly linearly.
Can I add plugins like Metamod and CounterStrikeSharp?
Yes. Install Metamod:Source and CounterStrikeSharp into the csgo folder for admin tools, custom game modes, and more. Test on a private server first.
Ready to launch? Spin up an NVMe game server VPS with full root access and be fragging on your own CS2 server in minutes.