# How to Configure Your Counter-Strike: Source Server (server.cfg) (/docs/counter-strike-source/server-config)



import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
import { File, Folder, Files } from 'fumadocs-ui/components/files';

Counter-Strike: Source remains one of the most popular games for community servers — particularly for **surf**, **bhop**, and **jailbreak** game modes. Configuration is via `server.cfg`.

File Structure [#file-structure]

<Files>
  <Folder name="cstrike" defaultOpen>
    <Folder name="cfg" defaultOpen>
      <File name="server.cfg" />

      <File name="autoexec.cfg" />
    </Folder>

    <File name="mapcycle.txt" />

    <Folder name="addons">
      <Folder name="metamod" />

      <Folder name="sourcemod" />
    </Folder>

    <Folder name="maps" />
  </Folder>
</Files>

Editing server.cfg [#editing-servercfg]

<Steps>
  <Step>
    Open the File Manager [#open-the-file-manager]

    In the [XGamingServer Panel](https://panel.xgamingserver.com), click **Files** in the sidebar.
  </Step>

  <Step>
    Navigate to the config [#navigate-to-the-config]

    Click through `cstrike` → `cfg` → open `server.cfg` in the code editor.

    {/* Screenshot needed: File Manager showing cstrike/cfg/ directory */}
  </Step>

  <Step>
    Save and restart [#save-and-restart]

    Edit settings, click **Save**, then restart from the **Console** page.
  </Step>
</Steps>

***

server.cfg — Key Settings [#servercfg--key-settings]

Server Identity [#server-identity]

```
hostname "My CSS Server"
sv_password ""                    // Join password (empty = public)
rcon_password "YourRconPassword"  // RCON password
sv_lan 0                          // 0 = internet, 1 = LAN only
sv_region 255                     // 255 = worldwide
```

Gameplay [#gameplay]

```
mp_autoteambalance 1
mp_limitteams 2
mp_friendlyfire 0
mp_autokick 0                    // Disable auto-kick for team kills
mp_timelimit 25                  // Minutes per map
mp_roundtime 2.25                // Round time in minutes
mp_freezetime 6
mp_buytime 45
mp_startmoney 800
mp_c4timer 45
mp_flashlight 1
mp_footsteps 1
sv_alltalk 0
sv_consistency 1
sv_pure 1
```

Network [#network]

```
sv_minrate 0
sv_maxrate 0                      // 0 = unlimited
sv_maxupdaterate 100              // Match tickrate
sv_maxcmdrate 100
```

> 💡 **Tickrate:** CSS default is 66-tick. Community servers often use 100-tick via `-tickrate 100` in startup. Surf and bhop servers always run 100-tick.

Surf Server Settings [#surf-server-settings]

The critical setting for surf is `sv_airaccelerate`:

```
sv_airaccelerate 150              // CRITICAL for surf (default is 10)
sv_accelerate 5
sv_gravity 800
sv_maxvelocity 3500
sv_staminamax 0
sv_staminalandcost 0
sv_staminajumpcost 0
mp_roundtime 60                   // Long rounds
mp_freezetime 0
sv_enablebunnyhopping 1
```

Bhop Server Settings [#bhop-server-settings]

```
sv_airaccelerate 100
sv_maxvelocity 10000
sv_staminamax 0
sv_staminalandcost 0
sv_staminajumpcost 0
sv_enablebunnyhopping 1           // Removes speed cap on land
mp_roundtime 60
mp_freezetime 0
```

***

GSLT (Game Server Login Token) [#gslt-game-server-login-token]

<Steps>
  <Step>
    Generate a token [#generate-a-token]

    Go to [Steam Game Server Management](https://steamcommunity.com/dev/managegameservers). Enter App ID **240**.
  </Step>

  <Step>
    Add to startup [#add-to-startup]

    In the **Startup** tab, find the GSLT field and paste your token.

    Or add to the launch command: `+sv_setsteamaccount YOUR_TOKEN`
  </Step>
</Steps>

***

Map Rotation [#map-rotation]

Edit `cstrike/mapcycle.txt` — one map per line:

```
de_dust2
de_inferno
cs_office
de_nuke
surf_greatriver_v2
surf_mesa
bhop_badges
jb_carceris_v2
```

Map prefixes indicate the game mode: `de_` (defuse), `cs_` (hostage), `surf_` (surf), `bhop_` (bunny hop), `jb_` (jailbreak).

***

SourceMod Admin Setup [#sourcemod-admin-setup]

After installing MetaMod + SourceMod (same process as CS:GO — see [CS:GO guide](/docs/counter-strike-go/server-config)), edit the admin file at `cstrike/addons/sourcemod/configs/admins_simple.ini`:

```ini
"STEAM_0:1:12345678" "99:z"        // Full root admin
"STEAM_0:0:87654321" "50:bcdeg"    // Moderator
```

**Common flags:** `z`=root, `b`=generic admin, `c`=kick, `d`=ban, `e`=unban, `f`=slay, `g`=map change

***

FastDL [#fastdl]

Without FastDL, clients download custom maps at \~20 KB/s directly from your server.

```
sv_downloadurl "https://yourcdn.com/cstrike/"
sv_allowdownload 1
net_maxfilesize 64
```

The web server directory mirrors `cstrike/`: maps, sounds, materials. Compress with bzip2 (`.bz2`) for bandwidth savings.

***

Ports [#ports]

| Port      | Protocol | Purpose      |
| --------- | -------- | ------------ |
| **27015** | UDP      | Game traffic |
| **27015** | TCP      | RCON         |
| **27020** | UDP      | SourceTV     |

Related Guides [#related-guides]

* [How to Connect](/docs/counter-strike-source/join-server)
