Knowledgebase Counter-Strike: Source How to Edit server.cfg on Your Counter-S...

How to Edit server.cfg on Your Counter-Strike: Source Server

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.

💡 Tip
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

01
Log into your MintServers panel and open the Files tab on the left-hand sidebar.
02
Open the cstrike folder, then the cfg folder.
📁 cstrike (your Counter-Strike: Source game directory)
📁 cfg
📄 server.cfg (Click to edit this file)
03
Click on server.cfg to open the text editor.
04
Make your changes, then click Save Content at the top right of the editor.
05
Apply your changes by restarting the server, or by typing the command below into the Console tab.
Developer Console
exec server.cfg
⚠️ Important Warning
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 30
Minutes each map is played before the server changes map.
mp_maxrounds 0
Maximum number of rounds before the map changes.
mp_winlimit 0
The score one team must reach before the map changes.
mp_fraglimit 0
The number of kills at which the map ends.
mp_roundtime 3
How many minutes each round takes.
mp_freezetime 6
How many seconds players are frozen at the start of each round.
mp_startmoney 800
The money each player starts with.
mp_buytime 1
How many minutes after the round starts that players can buy items.
mp_c4timer 45
How long in seconds from when the C4 is armed until it explodes.
mp_friendlyfire 0
Set to 1 to let players injure their own teammates.
mp_autoteambalance 1
Automatically keeps the teams balanced.
mp_limitteams 2
The maximum number of extra players one team can have over the other. Set to 0 to disable the check.
sv_alltalk 0
Set to 1 so that both teams can hear each other on voice chat.
💡 Tip
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.
Start Your Counter-Strike: Source ServerUnlimited RAM · Unlimited slots · From $9.99/monthStart My Server

Bots

bot_quota 0
The total number of bots in the game.
bot_quota_mode normal
How 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 1
Bot skill from 0 (easy) to 3 (expert).
bot_join_after_player 1
Bots wait until a human joins before entering the game.

Content and Visibility

sv_pure 0
Forces 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 3
The 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 0
The 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.

📄 server.cfg
// Server name and access
hostname "My MintServers CS:S Server"
sv_password ""
rcon_password "change-this-to-a-long-random-string"

// Map rules
mp_timelimit 30
mp_roundtime 3
mp_freezetime 6
mp_startmoney 800

// Teams
mp_friendlyfire 0
mp_autoteambalance 1
mp_limitteams 2
sv_alltalk 0

// Region
sv_region 3

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.

💡 Tip
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

How to Change Maps and Set Up a Map Cycle on a Counter-Strike: Source Server
Set up a map rotation so maps change once they hit an end condition.
How to Become an Admin on Your Counter-Strike: Source (CS:S) Server
Become an admin so you can change settings in-game once your config is set.
How to Install SourceMod Plugins on Your Counter-Strike: Source Server
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

Was this article helpful?

Counter-Strike: Source Server Hosting

Start Your Own Counter-Strike: Source Server

Recreation of the original Counter-Strike 24/7 Expert Support Swap between 60 games at any time
Start My Server From $9.99/month  ·  24-hour money-back guarantee