This guide covers how to set up and configure your IW4x (Call of Duty: Modern Warfare 2) dedicated server hosted with Legion Hosting. IW4x is a community-driven modification for CoD MW2 (2009) that adds dedicated server support, improved security, and modding capabilities. For admin commands and server management, see IW4x MW2 Server Admin Guide.
1. Accessing Your Server
- Log in to GPanel.
- Select your IW4x server from the server list.
- Your server IP and port are displayed on the Console tab. See How to Find Your Server IP and Port for details.
2. Startup Variables
Configure these settings from the Startup tab in GPanel:
| Variable | Env Name | Default | Description |
|---|---|---|---|
| Server Name | SERVER_NAME |
Pterodactyl IW4X | Server hostname shown in the server browser. Supports color codes (see below). |
| Server Password | SERVER_PASSWORD |
(empty) | Password to join the server. Leave blank for public access. |
| Mod Dir | MOD_DIR |
(empty) | Directory name of a mod to load (e.g. a custom mod folder). |
| Auto Update | AUTO_UPDATE |
1 | Auto-update the server on startup. 1 = on, 0 = off. |
Server Name Color Codes
IW4x supports color codes in the server name:
| Code | Color |
|---|---|
^1 | Red |
^2 | Green |
^3 | Yellow |
^4 | Blue |
^5 | Cyan |
^6 | Pink |
^7 | White |
^9 | Grey |
^0 | Black |
^: | Rainbow |
3. Configuration File
The main configuration file is userraw/server.cfg. The panel automatically manages the server hostname and password. You can add additional settings to this file.
sv_hostname "My IW4x Server"
set g_password ""
sv_hostname and g_password are managed by the panel startup variables. Additional server settings should be added below these lines in server.cfg.
4. Connecting to Your Server
- Install the IW4x client from iw4x.org. You need a copy of Call of Duty: Modern Warfare 2 (2009).
- Launch the IW4x client.
- Open the server browser and search for your server name.
- Alternatively, open the console (
~key) and type:connect [IP]:[PORT] - Enter the server password if one is set.
5. First-Time Setup Checklist
- Set a
SERVER_NAMEin the Startup tab (use color codes for style). - Optionally set a
SERVER_PASSWORDfor private matches. - Edit
userraw/server.cfgto configure game mode, map rotation, and other settings. - Start the server and wait for the
Sending heartbeat to mastermessage. - Connect with the IW4x client and verify everything works.
Related Articles
Need Help?
If you run into issues with your IW4x server, open a support ticket and include your server IP, a description of the problem, and any error messages from the GPanel console.