IW4x server.cfg Complete Configuration Guide
A complete reference for every important server.cfg cvar in IW4x, with explanations and recommended values.
IW4x server.cfg Complete Configuration Guide
The server.cfg file is the heart of your IW4x server configuration. It lives at userraw/server.cfg inside your server folder. This guide covers every significant cvar, organized by category, with explanations and recommended values for a public server.
Loading the Config
The config is loaded at startup via the +exec server.cfg launch parameter in DedicatedServer.bat. IW4x reads it from the userraw/ directory. You can have multiple config files and switch between them by changing the filename in the launch parameters.
Important: After editing server.cfg, you must restart the server for most changes to take effect. A handful of cvars can be changed at runtime via RCON, but server identity and port settings always require a restart.
Server Identity
// Name displayed in the server browser and in-game scoreboard
// Supports color codes: ^1=red, ^2=green, ^3=yellow, ^4=blue, ^7=white
set sv_hostname "^2My ^7IW4x Server"
// Message shown to players when they connect
set sv_motd "Welcome! Rules: No cheating. Have fun."
// Maximum number of players (hard cap is 18 for IW4x)
set sv_maxclients "18"
// Password-protect the server (leave empty for public)
set g_password ""
Network Settings
// 0 = public server (visible in browser), 1 = LAN only
// This MUST be 0 for your server to appear publicly
set sv_lanonly "0"
// Port is set on the command line (+set net_port "28960"), not here
// If you need to specify it in cfg, use:
// set net_port "28960"
Security and Admin
// RCON password — required for IW4MAdmin and remote administration
// Change this from the default; an empty password disables RCON
set rcon_password "YourSecurePasswordHere"
// Anti-cheat security level (23 is the recommended default)
// Higher values may kick legitimate players; lower values reduce protection
set sv_securityLevel "23"
// Disable cheats (keep this at 0 for public servers)
set sv_cheats "0"
// Kick players who are idle for this many seconds (0 = disabled)
set sv_kickBanTime "300"
// Flood protection: commands per second allowed
set sv_floodProtect "1"
Logging (Required for IW4MAdmin)
These settings are mandatory if you plan to use IW4MAdmin. Without them, IW4MAdmin cannot read server events.
// Path to the game log file (relative to your server's userraw/ folder)
set g_log "logs/games_mp.log"
// 2 = flush log on every write (required for IW4MAdmin to read events in real time)
// 0 = disabled, 1 = buffered writes
set g_logsync "2"
// Enable the log file
set logfile "2"
Make sure the userraw/logs/ directory exists before starting the server. IW4x will not create it automatically on all systems.
Gameplay Settings
// Default gametype (used if sv_maprotation doesn't specify one)
set g_gametype "war"
// Force all players to respawn immediately (1 = yes, 0 = wait for wave)
set scr_player_forcerespawn "1"
// Enable perks
set scr_game_perks "1"
// Enable killcam
set scr_game_allowkillcam "1"
// Auto team-balance when teams are uneven
set scr_teambalance "1"
// Spectator mode: 0 = disabled, 1 = team only, 2 = free spectate
set scr_game_spectatetype "2"
// Enable killstreak rewards (UAV, airstrike, helicopter, etc.)
set scr_game_killstreaks "1"
// Enable deathstreaks (Copycat, Painkiller, etc.)
set scr_game_deathstreaks "1"
Per-Gametype Score and Time Limits
Each gametype has its own set of cvars. Only the settings for your active gametypes need to be configured, but it's good practice to set them all.
Team Deathmatch (war)
set scr_war_scorelimit "25000" // Score limit (sum of both teams' kills × 50)
set scr_war_timelimit "10" // Match time limit in minutes (0 = unlimited)
set scr_war_roundlimit "1"
Domination (dom)
set scr_dom_scorelimit "200"
set scr_dom_timelimit "10"
Search & Destroy (sd)
set scr_sd_roundlimit "6" // Total rounds
set scr_sd_winlimit "4" // Rounds needed to win
set scr_sd_numlives "1" // Lives per round (1 = no respawn)
set scr_sd_timelimit "2" // Minutes per round
set scr_sd_bombtimer "45" // Seconds until bomb explodes after plant
set scr_sd_defusetime "5" // Seconds to defuse
set scr_sd_multibomb "0" // 1 = multiple bombs active at once
Capture the Flag (ctf)
set scr_ctf_scorelimit "3"
set scr_ctf_timelimit "10"
set scr_ctf_flagreturntime "30" // Seconds until a dropped flag auto-returns
King of the Hill / Headquarters (koth)
set scr_koth_scorelimit "250"
set scr_koth_timelimit "10"
Sabotage (sab)
set scr_sab_timelimit "20"
set scr_sab_bombtimer "30"
set scr_sab_scorelimit "1"
Global Thermonuclear War (gtnw)
set scr_gtnw_timelimit "10"
Map Rotation
// Format: gametype <type> map <mapname> gametype <type> map <mapname> ...
// The gametype carries over until changed, so you can batch maps of the same type.
set sv_maprotation "gametype war map mp_rust gametype war map mp_highrise gametype dom map mp_terminal gametype dom map mp_favela gametype sd map mp_skidrow gametype war map mp_afghan"
// Optionally shuffle the rotation instead of playing in order
set sv_maprotationcurrent ""
For a full list of valid map names, see the IW4x Map Rotation Guide.
Complete Minimal server.cfg Example
This is a clean starting point for a public TDM/Dom rotation:
// ─── Identity ──────────────────────────────────────────────────────────────
set sv_hostname "^2My ^7IW4x Server"
set sv_motd "Type !help for admin commands."
set sv_maxclients "18"
set g_password ""
// ─── Network ───────────────────────────────────────────────────────────────
set sv_lanonly "0"
// ─── Security ──────────────────────────────────────────────────────────────
set rcon_password "ChangeThisPassword"
set sv_securityLevel "23"
set sv_cheats "0"
// ─── Logging ───────────────────────────────────────────────────────────────
set g_log "logs/games_mp.log"
set g_logsync "2"
set logfile "2"
// ─── Gameplay ──────────────────────────────────────────────────────────────
set scr_player_forcerespawn "1"
set scr_game_perks "1"
set scr_game_allowkillcam "1"
set scr_teambalance "1"
set scr_game_spectatetype "2"
set scr_game_killstreaks "1"
// ─── TDM ───────────────────────────────────────────────────────────────────
set scr_war_scorelimit "25000"
set scr_war_timelimit "10"
// ─── Domination ────────────────────────────────────────────────────────────
set scr_dom_scorelimit "200"
set scr_dom_timelimit "10"
// ─── Map Rotation ──────────────────────────────────────────────────────────
set sv_maprotation "gametype war map mp_rust gametype war map mp_highrise gametype dom map mp_terminal gametype dom map mp_favela gametype war map mp_scrapyard gametype dom map mp_estate"