Docs / Game Servers / How to Set Up a Counter-Strike 2 Dedicated Server

How to Set Up a Counter-Strike 2 Dedicated Server

By Admin · Mar 1, 2026 · Updated Apr 23, 2026 · 27 views · 2 min read

Overview

Counter-Strike 2 (CS2) is one of the most popular competitive FPS games. Hosting a dedicated server lets you run custom matches, tournaments, or community servers.

Requirements

  • A Breeze with at least 4 GB RAM and 2 CPU cores
  • 40 GB free disk space
  • Ubuntu 22.04

Step 1: Install SteamCMD

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y steamcmd

Step 2: Create a Server User

sudo useradd -r -m -d /opt/cs2 cs2server

Step 3: Install CS2 Server

sudo -u cs2server steamcmd +force_install_dir /opt/cs2/server \
  +login anonymous \
  +app_update 730 validate \
  +quit

Step 4: Get a Game Server Login Token (GSLT)

You need a GSLT from Steam Game Server Account Management. Use App ID 730.

Step 5: Create a Start Script

sudo -u cs2server tee /opt/cs2/start.sh <<'EOF'
#!/bin/bash
cd /opt/cs2/server
./game/bin/linuxsteamrt64/cs2 -dedicated \
  +map de_dust2 \
  +game_type 0 \
  +game_mode 1 \
  -maxplayers 10 \
  -port 27015 \
  +sv_setsteamaccount YOUR_GSLT_HERE \
  -console
EOF
chmod +x /opt/cs2/start.sh

Step 6: Create a Systemd Service

sudo tee /etc/systemd/system/cs2.service <<EOF
[Unit]
Description=Counter-Strike 2 Server
After=network.target

[Service]
User=cs2server
WorkingDirectory=/opt/cs2
ExecStart=/opt/cs2/start.sh
Restart=on-failure
RestartSec=15

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable --now cs2

Step 7: Open Firewall Ports

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

Game Modes

Modegame_typegame_mode
Casual00
Competitive01
Deathmatch12
Arms Race10

Was this article helpful?