Private customers Business customers

CS2 server.cfg explainedWhich file is loaded when and what belongs in it

Counter-Strike 2 has several configuration files that are loaded at different times - and that is exactly where most settings fail. This guide explains the load order, the most important convars for a public server and how to include your own configs cleanly via exec.

Load orderGamemode configsUsing exec correctly

Published on · last updated on

Where the server.cfg is and when it takes effect

The server.cfg sits in the server's cfg directory and is run automatically at startup - but before the mode configs are loaded. That is the decisive point.

Counter-Strike 2 loads configurations roughly in this order:

  1. command-line startup parameters
  2. server.cfg
  3. the mode config matching game_mode and game_type
  4. everything you reload yourself via exec

This leads to the most common disappointment: a value you write into the server.cfg can be overwritten by the mode config. If you want to be sure, reload your values at the end via a config of your own.

CS2 server hosting from €5.99 / month

Prepaid without a contract, DDoS protection up to 250 Gbit/⁠s.

View plans & prices

The basic setup

A sensible minimum for a public server:

hostname "My CS2 Server"
sv_setsteamaccount "YOUR_GSLT"
rcon_password "secure-password"
sv_password ""
sv_lan 0
sv_cheats 0
  • sv_setsteamaccount - without a valid token, the server is not publicly visible. See create a GSLT.
  • sv_lan 0 - if the value stays at 1, the server is only reachable in the local network.
  • sv_password "" - leave it empty for an open server, otherwise nobody gets in without a password.
  • rcon_password - should be set and not passed on. See RCON commands.

Game rules: rounds, time and money

The values that determine the flow of the game. They usually belong in a config of their own, because otherwise the mode config overwrites them:

ConvarMeaning
mp_maxroundsrounds until the end of the game
mp_overtime_enableovertime in case of a tie
mp_roundtime / mp_roundtime_defuseround length in minutes
mp_freezetimebuy phase at the start of the round
mp_startmoney / mp_maxmoneystarting and maximum money
mp_friendlyfiredamage within your own team
mp_autoteambalanceautomatic team balancing

For changes to round values to take effect immediately, mp_restartgame 1 helps - otherwise many only apply at the next half.

Your own configs via exec

The clean way for everything that should not be overwritten: create a file of your own in the cfg folder and load it specifically.

exec myserver.cfg

It is practical to keep one file per mode of operation - for example competitive.cfg, practice.cfg and dm.cfg - and run the matching one when switching. A ready-made practice config is shown in create a practice config.

Two rules that save a lot of trouble: do not forget the file extension and give the file name without a path - exec searches relative to the cfg directory.

Uploading and safely changing configs

The files sit in the cfg directory of the server installation, i.e. under game/csgo/cfg/. You edit them via the WebFTP file manager or via SFTP - the same access you use to manage demos and plugins.

  • Make a copy before every larger change. A second file next to the active one costs nothing and saves the evening if in doubt. There are no automatic backups; backups are self-service throughout.
  • Use plain text files. An editor that writes formatting into the file turns a valid config into an unreadable one.
  • Change one thing per round. Anyone who touches five values at once and then sees an error searches five times as long.
  • Use meaningful file names. competitive.cfg and dm.cfg still tell you in six months what is inside - test2.cfg does not.

A changed file does not take effect by itself: the server still holds the old version. Reload it via exec or restart the server. Troubleshooting fails surprisingly often exactly here - the file has long been correct, it just was never read in again.

Test a config before you build it in permanently

The fastest way to a config that does what it should leads via RCON: set values while running, check the behavior and only then take them over into the file. The reverse way - write, restart, wonder - costs a server start for every attempt.

  1. Set the value via RCON and check in the game whether it brings the desired result.
  2. Enter the convar name without a value - the server outputs the current state.
  3. For round values, follow with mp_restartgame 1, otherwise they only take effect at the next half.
  4. Take the confirmed value over into the file and reload the config once completely.
  5. Restart the server and cross-check - only that proves the value survives the load order.

The last step is the most important, because values set via RCON usually do not survive the next map change. What is meant to apply permanently has to come from a file that is read at every start.

The whole practice builds on this separation: one mode of operation, one file, one command to switch. How this results in one config each for competitive, practice and deathmatch and how switching works on a match day is shown in the tournament and LAN setup. Bot values belong in a file of their own for the same reason, see set up bots.

Common mistakes

  • The value is overwritten - it is in the server.cfg, and the mode config sets it again afterwards. Solution: reload via exec.
  • Unclosed quotation marks in the hostname - makes the following lines ineffective.
  • Comments with the wrong character - in CS2 configs, comments start with //.
  • The convar no longer exists - CS2 removed some CS:GO values, above all everything around the tick rate. See sub-tick explained.

Whether a value has actually arrived, you check in the console by entering the convar name without a value - the server then outputs the current state.

Frequently asked questions

Because the mode config is loaded after the server.cfg and overwrites values. Write such values into a file of your own and load it via exec after the mode is set.

In the server's cfg directory. It is run automatically at startup - even before the mode config matching game_mode and game_type is loaded.

Enter the convar name in the console without a value. The server then outputs the current state including the default value - so you see immediately whether your config took effect.

No. Counter-Strike 2 works with sub-tick; the tick rate convars from CS:GO were removed. Entries for them in a config have no effect.

Rent your own CS2 server

Sub-tick optimized hardware, unlimited slots, Workshop maps, Metamod:Source & CounterStrikeSharp - prepaid, made in Germany.

View plans & prices

CS2 server hosting

from €5.99 / month

Prepaid without a contract, DDoS protection up to 250 Gbit/⁠s, hosted in Frankfurt am Main.

View plans & prices

Go straight to checkout

Read more


Discover more