LogoLogo
  • Home
  • Getting Started
  • Configuration
    • LinuxGSM Config
    • Game Server Config
    • Start Parameters
    • cronjobs
    • Running on Boot
    • Running Multiple Game Servers
    • IP Address Configuration
    • LinuxGSM Stats
  • Commands
    • install
    • start-stop-restart
    • monitor
    • test-alert
    • console
    • debug
    • update
    • check-update
    • force-update
    • validate
    • update-lgsm
    • backup
    • map-compressor
    • details
    • mods
    • skeleton
    • fastdl
    • change-password
  • Game Servers
    • 7 Days to Die
    • Arma 3
    • ARK: Survival Evolved
    • Call of Duty 4
    • Dont Starve Together
    • Counter-Strike 2
    • Counter-Strike: Global Offensive
    • Factorio
    • Garry's Mod
    • Insurgency: SandStorm
    • Killing Floor 2
    • Minecraft: Java Edition
    • Multi Theft Auto
    • Rust
    • Sven Co-op
    • Trackmania Nations Forever / Trackmania United Forever
    • TeamSpeak 3
    • Unreal Tournament 99
    • Unreal Tournament 2004
    • Unreal Tournament 3
    • Valheim
    • Xonotic
    • The Front [WIP]
  • Networking
    • IP Address
    • Ports
    • Source Engine
  • Alerts
    • Discord
    • Email
    • IFTTT
    • Pushbullet
    • Pushover
    • Rocket.Chat
    • Slack
    • Telegram
  • Dependencies
    • Java
    • tmux
    • jq
    • gamedig
    • glibc
  • Features
    • ANSI Colors
    • Stop Mode
    • Log Management
    • Message Display Time
  • SteamCMD
    • Steam Master Server
    • Game Server Login Token
    • Branch
    • LAN Discovery
    • Workshop
    • Error Codes
  • Linux
    • distro
    • ftp-scp
    • file-ownership
    • firewalls
    • network-interfaces
    • permissions
    • Symlinking and ln command
  • Troubleshooting
  • FAQ
  • Guides
    • Security
    • Make Webserver Case Insensitive
    • Sourcemod and Metamod:Source
  • Other
    • server-migration
    • basic-usage
    • brand
Powered by GitBook
On this page
  • Call of Duty 4 Server Files
  • CoD4x
  • Updating CoD4x
  • CoD4x Master Server
  • Mod Support
  • Adding Mods
  • Custom Maps
  • Running custom maps on unmodded servers
  • Fast Download
Edit on GitHub
Export as PDF
  1. Game Servers

Call of Duty 4

PreviousARK: Survival EvolvedNextDont Starve Together

Last updated 1 year ago

Call of Duty 4 Server Files

Many tutorials state that the game disk is required to install a CoD4 server. This is because the server is built into the client. This made it difficult to distribute and create a CoD4 server.

After investigating this issue, it was found that it is possible to run a server with most of the client files removed. This greatly reduces the file size and prevents the client from being used. Because of this LinuxGSM provides a download to only the files required to run the server. Preventing the use of the client, removing the opportunity to use the server to pirate the game.

CoD4x

cod4server uses CoD4x project for its server, rather than the original, as it fixes various bugs and adds a few features over the vanilla server.

Updating CoD4x

CoD4x has its own update functionality. It will automatically check for updates and does not require LinuxGSM to check for updates.

CoD4x Master Server

CoD4x game servers (since version 17.6) require a server token to be listed on the CoD4x master server.

To generate a token visit .

Once a token is generated add it to the sv_authtoken cvar in server.cfg or command-line parameters.

server.cfg

set sv_authtoken "mytokenhere"`

command-line parameters

+set sv_authtoken "mytokenhere"

The server then needs to be restarted to allow the game server to be listed.

Mod Support

Mods for Call of Duty 4 have to be manually added to the game server.

Adding Mods

To run a mod the servers fs_game variable must be set correctly. Mods reside in the mods folder inside fs_homepath. Example directory tree:

mods/                                  
     ├── pml220                         
     │   ├── mod.ff                         
     │   ├── pml220.iwd                     
     │   ├── z_c_r.iwd

To start the server with a mod set the fs_game variable accordingly.

parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap} +set fs_game "mods/pml220""

Custom Maps

Modded CoD4 servers have the ability to run with user-created maps. To run a server with a custom map, it has to first be placed in the usermaps directory (if missing simply create it yourself).

    ├── usermaps
    │   ├── mp_nuketown
    │   │   ├── mp_nuketown.ff
    │   │   ├── mp_nuketown.iwd
    │   │   ├── mp_nuketown_load.ff

Typically, maps are prefixed by mp_ following the maps name.

Running custom maps on unmodded servers

Running custom maps on unmodded servers is not supported, but there is a neat workaround to still load custom maps. First, create a mods folder and some empty folder inside it.

    ├── mods
    │   ├── myemptymod

Now set fs_game to mods/myemptymod and you will be able to run custom maps.

Fast Download

set sv_allowDownload "1" // allow clients to download gamefiles
set sv_wwwDownload "1" // enable download redirection
set sv_wwwBaseURL "http://domain.tld/cod4fastdl/" // defines url to download from
set sv_wwwDlDisconnected "0" // disconnect clients while downloading

here sv_wwwBaseURL has to point to a URL served by your web server.

An example directory tree for a served folder may look as below:

    cod4fastdl/
    ├── mods
    │   ├── pml220
    │   │   ├── mod.ff
    │   │   ├── pml220.iwd
    │   │   ├── z_c_r.iwd
    ├── usermaps
    │   ├── mp_nuketown
    │   │   ├── mp_nuketown.ff
    │   │   ├── mp_nuketown.iwd
    │   │   ├── mp_nuketown_load.ff

is possible with CoD4 to allow custom maps and mods to be hosted on a webserver.

https://cod4x.ovh
here
CoD4x master server list
Fast download