Setup a Call of Duty 4 Server on Debian 7 x64


This guide will cover the installation and operation of a Call of Duty 4 (COD4) server using screen. In this tutorial, we will install COD4 on Debian 7.


  • Call of Duty 4 game client installer CD or image.
  • Debian server running a stable release (Wheezy, Jessie)
  • Vultr VPS (1 CPU, 1GB Memory, 20GB Storage) as a minimum. This configuration may not be suitable for large servers.


Login as root on the server that you will be using for this installation.

Run the command below to update your server’s list of available packages from the repositories and then upgrade any existing packages.

apt-get update && apt-get upgrade

Screen is often times included with the OS image by default, but you may be required to install it yourself.

apt-get install screen

Because the Call of Duty 4 server only runs on i386 machines, you have to enable the “multilib” feature in Debian.

dpkg --add-architecture i386apt-get update

For security purposes, we do not want to run the server using the root account. You should use a standard user account.

Create a directory for the game server.

cd ~mkdir cod4

Download the Call of Duty 4 dedicated server.

cd cod4wget

The download size is roughly 280 MB. When the download finishes, unpack the package.

tar -xvjf cod4-linux-server-06282008.tar.bz2

Install the COD4 game client onto your computer. Copy the main and zone folder of the game client onto the COD4 directory of your server using your favorite SCP client.

Once your upload completes, download the IceOps made executable. It contains various bugfixes and improvements.


Make the server “executable”.

chmod +x cod4x17a_dedrun

Create a config file for the dedicated server.

nano general.cfg

If you want to run a simple “Team Deathmatch” or “Search & Destroy” server, then use this sample config.

//************************************************** ****************************// Call of Duty 4//************************************************** ****************************//************************************************** ****************************// Public Information//************************************************** ****************************sets sv_hostname "CoD4 Server" // Change this field, what is the server namesets _Admin "Admin" // Change thissets _Email "" // Change thissets _Website "" // Change thissets _Location "Location" // Change thissets _Irc ""sets _Mod ""sets _ModVer ""sets _ModUpdate ""sets _Maps "COD4 Stock"set scr_motd "Message of the Day when the gamer joined the server" // Change it//************************************************** ****************************// Common Server Settings//************************************************** ****************************// Log Settingsset g_logsync "2" // 0=no log, 1=buffered, 2=continuous, 3=appendset logfile "1" // 0 = NO log, 1 = log file enabledset g_log "games_mp.log" // Name of log file, default is games_mp.logset sv_log_damage "1"// Network optionsset net_ip "" // Set your servers IP addressset net_port "28960" // Set your port numberset com_hunkMegs "512"set net_noipx "1" // Allow ONLY tcp/ip protocol, player/server communications// Server Network Modeset dedicated "2" // 0 = Listen, 1 = LAN, 2 = Internet// Password Settingsset rcon_password "yourpass" // RCON must be set.set sv_privatePassword "" // Private slots, non-public slots// The following can be used to lock out the server so that only those// players that have been provide the password can connect. Good for// matches, practices, etc.set g_password ""// Player slots setupset sv_maxclients "32" // MAX server player slots, this is TOTAL player slotsset sv_privateclients "" // Number of private player slots, maxclients - privateclients = public slots// Pingset sv_minPing "0" // MIN player ping on CONNECT, any lower and player isnt allowed to connectset sv_maxping "250" // MAX player ping on CONNECT, any higher and player isnt allowed to connect// Client Download Settings. (0=off/1=on) Used for MODs and custom maps// You have to got a working httpd server if fast downloading enabled.set sv_allowdownload "0"seta sv_wwwDownload "0"seta sv_wwwBaseURL ""seta sv_wwwDlDisconnected "1"// Rateset sv_maxRate "25000"// Drop inactive playersset sv_timeout "300"set sv_zombietime "1"set g_inactivity "0"set g_inactivityspectator "0"// AntiFlooding Settingsset sv_floodProtect "1"set sv_reconnectlimit "3"// Anti Cheat Settings// In IceOps Dedicated server have their own cheat protection, so Punkbuster not neededset sv_punkbuster "0"set sv_disableClientConsole "0"set cl_autocmd "0"set sv_cheats "0"set sv_pure "1"set g_banIPs ""set g_no_script_spam "1"// Temporary Ban duration, in secondsset sv_kickBanTime "3600"// In-game voice communication systemset sv_voice "0"set sv_voiceQuality "4"set voice_deadChat "0"set voice_global "0"set voice_localEcho "0"set winvoice_mic_mute "1"//************************************************** ****************************// Misc//************************************************** ****************************set sv_allowAnonymous "0"set g_antilag "0"set g_compassShowEnemies "0"set scr_hardcore "1"set g_allowvote "0"set scr_allow_vote "0"set scr_teambalance "1"set ui_hud_hardcore "1"set scr_game_allowkillcam "0"set scr_game_onlyheadshots "0"set scr_game_deathpointloss "0"set scr_game_suicidepointloss "0"set scr_team_teamkillpointloss "1"set scr_game_spectatetype "1" // [0-2] 0=none, 1= team only, 2=spectate allset scr_team_fftype "1" // 0=off 1=on 2=reflect damage 3=shared//================================================== ===============================// Gametype Settings//================================================== ===============================// First gametype to load// "dm" - free for all deathmatch// "dom" - domination// "koth" - headquarters// "sab" - sabotage// "sd" - search & destroy// "war" - team deathmatch// Deathmatchset scr_dm_scorelimit   150set scr_dm_timelimit    10set scr_dm_roundlimit   1set scr_dm_numlives 0set scr_dm_playerrespawndelay -1set scr_dm_waverespawndelay 0// Dominationset scr_dom_scorelimit  200set scr_dom_timelimit   0set scr_dom_roundlimit  1set scr_dom_numlives 0set scr_dom_playerrespawndelay -1set scr_dom_waverespawndelay 0// Teamdeath Matchset scr_war_scorelimit  750set scr_war_timelimit   10set scr_war_roundlimit  1set scr_war_numlives 0set scr_war_playerrespawndelay -1set scr_war_waverespawndelay 0// Sabotogeset scr_sab_scorelimit  3set scr_sab_timelimit   10set scr_sab_roundlimit  3set scr_sab_roundswitch 1set scr_sab_numlives 0set scr_sab_bombtimer   30set scr_sab_planttime   3set scr_sab_defusetime  3set scr_sab_hotpotato   0set scr_sab_playerrespawndelay -1set scr_sab_waverespawndelay -1// King of the Hillset scr_koth_scorelimit 250set scr_koth_timelimit  15set scr_koth_roundlimit 1set scr_koth_roundswitch    1set scr_koth_numlives   0set scr_koth_playerrespawndelay -1set scr_koth_waverespawndelay 0set koth_autodestroytime    60set koth_spawntime  0set koth_kothmode   0set koth_capturetime    20set koth_destroytime    10set koth_delayPlayer    0set koth_spawnDelay 60// Search and Destroyset scr_sd_scorelimit   6set scr_sd_timelimit    3set scr_sd_roundlimit   0set scr_sd_roundswitch  3 // rounds between switching teamsset scr_sd_numlives 1 // eliminationset scr_sd_bombtimer    60set scr_sd_planttime    7set scr_sd_defusetime   7set scr_sd_multibomb    0set scr_sd_playerrespawndelay -1set scr_sd_waverespawndelay 0// Team-Balance and Votingset scr_teambalance "1"set g_allowvote "0"set sv_mapRotation "gametype sd map mp_bloc gametype sd map mp_backlot gametype sd map mp_crash gametype sd map     mp_convoy gametype sd map mp_vacant gametype sd map mp_bog gametype sd map mp_pipeline gametype sd map mp_farm gametype sd map mp_crossfire gametype sd map mp_overgrown gametype sd map mp_citystreets gametype sd map mp_showdown gametype sd  map mp_strike gametype sd map mp_cargoship gametype sd map mp_countdown"

Save your changes to the config file.

Next, create a start-up script that starts a dedicated server (with screen) and enables map rotation.


Paste the following content into the script file.

#!/bin/bashscreen -dmS cod4 ./cod4x17a_dedrun +set sv_authorizemode "-1" +exex general.cfg +map_rotate

Save your changes to the script file, then make it “executable”.

chmod +x

If you are using the iptables firewall, add the following rules. Update the ports if you have changed them in the server configuration file.

-A INPUT -p udp --dport 28960 -j ACCEPT-A INPUT -p udp --sport 28960 -j ACCEPT-A INPUT -p tcp --dport 28960 -j ACCEPT-A INPUT -p tcp --sport 28960 -j ACCEPT-A INPUT -p udp --dport 20800 -j ACCEPT-A INPUT -p udp --sport 20800 -j ACCEPT-A INPUT -p tcp --dport 20800 -j ACCEPT-A INPUT -p tcp --sport 20800 -j ACCEPT-A INPUT -p udp --dport 20810 -j ACCEPT-A INPUT -p udp --sport 20810 -j ACCEPT-A INPUT -p tcp --dport 20810 -j ACCEPT-A INPUT -p tcp --sport 20810 -j ACCEPT

Finally, start your server.


Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article

No comments

Powered by Blogger.