Ok, this is where a lot of people get intimidated. Every other day I run into someone who is asking this question, and has little luck finding a simple answer. So I decided to do my own series of guides that would help people make better servers. First of all you need to get the ingredients.
First things first, you will need a copy of the game which would be the core of the server. If you have access to BitTorrent or are on a internet connection which disconnects often then you should download this torrent. What you require from this is the base game, plus the Add-on Pack. You do not need to download all of the files in the torrent.
Optionally (and I prefer this), if you have a fast internet connection, which would be 512k or greater, then you should download this utility, and follow these simple steps:
- Create a folder on your hard drive and rename it to anything you want, like "Counter-Strike Dedicated Server" or something.
- Extract the above RAR file anywhere on your computer and double click on the installer.exe included in it.
- When the installer asks for the installation directory, simply choose the folder you created in step 1.
- After a couple of moments, a console window will open up and it will start downloading the Half Life Server files and Counter Strike. It takes about 30 minutes to complete on a 1 Mbps connection.
- After the installation is complete, verify that the size of the folder you created is between 310-320 MB. If its lesser, than re-run the installer, it will download the remaining files.
Note: It usually takes twice to fully download.
- After the download is complete, you need to patch your server to work without steam. For this download this file. This is only required in case you want to run a non-steam server.
- Unzip the above file and place it in the Server's directory replacing the original files.
Getting the Game Online
No matter what method you followed from above, you now have a Half-Life Dedicated Server with Counter Strike ready to run on non-steam clients. However, it is configured to run on LAN right now instead of the Internet. To make it work online:
- Go to the installation directory, and open the cstrike folder.
- Look for a file called server.cfg and open it with any text editor like Notepad. This file contains all your server settings including the server variables (termed cvars onwards). So it is a good idea to tweak it.
- Replace all the text in it with the following code:
hostname "ACN-Clan.tk (Beta CS 1.6)"
I'll explain all the important cvars in a while, but for now just bear with me
- Goto your HLDS directory (Its the one you created initially, where you installed the server files) and right-click on the HLDS.exe. Select Create Shortcut and then open up the shortcut's properties. Click the Shortcut tab above.
- Now add the following at the end of the text in the Target box:
-console -game cstrike -ip localhost -port 27015 +exec server.cfg +maxplayers 4 +map de_dust2
For example, if you're HLDS is in G:\HLDS, then the field should be:
"G:\HLDS\hlds.exe" -console -game cstrike -ip localhost -port 27015 +exec server.cfg +maxplayers 4 +map de_dust2
- -console enables the console and starts the server.
- -game cstrike tells the HLDS to set the server type to Counter-Strike. This however could be any Half-Life MOD.
- localhost should be replaced by you're IP address. Its a good idea to have a Static IP for a dedicated server, or if you have access to a DNS and are registered then place the domain name their.
- -port is the default port for the server. Note that its a good practice to also forward that port to accept incoming connections.
- +exec server.cfg tells the HLDS to execute the server side file first. In this case, its the server.cfg configured earlier.
- +maxplayers 4 sets the maximum number of players allowed to 4. Its good practice to setup low number of players on test servers.
- +map de_dust2 tells the server to start dust2 map.
- After you are finished with this step, you can double click on the newly created shortcut to start your server. You can also add this shortcut to you're system startup to autmatically start up everytime your system reboots.
- Congrats. You're basic Internet enabled Counter-Strike dedicated server is now ready. Join the game now and frag
Also note that this is just a basic server (MetaMod, AdminMod and StatsMe are installed in the backend but we are not using them) without additional features. Do comment about any suggestions or difficulties you had doing this. Next, I would post how to setup AMX Mod X (The King of Half-Life Server Side Scripting), HL Guard, and other cool plug-ins. Hope all this could help.