Introduction
This guide will cover the setup of a dedicated server for IW4x for use on a Local Area Network (LAN), please note this is for advanced users only. If you are looking for a simply way to play with friends I recommend you check out the Private Match Guide.
There are two main types of servers. There are party servers or match servers, party server act like a traditional steam MW2 lobby, leaving you time to vote for the next map and edit your classes. The other type of server is match, this is the most commonly used type of server and simply rotates map to map without any lobby.
Party Server
- Steam style lobby system.
- Adjust classes and killstreak rewards without leaving the server.
- Vote to skip next map.
- Note: Party servers are very buggy and unstable, they will crash often and even with scripts the server might not properly restart. It is advised to not use party servers and stick to match servers instead!
Match Server
- A normal dedicated server that makes use of a map rotation.
- Rotates map to map with no lobby.
- Stable and the recommended server type to use.
Requirements
Match Server Setup
- Download the IW4x All-In-One Dedicated Server Edition (See Requirements Section) and place it in a location of your choosing on your VPS or PC
- Right click the DedicatedServer.bat file and go to edit with notepad++
- Carefully review/edit the bat file. Game Port LAN Mode.
- Save the file that you just edit.
- Go to your userraw folder. Right click on server.cfg and edit with notepad++
- Carefully review edit the cfg file to your liking.
Give it a hostname, Message of the day, Gametype, remove/add maps that you want on the rotate.
- Ensure you set LANMode=1, this is important for Offline servers.
- Save the server.cfg file that you just edit after you done. You can always go back and edit it
- Forward the TCP and UDP port you put in the bat file.
- Run the startserver.bat and have fun! (ignore any missing console errors)
- Client PC's Go to Join Game and on the server browser set the Source option to LAN and the server should be listed.
Party Server Setup
- Download the IW4x All-In-One Dedicated Server Edition (See Requirements Section) and place it in a location of your choosing on your VPS or PC
- Right click the DedicatedLobbyServer.bat file and go to edit with Visual Studio Code or your choice of editor.
- Carefully review/edit the file to your liking, Gamemode, GamePort
- Ensure you set LANMode=1, this is important for Offline servers.
- Make sure party_minplayers=2 on whatever playlist you chose. (Don't do "1" on teambased games or you going to have problems)
- Save the file that you just edit after you done. You can always go back and edit it.
- Go to your userraw folder. Right click on partyserver.cfg and edit with Visual Studio Code or your choice of editor.
- Carefully review edit the cfg file to your liking. Give it a hostname, Message of The Day, etc.
- Save the partyserver.cfg file that you just edit.
- Make sure All PC's are set to Home/Private Network and iw4x.exe is allowed in windows firewall or 3rd party firewalls.
- Run the DedicatedLobbyServer.bat and the window should open the name of your server, 0/18 players, none. Ignore any console errors that happen. As long as the server doesn't crash or error out.
- Client PC's Go to Join Game and on the server browser set the Source option to LAN and the server should be listed.
Want To Learn More?
Check out the official IW4x Wiki, it contains more detailed information in regards to servers such as the API or even setting up a server using a Docker container.
Credits
- Fry for the base of the guide.
- IW4x team for the Wiki writeup.