Call of Duty 4 has the largest surviving player base of the classic CoD servers, and almost all of it runs on CoD4X rather than the original Activision binary. If you are setting up a public server in 2026, install CoD4X and stop thinking about PunkBuster.
Stock 1.7 or CoD4X?
Stock cod4_lnxded 1.7 |
CoD4X (cod4x18_dedrun) |
|
|---|---|---|
| Master server | cod4master.activision.com:20810, unreliable |
CoD4X master, working |
| Fast download | sv_wwwDownload |
HTTP download, plus built-in redirect |
| Anti-cheat | PunkBuster, effectively unmaintained | own hooks, no PB required |
| Player reach | small | where the players actually are |
| Mod support | standard | standard plus extra script builtins |
Get CoD4X from cod4x.me. The rest of this guide assumes CoD4X but notes where stock 1.7 differs.
Both the 1.7 and 1.6 patches are on the war24.net downloads page if you need the original files.
What you need
| Item | Notes |
|---|---|
| Game paks | iw_*.iwd plus localized_* from a legitimate install |
| Binary | cod4x18_dedrun (CoD4X) or cod4_lnxded (stock 1.7) |
| Ports | UDP 28960 inbound |
| RAM | ~200 MB per instance |
Directory layout
/opt/cod4/
├── cod4x18_dedrun
├── main/
│ ├── iw_00.iwd … iw_NN.iwd
│ ├── localized_english_iw00.iwd …
│ └── server.cfg
└── mods/
└── pml220/
└── z_svr_pml220.iwd
32-bit libraries
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y libc6:i386 libgcc-s1:i386 lib32stdc++6 zlib1g:i386
CoD4X additionally links against 32-bit libcurl and libssl; if it exits complaining
about either, install libcurl4:i386 and libssl-dev:i386 (package names vary by release).
server.cfg
seta sv_hostname "^1My ^7CoD4 Server"
set rcon_password "change-me"
set g_gametype "war"
set sv_maxclients 20
set sv_pure 1
set sv_allowDownload 1
set sv_maxRate 25000
set sv_fps 20
set sv_timeout 60
set sv_floodProtect 1
set sv_punkbuster 0 // 0 on CoD4X, PB is unmaintained
set g_allowVote 1
set g_antilag 1
set scr_teambalance 1
set scr_friendlyfire 0
set scr_killcam 1
set logfile 1
set g_log "games_mp.log"
set g_logsync 0
set scr_war_timelimit 15
set scr_war_scorelimit 750
set scr_sd_roundlimit 0
set scr_sd_timelimit 2
set sv_mapRotation "gametype war map mp_crash map mp_backlot map mp_crossfire map mp_vacant"
map_rotate
CoD4 gametype codes are not the same as CoD1/CoD2. Team Deathmatch is war, not
tdm, and Headquarters is koth. Using tdm gives you a server that silently
refuses to start the gametype. Full list on the cvar reference.
Starting the server
cd /opt/cod4
./cod4x18_dedrun \
+set fs_basepath /opt/cod4 \
+set fs_homepath /opt/cod4 \
+set dedicated 2 \
+set net_port 28960 \
+set sv_maxclients 20 \
+set rcon_password "change-me" \
+exec server.cfg \
+map mp_crash
systemd unit
[Unit]
Description=Call of Duty 4 dedicated server
After=network-online.target
[Service]
Type=simple
User=cod4
WorkingDirectory=/opt/cod4
ExecStart=/opt/cod4/cod4x18_dedrun \
+set fs_basepath /opt/cod4 +set fs_homepath /opt/cod4 \
+set dedicated 2 +set net_port 28960 \
+exec server.cfg +map mp_crash
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Promod
Promod is what competitive CoD4 runs on. It is a mod directory selected with fs_game
plus a mode cvar:
set fs_game "mods/pml220"
set promod_mode "match_mr12"
Common modes:
| Mode | Use |
|---|---|
custom_public |
public server, Promod weapon balance |
match_mr10 |
match, 10 rounds per half |
match_mr12 |
match, 12 rounds per half |
strat |
strat time / practice |
Versions in circulation are Promod LIVE 2.11, 2.14, 2.16 and PML 2.20. Set fs_game
before the config exec on the command line so the mod's own cfg is picked up:
./cod4x18_dedrun +set fs_game mods/pml220 +set promod_mode match_mr12 \
+set dedicated 2 +exec server.cfg +map mp_crash
Fast download
set sv_allowDownload 1
set sv_wwwDownload 1
set sv_wwwBaseURL "http://files.example.com/cod4"
set sv_wwwDlDisconnected 0
The served tree mirrors the paths the client asks for:
cod4fastdl/
├── mods/
│ └── pml220/
│ ├── mod.ff
│ └── pml220.iwd
└── usermaps/
└── mp_yourmap/
├── mp_yourmap.ff
├── mp_yourmap.iwd
└── mp_yourmap_load.ff
Every directory name must be lowercase. CoD4 fast download is case-sensitive, so
Mods/ or UserMaps/ produces a 404 and a silent fallback to the slow path. Custom maps
go under usermaps/, not main/.
Serving a 20 MB mod over the engine's UDP path takes minutes; over HTTP it takes seconds. See the fast download guide for the nginx side.
PunkBuster
PunkBuster on CoD4 is unmaintained and its master infrastructure is unreliable. On CoD4X,
leave sv_punkbuster 0. If you insist on running it on stock 1.7:
set sv_punkbuster 1
set pb_sv_guidRelax 1
Expect a share of legitimate players to be kicked for PunkBuster losing its connection.
Map codes
CoD4 map codes rarely match the display names: District is mp_citystreets, Ambush is
mp_convoy, Downpour is mp_farm, Wet Work is mp_cargoship. The full mapping is on
the Call of Duty 4 map list.
