Server Configuration
Complete reference for the CoD1 server.cfg file.
Location
The server configuration file is located at:
main/server.cfgEdit this file via SFTP. Changes take effect after a server restart.
Example Configuration
// ============================================================
// Server Identity
// ============================================================
set sv_hostname "My uHost CoD Server"
set sv_maxclients "20"
set sv_privateClients "0"
// ============================================================
// Passwords
// ============================================================
set rcon_password "changeme"
set g_password ""
set sv_privatePassword ""
// ============================================================
// Network
// ============================================================
set sv_maxRate "25000"
set sv_floodProtect "1"
// ============================================================
// Downloads
// ============================================================
set sv_allowDownload "1"
set sv_pure "1"
// FastDL is auto-configured on uHost. No need to set
// sv_wwwDownload or sv_wwwBaseURL manually.
// ============================================================
// Gameplay
// ============================================================
set g_gametype "tdm"
set scr_teambalance "1"
set scr_friendlyfire "0"
set g_allowvote "1"
// ============================================================
// Team Deathmatch Settings
// ============================================================
set scr_tdm_timelimit "15"
set scr_tdm_scorelimit "0"
// ============================================================
// Search & Destroy Settings
// ============================================================
set scr_sd_timelimit "2.5"
set scr_sd_scorelimit "0"
set scr_sd_bombtimer "45"
set scr_sd_planttime "5"
set scr_sd_defusetime "5"
// ============================================================
// Map Rotation
// ============================================================
set sv_mapRotation "gametype tdm map mp_brecourt map mp_carentan map mp_dawnville gametype sd map mp_carentan map mp_harbor"
set sv_mapRotationCurrent ""Settings Reference
Server Identity
| CVar | Description | Default |
|---|---|---|
sv_hostname | Server name shown in the browser | "" |
sv_maxclients | Maximum connected players | 20 |
sv_privateClients | Reserved private slots not shown in the browser | 0 |
Passwords
| CVar | Description |
|---|---|
rcon_password | Password for remote console access. Set this to something strong; it controls full server admin. |
g_password | Server join password. Leave empty for a public server. |
sv_privatePassword | Password to access reserved private slots. |
Network
| CVar | Description | Default |
|---|---|---|
sv_maxRate | Maximum data rate per client in bytes/sec. 25000 is standard. | 0 |
sv_minRate | Minimum data rate per client. | 0 |
sv_maxPing | Kick players with ping above this value. 0 = no limit. | 0 |
sv_floodProtect | Rate-limit client commands to prevent spam. | 1 |
sv_timeout | Seconds before an idle client is dropped. | 40 |
File Downloads
| CVar | Description | Default |
|---|---|---|
sv_allowDownload | Allow clients to download missing files from the server. | 0 |
sv_wwwDownload | Enable HTTP redirect for faster downloads (FastDL). | Auto |
sv_wwwBaseURL | Base URL for HTTP downloads. | Auto |
sv_wwwDlDisconnected | Disconnect clients during download, reconnect after. | 0 |
sv_pure | Enforce file purity. Rejects clients with modified .pk3 files. | 1 |
FastDL on uHost
FastDL is configured automatically on uHost servers. The built-in HTTP server serves mod files at full speed. You only need to set sv_wwwDownload and sv_wwwBaseURL if you want to use your own external download server.
Gameplay
| CVar | Description | Values |
|---|---|---|
g_gametype | Game mode | dm, tdm, sd, re, bel, hq |
scr_friendlyfire | Friendly fire mode | 0 off, 1 on, 2 reflect, 3 shared |
scr_teambalance | Auto-balance teams | 0 off, 1 on |
g_allowvote | Allow player voting | 0 off, 1 on |
Per-Game-Type Settings
Each game type has its own score and time limits. Replace <type> with the game type code (dm, tdm, sd, re, bel, hq).
| CVar | Description |
|---|---|
scr_<type>_scorelimit | Score needed to win. 0 = no limit. |
scr_<type>_timelimit | Time limit in minutes. 0 = no limit. |
scr_<type>_numlives | Lives per player per round. 0 = unlimited. |
Search & Destroy has additional settings:
| CVar | Description | Default |
|---|---|---|
scr_sd_bombtimer | Seconds until planted bomb detonates. | 45 |
scr_sd_planttime | Seconds to plant the bomb. | 5 |
scr_sd_defusetime | Seconds to defuse the bomb. | 5 |
Logging
| CVar | Description | Default |
|---|---|---|
g_log | Log file name. | games_mp.log |
g_logsync | Logging mode: 0 off, 1 buffered, 2 continuous. | 0 |
logfile | Enable the log file: 1 on, 0 off. | 0 |
Map Rotation
The sv_mapRotation CVar defines the map and game type cycle:
set sv_mapRotation "gametype tdm map mp_brecourt map mp_carentan gametype sd map mp_carentan map mp_dawnville"Format: gametype <type> sets the mode, followed by one or more map <mapname> entries. The game type persists until another gametype token appears.
See the Maps table in the overview for all internal map names.
TIP
After editing server.cfg, restart your server from the dashboard for changes to take effect.
FastDL (HTTP Redirect Downloads)
By default, CoD1 transfers mod files to clients over UDP, which is extremely slow. FastDL redirects these downloads to an HTTP server for full-speed transfers.
On uHost, FastDL is configured automatically. The server runs a built-in HTTP server that serves files from your mods/ and main/ directories. No setup is required.
If you need to use a custom download server instead:
set sv_wwwDownload "1"
set sv_wwwBaseURL "http://your-download-server.com/cod/"
set sv_wwwDlDisconnected "0"The HTTP server directory must mirror your game server's file structure:
server/
mods/
mymod/
z_mymod.pk3