> Intel // field guide_

How to Set Up a Counter-Strike 2 Dedicated Server on Linux

By Matthew Zhao|
Counter-Strike 2Guides

Scrims on a Tuesday, retakes on a Thursday, and a community server your regulars can find without asking who is hosting. A Counter-Strike 2 dedicated server gives you that: your own map rotation, your own config and your own password, with nothing riding on someone's home connection.

This guide walks through a CS2 dedicated server on Linux with SteamCMD, from install to Steam token, game modes, ports, backups and troubleshooting. The steps follow the Steam token page, the cm2network CS2 image and a CubePath setup guide. Check Valve's developer wiki if a step no longer matches your build, since CS2 updates often.

Why Run Your Own CS2 Server?

Your rules: Pick the map, the mode and the password. Run a scrim config on Tuesday and a casual server on the weekend.

Always available: The server is there when your team or community wants to play, not when the player hosting the match is online.

A home for your community: A named server with its own config is something people can come back to.

Practice on your terms: Retakes, warmups and utility runs on a server nobody else is using.

CS2 is free to play on Steam, and the Steam store page lists it as app 730. The dedicated server uses the same app ID, so one app_update 730 gets you the server files.

What You'll Need

  • A Linux machine with a public IP. The guides we used cover Ubuntu 24.04 on x86_64.
  • SteamCMD to download the server.
  • Disk space: the cm2network CS2 Docker image says you must have at least 60GB free, and a CubePath setup guide asks for 70GB. The game's own Steam page lists 85GB for the client. Plan for plenty.
  • CPU and RAM: Valve does not publish a server figure that we found. The Docker image lists 2 CPUs and 2 GiB of RAM as its requirement, and the CubePath guide suggests about 2 cores and 4GB for a 5v5. Treat those as starting points, then watch real usage.
  • A Steam Game Server Login Token (GSLT) from an account that owns CS2.
  • Open ports: UDP and TCP 27015 for the game, and UDP 27020 if you want SourceTV.

Step 1: Install SteamCMD

On Ubuntu 24.04, following the CubePath guide:

sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install steamcmd

Accept the Steam license when asked. The binary lands at /usr/games/steamcmd.

Step 2: Download CS2

Run the server as its own user, not root:

sudo useradd -m -s /bin/bash steam
sudo -iu steam
/usr/games/steamcmd +force_install_dir /home/steam/cs2 +login anonymous +app_update 730 validate +quit

+force_install_dir has to come before +login. When it finishes, check that the server binary exists:

ls /home/steam/cs2/game/bin/linuxsteamrt64/cs2

The download is large, so give it time.

Step 3: Link the Steam Client Library

Without this link, the server can fail with a steamclient.so error. As the steam user:

find ~ -path '*steamcmd/linux64/steamclient.so'
mkdir -p ~/.steam/sdk64
ln -sf <path printed by find> ~/.steam/sdk64/steamclient.so

Step 4: Create a Steam Game Server Login Token

Public servers need a GSLT. Without one, the server comes up but players on the internet can't join.

  1. Sign in at steamcommunity.com/dev/managegameservers.
  2. Create a token with App ID 730.
  3. Copy the 32-character token somewhere safe.

Steam's page lists the rules: your account must own the game, must not be community banned, locked or limited, and needs a qualifying registered phone. An account may create 1000 game server accounts. You are responsible for your tokens, so don't hand them to third parties. Resetting your Steam password regenerates all your tokens, and a token left unused for a long time expires, though you can regenerate it on the same page.

Use one token per server. If you run a scrim server and a community server, make two.

Step 5: Pick a Game Mode

CS2 uses game_type and game_mode to choose the mode. These pairs come from the CubePath guide:

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

The Docker image also has a game alias option that sets both at once, and when you set an alias it takes priority over the separate type and mode values. For scrims and retakes on a plain server, competitive (game_type 0, game_mode 1) is the usual starting point.

Step 6: Edit server.cfg

The main config lives at /home/steam/cs2/game/csgo/cfg/server.cfg. The CubePath guide sets these:

hostname "My CS2 Server"
sv_password ""
rcon_password "pick-a-long-one"
sv_lan 0
sv_cheats 0
mp_autoteambalance 1
mp_limitteams 1

Leave sv_password empty for a public server and set it for a private scrim. Mode-specific rules go in files named gamemode_<mode>_server.cfg in the same folder, for example gamemode_competitive_server.cfg. If your server.cfg settings seem ignored, a mode config is probably overriding them, so move the rules there.

Step 7: Launch the Server

From the steam user, using the launch line from the CubePath guide with your token:

cd /home/steam/cs2/game/bin/linuxsteamrt64
./cs2 -dedicated -usercon -port 27015 -maxplayers 10 +game_type 0 +game_mode 1 +map de_dust2 +sv_setsteamaccount YOUR_GSLT

What the pieces do:

  • -dedicated starts the server instead of the game.
  • -port sets the game port.
  • -maxplayers sets the player cap.
  • +map picks the starting map.
  • +sv_setsteamaccount passes your token.
  • -usercon turns on RCON.

Keep the token out of shell history and shared scripts. The CubePath guide stores it in a root-only environment file and runs the server as a systemd service with Restart=on-failure, so the server comes back after a crash or reboot. It also runs an app_update 730 step before each start, with a leading - so a Steam outage doesn't block startup.

Ports and Firewall

The Docker image documents the defaults:

Port Protocol Use
27015 UDP + TCP Game traffic
27020 UDP SourceTV

The CubePath guide opens game traffic with sudo ufw allow 27015/udp, and uses TCP 27015 for RCON, which it limits to your admin IP:

sudo ufw allow 27015/udp
sudo ufw allow from your_admin_ip to any port 27015 proto tcp

If the server sits behind a home router, forward the same ports to the machine.

Connect and Test

Enable the developer console in CS2 under Settings, Game. Then:

password your_join_password
connect your_server_ip:27015

Leave out the password line on an open server.

Admin and RCON

With -usercon and an rcon_password, you can administer from your own game console:

rcon_address your_server_ip:27015
rcon_password your_strong_rcon_password
rcon status
rcon changelevel de_mirage
rcon mp_restartgame 1

changelevel swaps the map and mp_restartgame 1 restarts the round. Use a long RCON password and don't expose TCP 27015 to the whole internet if you can avoid it.

Workshop Maps and Plugins

The CubePath guide mentions host_workshop_map with a Workshop ID for Workshop maps, and names Metamod:Source and CounterStrikeSharp as plugin options, but gives no install steps for either. Follow their own documentation. Plugins are your responsibility to keep compatible after each CS2 update.

Updating the Server

If players see "Server is running an older version" after a CS2 patch, the CubePath guide's fix is to restart the service so its app_update 730 step runs. By hand:

/usr/games/steamcmd +force_install_dir /home/steam/cs2 +login anonymous +app_update 730 +quit

The Docker image works the same way: it updates the game at startup, and STEAMAPPVALIDATE=1 makes SteamCMD validate and redownload game files.

Backups

A CS2 server has no world to lose, but your configs and any custom files are worth keeping. Copy these off the machine regularly:

  • game/csgo/cfg/ with server.cfg and your gamemode_*_server.cfg files
  • Any plugin folders and their configs
  • Your systemd unit and environment file (without sharing the token)

The game files can always be downloaded again with SteamCMD, so you don't need to back those up.

Common Issues and Troubleshooting

steamclient.so error on startup

Check the link from Step 3 with sudo -u steam ls -lL /home/steam/.steam/sdk64/steamclient.so. If it doesn't resolve, recreate it.

Players can't join from the internet, or the server shows as LAN-only

The GSLT is missing, invalid or already in use on another server. Check the log and regenerate the token. Also confirm sv_lan 0.

"Server is running an older version"

Restart the server so it runs app_update 730, or update by hand with SteamCMD.

server.cfg settings are ignored

A gamemode_<mode>_server.cfg file may be overriding them. Move the rules into the mode config.

Nobody can connect even with the token

Check that UDP 27015 is open on the machine's firewall and on any router in front of it. sudo ss -ulpn | grep 27015 shows whether the server is listening.

FAQ: CS2 Dedicated Server Setup

How do I set up a CS2 dedicated server?

Install SteamCMD, run app_update 730 into a folder, create a GSLT for app 730, edit server.cfg, and launch cs2 -dedicated with your token in +sv_setsteamaccount.

What app ID does the CS2 server use?

730, the same as the game. Create your GSLT with App ID 730 too.

What ports does CS2 use?

27015 for the game (UDP and TCP) and 27020 UDP for SourceTV by default, per the cm2network Docker image documentation.

Do I need a Steam token?

Yes, for a public server. Without a valid token, players on the internet generally can't join. Each server needs its own.

How much disk space does it need?

Plan for at least 60GB, and 70GB or more is safer. Sources vary, and Steam lists 85GB for the game itself.

How do I run Wingman or Deathmatch?

Change game_type and game_mode in the launch line: Wingman is 0 and 2, Deathmatch is 1 and 2.

Final Thoughts

A CS2 server is a big download, a token, a launch line and a firewall rule. Keep your configs backed up, restart after patches, and keep one token per server. If you would rather rent one, see our other guides on game server hosting.

Counter-Strike 2 Hosting on EZ Game Host

EZ Game Host offers Counter-Strike 2 server hosting on Pro and Premium plans, because CS2 needs the 80GB disk those plans include. You bring your own Steam Game Server Login Token, choose your starting map and player cap at checkout, and get 3 backup slots, a panel with console and file manager, and 24/7 support. Plans start at $48 a month, and monthly plans can be cancelled any time.

🍪 Cookie Notice

We use cookies for analytics and to measure our ads. Choose “Accept” to allow them, including session recordings that help us fix usability problems, or “Decline” to opt out of analytics and the sale or sharing of your personal information. Read our Privacy Policy.