To host a Soldier of Fortune II server on Windows, copy a patched v1.03 install to the server, write a server.cfg, and start SoF2MP.exe with +set dedicated 2 +exec server.cfg. Open UDP port 20100 in the firewall and on your router. dedicated 2 makes the server announce itself to the master server, so players can find it in the server list and on SOF2MP.com.
What you need
- A Windows PC or VPS that stays on. SoF2 needs very little: one CPU core and a few hundred MB of memory are plenty for a 16-player server.
- A copy of the game, v1.03 (Gold), with the 1fx. client patch applied so it reports to the community master server.
- Upload speed: roughly 25–40 KB/s per player at broadband rates, so a 16-player server needs about 5 Mbit/s up.
- A public IP address and the ability to open a UDP port. A VPS is easiest. A home connection works if you can forward ports on your router.
Set up the server
- Copy the game folder to the server, for example
C:\SoF2Server\. You need the program and thebasefolder. Add a mod folder such asrocmodif you’ll run a mod. - Create
server.cfginbase(or in the mod’s folder). Our server.cfg guide has a complete, commented example. - Create a start file called
start-server.batin the game folder, with the command below. - Open UDP port 20100 in Windows Firewall, and forward it on your router if you’re at home.
- Run
start-server.batand join your server from another PC to test it.
The start command
@echo off
cd /d C:\SoF2Server
SoF2MP.exe +set dedicated 2 +set net_port 20100 +set fs_game rocmod +exec server.cfg
Leave out +set fs_game rocmod to run the plain game, or change it to your mod’s folder name.
| Option | What it does |
|---|---|
+set dedicated 2 |
Runs a dedicated internet server that reports to the master server. 1 is LAN only. |
+set net_port 20100 |
The UDP port. 20100 is SoF2’s standard port. Use 20101, 20102… for more servers on the same machine. |
+set fs_game rocmod |
Loads a mod from its folder. |
+exec server.cfg |
Runs your server settings, which should end by loading the first map. |
Open the port
In an administrator PowerShell window on the server:
New-NetFirewallRule -DisplayName "SoF2 server" -Direction Inbound -Protocol UDP -LocalPort 20100 -Action Allow
At home, also forward UDP 20100 on your router to the server PC’s local IP address. Your router’s manual explains how.
Keep it running
Restart on crash: wrap the command in a loop in start-server.bat, so the server comes back by itself:
@echo off
cd /d C:\SoF2Server
:loop
SoF2MP.exe +set dedicated 2 +set net_port 20100 +set fs_game rocmod +exec server.cfg
timeout /t 5
goto loop
- Start with Windows: use Task Scheduler with “At startup” to run
start-server.bat, so the server comes back after updates and reboots. - Remote admin: set an rcon password and manage the server from in game. See admin commands.
Get listed
With dedicated 2 the server announces itself to the master server within a few minutes. SOF2MP.com reads the same list and adds the server to the live server list automatically. If it doesn’t appear, see how to get your server listed.
Frequently asked questions
What port does a SoF2 server use?
UDP 20100 by default, set with net_port.
Can I play on the same PC that runs the server?
Yes. Start the dedicated server, then start the game normally and connect to localhost:20100.
How many players can a SoF2 server hold?
Set with sv_maxclients. Public servers usually allow 16 to 24. The game’s default is 8.
