The main configuration file for your Counter-Strike: Source (CS:S) server is server.cfg. It controls your server name, passwords, round and map rules, bots and more. This guide shows you where to find it, how to edit it, and which settings are worth changing.
Every path in this guide is relative to the
cstrike folder, which is the Counter-Strike: Source game directory on your server.
Step 1: Open server.cfg
cstrike folder, then the cfg folder.📁 cstrike (your Counter-Strike: Source game directory)
📁 cfg
server.cfg to open the text editor.Saving the file does not change the running server. The values are only applied when the file is executed, so restart the server or run
exec server.cfg before testing. If a change "did nothing", this is almost always why.
Step 2: Settings Worth Knowing
You do not need to set everything. These are the settings most server owners change. Each setting goes on its own line in server.cfg, in the format setting value.
Server Name and Access
hostname "My Server"The name players see in the server browser.
sv_password "secret"A join password. Leave it empty for a public server.
rcon_password "long-random-string"The RCON password. Anyone who has it controls your server completely, so use a long random string that you use nowhere else.
Rounds and Map Rules
mp_timelimit 30Minutes each map is played before the server changes map.
mp_maxrounds 0Maximum number of rounds before the map changes.
mp_winlimit 0The score one team must reach before the map changes.
mp_fraglimit 0The number of kills at which the map ends.
mp_roundtime 3How many minutes each round takes.
mp_freezetime 6How many seconds players are frozen at the start of each round.
mp_startmoney 800The money each player starts with.
mp_buytime 1How many minutes after the round starts that players can buy items.
mp_c4timer 45How long in seconds from when the C4 is armed until it explodes.
mp_friendlyfire 0Set to
1 to let players injure their own teammates.mp_autoteambalance 1Automatically keeps the teams balanced.
mp_limitteams 2The maximum number of extra players one team can have over the other. Set to
0 to disable the check.sv_alltalk 0Set to
1 so that both teams can hear each other on voice chat.A map only changes when it reaches an end condition. If
mp_timelimit, mp_maxrounds, mp_winlimit and mp_fraglimit are all 0, the map will never rotate on its own.
Bots
bot_quota 0The total number of bots in the game.
bot_quota_mode normalHow the quota works.
normal adds the set number of bots, fill keeps the server at the quota number of players in total, and match keeps a set ratio of bots to humans.bot_difficulty 1Bot skill from
0 (easy) to 3 (expert).bot_join_after_player 1Bots wait until a human joins before entering the game.
Content and Visibility
sv_pure 0Forces connecting players to use models, materials and sounds that match the server's. Setting it to
1 or 2 stops players loading custom content, so leave it at 0 if your server uses custom skins, models or sounds.sv_region 3The region your server reports to the server browser:
0 US East, 1 US West, 2 South America, 3 Europe, 4 Asia, 5 Australia, 6 Middle East, 7 Africa, 255 World. Valve notes this setting may be deprecated, so treat it as harmless rather than something to rely on.sv_cheats 0The master switch for cheat commands. Keep it at
0 on a public server.mapcyclefile "mapcycle.txt"The file your map rotation is read from.
Example server.cfg
Here is a simple example you can use as a starting point. Lines starting with // are comments and are ignored by the server.
How to Check a Setting's Current Value
To see what a setting is currently set to, type its name into the Console tab without a value and press Enter. The server will print the current value. This is more reliable than trusting a value copied from a guide, because plugins and config files can change settings while the server is running.
Some options are not set in
server.cfg. Panel settings such as your GSLT are found in the Game Settings tab. Settings for SourceMod plugins are generated in cstrike/cfg/sourcemod once a plugin has loaded, which is a different folder from SourceMod's own data files in cstrike/addons/sourcemod/configs.
Related Guides
Set up a map rotation so maps change once they hit an end condition.
Become an admin so you can change settings in-game once your config is set.
Install SourceMod plugins, which keep their own settings outside server.cfg.
🛠️ Troubleshooting Config Issues
My changes are not applying
Restart the server or run exec server.cfg in the Console tab. Saving the file alone is not enough.
Unknown command in the console
The line has a typo, comes from a different game, or belongs to a plugin that is not installed. The server skips that line and carries on with the rest of the file.
Copied config from another game
Configs written for Counter-Strike 2 or CS:GO contain commands that CS:S does not know, so only part of the file will apply. Start from a CS:S config instead and read the console output the first time you run it.
A value looks wrong
Type the setting's name in the Console tab to see what the server is really using right now.
Still stuck?
Our team is happy to help. Open a ticket through the live chat button in the bottom-right corner of our website, or join our Discord and open a ticket there.
Join our Discord