HLDS Guides for Newbies
Created by Vadakill

This guide will walk you through creating a steam account for your server, downloading the core files and then extracting and configuring your NS installation for basic operation.

For better or for worse steam is here and is here to stay. Once the WON servers go down for good there will be no other way to authenticate Half-life, Counter-Strike and Day of Defeat Retail users to play on your servers. As you may or may not know the auth server is important for two main reasons. First, it allows you to ban users who are disruptive to your environment, second when Valve Anti-Cheat (VAC) becomes available for NS it will allow you to use the updated modules to help fight cheating.
Downloading the Proper Files

You'll want to download the server files onto your machine so that they can be extracted and set up. There are a ton of mirror sites for these files which can be found at natural-selection.org. Download the following files into a local directory on your server machine:
hlds_updatetool.exe (581 KB) - Location: ftp://hlserver:[email protected]/win32/hlds_updatetool.exe
ns_dedicated_server_v32.zip (173 MB) - Location: Check http://www.unknownworlds.com/ns for download mirrors
Extracting the Base Server File

Now that you have all the files in your local directory needed for the install we need to go through extracting the dedicated server update tool. Find the hlds_updatetool.exe and double click it to launch the installer.
  1. Select a location to install the Dedicated server, I suggest C:\HLServer or an equivalent drive with at least 2 GB of space free. The installation will not take 2GB but it is a good idea to have lots of space for logfiles.
  2. Next you will need to set your region. Set this to whatever is most appropriate for your area.
  3. The next screen will have mailing list information that you can sign up for. This will help keep you informed when new HLDS releases are pending and if there are other issues discovered by your fellow administrators. You should note this information if you would like to join the list in the future.
  4. Hit next until you can finish the installation, you can choose to read the readme file if you like.

Now we'll need to create a steam account for the server, see the next section:
Setting up a HLDS Steam Account

Just like for the client, you will need to create an account for your server. We need to create this account using a DOS command line interface (CLI). I'll show you step by step what you need to do in order to get to the right place and what to type.
Open a DOS CLI Window:
  1. Click Start >> Run...
  2. Type in "cmd" (without quotes) and hit enter to get a DOS window.

Change to your HLServer directory:
Code cd c:\HLServer

Downloading, Extracting and Updating HLDS and NS

Next we will need to actually get the HLDS core files needed to run the server. In the same open command window you'll want to type the following line:
Code HldsUpdateTool.exe -command update -game valve -dir c:\HLServer

This could take 10 minutes or several hours depending on how much bandwidth you have and how busy the steam content servers are. Doing it this way ensures that you have the latest, most up-to-date server files.

Once it's done downloading you should then extract the NS files to the c:\HLServer directory and that's pretty much it, now you just need to do a little custom configuration.
Custom Configuration

You should now edit the server.cfg file, which will be in the "ns" folder, to replace the default hostname with one you want such as "Bobo's Love Shack". Use Notepad (do not use Word or Wordpad) to edit your files since it will not leave any metadata in there which might mess up how the server reads the configuration.

Normally you would need to enter a long string of commands in order to get a hlds server to start up. Typing these commands every time you wanted to restart the server would be a big pain so we try to automate the task somewhat with a batch file.
Batch files are simply files that run a series of commands in the order they are presented in the file. Before we can create a batch file we need to be able to change the file extension so it is recognized as a MS-DOS batch file.

To do this, open your c:\HLServer folder on your hard drive so that you can see the contents inside. Up on your menu bar click the "Tools" then click "Folder Options". Next click the "View" tab. Uncheck the checkbox next to "Hide extensions for known file types" and select "Show hidden files and folder" then click the OK button on the bottom.

Now you should see the contents of your HLServer folder again. Now, go to "File" menu, click "New" then "text document". It should create a new file called "New text document.txt" change this to "StartHLDS.bat". It might warn you about changing the file extension, just click okay to accept it.

Next thing you need to do is open the batch file so you can enter data into it. Since it is now an MS-DOS batch file, double clicking on it will run the batch file and give you nothing. We need to edit it, so we need to right-click the StartHLDS.bat file and select "Edit". If it asks what you want to edit it with, choose "NotePad".

Put this line in your file, (NOTE: This is all one line, it may word wrap in your file):
Code hlds.exe -game ns -maxplayers 12 +map ns_shiva -console +port 27015 +mapchangecfgfile "server.cfg" +exec banned.cfg

You should be able to start your server after this. Change directory back to you HLServer directory and double click on the "StartHLDS.bat" file, a black console window should appear.

If the server starts try typing "stat" in the console, it should feedback to you some server statistics like map, players, server build, etc...

That's it! You're Done! You should try to connect to your server to make sure that it can receive traffic, if possible look for it in a server browser to make sure everyone else can see it as well.