Public matchmaking gets the job done – until you want your own practice routines, a retake setup, or simply a place where your crew plays undisturbed. That's when a dedicated CS2 server pays off. This guide covers both Windows and Linux, from installing SteamCMD through GSLT, ports and server.cfg to plugins, auto-updates and troubleshooting.
What you need
- Windows or Linux (Ubuntu/Debian) with SteamCMD
- At least 65 GB of free space; with room for updates, logs, plugins and backups, plan for 80 GB or more
- 2 GB RAM is enough for a plain match server; add more once you run plugins and GOTV
- A GSLT (Game Server Login Token) from Steam, or the server stays private
- Port 27015/UDP (game) and 27015/TCP (RCON) open; 27020/UDP only for GOTV/SourceTV
Get the GSLT token first
Without a login token your server shows up in no browser at all – it's the single most common trip-up, so let's handle it right away. Head to steamcommunity.com/dev/managegameservers, create a token with App ID 730, and copy the code somewhere safe. It goes into your launch script later as +sv_setsteamaccount.
Treat the token like a password. It's tied to your Steam account, and if it leaks and gets abused, Valve will ban it.
Install SteamCMD
SteamCMD downloads and updates the server files. The install differs by system.
Windows
Download steamcmd.zip from Valve, extract it into its own folder (e.g. C:\steamcmd) and run steamcmd.exe once so it updates itself.
Ubuntu / Debian
SteamCMD is 32-bit, so you need the matching library. Then you pull it straight from Valve:
sudo apt update
sudo apt install -y lib32gcc-s1 curl
mkdir -p ~/steamcmd && cd ~/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
./steamcmd.sh +quit
cs2) and don't run it as root. It's safer and makes the later systemd auto-start cleaner.Download the server files (App 730)
CS2 runs under App ID 730. The download is almost identical on both systems.
Windows:
steamcmd +force_install_dir C:\cs2-server +login anonymous +app_update 730 validate +quit
Linux:
./steamcmd.sh +force_install_dir ~/cs2-server +login anonymous +app_update 730 validate +quit
Expect around 40 GB of download (on disk CS2 takes more, hence the 65 GB) and 20 to 60 minutes depending on your line.
How much hardware?
CS2 leans on your CPU's single-thread performance and a steady connection – core count is secondary, it's the tickrate you need to hold.
| Server type | RAM | Note |
|---|---|---|
| Plain match/comp server | 2–4 GB | strong single-thread CPU |
| With plugins + GOTV | 4–8 GB | e.g. practice, retake |
| Community with many plugins | 8 GB+ | dedicated machine recommended |
Start the server
The launch command is almost the same on both systems – only the path to the executable differs. Save it as a launch script so you don't retype it every time.
Windows – start.bat:
game\bin\win64\cs2.exe -dedicated -console -usercon +map de_dust2 +game_type 0 +game_mode 1 +sv_setsteamaccount YOUR_GSLT +rcon_password YOUR_RCON_PW
Linux – start.sh:
#!/bin/bash
cd ~/cs2-server
./game/bin/linuxsteamrt64/cs2 -dedicated -console -usercon +map de_dust2 +game_type 0 +game_mode 1 +sv_setsteamaccount YOUR_GSLT +rcon_password YOUR_RCON_PW
Then make it executable on Linux: chmod +x start.sh.
Which mode runs comes down to the game_type / game_mode pair:
| Mode | game_type | game_mode |
|---|---|---|
| Competitive | 0 | 1 |
| Casual | 0 | 0 |
| Wingman | 0 | 2 |
| Deathmatch | 1 | 2 |
-usercon enables RCON and +rcon_password sets its password, so you can administer the server remotely instead of sitting in front of it.
Open the ports
For gameplay, 27015/UDP must be open, for RCON also 27015/TCP, and 27020/UDP only with GOTV.
Windows: create inbound rules in the Windows Firewall for those ports.
Linux (ufw):
sudo ufw allow 27015/udp
sudo ufw allow 27015/tcp
sudo ufw allow 27020/udp
When hosting at home, add port forwarding in your router – without it the server isn't reachable from outside.
Connect and test
Open the console in CS2 and connect straight to it:
connect YOUR_IP:27015
If that works and the server also shows up in the community browser, your token and ports are set correctly. If you connect from the same network via the public IP and it fails, it's usually missing NAT loopback in the router – test with the local IP instead.
The server.cfg – copy and paste
Persistent settings go into game/csgo/cfg/server.cfg, which loads automatically on every map start. A solid baseline:
hostname "My CS2 Server"
sv_password "" // empty = public, set a value for private
rcon_password "SECRET" // use a long, unique password
sv_lan 0
sv_cheats 0
mp_autoteambalance 1
mp_friendlyfire 1
mp_maxrounds 24
mp_roundtime 1.92
mp_freezetime 15
sv_hibernate_when_empty 1 // saves resources when nobody plays
rcon_password and never share it. A weak RCON password is an open door to control of your server. To use RCON, connect in the client console with rcon_password YOUR_PW, then send commands with rcon <command>.Change the server name and password
Both live in server.cfg: hostname for the displayed name, sv_password for a join password (leave empty for public). Changes apply on the next map change or after exec server.cfg in the console.
Add or remove bots
Handy for testing or practice servers. Via console or in server.cfg:
bot_quota 6 // target number of bots
bot_difficulty 2 // 0 (easy) to 3 (hard)
bot_add_ct // add one bot to CT
bot_add_t // add one bot to T
bot_kick // remove all bots
Change the start map and game mode
Set the start map via +map in the launch script. While the server runs, switch with changelevel de_mirage. The mode is controlled by game_type/game_mode (see the table above) – easiest right in the launch script.
Install Workshop maps
CS2 loads community maps straight from the Steam Workshop. You'll find the Workshop ID in the map's URL. To start with a Workshop map:
+host_workshop_map 1234567890
While the server runs it works the same way from the console. For whole map rotations from a Workshop collection, use host_workshop_collection.
Plugins: Metamod and CounterStrikeSharp
Anyone who wants more than vanilla – practice tools, retake logic, ranking – ends up at two building blocks: Metamod:Source v2 as the base and CounterStrikeSharp, which puts a C# layer (.NET 8) on top. Here's the install:
- Download Metamod:Source v2 and extract the
addonsfolder intogame/csgo/. - In
gameinfo.gi, add a line belowGame_LowViolence csgo_lv:Game csgo/addons/metamod. - Extract CounterStrikeSharp and merge its
addonsfolder with the existing one. - From there, dropping compatible plugins into the plugin directory is all it takes.
Update the server automatically
After every CS2 update you should pull the server files. The simplest way is a small update script running the same app_update command:
Windows – update.bat:
steamcmd +force_install_dir C:\cs2-server +login anonymous +app_update 730 +quit
Linux:
~/steamcmd/steamcmd.sh +force_install_dir ~/cs2-server +login anonymous +app_update 730 +quit
Run it before each start, or nightly via cron/Task Scheduler.
gameinfo.gi – then the Metamod line is gone and your plugins stop loading. After bigger updates, check the Game csgo/addons/metamod line and re-add it if needed.Auto-start after a reboot
Linux (systemd) is the clean way. Create /etc/systemd/system/cs2.service:
[Unit]
Description=CS2 Dedicated Server
After=network.target
[Service]
Type=simple
User=cs2
WorkingDirectory=/home/cs2/cs2-server
ExecStart=/home/cs2/cs2-server/game/bin/linuxsteamrt64/cs2 -dedicated -console -usercon +map de_dust2 +game_type 0 +game_mode 1 +sv_setsteamaccount YOUR_GSLT +rcon_password YOUR_RCON_PW
Restart=on-failure
[Install]
WantedBy=multi-user.target
Enable and start it:
sudo systemctl daemon-reload
sudo systemctl enable --now cs2
Windows: the Task Scheduler does the same job – create a task that runs start.bat "At startup".
Troubleshooting
| Problem | Cause & fix |
|---|---|
| Server not in the server list | GSLT missing/invalid, or port 27015 not open as UDP / not forwarded |
| "No Steam logon" error | GSLT expired or banned – create a new token with App ID 730 |
| Connecting via public IP fails (same network) | missing NAT loopback in the router – connect via the local IP or enable loopback |
| Metamod/CounterStrikeSharp won't load after an update | the update reset gameinfo.gi, or the plugin version doesn't match the new CS2 version |
| Stutter, high latency | CPU too weak on single thread, or the connection is overloaded |
FAQ
Do I need a GSLT for a CS2 server? For a public one, yes. The token is free, created at steamcommunity.com/dev/managegameservers with App ID 730, and passed via +sv_setsteamaccount.
Does a CS2 server run on both Windows and Linux? Yes, both are supported. You download the server files with SteamCMD (App 730) either way; only the path to the executable and the firewall setup differ.
How much disk space does a CS2 server need? At least 65 GB per Valve; with room for updates, logs, plugins and backups, 80 GB or more makes sense.
Which port does CS2 use? 27015/UDP for the game, 27015/TCP for RCON, 27020/UDP only with GOTV.
How do I install plugins? Metamod:Source v2 first, then CounterStrikeSharp – after that you just drop individual plugins into the plugin folder.
How much RAM does a CS2 server need? A plain match server runs on 2 to 4 GB. With plugins and GOTV, plan for 4 to 8 GB.
Next steps
- Prefer survival with your own server? How to create a Rust server
- Or sandbox instead of a shooter: How to create a Minecraft server
- Don't want to manage SteamCMD, port forwarding and updates yourself? At DeinServerHost you can rent a CS2 server that's set up and managed straight from the game server panel.