01
Before you start
According to Valve's documentation, the Counter-Strike 2 dedicated server needs:
- A recent Linux: glibc 2.31 or later, which means Ubuntu 20.04, Debian 11 or newer. This guide uses Ubuntu 24.04.
- At least 65 GB of disk, the figure given by Valve: the client and the server are now the same Steam app (730), which weighs tens of gigabytes. Leave room for updates and maps.
- At least 2 GB of memory, more with plugins and a full server.
- An x86-64-v2 processor (including the SSE4.2 and POPCNT instructions). The server computes most of the match on one core: per-core speed matters more than the number of cores.
- A GSLT token (Game Server Login Token), without which players cannot join a public server. You create it for free on Steam's game server management page, with game ID 730, from a Steam account that is not limited and has a registered phone number. A token can only be used by one server at a time.
The server runs entirely in user space: it works just as well in a Linux container as in a virtual machine. Start with the basic settings from the securing a Linux VPS guide, and see which VPS for a game server if you are unsure about the size.
02
Install SteamCMD and download the server
SteamCMD is Valve's tool that downloads and updates dedicated servers. On Ubuntu, it lives in the multiverse repository and needs the 32-bit architecture. The two debconf lines accept the Steam license in advance, so the installation does not stop on a prompt:
sudo apt update && sudo apt install -y software-properties-common
sudo add-apt-repository -y multiverse
sudo dpkg --add-architecture i386
sudo apt update
echo steam steam/question select "I AGREE" | sudo debconf-set-selections
echo steam steam/license note '' | sudo debconf-set-selections
sudo apt install -y steamcmd
sudo useradd -r -m -d /opt/cs2 -s /bin/bash cs2
On Debian, steamcmd is in the non-free section: add it to your APT sources instead of multiverse; the rest is identical.
Then download the game as the dedicated user, never as root. An anonymous login is enough:
sudo -iu cs2
/usr/games/steamcmd +force_install_dir /opt/cs2/serveur +login anonymous +app_update 730 validate +quit
Keep the install path in lowercase: Valve notes that some distributions reject capital letters in this folder. Allow several minutes for this download of tens of gigabytes.
03
First launch, game modes and tickrate
On Linux, Valve asks you to use the cs2.sh script in the game folder rather than the executable itself, because the script sets up the environment. Still as the cs2 user:
cd /opt/cs2/serveur/game
./cs2.sh -dedicated -port 27015 -maxplayers 10 +game_alias competitive +map de_dust2 +sv_setsteamaccount GSLT_TOKEN
Replace GSLT_TOKEN with your token. Without -dedicated, the game starts instead of the server.
If the server stops saying that ~/.steam/sdk64/steamclient.so cannot be found, create the expected link to the file shipped with SteamCMD, then start again:
mkdir -p ~/.steam/sdk64
ln -sf "$(find ~ -name steamclient.so -path '*linux64*' -print -quit)" ~/.steam/sdk64/steamclient.so
Game modes. The game_alias variable sets both the game type and the game mode at once: competitive (the default), wingman, casual, deathmatch or custom.
Persistent settings (name, join password) go in /opt/cs2/serveur/game/csgo/cfg/server.cfg, read at startup:
hostname "CS2 FR #1"
sv_password ""
sv_lan 0
Tickrate and sub-tick. Counter-Strike 2 runs at 64 ticks per second, a value fixed by Valve: the -tickrate parameter inherited from CS:GO no longer has any effect, and the old "128 tick" configs are useless. Sub-tick makes up for it: the server records the exact moment of a shot or a jump between two ticks. What remains in your hands is a fast processor and low latency to your players.
04
A service that restarts on its own, and updates
Leave the cs2 session with exit, then create /etc/systemd/system/cs2.service:
[Unit]
Description=Counter-Strike 2 server
After=network-online.target
Wants=network-online.target
[Service]
User=cs2
WorkingDirectory=/opt/cs2/serveur/game
ExecStart=/opt/cs2/serveur/game/cs2.sh -dedicated -port 27015 -maxplayers 10 +game_alias competitive +map de_dust2 +sv_setsteamaccount GSLT_TOKEN
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now cs2
journalctl -u cs2 -f
When Valve ships an update, an outdated server turns away up-to-date players. Stop it, update it with the same SteamCMD command (without validate, which is for the first install and integrity checks), then start it again:
sudo systemctl stop cs2
sudo -iu cs2 /usr/games/steamcmd +force_install_dir /opt/cs2/serveur +login anonymous +app_update 730 +quit
sudo systemctl start cs2
05
Plugins: Metamod:Source and CounterStrikeSharp
CounterStrikeSharp lets you write and install plugins in C# (admin tools, retakes, rankings…). It relies on Metamod:Source, which must be installed first. Download from their official sites:
- Metamod:Source, 2.x development build for Linux (the CounterStrikeSharp documentation gives the minimum build required);
- CounterStrikeSharp for Linux, with-runtime build for the first install: it contains the .NET runtime it needs.
Upload both archives to /opt/cs2 (with scp or over SFTP), then extract them into the csgo folder (adjust the archive names to the version you downloaded):
sudo apt install -y unzip libicu-dev
sudo -iu cs2
cd /opt/cs2/serveur/game/csgo
tar -xzf /opt/cs2/mmsource-2.0.0-git*-linux.tar.gz
unzip -o /opt/cs2/counterstrikesharp-with-runtime-*linux*.zip
exit
Metamod loads thanks to a Game csgo/addons/metamod line added below Game_LowViolence csgo_lv in game/csgo/gameinfo.gi. But every game update replaces this file and erases the line: Metamod no longer loads and the console answers "Unknown command" to meta list. A small script puts it back at every start:
sudo tee /opt/cs2/metamod.sh > /dev/null <<'EOF'
#!/bin/sh
F=/opt/cs2/serveur/game/csgo/gameinfo.gi
grep -q 'csgo/addons/metamod' "$F" || sed -i 's|^\(\s*\)Game_LowViolence\(\s*\)csgo_lv.*|&\n\1Game\2csgo/addons/metamod|' "$F"
EOF
sudo chmod 755 /opt/cs2/metamod.sh
sudo mkdir -p /etc/systemd/system/cs2.service.d
printf '[Service]\nExecStartPre=/opt/cs2/metamod.sh\n' | sudo tee /etc/systemd/system/cs2.service.d/metamod.conf
sudo systemctl daemon-reload && sudo systemctl restart cs2
To check, start the server once by hand (after sudo systemctl stop cs2) and type meta list in its console: CounterStrikeSharp should appear. Each plugin then goes in its own folder under addons/counterstrikesharp/plugins/. A plugin runs with the server's rights: get them from their official repository, not from a random link.
06
Ports, firewall and backups
- Game port: 27015 UDP. If you enable spectator broadcasting (CSTV, formerly GOTV, with
tv_enable 1), also open 27020 UDP with sudo ufw allow 27020/udp.
- Remote console (RCON): it uses port 27015 TCP. Keep it closed if you manage the server over SSH or through a plugin.
If ufw is not active yet, allow SSH before enabling it, as below:
sudo apt install -y ufw
sudo ufw allow OpenSSH
sudo ufw allow 27015/udp
sudo ufw enable
sudo ufw status
The ports of other games and how to check that a port answers are in the game server ports guide. A public Counter-Strike server also attracts attacks: the protecting a game server from DDoS attacks guide explains what to expect from your host.
Backups. No need to copy the tens of gigabytes of game files, which SteamCMD downloads again. Back up what is yours, off the VPS: game/csgo/cfg, your plugins' configuration and data under game/csgo/addons, the cs2.service file, its metamod.conf drop-in and the metamod.sh script.
07
On a CloudFive VPS, and when to choose something else
CloudFive has no turnkey Counter-Strike 2 offer: a CS2 server is installed on a VPS, as described in this guide. Our Ryzen VPS is well suited: a Ryzen 9 9950X that is very fast per core, DDR5 memory, NVMe disk, root access, a dedicated IPv4 address, a 1 Gb/s port and servers in France. Pick a tier with at least 100 GB of disk: the smallest one (64 GB) is below the 65 GB Valve asks for the game alone. Our Linux VPS are LXC containers with nesting enabled; the CS2 server needs no kernel module and runs normally there.
Every VPS includes basic anti-DDoS protection; the game-specific filter is part of Premium Protection, a paid option enabled from the VPS Protection page. The VPS is monthly, with no commitment, and support answers in French 7 days a week through tickets, Discord and phone. All prices are on the pricing page.
It is not the right choice if:
- You do not want to manage anything: with no turnkey offer for CS2, you have to maintain the VPS and the updates yourself. Our ready-made game offers cover other games (FiveM, Minecraft, Garry's Mod, Rust…).
- You are preparing a LAN or a tournament with many servers: a dedicated server gives you the whole machine and enough disk for several instances.
- You want Windows: the server also exists for Windows, where Valve requires Steam to be installed; it is possible on a Windows VPS, but Linux remains lighter for this role.
- Your players are far from France: our servers are all in France, and in a shooter every millisecond counts. The choosing a VPS guide helps you compare.
08
Frequently asked questions
Can I get a Counter-Strike 2 server without installing anything?
With CloudFive's Pterobox, you create your game servers from the customer area without installing anything, on a Ryzen 9 9950X with Anti-DDoS Premium included (cloudfive.fr/en/pterobox). If Counter-Strike 2 is not in the catalogue yet, request it from the customer area. A VPS remains the most flexible option if you want to configure everything yourself.
How do I create a CS2 dedicated server on Linux?
Install SteamCMD, download the game with app_update 730 using an anonymous login, create a GSLT token with app ID 730 on Steam's game server management page, then run ./cs2.sh -dedicated +map de_dust2 +sv_setsteamaccount followed by the token, from the game folder.
Which port should I open for a Counter-Strike 2 server?
Port 27015 UDP for the game. Port 27020 UDP is used by CSTV (formerly GOTV), only if you enable it. Port 27015 TCP is used by the remote console (RCON): keep it closed if you do not need it.
Can a CS2 server run at 128 tick?
No. Counter-Strike 2 runs at 64 ticks per second, a value fixed by Valve, and the -tickrate parameter no longer has any effect. Sub-tick records the exact moment of actions between two ticks, which replaces the old 128 tick of CS:GO.
How much RAM and disk does a CS2 server need?
Valve states at least 2 GB of memory and 65 GB of disk, since the full game (app 730) weighs tens of gigabytes. Plan more memory with plugins and spare disk for updates: a VPS with at least 100 GB is comfortable.
How do I install CounterStrikeSharp on a CS2 server?
First install a recent development build of Metamod:Source 2.x by copying its addons folder into game/csgo and adding the line Game csgo/addons/metamod to gameinfo.gi, then copy the CounterStrikeSharp addons folder (with-runtime build) to the same place; on Linux, .NET also needs the ICU library (libicu-dev package). The meta list command should show CounterStrikeSharp.
Why does Metamod stop loading after a CS2 update?
Every game update replaces the gameinfo.gi file and erases the Game csgo/addons/metamod line. Add it back, or have a small script add it automatically before each server start.