Skip to content
Counter-Strike 2

Install a Counter-Strike 2 server

The CS2 dedicated server is installed with SteamCMD (app 730, about 60 GB) and started with cs2.sh. Plan for a recent Ubuntu VPS or a Windows PC, half an hour of setup and a server token (GSLT) to appear online. Sources consulted: Hetzner Community tutorial, host guides and the Valve wiki (not reachable at writing time, cross-check it).

Last updated: 10/9/2026

The CS2 dedicated server is installed with SteamCMD (app 730, about 60 GB) and started with cs2.sh. Plan for a recent Ubuntu VPS or a Windows PC, half an hour of setup and a server token (GSLT) to appear online. Sources consulted: Hetzner Community tutorial, host guides and the Valve wiki (not reachable at writing time, cross-check it).

Step-by-step installation

  1. Prepare the machine: Ubuntu 24.04 (or Windows), at least 4 vCPU, 8 GB RAM and 80 GB disk for 10 to 32 players.

  2. Create a non-root user (steam) and install SteamCMD with the 32-bit libraries.

  3. Create a GSLT token for AppID 730 at steamcommunity.com/dev/managegameservers (one token per server).

  4. Download the server with app_update 730 validate (10 to 30 minutes).

  5. Create the 64-bit SDK steamclient.so link, then start the server with ./cs2.sh from the game/ folder.

  6. Put server.cfg in game/csgo/cfg/ (see the “CS2 server.cfg generator” tool).

  7. Open 27015 (UDP and TCP), 27005 (UDP) and 27020 (UDP) in ufw, the provider firewall and the router.

  8. Connect from CS2 with the game console: connect IP:27015.

  9. Create a systemd service for automatic start and schedule backups and updates.

Prerequisites

  • OS: Ubuntu 24.04 (used by the Hetzner tutorial) or Windows 10/11 and Windows Server.
  • Resources: 4 vCPU, 8 GB RAM, 80 GB disk for 10 to 32 players (Hetzner tutorial recommendation); the download is about 60 GB.
  • Accounts: a Steam account to create the GSLT token (AppID 730). Without a token, the server stays limited to the local network.
  • Note: the old CS:GO server used app 740; CS2 uses 730.

Local installation on Windows

Download SteamCMD from Valve's official documentation, unzip it in C:\steamcmd, then install the server. The exact path of cs2.exe on Windows could not be confirmed on an official source: locate it in the game\bin folder after installation, run it with -dedicated -console, then test with connect 127.0.0.1 in game.

cd C:\steamcmd
steamcmd +force_install_dir C:\cs2-server +login anonymous +app_update 730 validate +quit

Linux VPS: user and dependencies

Commands from the Hetzner Community tutorial (Ubuntu 24.04). The steam account does not need sudo in production: remove that right once installation is done.

sudo apt update && sudo apt upgrade -y
sudo adduser steam
sudo usermod -aG sudo steam
su - steam
sudo apt-get install lib32gcc-s1 -y
sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
sudo apt update -y
sudo apt install steamcmd -y

Linux VPS: downloading the server

The Hetzner tutorial also recommends logging in once with a dedicated Steam account (steamcmd +login YOUR_ACCOUNT); the anonymous install works in several guides, test what works for you.

mkdir -p ~/cs2-server && cd ~/cs2-server
steamcmd +login anonymous +force_install_dir ~/cs2-server +app_update 730 validate +quit

# SDK 64 bits (ignorer si le lien existe déjà)
mkdir -p ~/.steam/sdk64
ln -s ~/.local/share/Steam/steamcmd/linux64/steamclient.so ~/.steam/sdk64/steamclient.so

Linux VPS: first start

Always start ./cs2.sh (not the binary directly) from the game/ folder. Replace YOUR_GSLT_TOKEN. Modes: casual 0/0, competitive 0/1, deathmatch 1/2 (+game_type/+game_mode). The -insecure flag disables VAC: keep it for private servers. For tests, use screen or tmux (screen -S cs2).

cd ~/cs2-server/game
./cs2.sh -dedicated -port 27015 -maxplayers 10 \
  +hostname "My CS2 Server" +map de_dust2 \
  +game_type 0 +game_mode 1 \
  +sv_setsteamaccount YOUR_GSLT_TOKEN

Ports to open and Linux firewall (ufw)

To change the game port, add -port N to the launch line (a different port per instance) and open it instead of 27015.

Open only what you need, then test from another connection (not from the server itself).

  • 27015/udp: game traffic
  • 27015/tcp: RCON and pings
  • 27005/udp: client communication
  • 27020/udp: SourceTV (demo recording)
  • Other ports listed by the Hetzner tutorial: 27036/tcp (Steam Remote Play), 3478/udp (NAT traversal), 4379-4380/udp (matchmaking), 22/tcp (SSH).
sudo ufw allow OpenSSH
sudo ufw allow 27015/udp
sudo ufw allow 27015/tcp
sudo ufw allow 27005/udp
sudo ufw allow 27020/udp
sudo ufw enable
sudo ufw status

Windows firewall (netsh)

In an administrator command prompt, create one inbound rule per port (or open “Windows Defender Firewall with Advanced Security”).

netsh advfirewall firewall add rule name="Counter-Strike 2 27015 UDP" dir=in action=allow protocol=UDP localport=27015
netsh advfirewall firewall add rule name="Counter-Strike 2 27015 TCP" dir=in action=allow protocol=TCP localport=27015
netsh advfirewall firewall add rule name="Counter-Strike 2 27005 UDP" dir=in action=allow protocol=UDP localport=27005
netsh advfirewall firewall add rule name="Counter-Strike 2 27020 UDP" dir=in action=allow protocol=UDP localport=27020

Provider firewall and port forwarding (home router)

At a host (OVH, Hetzner, Scaleway…), also open the same ports in the provider's firewall or “security group”: ufw is not enough if an upstream firewall exists. For a home server, create a port forward (NAT) in your router for each port to the machine's local IP address (make it static or reserve it via DHCP).

Test: from another connection, add the server as “IP:port” in Counter-Strike 2's server browser or in the console. If it fails, check in order: service running, local firewall, provider firewall, NAT forward.

Automatic start: systemd service

Create /etc/systemd/system/cs2.service (as root), then enable it. Adapt the user and paths; read logs with journalctl -u cs2 -f.

[Unit]
Description=Counter-Strike 2 dedicated server
After=network-online.target
Wants=network-online.target

[Service]
User=steam
WorkingDirectory=/home/steam/cs2-server/game
ExecStart=/home/steam/cs2-server/game/cs2.sh -dedicated -port 27015 -maxplayers 10 +game_type 0 +game_mode 1 +map de_dust2 +sv_setsteamaccount YOUR_GSLT_TOKEN
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

# then:
# sudo systemctl daemon-reload
# sudo systemctl enable --now cs2

Windows: scheduled task at startup

On Windows, a scheduled task runs your .bat script at system startup (run the command in an administrator prompt).

schtasks /Create /TN "Counter-Strike 2 server" /TR "C:\cs2-server\start-cs2.bat" /SC ONSTART /RU SYSTEM /RL HIGHEST

Updates, backups and scheduled restarts

Stop the service before updating (same SteamCMD command as for installation), back up configuration and data files regularly, and schedule a daily restart if the server degrades over time.

sudo systemctl stop cs2
steamcmd +force_install_dir /home/steam/cs2-server +login anonymous +app_update 730 validate +quit
sudo systemctl start cs2

# backup
tar czf ~/cs2-$(date +%F).tar.gz -C /home/steam/cs2-server game/csgo/cfg game/csgo/gamemodes_server.txt

# daily restart at 05:00 (root crontab: sudo crontab -e)
0 5 * * * systemctl restart cs2

List and find your server

Add your server at https://game-rank.com/jeux/counter-strike to make it visible to the community. To find it in game, use the server browser or connect directly with its IP:port.

Troubleshooting: common errors

  • The server starts in LAN mode or invisible: GSLT token missing, invalid or reused on another server. Fix: create a token specific to this server for AppID 730 and pass it with +sv_setsteamaccount.
  • The server crashes or cannot find steamclient.so: 64-bit SDK link missing. Fix: create ~/.steam/sdk64/steamclient.so as shown, and run ./cs2.sh from game/.
  • Server invisible from outside: the service runs but nobody can connect. Cause: closed port (ufw, provider firewall or missing NAT forward). Fix: open the ports listed above at all three levels and test from another connection.
  • Port already in use at startup: another instance holds the port. Fix: list processes with ss -lunp | grep 27015, stop the old instance, or give each server a different port with -port.
  • SteamCMD “Failed to install app” or stalled download: frequent cause, full disk or insufficient folder permissions. Fix: check df -h and the folder owner, then rerun the command with validate (several times if needed).

Frequently asked questions

Does CS2 still use CS:GO commands and files?
Partly: the config folder remains game/csgo/cfg/ and most mp_* cvars exist, but the server is a different application (730) and some things (SourceMod plugins, the CS:GO Workshop API) do not carry over as is. When in doubt, test on your build.
How many players and what machine for a CS2 server?
The Hetzner tutorial targets 10 to 32 players with 4 vCPU, 8 GB RAM and 80 GB disk; add -maxplayers to the launch line to limit slots.
Can I run the server as root?
Not recommended: create a dedicated user (for example steam) without admin rights, and install and run the server with it. A flaw in the server or a plugin then does not compromise the whole machine.
My Counter-Strike 2 server does not appear in the list: what should I check?
First check that the ports are open at every level, that the server is not in LAN mode (sv_lan 0) and, if the game requires it, that a valid server token (GSLT) is provided. The Steam list can take a few minutes to refresh; meanwhile, connect by IP:port.

Tools for your Counter-Strike 2 server

Counter-Strike 2
Counter-Strike 2Open access
Build your Counter-Strike 2 server.cfg and launch command: game mode, rounds, money, bots and passwords.
ConfigurationLaunchOpen
Documentation
Counter-Strike 2
Counter-Strike 2Sign-in required
List your CS2 Workshop maps: +host_workshop_map parameter, gamemodes_server.txt map group and ds_workshop_changelevel commands.
WorkshopMapsOpen
Documentation