Post tutorial RSS Setting up a Server for WON2 (GoldSrc)

Setup a Half-Life or any other GoldSrc game/mod server on WON2.

Posted by on - Basic Server Tools

The next Step-by-step guide will help you to make a server for any supported game or mod ,This tutorial is very sensitive for any change done so Please do exactly what is said .

Note: If you're trying to create a server for a Standalone game like "Gunman chronicles" You can use your game "gamedir" folder example:rewolf for HLDS Instead of a Mod.

Minimum hardware requirements: 800 MHz AMD / Intel x86 processor with 256 MB system memory
Recommended hardware requirements: 1 GHz or faster AMD / Intel x86/x86-64 processor with 512 MB system memory. HLDS has minimal multithreading support, so running it on more than one core will most likely not improve (but neither decrease) performance.

1) First you will need to get the Half-Life base files. You can get these either from a retail CD or the standalone package available on the Internet.

Client CD: If you have a retail disc, install Half-Life or Counter-Strike Retail from CD.
Standalone package:If you have another game or Mod Download and install the Half-Life Dedicated Server standalone package in a folder of your choice. Don't install it inside your game folder or it will Crash .

2) In case you used a client CD to get the base files, follow the instructions below. If you used the standalone package, skip this step.

Client CD:
Half-Life users:
Download and install the Half-Life Full update (hl1110.exe).
Counter-Strike Retail users: Download and install the CS Retail update (CS 1.5 for Retail), cs1005.exe.

Standalone package users Skip this step.

Your server is now almost ready to go. However, you can only run a Half-Life game server right now. If you wish to host a server that runs Counter-Strike 1.5 or other mod, follow step 3 below. Otherwise, skip to step 4.

3) Now it's time to get the files for your mod

Client CD base files:
Half-Life and Counter-strike Retail: Download and install your Mod inside the game folder.
If you used Standalone package: Download and install your mod's package . Install it in the same folder as HLDS.

4) Download and install Half-Life Dedicated Server 2.

5) Follow the instructions included in the RAR file, with the exception of step 1:

In this step you are required to copy all files from either Half-Life or Counter-Strike Retail to a new place of your choice. This is true if you are using Half-Life or Counter-Strike Retail, so if you followed all steps for the 'Client CD' above.

However, if you have chosen to use the standalone package, you can directly install HLDS2 to the location where you have installed the standalone package.

NOTE: Be sure to read the instructions carefully. Many setups fail just because the installation notes were not carefully read. This includes for example, as stated in the instructions, that you should NOT install HLDS2 to your Half-Life or Counter-Strike Retail installation, should you be using one of these. This will result in a corrupted installation as HLDS2 uses some Steam DLLs. Like mentioned above, if you are using the standalone package, you can (and need to) install HLDS2 directly to the location where you installed it.

6) Open up the folder of the MOD you have chosen to run ('cstrike' in case of Counter-Strike) and locate the file server.cfg. Right-click on this item and choose 'Open'. If this file type wasn't previously assigned to any program, Windows will ask you what to do next. Make sure to choose 'Select a program from a list of installed programs', after which you select Notepad and click OK.

Notepad will now open server.cfg. In this file you will find (by default) only a small number of settings, including comments, which describe what each of these settings do.

Locate the line that starts with 'hostname'. Between the two double quotes (") you can enter the server's hostname as it will appear in the Server Browser list.

Next, move to the end of the document and add a new line starting with 'rcon_password'. Behind this line (seperated by a space) you need to enter the Remote Control (RCON) password you can use for remotely administrating the server. For example:

rcon_password santaclauserocks

The above line sets the RCON password to 'santaclauserocks'. You will need to supply this password whenever you want to administrate the server. Scroll down for the RCON Crash course .

7) (optional) If you wish your server to be only accessible by you and your clan mates, you can secure it by adding a server password, which needs to be supplied upon connecting to the server.

Adding the following line to server.cfg will enable the server password feature:

sv_password somepassword

..where 'somepassword' is a password of your choice, which you can pass on to your clan mates.

8) (optional) You may wish to extend your server's gameplay or administration features, both of which can be done by installing addons.

Further notes

An example command line that works with all HLDS versions:

-console -maxplayers 16 +map de_dust -port 27015 +sv_lan 1 -game cstrike

By making a shortcut to hlds.exe (right-click on the item and select "Create Shortcut") and adding the line above behind the executable name, you can start a dedicated server in console mode.

Note that at bare minimum the console, map, game and sv_lan parameters should be specified. Otherwise, the server will fail to launch - it will just show you a console window where it seemingly doesn't do anything. For more information about HLDS parameters, see the HLDS finetuning guide.

Linux based systems

This Linux guide only covers HLDS Older versions suffer from many security vulnerabilities. As such we do not recommend using them.

1) Get the following packages:
* HLDS Linux hlds_l_3111_full.bin
* Counter-Strike 1.5 or an other MOD of your choice
* HLDS Linux update: hlds_l_3111e_update.tar.gz

2) Extract the above files in the order they are listed. Customize the configs and install any addons if you wish to do so. If you don't know how to do this you can find the basics in the Linux CS Server How-To on Counter-Server. If they removed it use this copy archived here.

3) Replace /hlds_l/valve/valvecomm.lst with the WON2 listing patch (You'll notice the patch consists of a file named woncomm.lst, rename it to valvecomm.lst and overwrite the existing one in the 'valve' folder).

4) If you do not wish to add any anticheat addons, edit /hlds_l/cstrike/liblist.gam and change secure "1" to secure "0".

Note: As of 2008, the WON2 AntiCheat System (WAC) is no longer operational, so secure should always be set to 0. Failure to do so may significantly slow down HLDS while launching and might even prevent your server from operating.

Another good anticheat system is HLGuard.

We do not, however, recommend Cheating-Death. Cheating-Death does not officially support the WON(2)/Half-Life system anymore and as for the latest version it doesn't work at all server-side. Pre-4.30.x versions work with CS 1.5, however this make huge laggs occur both server and client side. Note: after a long period of inactivity UnitedAdmins has dropped support and development for Cheating-Death entirely.

While HLGuard (or any other anticheat system of your choice) will prevent cheating and auto-ban many cheaters to some extent, you should be aware that the best 'anticheat' is being around and banning cheaters manually on sight.

5) Create a file in /hlds_l/ called nowon.c with just one line: int NET_IsReservedAdr(){return 1;}

In the same directory, type these commands:
1. gcc -c nowon.c -o nowon.o
2. ld -shared -o nowon.o

Note: A number of users have reported that this method does not work on 64-bit installations, although only Fedora seems affected for now. Should you have problems getting this to work, you must force gcc to compile nowon.c as a 32-bit file, or consider installing a 32-bit version of your distro in a virtual machine or natively. You can also consider using method 2 from the WON2 Patch for Linux Servers guide in place of step 5 and 6.

6) Edit /hlds_l/hlds_run and under the first "export" line add this:

export LD_PRELOAD=/.../hlds_l/

Be sure to substitute the full path to your hlds_l directory in place of the "...".

7) Edit the script you use to start your server and add +sv_lan 1 to it.

8) Now you should have a working server. Unfortunately HLDS has an exploit that allows anyone to crash it. You may want to start your server anyway and try connecting so that you know it works, then shut it down and follow the rest of these steps to patch this hole in HLDS.

9) Download this file to your /hlds_l/ directory (Thanks Tomi).

10) In /hlds_l/ type the following command:

gcc -s -O3 -D_GNU_SOURCE -fPIC -shared -ldl -o hlds_20040707fix.c

11) Edit /hlds_l/hlds_run and change the "export" line you created in step 5 to this:

export LD_PRELOAD="/<strong>...</strong>/hlds_l/ /.../hlds_l/"

As before, be sure to substitute the full path to your hlds_l directory in place of both "...".

12) Your server is now working and slightly more secure.

Further notes

An example command line that works with all HLDS versions:

-maxplayers 16 +map de_dust -port 27015 +sv_lan 1 -game cstrike

Edit your startup script that refers to hlds_run and add the line above, while customizing it to your needs.

Note that at bare minimum the map, game and sv_lan parameters should be specified. Otherwise, the server will fail to launch. For more information about HLDS parameters, see the HLDS finetuning guide.

Supplement: RCON Crash Course

Remotely administrating your server can be very useful, such as for banning cheaters on sight or changing the running map.

To login while you are in-game, open up your console and type:

rcon_address serverip
rcon_port serverport
rcon_password rconpassword

rcon_address is the IP address of your server;
rcon_port is the port the game server is using (27015 by default);
rcon_password is the RCON password you set in server.cfg.

Entering the above commands each time you want to administrate your server in-game can be quite annoying. You can eliminate this problem by creating a config file inside the folder of the MOD you'll be playing (cstrike for example), after which you paste the aforementioned commands in this config file. Now you can execute this config file by just typing a single line in your console: exec logindetails.cfg (where logindetails.cfg is the name of your config file).

After logging in you may wish to type 'rcon test' to make sure you have logged in succesfully. If you have supplied an incorrect RCON password, the console will print 'Bad RCON password', otherwise it will return nothing.

Once you are logged in you can enter any commands you wish. Below is a short 'cheat sheet' for most common tasks.

Kicking a player:
rcon status (shows a list of players including their IP address)
rcon kick "playername" (these quotes are important, especially for names containing unusual characters)

Banning a player:
rcon status
rcon addip timelimit playerip (enter ban period in minutes and the IP of the player you wish to ban)

Switching maps:
rcon changelevel de_dust2 (where de_dust2 is the map of your choice you wish to switch to)

Enabling a server password:
rcon sv_password somepassword (this password needs to be supplied in order to be able to connect)

Note: A server password set this way will be disabled upon map change. To permanently enable a server password, see step 7 for Windows servers and step 2 for Linux servers.


I have to say, I've tried getting this to work on 64-bit Linux distro's (Slackware is my choice) and have had no luck. I suggest setting up a 32-bit Linux server for WON2.

Reply Good karma Bad karma+1 vote
lost_acs Author

Yeah, probably the 64bit files are not provided, you might want to ask at official forums and see if ben or anyone else still has 64bit files .

Reply Good karma+1 vote

is there any patch for cs 1.5 build 2615 or its the latest version? if it is where can i find it? sorry for bad english and thanks

Reply Good karma Bad karma+1 vote
lost_acs Author

Hi there, sorry i didn't notice your comment, I don't know if there is a patch for it but the version should be supported anyways just like any other GoldSrc game version, you should use the most used version dough, It's mentioned here + a link for it : , I Updated the dead links, I didn't realize they died till now .

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Related Games
Half-Life First Person Shooter