Which Server Size for CS2
| Plan | Memory | vCPUs | Disk | Price |
|---|---|---|---|---|
| Bronze VPS | 6 GB | 3 | 75 GB | $37.50/mo |
| Silver VPS | 8 GB | 4 | 100 GB | $46.50/mo |
| Gold VPS | 12 GB | 6 | 150 GB | $60.00/mo |
| Diamond VPS | 16 GB | 8 | 200 GB | $73.50/mo |
| Platinum VPS | 24 GB | 12 | 300 GB | $100.00/mo |
Disk is the first limit: the same image asks for at least 60 GB free, and lists 2 CPUs and 2 GB of memory as its minimum, so every plan here can run one server. More players, plugins or several servers at once want more vCPUs. vCPUs on a VPS are shared threads of the host processor; for many servers at once, a dedicated server gives you every core. Choose the location nearest your players; see choosing a location by latency.
1. Create the User and Install LinuxGSM
LinuxGSM is a free, open-source tool that installs, updates and watches game servers. On Ubuntu, after securing the server:
sudo apt install -y curl tar nano sudo adduser cs2server # choose a strong password sudo su - cs2server
Everything from here runs as cs2server, without sudo:
curl -Lo linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh cs2server ./cs2server install
The installer checks for missing packages first. If it lists some, install them from your own sudo account with the command it prints, then run ./cs2server install again as cs2server. The download is large, so the first install takes a while.
2. Add a Game Server Login Token
- Sign in at
steamcommunity.com/dev/managegameserverswith an account that owns CS2, has a phone number registered and is not limited. - Create a token with app ID 730 (the game's ID, not the server's), and a memo such as the server's name.
- Put it in the instance config:
nano ~/lgsm/config-lgsm/cs2server/cs2server.cfg
gslt="YOUR_TOKEN"
Treat the token like a password: anyone holding it can run a server under your account.
3. Choose the Mode and Map
Add the mode and starting map to the start parameters in the same file, after LinuxGSM's own (copy its default line from _default.cfg in the same folder and extend it):
startparameters="-dedicated -ip ${ip} -port ${port} -maxplayers ${maxplayers} -authkey ${wsapikey} +exec ${selfname}.cfg +sv_setsteamaccount ${gslt} +game_type 0 +game_mode 1 +map de_dust2"| Mode | game_type | game_mode |
|---|---|---|
| Competitive | 0 | 1 |
| Wingman | 0 | 2 |
| Deathmatch | 1 | 2 |
Server settings such as the name and passwords go in the server's own config file; ./cs2server details shows where it is, along with the ports and the current settings.
4. Open the Port and Start
From your sudo account:
sudo ufw allow 27015/udp sudo ufw allow 27015/tcp
Then as cs2server:
./cs2server start ./cs2server details ./cs2server console # leave with Ctrl+b, then d; Ctrl+c stops the server
If you turned on the firewall on your server's page in the dashboard, allow 27015 there too. In CS2, open the console and type connect 203.0.113.10:27015 (your server's address), or find it in the server browser once the token is in place.
5. Updates and Restarts
As cs2server, run crontab -e and add LinuxGSM's recommended jobs:
*/5 * * * * /home/cs2server/cs2server monitor > /dev/null 2>&1 */30 * * * * /home/cs2server/cs2server update > /dev/null 2>&1 0 0 * * 0 /home/cs2server/cs2server update-lgsm > /dev/null 2>&1
monitor restarts the server if it has stopped, update checks for a new CS2 build every half hour, and update-lgsm keeps LinuxGSM itself current. Players cannot join an out-of-date server, so the update job matters.
Plugins, Workshop Maps and More Servers
- Plugins:
./cs2server mods-installoffers Metamod:Source and CounterStrikeSharp, the base most admin and match plugins need. After a CS2 update, run./cs2server mods-update. - Workshop maps: add
+host_workshop_mapwith the map's ID to the start parameters; collections need a Steam Web API key inwsapikey. - More servers: each needs its own port and its own token. Disk adds up quickly, so watch it with these commands.
Other games on the same server? See Rust, Satisfactory and Minecraft.