---
title: "Set up a Counter-Strike 2 dedicated server on Linux · CloudSat"
description: "Install a Counter-Strike 2 dedicated server on Linux with SteamCMD: login token, ports, server.cfg, game modes, a systemd service and a safe update routine."
url: https://cloudsat.io/learn/counter-strike-2-dedicated-server-linux
updated: 2026-11-18T12:00:00Z
source: CloudSat (https://cloudsat.io/). Prices in USD.
---

[Gaming](https://cloudsat.io/learn/topic/gaming)

# Set up a Counter-Strike 2 dedicated server on Linux

Install a Counter-Strike 2 dedicated server on Linux with SteamCMD: login token, ports, server.cfg, game modes, a systemd service and a safe update routine.

CloudSat team November 18, 2026 7 min read

Old CS:GO server guides no longer apply. Counter-Strike 2 replaced CS:GO in September 2023, moved to the Source 2 engine and changed how the server is installed: it now ships under the same Steam app ID as the game, 730, and the old `srcds_run` workflow is gone. This guide builds a CS2 dedicated server on Ubuntu or Debian with SteamCMD, then makes it public, runs it as a service and keeps it updated.

## What you need

- **A Linux server** running Ubuntu 22.04 or 24.04, or Debian 12. Valve's build needs a reasonably recent glibc, so very old releases will not start it.
- **Disk space**: the install takes roughly 60 GB and grows with updates, so plan for more.
- **Memory**: Valve lists 2 GB as the minimum; 4 GB leaves room for plugins and the operating system.
- **One fast CPU core.** CS2 must finish every server frame on time, and per-core speed matters more than core count.
- **A Steam account** to create a Game Server Login Token. Valve sets requirements for this, such as the account not being limited.

| Port | Protocol | Purpose |
| --- | --- | --- |
| 27015 | UDP | Game traffic |
| 27015 | TCP | RCON, only if you enable it |
| 27020 | UDP | CSTV, only if you broadcast matches |

## 1. Prepare the system

Create a dedicated user so the server never runs as root, then install SteamCMD. On Ubuntu it lives in the multiverse repository and needs 32-bit support:

```bash
sudo adduser --disabled-password --gecos "" cs2
sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install steamcmd lib32gcc-s1
```

The installer asks you to accept Steam's license. On Debian, enable the `non-free` component in your APT sources instead of multiverse, then run the same commands from `dpkg --add-architecture` onward.

## 2. Download the server files

Switch to the new user and install app 730 into a lowercase path. Some distributions have trouble with capital letters in the install path, so `cs2-server` is safer than `CS2Server`:

```bash
sudo -iu cs2
steamcmd +force_install_dir /home/cs2/cs2-server +login anonymous +app_update 730 validate +quit
```

Anonymous login is enough for the download. `force_install_dir` must come before `login`, otherwise SteamCMD warns and may put the files elsewhere.

CS2 also expects the Steam client library in a fixed place. Create the folder and link it:

```bash
mkdir -p ~/.steam/sdk64
ln -sf ~/.local/share/Steam/steamcmd/linux64/steamclient.so ~/.steam/sdk64/steamclient.so
```

If SteamCMD stored its files somewhere else on your system, find the library with `find ~ -name steamclient.so -path '*linux64*'` and link that path instead. A missing link shows up as a "cannot open shared object file" error at startup.

## 3. Create a Game Server Login Token

A server without a token only accepts players on the local network. Sign in at `https://steamcommunity.com/dev/managegameservers`, create a token for app ID **730**, and add a memo naming the server. Use one token per server and keep it private: a token in a public screenshot can be abused, and Valve can ban tokens that misbehave along with the servers using them.

## 4. Write server.cfg

Server settings live in `game/csgo/cfg/` inside the install folder. Create `server.cfg`:

```text
hostname "Thursday Scrims"
sv_password ""
rcon_password "use-a-long-random-string"
sv_lan 0
sv_cheats 0
mp_autoteambalance 1
mp_limitteams 1
```

Set `sv_password` to make the server private to people who know it. Each game mode also runs a matching file after Valve's own defaults, for example `gamemode_competitive_server.cfg` for competitive, so per-mode settings such as round time go there while shared settings stay in `server.cfg`.

## 5. Pick a game mode

CS2 chooses its ruleset from two values set together, `game_type` and `game_mode`. Setting only one can leave the server on the previous mode.

| Mode | `game_type` | `game_mode` |
| --- | --- | --- |
| Casual | 0 | 0 |
| Competitive | 0 | 1 |
| Wingman | 0 | 2 |
| Arms Race | 1 | 0 |
| Deathmatch | 1 | 2 |

To switch modes on a running server, set both values and load a map, for example `game_type 0; game_mode 2; changelevel de_inferno`.

## 6. Start the server

From the install folder, start the server through the `cs2.sh` wrapper, which sets up the libraries it needs:

```bash
cd ~/cs2-server
./game/cs2.sh -dedicated -port 27015 -maxplayers 10 +map de_dust2 +game_type 0 +game_mode 1 +sv_setsteamaccount YOUR_TOKEN
```

Replace `YOUR_TOKEN` with your login token. Add `-usercon` if you want RCON access from outside tools, and `+tv_enable 1` for CSTV. Watch the console until the map loads, then connect from the game console with `connect 203.0.113.10:27015`, using your server's address.

## 7. Run it as a service

A systemd unit starts the server at boot and restarts it after a crash. Exit back to your admin account and create `/etc/systemd/system/cs2.service`:

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

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

[Install]
WantedBy=multi-user.target
```

```bash
sudo systemctl daemon-reload
sudo systemctl enable --now cs2
journalctl -u cs2 -f
```

### Talking to a server that runs in the background

Under systemd there is no interactive console, so you need another way to send commands. RCON with `-usercon` and a tool of your choice is one route, though many admins find it less dependable in CS2 than it was in CS:GO. The simple alternative is to run the start command inside a `tmux` session as the `cs2` user and attach with `tmux attach` when you need the console. Whichever you pick, these are the commands you will use most during a match night:

```text
status
mp_warmup_end
mp_restartgame 1
mp_maxrounds 24
bot_kick
changelevel de_mirage
```

`status` shows who is connected and the map in play. `mp_restartgame 1` restarts the match after a second, which is the clean way to start live after warmup. There is no tick rate to tune: CS2 runs a fixed 64 ticks per second with sub-tick input, so a `-tickrate` option from old guides does nothing.

## 8. Open the firewall

Allow the game port for everyone and RCON only for your own address:

```bash
sudo ufw allow 27015/udp
sudo ufw allow 27020/udp
sudo ufw allow from 198.51.100.7 to any port 27015 proto tcp
```

Skip the 27020 rule if you do not use CSTV. On a CloudSat server you can enforce the same rules with a [cloud firewall](https://cloudsat.io/docs/cloud-firewalls), which drops other traffic before it reaches the machine.

## 9. Update after every patch

Valve ships game updates without warning, and once clients update, an outdated server refuses them. Keep a small update script for your admin account:

```bash
#!/bin/bash
set -e
sudo systemctl stop cs2
sudo -u cs2 steamcmd +force_install_dir /home/cs2/cs2-server +login anonymous +app_update 730 +quit
sudo systemctl start cs2
```

Leave `validate` out of routine updates, because it rechecks every file and takes far longer; keep it for repairs. Run the script from a systemd timer or cron a few times a day, ideally at hours when nobody is mid-match.

## Plugins and community content

SourceMod does not support CS2. Community servers use Metamod:Source with CounterStrikeSharp, which loads plugins written in C#, for retakes, practice modes and admin menus. Add plugins one at a time and watch the server's frame times after each, since a slow plugin costs more than extra players.

If you want a starting point for hardware, CloudSat's [Counter-Strike 2 server page](https://cloudsat.io/solutions/counter-strike-server) explains why the 4 GB High Frequency plan, with 120 GB of NVMe at $11.58/mo, fits the install with room for updates.

## FAQ

### Why does nobody see my server in the browser?

Check the three usual causes in order: the login token is missing or invalid, `sv_lan` is set to 1, or UDP 27015 is blocked by a firewall. The console log at startup says whether the token was accepted.

### Can I still run SourceMod plugins?

Not on CS2. SourceMod targets the older Source engine, where it still runs Team Fortress 2 and Counter-Strike: Source servers. For CS2, look for the CounterStrikeSharp version of the plugin you want.

### How do I host a Workshop map?

Use the map's Workshop ID with `host_workshop_map`, from the console or on the command line in place of `+map`. The server downloads the map itself, and players get it automatically when they join.

### How much does the server need for 10 players?

A competitive 5v5 server fits in 4 GB of memory with room to spare. CPU speed and a stable network matter far more, especially for deathmatch servers with many players and constant gunfire.

**Run it on CloudSat.** Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. [See plans](https://cloudsat.io/plans) or [deploy a server](https://dash.cloudsat.io/console/deploy).

## Keep reading

[All guides in Gaming](https://cloudsat.io/learn/topic/gaming)

- [Game server security: the threats that hit community servers](https://cloudsat.io/learn/game-server-security-checklist): Security Game server security: the threats that hit community servers 6 min read
- [Survival games like ARK that you can host yourself](https://cloudsat.io/learn/survival-games-like-ark-you-can-host): Gaming Survival games like ARK that you can host yourself 7 min read
- [Choosing Minecraft server hosting: a buyer's checklist](https://cloudsat.io/learn/minecraft-server-hosting-checklist): Gaming Choosing Minecraft server hosting: a buyer's checklist 7 min read
- [Host an ARK: Survival Ascended server, mods included](https://cloudsat.io/learn/ark-survival-ascended-dedicated-server-with-mods): Gaming Host an ARK: Survival Ascended server, mods included 7 min read
