CS2
| Platform | Support | Notes |
|---|---|---|
| Linux | ✅ Native | Recommended |
| Windows | ✅ Native |
Minimum Requirements
| Mode | RAM | Disk | CPU |
|---|---|---|---|
| Casual/Deathmatch | 2 GB | 30 GB | 2 vCPU |
| Competitive | 4 GB | 30 GB | 2-4 vCPU |
| 128-tick | 8 GB | 30 GB | 4 vCPU |
1. Install dependencies
sudo apt update
sudo dpkg --add-architecture i386
sudo apt install lib32gcc-s1 lib32stdc++6 steamcmd -y
# If steamcmd not in repository:
sudo add-apt-repository multiverse
sudo apt update && sudo apt install steamcmd -y
2. Create dedicated user
sudo useradd -m -s /bin/bash steam
sudo su - steam
3. Download server with SteamCMD
mkdir -p ~/cs2-server
steamcmd +force_install_dir ~/cs2-server \
+login anonymous \
+app_update 730 validate \
+quit
The download is ~25 GB and may take time.
4. Startup script
nano ~/cs2-server/start.sh
#!/bin/bash
cd ~/cs2-server
./game/bin/linuxsteamrt64/cs2 \
-dedicated \
-usercon \
+game_type 0 \
+game_mode 0 \
+map de_dust2 \
+sv_setsteamaccount YOUR_GSLT_TOKEN \
+sv_lan 0 \
-port 27015 \
+maxplayers 10 \
-tickrate 128
chmod +x ~/cs2-server/start.sh
5. Obtain the GSLT (Game Server Login Token)
The GSLT token is required for public servers:
- Go to steamcommunity.com/dev/managegameservers
- App ID: 730 (CS2)
- Create the token and paste it in +sv_setsteamaccount
6. Configuration (server.cfg)
nano ~/cs2-server/game/csgo/cfg/server.cfg
hostname "My CS2 Server"
sv_password "" // leave empty for public server
sv_cheats 0
sv_lan 0
// RCON
rcon_password "yourrconpassword"
// Tick rate
sv_mincmdrate 128
sv_maxcmdrate 128
sv_minupdaterate 128
sv_maxupdaterate 128
// Rate
sv_maxrate 786432
sv_minrate 196608
// Deathmatch
// mp_autoteambalance 1
// mp_limitteams 2
// Competitive
// game_mode 1
// game_type 0
7. Open ports
sudo ufw allow 27015/tcp
sudo ufw allow 27015/udp
sudo ufw allow 27020/udp # HLTV / SourceTV
8. Startup with tmux or systemd
# With tmux
tmux new -s cs2
~/cs2-server/start.sh
# With systemd
sudo nano /etc/systemd/system/cs2.service
[Unit]
Description=CS2 Dedicated Server
After=network.target
[Service]
User=steam
WorkingDirectory=/home/steam/cs2-server
ExecStart=/home/steam/cs2-server/start.sh
Restart=on-failure
RestartSec=30
[Install]
WantedBy=multi-user.target
sudo systemctl enable cs2
sudo systemctl start cs2
9. CounterStrikeSharp Plugin (CSSharp)
For plugins and mods on CS2, use CounterStrikeSharp:
# Download latest release
wget https://github.com/roflmuffin/CounterStrikeSharp/releases/latest/download/counterstrikesharp-with-runtime-linux-amd64.tar.gz
tar -xzf counterstrikesharp-with-runtime-linux-amd64.tar.gz -C ~/cs2-server/game/csgo/
Popular plugins: MatchZy (tournaments), SimpleAdmin, PugSetup.
10. Update the server
# Update CS2 when Valve publishes an update
steamcmd +force_install_dir ~/cs2-server \
+login anonymous \
+app_update 730 validate \
+quit
Automate with cron:
# Update daily at 4:00 AM
0 4 * * * /usr/games/steamcmd +force_install_dir /home/steam/cs2-server +login anonymous +app_update 730 +quit
Tips & Tweaks
Tickrate Configuration
Set tickrate in startup script with -tickrate:
# 64-tick (casual, lower bandwidth)
-tickrate 64
# 128-tick (competitive, recommended for skilled players)
-tickrate 128
# 256-tick (premium servers, high bandwidth and CPU)
-tickrate 256
Rate settings for server.cfg:
sv_mincmdrate 128 # Minimum client command rate
sv_maxcmdrate 128 # Match tickrate
sv_minupdaterate 128 # Server update frequency
sv_maxupdaterate 128
# Bandwidth limits
sv_maxrate 786432 # ~750 Kb/s per player (128-tick)
sv_minrate 196608 # ~190 Kb/s minimum
Essential server.cfg Convars
| Convar | Purpose | Typical Value |
|---|---|---|
sv_cheats | Enable cheat commands | 0 (public), 1 (testing) |
sv_lan | LAN mode (no Steam auth) | 0 (public) |
sv_pure | Validate client files | 1 (recommended) |
sv_autoexec | Auto-execute exec cfg | 1 |
sv_timeout | Client timeout (seconds) | 65 |
sv_prime_accounts_only | Prime-only server | 0 or 1 |
bot_difficulty | Bot skill (0-3) | 1 |
RCON Console Commands
# Connect with rcon-cli or web console
rcon_password "your_password"
Common commands:
| Command | Purpose |
|---|---|
status | Player list with IDs |
mp_warmuptime 60 | Warmup duration (seconds) |
mp_freezetime 15 | Freezetime (seconds) |
mp_round_time 1.92 | Round duration (minutes) |
mp_timelimit 45 | Match time limit |
changelevel de_dust2 | Change map |
kick #ID | Remove player by ID |
say <msg> | Server message |
csgo_import_player_name | Force player names |
Map Voting and Rotation
Create mapcycle.txt:
nano ~/cs2-server/game/csgo/mapcycle.txt
de_dust2
de_inferno
de_mirage
de_nuke
de_vertigo
de_ancient
Load in server.cfg:
mapcyclefile mapcycle.txt
Server-Side Rates and Network Optimization
For competitive servers:
# Strictly competitive
sv_maxrate 1000000 # No bandwidth cap
sv_minrate 1000000 # Force high rate
sv_mincmdrate 128
sv_maxcmdrate 128
# For public servers with mixed bandwidth
sv_maxrate 786432 # ~750 Kb/s
sv_minrate 196608
Monitoring Commands
# Check server status
systemctl status cs2
# Real-time logs
journalctl -u cs2 -f --no-pager
# Monitor connections
ss -tulnp | grep 27015
# Check player count via RCON
rcon -p "password" status
Advanced Tuning
Stability flags:
sv_maxrate 2000000
sv_minrate 64000
sv_cmdrate_unrestricted 1 # Allow unrestricted cmdrate
sv_deltaprint 150
Lag compensation:
sv_clockcorrection_msecs 15
sv_max_usercmd_future_ticks 0
Gerelateerde artikelen
Palworld
Create a dedicated Palworld server on Linux with SteamCMD. Configuration, ports and automatic startup.
Rust
Install and manage a Rust server (Facepunch) on Linux with SteamCMD. Includes automatic updates, Oxide plugins and optimizations.
Valheim
Install a Valheim dedicated server on Linux with SteamCMD. Configuration, password, cross-play and automatic update.
