Natural Selection 2 (NS2) is a multiplayer first-person shooter and real-time strategy game. The dedicated server component can be run as a Windows Service using FireDaemon Pro, which allows you to start the dedicated server automatically at boot prior to login, start multiple instances of the dedicated server and more. This HOWTO will show you how to set it up. You can also use FireDaemon Fusion to manage FireDaemon and other Windows services via a web browser.
Natural Selection 2 Dedicated Server (NS2DS) Setup Under FireDaemon Pro
First download and extract SteamCMD. The download is small (< 2 MB).
Download the NS2 server files via Valve’s content servers. First before you can download the files, go to the directory where you installed SteamCMD and create a shortcut to "SteamCMD.exe". Next edit the properties of the shortcut and in the target box, at the end of it (with a space before the following), put:
+login anonymous +force_install_dir "C:\NS2" +app_update 4920 validate +quit
C:\SteamCMD\steamcmd.exe +login anonymous +force_install_dir "C:\NS2" +app_update 4920 validate +quit
Now download the NS2 server files via Valve’s content servers. Click the shortcut you created and let it run. It might take a few hours to update everything. You should also stop your server and run the shortcut every week or so to grab the latest server updates.
Note: NS2 uses 3 configuration files to store its settings. You will need to run the server first before they are generated so continue on with the rest of this HOWTO for now. NS2 uses the JSON format for all of its config files; if the syntax isin't correct the server will not work properly. You can validate syntax with this tool.
Download and install FireDaemon Pro into the directory of your choice, typically C:\Program Files\FireDaemon.
Next start the FireDaemon GUI from the desktop shortcut. Click on the "Create a new service definition" button in the toolbar (or type Ctrl+N) and enter the information into the fields as you see below. Adjust the paths to suit your installation.
Executable: The path to your Server.exe file. For the purposes of this HOWTO, the path is C:\NS2\Server.exe.
Working Directory: The directory containing your Server.exe file. For the purposes of this HOWTO, the path is C:\NS2.
The most important field on the tab is the Parameters. The Parameters define the initial setup of your server.
Here’s the full parameter list you should have:
-name "My Server" -map ns2_docking -ip "18.104.22.168" -port 27015 -limit 24 -config_path "C:\NS2\config" -modstorage "C:\NS2\Mods" -logdir "C:\NS2\config\Logs" -webadmin -webuser "YOURUSERNAME" -webpassword "YOURPASSWORD"
- -name "My Server" Sets the name of your server.
- -map "ns2_docking" Loads the map.
- -ip "22.214.171.124" should be the IP of your computer (not 127.0.0.1, go here to get your IP). This command should never be removed.
- -port 27015 This is the default server port for NS2. Changing it is generally used when you host multiple servers (as each server has to use its own port when using the same IP). This command should never be removed. If you wish to query your server remotely through an application like HLSW, then you will want to use 27016 as the port (or +1 for whatever the server port is).
- -config_path "C:\NS2\config" By default NS2 stores all of its configs in your user directory. This can make configuration a pain as the directory isin't easy to find. Changing the config directory to a folder in your NS2 directory makes it easier to access.
- -modstorage "C:\NS2\Mods" By default NS2 stores all of its mods in your user directory. This can make configuration a pain as the directory isin't easy to find. Changing the mods directory to a folder in your NS2 directory makes it easier to access.
- -logdir "C:\NS2\config\Logs" By default NS2 stores all of its logs in your user directory. This can make configuration a pain as the directory isin't easy to find. Changing the logs directory to a folder in your NS2 directory makes it easier to access.
- -mods "" Loads steam workshop mods. See the end of this howto for information on how to configure this.
- -webadmin This parameter is optional. It enables the built-in web interface. If you do not want the web interface enabled, then omit this parameter and the next 2.
- -webuser "YOURUSERNAME" Set this to the username you want for the web interface.
- -webpassword "YOURPASSWORD" Set this to the password you want for the web interface.
Now click on the Settings tab. If you DON'T want to see your dedicated server running, uncheck the Interact with Desktop check box & select "Hidden" from the "Show Window" dropdown. You can optionally run NS2DS as the user you installed it as. In the Logon Account field type your username (eg. Administrator) and then enter the user's password twice in the Password and Confirm fields. You can change the Process Priority to allocate more CPU time to the dedicated server or specify which CPU or core the dedicated server will run on (in the case of multi-processor, hyperthreaded or multi-core CPUs).
Now click on the Lifecycle tab. Uncheck Graceful Shutdown as NS2DS doesn't respond to it.
Now click on the Install button to install and start NS2!
When you start your NS2 FireDaemon service for the first time, let it run for a few minutes and then stop it so you can edit the generated config files.
To use a mod you must know its mod ID. This is the hexadecimal representation of the mod's Steam Workshop ID. Look at the Steam Workshop URL of the mod you want to use and take note of the numbers at the end appearing after the equal symbol. Go here, enter the Workshop ID and click convert. Then enter the mod id into between the quotes in your paremeter list. For example, see this url:
http://steamcommunity.com/sharedfiles/filedetails/?id=117887554The Steam Workshop ID of the above URL is: 117887554
Converted into Hexadecimal, the above is: 706d242
So to use this in the -mods "" parameter you would use it like the following:
If you have two or more mods, it would look like this:
-mods "706d242 123abc 456def"
The mod ID is: 117887554
If you have more questions about server setup, see the official NS2 wiki here.