Natural Selection 2 Server Setup

Natural Selection 2 Server Setup

Logo Natural Selection 2 Transparent Background 1024x3491

Natural Selection 2 Server OS Supported

  • Windows
  • Linux*

Natural Selection 2 requires a ton of CPU power and does not support multithreading.  It is recommended that you overclock an I5 to 4.4Ghz in order to run a server with 24 players active on it.  RAM is not an issue and no matter the server size 2GB should be more then antiquate to run the server.  For a small 8 player server a processor clocked to 3.5Ghz should be fine.  DO NOT USE AN AMD PROCESSOR.  They do not do well and the server will not work.

For my second I used a 64 bit windows 8 OS.  It should work on any windows server OS or desktop OS as well.  I highly recommend using a server OS as the tools for controlling hardware reallocation for your NS2 server  are very useful.

  • Download – SteamCMD for Windows
  • Extract the contents to the folder that you want to run SteamCMD from.
  • A folder called C://steamcmd is recommended.
  • Your SteamCMD folder should only contain SteamCMD and not the Natural Selection 2 server files.
    • Create a new Steam account just for your dedicated server.
      • You do not have to purchase the Natural Selection 2 Client on this account.
      • You can use this account for multiple servers.
      • DO NOT use use your personal steam account as passwords are kept in plain text on the server.
    • Open a Command Prompt, cd to the folder where steamcmd.exe is located.
    • Run >steamcmd.exe
      • On the first run, it will download the latest version of itself

After the update you need to login with your steam account in order to download the NS2 server files.

  • login username password

If you have steamguard you will need the code that will be sent to your email next.

  • force_install_dir PATH

Set the path of where the install files should download to.

  • app_update 4940 validate

Will now start downloading the files.  Depending on connection this could take awhile.

How to Run the NS2 Server

Browse to the path that the file are located.

Create a shortcut to the server.exe file (right click, Shortcut)

Open the shortcut and change the code to what type of server you want

  • ex: Server.exe -name MYSERVER -map ns2 tram -limit 16

Now just allow ports 27015 and 27016 on your firewall.  If your server does not have a public IP make sure to port forward the correct ports from your router!

Ubuntu Dependencies (debian)

 32 bit: apt-get install speex:i386 libgtk2.0-0:i386

64 bit: apt-get install speex:i386 libgtk2.0-0:i386 lib32gcc1

Create A User to run the server

  • adduser ns2server

Set a directory to install the server.

  • cd /home/ns2server

Create a directory for steamCMD inside the set directory.

  • mkdir steamcmd
  • cd steamcmd

Download SteamCMD.

  • wget

Extract steamCMD.

  • tar -xvzf steamcmd_linux.tar.gz

Make a folder for the server files

  • mkdir /home/ns2server/serverfiles

Run the following command to download the server. You will need a Steam username and password to authenticate with steamCMD. make sure to change the username/password part of the command to your settings.

  • ./ +login username password +force_install_dir “/home/ns2server/serverfiles” +app_update 4940 validate +quit

Login to SteamCMD as stated above

Set the folder you want Natural Selection 2 to be installed.

  • force_install_dir /home/ns2server/serverfiles

Download the server files to the folder

  • app_update 4940 validate
Command Line Setting Configuration File Setting Values Description
-file N/A path Specifies a file to load command line options from
-ip IP Address Sets the IP that the server will listen on (omit if you do not know what this means)
-port integer Sets the port the server will run on. (Default: 27015)
NS2 also requires the next available port in order for master server communication to work
-limit integer Maximum number of players the server will allow (max is 24)
-password string Specifies a password for clients connecting to the server (omit to remove password protection)
-name string Specifies the server name to be shown in the server browser. Many server operators also include the core and clock speed in the name as it affects players’ performance in-game.
(e.g.’i7 4.4GHz’)
-modstorage path Specifies the directory where mods from the Steam Workshop will be downloaded and loaded from. If not set, defaults to “%APPDATA%\Natural Selection 2\Workshop”.
-config_path path Specifies the directory that will be mapped to config://, i.e. where your JSON configuration files are found. If not set, defaults to “%APPDATA%\Natural Selection 2\”.
-logdir path Specifies the directory for the server’s log.txt file. If not set, defaults to “%APPDATA%\Natural Selection 2\”.
-map map name (eg: ns2_mineshaft) Inital map that the server starts on
-mods List of mod ids This should be a list of space separated mod ids that are active on this server.
There is a command-line interface for this option. Please see Dedicated_Server_Usage.txt in your server directory.
As of B222, the Steam Account used no longer requires access to the NS2 Steam Workshop
-webadmin N/A  If specified, runs the built-in web interface.
Omit this option to disable
-webdomain “string” This string MUST be covered in double-quotes. Defines a web address to allow remote connections to the web interface from.
If not set, the web server will only accept connections from localhost.
-webport integer Set the port the web administration system should listen on. (Default: 80)
-webuser string Specifies the user name for logging into the web server (Single-user mode)
-webpassword string Specifies the password for logging into the web server (Single-user mode)
-webusers path Loads username/password data from the specified .htpasswd file (Multi-user mode)
-record N/A Unknown
-play N/A Unknown
-console N/A Displays the interactive console on startup. Press tilde key (~) to display console after grey window appears.
This is the only way to reach the console if you are using Wine on Linux to run the server.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.