Skip to content

IW4x

IW4x is a community-driven modification for Call of Duty Modern Warfare 2 (2009) that enhances the game with improved security, dedicated servers, and extensive modding capabilities.

egg-iw4x.json

updated

Ports

Add an allocation on the node for each port.

  • Game 28960

Install

Installer image
ghcr.io/ptero-eggs/installers:debian
Steam app
10190
Steam login
required
Install script
64 lines

Images

New servers use the first image. Users can change it on the Startup page.

  • Wine Latest default ghcr.io/ptero-eggs/yolks:wine_latest
  • Wine Staging ghcr.io/ptero-eggs/yolks:wine_staging

Startup

The Panel runs this command to start the server. It replaces each variable in the command with the value of that variable.

11 variables

Startup command

./iw4x-launcher --update && wine iw4x.exe -dedicated -stdout +set fs_game {{MOD_DIR}} +set sv_lanonly 0 +set net_port 28960 +exec server.cfg +set party_enable "0" +map_rotate

Dotted values come from the server settings. These values are examples.

  • This is a required setting and cannot be set to anonymous.

    STEAM_USERUsers can edit

    required|stringA value is required.

  • Steam User Password

    STEAM_PASSUsers can edit

    required|stringA value is required.

  • The ID corresponding to the game to download and run using SRCDS

    SRCDS_APPIDUsers can see

    string

  • Steam account auth code. Required if you have 2fa enabled

    STEAM_AUTHUsers can edit

    nullable|string|max:5

  • This is to auto-update the game server

    AUTO_UPDATEUsers can edit

    required|boolean

  • WINDOWS_INSTALLUsers cannot see

    required|string|max:20

  • WINETRICKS_RUNUsers cannot see

    required|string|max:20

  • WINEDEBUGUsers cannot see

    required|string|max:20

  • Name of the Dir where the mod are.

    MOD_DIRUsers can edit

    nullable|string

  • Sets the server hostname. SERVER COLORS ^1 = Red, ^2 = Green, ^3 = Yellow, ^4 = Blue, ^5 = Cyan, ^6 = Pink, ^7 = White, ^8 = Depends on the team colors playing., ^9 = Grey, ^0 = Black, ^: = Rainbow colors.

    SERVER_NAMEUsers can edit

    required|string|max:100

  • Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.

    SERVER_PASSWORDUsers can edit

    nullable|string|max:100

Wings

Stop command
^C (SIGINT)
Running when the console shows
Sending heartbeat to master

Files Wings edits

Wings sets these values in these files before each start.

userraw/server.cfg file

sv_hostname
sv_hostname "{{server.build.env.SERVER_NAME}}"
set g_password
set g_password "{{server.build.env.SERVER_PASSWORD}}"

Readme

IW4X

IW4x is a community-driven modification for Call of Duty Modern Warfare 2 (2009) that enhances the game with improved security, dedicated servers, and extensive modding capabilities. See https://iw4x.io/

Author & Contributers

Name Github Profile
brainshead https://github.com/brainshead

Server Ports

IW4X requires up to 1 ports

Port default
Game 28960

This can be changed to any port.

[!IMPORTANT]

Before installing IW4x, you need to obtain a legitimate copy of Call of Duty: Modern Warfare 2 (2009) from Steam.

  • This is required for installation of the server files.
  • Client also need need to use the IW4x files installed to connect to the server.

Files can be found on

[!CAUTION] [Only Steam is supported] IW4x does not support game copies from the Microsoft Store!

Install Notes

Memory 1GB and 20 GB storage is needed at least without modicification.

Settings

Most setting can be done by opening userraw/server.cfg and edit settings inside

Server hosting rules

Can be found at IW4X Docs.

Violation of any rule may result in your server being delisted.

If you are unsure about the rules or want to report a server please do so via our Discord server. Discord Server IW4X

Changes

  1. Updated IW4X Egg (#304)

    · brainshead · c7f093f

  2. Add: MW2 IW4X Egg

    · brainshead · a142dfe

All changes on GitHub

Problem with this egg?

Open an issue on GitHub. Include your Panel and Wings versions.

Install script 64 lines bash in ghcr.io/ptero-eggs/installers:debian Show
#!/bin/bash
# steamcmd Base Installation Script


## just in case someone removed the defaults.
if [ "${STEAM_USER}" == "" ]; then
    echo -e "steam user is not set.\n"
    echo -e "Using anonymous user.\n"
    STEAM_USER=anonymous
    STEAM_PASS=""
    STEAM_AUTH=""
else
    echo -e "user set to ${STEAM_USER}"
fi

## download and install steamcmd
cd /tmp
mkdir -p /mnt/server/steamcmd
curl -sSL -o steamcmd.tar.gz https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xzvf steamcmd.tar.gz -C /mnt/server/steamcmd
cd /mnt/server/steamcmd

# SteamCMD fails otherwise for some reason, even running as root.
# This is changed at the end of the install process anyways.
chown -R root:root /mnt
export HOME=/mnt/server

## install game using steamcmd
./steamcmd.sh +force_install_dir /mnt/server +login anonymous +app_update 1628350 validate +quit ## other flags may be needed depending on install. looking at you cs 1.6
./steamcmd.sh +force_install_dir /mnt/server +login anonymous  +app_update 1493710 validate +quit ## other flags may be needed depending on install. looking at you cs 1.6

./steamcmd.sh +force_install_dir /mnt/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) ${INSTALL_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6

## set up 32 bit libraries
mkdir -p /mnt/server/.steam/sdk32
cp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so

## set up 64 bit libraries
mkdir -p /mnt/server/.steam/sdk64
cp -v linux64/steamclient.so ../.steam/sdk64/steamclient.so



#Install IW4X launcher
cd /mnt/server
wget https://github.com/iw4x/launcher/releases/latest/download/iw4x-launcher-x86_64-unknown-linux-gnu.tar.gz
tar xfv iw4x-launcher-x86_64-unknown-linux-gnu.tar.gz
rm  iw4x-launcher-x86_64-unknown-linux-gnu.tar.gz
chmod +x iw4x-launcher

#Getting server configs
cd /mnt/server
wget -q https://github.com/iw4x/iw4-server-configs/archive/main.zip
unzip main.zip
mv -f iw4-server-configs-main/* . 
rmdir iw4-server-configs-main
rm main.zip
rm LICENSE
rm README.md

## install end
echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"