A few friends and I wanted to do private scrimmages without matchmaking — specific maps, specific rules, practice scenarios with bots. Official servers don't give you that level of control.
Setting up a CS2 dedicated server is more involved than most game servers: SteamCMD for installation, a GSLT token from Steam (which is the thing most guides don't mention clearly and without it the server won't connect), and careful port configuration. But once it's running, it's stable and the private server experience is exactly what you'd want.
This guide covers the complete setup on Ubuntu 22.04 from scratch.
I run game servers on Tencent Cloud Lighthouse. For CS2, pick the region closest to your players — latency matters a lot in a competitive FPS, and Lighthouse's global data center footprint (US, Europe, Singapore, Tokyo, and more) gives you options. The fixed monthly pricing also makes game server hosting cost-predictable: no per-GB charges for match traffic, just a flat monthly rate regardless of how many hours you play.
- Key Takeaways
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 2 vCPU | 4 vCPU |
| RAM | 2 GB | 4 GB |
| Disk | 30 GB | 50 GB (CS2 server files are large) |
| Bandwidth | 10 Mbps | 50 Mbps+ (for 10+ players) |
CS2 dedicated server is lighter than Palworld but needs good bandwidth for smooth gameplay.
| Requirement | Notes |
|---|---|
| Cloud server | Tencent Cloud Lighthouse Ubuntu 22.04 |
| 4 GB+ RAM | Recommended for reliable operation |
| Steam account | For obtaining the Game Server Login Token (GSLT) |
| UDP ports 27015, 27020 open | CS2's default ports |
Cost: The Basic plan (2 vCPU / 4 GB RAM) works for small groups. Check current promotions.
ssh ubuntu@YOUR_SERVER_IP
sudo apt update && sudo apt upgrade -y
# Enable 32-bit support (SteamCMD requirement)
sudo dpkg --add-architecture i386
sudo apt update
# Install dependencies
sudo apt install -y lib32gcc-s1 wget curl git
# Install SteamCMD
sudo apt install -y steamcmd
# Create dedicated user
sudo adduser --disabled-password --gecos "" csgo
sudo su - csgo
# As csgo user: install CS2 dedicated server
/usr/games/steamcmd \
+login anonymous \
+force_install_dir ~/cs2-server \
+app_update 730 validate \
+quit
App ID 730 is Counter-Strike 2 (CS:GO's app ID, now runs CS2).
The download is large (~30 GB) and takes 20-60 minutes depending on your connection speed.
ls ~/cs2-server/
# Should show: cs2, game/, bin/, etc.
exit # Back to ubuntu user
CS2 uses a configuration file for server settings:
# Create server config directory and file
sudo -u csgo mkdir -p /home/csgo/cs2-server/game/csgo/cfg
sudo -u csgo nano /home/csgo/cs2-server/game/csgo/cfg/server.cfg
// CS2 Server Configuration
// Server identity
hostname "My CS2 Server"
sv_password "" // Leave empty for public, or set a password
// Gameplay
sv_cheats 0
sv_lan 0
// Performance
fps_max 64 // Server tick rate (64 or 128)
sv_maxupdaterate 64
sv_minupdaterate 10
sv_mincmdrate 10
sv_maxcmdrate 64
// Logging
log on
sv_logbans 1
sv_logecho 1
sv_logfile 1
// RCON admin access
rcon_password "your_rcon_password"
// Anti-cheat
sv_pure 1
// Map voting
mp_endmatch_votenextmap 1
// Round settings
mp_timelimit 30
mp_maxrounds 30
mp_roundtime 1.92
CS2 servers require a Game Server Login Token (GSLT) to be visible on the Steam server browser and to use VAC anti-cheat.
You'll use this token in the server start command.
sudo nano /etc/systemd/system/cs2server.service
[Unit]
Description=CS2 Dedicated Server
After=network.target
[Service]
Type=simple
User=csgo
WorkingDirectory=/home/csgo/cs2-server
ExecStart=/home/csgo/cs2-server/game/bin/linuxsteamrt64/cs2 \
-dedicated \
-port 27015 \
+sv_setsteamaccount YOUR_GSLT_TOKEN \
+game_type 0 \
+game_mode 1 \
+map de_dust2 \
+maxplayers 10
Restart=on-failure
RestartSec=15s
[Install]
WantedBy=multi-user.target
Map options: de_dust2, de_mirage, de_inferno, de_nuke, de_overpass, de_ancient, de_vertigo, cs_office, cs_italy
Game type/mode options:
+game_type 0 +game_mode 1+game_type 0 +game_mode 0+game_type 1 +game_mode 2+game_type 0 +game_mode 2sudo systemctl daemon-reload
sudo systemctl enable cs2server
sudo systemctl start cs2server
# Monitor startup
sudo journalctl -u cs2server -f
# Wait for: VAC enabled, sv_pure = 1, etc.
In the Lighthouse console firewall and UFW:
sudo ufw allow 27015/udp # Game port
sudo ufw allow 27015/tcp # Game port (TCP, also needed)
sudo ufw allow 27020/udp # SourceTV (optional)
sudo ufw allow ssh
sudo ufw enable
~ keyconnect YOUR_SERVER_IP:27015connect YOUR_SERVER_IP:27015; password yourpassword# Check if server is listening
sudo ss -tlnp | grep 27015
# Test connection
nc -zv YOUR_SERVER_IP 27015
To use custom maps from the Steam Workshop:
# In the ExecStart line, add:
+host_workshop_map WORKSHOP_MAP_ID
# Or create a mapcycle file:
sudo -u csgo nano /home/csgo/cs2-server/game/csgo/mapcycle.txt
de_dust2
de_mirage
de_inferno
de_nuke
Create /home/csgo/cs2-server/game/csgo/cfg/practice.cfg:
sv_cheats 1
mp_limitteams 0
mp_autoteambalance 0
mp_roundtime 60
mp_roundtime_defuse 60
mp_maxmoney 65535
mp_startmoney 65535
mp_buy_anywhere 1
mp_buytime 9999
sv_infinite_ammo 1
give weapon_knife
bot_kick
mp_restartgame 1
Execute it in-game: exec practice
CS2 updates frequently. Create an update script:
sudo -u csgo nano ~/update_cs2.sh
#!/bin/bash
/usr/games/steamcmd \
+login anonymous \
+force_install_dir ~/cs2-server \
+app_update 730 validate \
+quit
echo "CS2 update complete: $(date)"
chmod +x /home/csgo/update_cs2.sh
# Run weekly via cron (as csgo user)
sudo crontab -u csgo -e
# Add: 0 4 * * 1 /home/csgo/update_cs2.sh
Without a valid Game Server Login Token, CS2 servers receive a VAC error at startup and may not appear in the server browser or work correctly with Steam authentication.
Error without GSLT:
GSLT authentication failed
Server will not be listed in server browser
The fix: get a GSLT from the Valve Developer page (Part 4) and add it to the start command with +sv_setsteamaccount YOUR_TOKEN.
GSLT tokens can be blocked if you get too many VAC bans from your server or violate Valve's game server policies. Each server should have its own token.
Connect to the server console via RCON:
# Install rcon tool
sudo apt install -y rcon
# Connect to server console
rcon -H YOUR_SERVER_IP -P 27015 -p your_rcon_password
Common admin commands:
status // Show connected players
kick "PlayerName" // Kick a player
banid 0 "SteamID" // Ban by Steam ID
changelevel de_mirage // Change map
mp_restartgame 1 // Restart the round
bot_add // Add a bot
bot_kick // Remove all bots
exec competitive.cfg // Load a config file
| Issue | Likely Cause | Fix |
|---|---|---|
| Connection refused | Service not running or wrong port | Check systemctl status SERVICE and verify firewall rules |
| Permission denied | Wrong file ownership or permissions | Check file ownership with ls -la and use chown/chmod to fix |
| 502 Bad Gateway | Backend service not running | Restart the backend service; check logs with journalctl -u SERVICE |
| SSL certificate error | Certificate expired or domain mismatch | Run sudo certbot renew and verify domain DNS points to server IP |
| Service not starting | Config error or missing dependency | Check logs with journalctl -u SERVICE -n 50 for specific error |
| Out of disk space | Logs or data accumulation | Run df -h to identify usage; clean logs or attach CBS storage |
| High memory usage | Too many processes or memory leak | Check with htop; consider upgrading instance plan if consistently high |
| Firewall blocking traffic | Port not open in UFW or Lighthouse console | Open port in Lighthouse console firewall AND sudo ufw allow PORT |
What server size do I need for a CS2 dedicated server server?
Check the requirements section in this guide. Generally: more RAM = more players. Start with the recommended specs and monitor actual usage with htop before scaling up.
How do I keep the CS2 dedicated server server running when I close my SSH session?
Use screen, tmux, or systemd to run the server as a background process. The guide covers setting up a systemd service for automatic startup and crash recovery.
How do I update the CS2 dedicated server server software?
Stop the server, download the new version, replace the old binary or files, and restart. Always back up your world/save data first. Check the game's official documentation for version-specific migration notes.
How do I protect my server from unwanted players?
Use password protection and/or whitelist mode (if supported). Restrict the server port in UFW to known IP addresses if it's a private server for a small group.
Host your CS2 server today:
👉 Tencent Cloud Lighthouse — Low-latency VPS for game servers
👉 View current pricing and promotions
👉 Explore all active deals and offers