I recently set up a server with the help of -MAD_DAD-'s guide, It is straight to the point, but misses some things that I think should be included for new server hosters/People who arent Tech Savvy and its the only complete guide I can find (might be blind). All credit goes to -MAD_DAD- as without his guide, I would’ve faulted. This guide is more lengthy, so if you are Tech Savvy and know how to port forward / setup servers, please follow his instead.
- IP/Port. (If using Hamachi/Radmin or anything, just copy IP from that. port forwarding is still recommended/needed. If you cant port forward, try using default 28960, if errors occur, try a different port number.)
First we need your IP and Port to setup your server to let others join. Open CMD on windows, type ipconfig , look for your ipv4 address. Copy (ctrl+shift+c) and paste into notepad for later.
Next is port forwarding, It is very misguided that you should use port 28960. DO NOT USE THIS PORT it is common to have issues with this port. Type any random numbers 4-5 chars long but make sure its between 0 and 65535, like 27491 (dont use) and set as TCP/UDP protocol also paste this port in your notepad.
(if you do not know how to port forward, Easiest Way: Find your internet providers phone app, and go through that.
Next Best way: Login through your providers website
Last Option (always works if ISP supports): Open CMD, type “ipconfig” and look for “default gateway 000.000.000.000” copy and paste the gateway into your browsers search (at the top) and look up what your admin login is for your router (or look for a sticker with login info on the bottom/side of your router). If neither of those work, you will have to contact your provider for further assistance.
Once you get to the Port Forwarding screen ignore anything else and, come back to this, and follow what I said above) In the end, you should have a new port with TDP/UDP on your router/pc.
- Server Setup.
First lets make a new folder for your server, this can be anywhere. In that folder make a “Main” folder. Go to your Cod4 Installation folder, and copy any “IWD” files from there, to your servers “Main” Folder. Now Copy the “Zone” Folder and paste it into your server folder. You will now have 2 folders “Main” and “Zone” inside the servers folder.
Then we will download the server files for windows. (guide may become out of date, if any issue arises first make sure server files are most recently released V21.2 is current as of 12/1/2023)
Once the server files are downloaded, open with Winrar/7zip, go into the folders until you see Main/Zone Folder and other loose files. Drag the loose files, into the root directory of your server folder then copy the files inside of the Main/Zone folder from the rar, into the Main/Zone folder of the server. (if asked to overwrite, do so)
After this has been done, make a shortcut of cod4x18_dederun.exe inside the server folder, we will use this to set “Launch options”.
Right click the shortcut, click properties, and where Target is. Go all the way right with your arrow key, after the " make a space and Paste whats below with the ipv4 and port set to what is pasted in your notepad from Step 1.
+set dedicated 2 +set net_ip 000.000.000.000 +set net_port 28700 +set modstats 0 +set rcon_password “Password” +set sv_maxclients 32 +exec server.cfg
IMPORTANT: Change the rcon_password, make sure its longer than 6 characters. Its up to you what it is. DO NOT SHARE, AND DO NOT PASTE THIS OR PUT IT ANY CFG FILE, IT STAYS IN THE SHORTCUT!!!
Once this is set, hit apply, if there is an error, make sure it was fully pasted. There is a character limit, so make sure your folders don’t have super long names (ex D:\My Games\Call Of Duty 4 Modern Warfare\Cod Server) try to keep it short.
If it says cannot apply/invalid/something, delete the shortcut, make a new one, and try it again. NOW Run the server once to get needed folders/files generated for later steps. (it wont work, that is fine)
- We will now set up the server settings. If you want to do this from scratch (fun but hard) use this template from Cod4x, or you can use mine which is pre-made with default TDM settings. We will now go through some needed / wanted changes.
Line 15, add a authtoken by going to Cod4x Masterserver List and signing in with your steam account (for security reasons on their end)
Line 44 sets the server name (what people see it as) DO NOT TOUCH RCON_PASSWORD LEAVE IT BLANK
Line 48 sets a password if you want the match to be private to yourself/friends.
Line 208 to change gamemode, if done Line 241 Must be edited as well.
Once your done editing your cfg, save it in the top left, then close it and rename it to “server.cfg”
Once that is all done, your folder structure for your server should look like this or very similar
Launch the shortcut, the server should open and run. Once the console stops spamming logs you should see “Gameserver is not VAC Secure!” and following it should be heartbeats from your IP/Port to the masterserver, then following should say “Server is registered on the master server” that should be all! Open Cod4x.
Now open the console with ` (next to 1) and type “connect IP:PORT” (replace ip and port with yours from Step 1) and if you want to have it be private to friends. You can set a password.
Open server.cfg in the Main folder, Line 48 “set g_password " "” put your password inside the parenthesis. Now to connect with a password set use command “connect IP:PORT; password Password” (replace 2nd password)
Any connectivity issues, please try allowing the port through your windows firewall first. Make sure people are able to connect and that the guide was followed 1:1.
IF YOU NEED ANY HELP, FEEL FREE TO ASK BELOW, IF YOU NEED HELP ASAP, IM TYPICALLY FREE TO HELP // Discord: kutag9
If this is not allowed on the forum for some reason, please tell me where I could post this for other new users to easily find!