Setting up a server at UNIX/LINUX

Started by acidburn
01/02/2006 12:51
Page 1 of 1
acidburn01/02/2006 12:51

Since a lot of members wanted to setup a server, I decided to write a "guide" about how it's done. I tried this on my laptop running Ubuntu Linux 5.10. Good luck!

0.) Log in as ROOT

1.) Create a folder /usr/steam/hlds

Open a terminal window and enter:

mkdir /usr/steam/hlds


2.) Download the HLDS update tool

Open a browser and go to:

http://www.steampowered.com/?area=getsteamnow

on the right hand side you should see a DIV
with the name "Dedicated Server". There you
have to click on "Linux HLDS Update Tool".

Download it into the folder you created above.


3.) Make the file executable and execute it

cd /usr/steam/hlds
chmod a+x hldsupdatetool.bin
./hldsupdatetool.bin


You will be presented the EULA (end user
license agreement).

Type "yes" when the scrolling of the text
finished.

Now the updater is extracted and ready to use.


4.) Download all the CSTRIKE server files

./server -command update -game cstrike -dir /usr/steam/hlds

Now the update tool should download the latest
server files for your HLDS. This covers all maps,
player models, executables and everything else
needed. This process can take up to several
hours depending on your internet connection and
the usage of the steam network.


5.) Configuring your server

Now among a lot of files you should have a folder
/usr/steam/hlds/cstrike. Go there:

cd cstrike

Open the server configuration file with an editor.
The file is called "server.cfg".

Add the following lines:

hostname ""
hostport ""

for example:

hostname "## My supidupi CS 1.6 server ##"
hostport "27015"

If similar lines were available just alter them.

Following configuration files are available:

The autoexec.cfg executes only once when running a server,
when the server is first initialized.

The server.cfg, on the other hand, executes every time the
map changes.

The motd.txt file contains the text that people will see when
the map changes. The format of this file is HTML.

Last is the mapcycle.txt. All of the maps you want rotated on
your server should be placed in this file. Use the mapname
without the ".bsp" extension.


6.) Gameplay configuration

You will probably have to configure a lot if you want
to set up a great server. Lots of commands (by no means
all) can be found on this damn old (never updated) site:

http://server.counter-strike.net/server.php?cmd=cmdall

The best thing to do, is to add gameplay config commands
into a seperate ".cfg" file and load them when needed.


7.) Security issues

So far we worked on our server being the root user.
But we should not run anything that can be accessed
from the internet as root. Lets give our HLDS to
another user :-)

cd /usr/steam
chown -R hlds


Moreover, whenever you run the server; login as
the and run the server
being that user.


8.) Activateing port forwarding

You only have to do this, if your server is running
on a computer that is not directly connected to the
internet. In most cases you will have to do this.

Since people from outside (ther internet) can't see
your LAN (private IP addresses like 192.168.X.Y), just
your public IP address and the server is not running
on the pc with that IP address, you will have to
configure that people from outside, who are connecting
to your IP address and on the particular port on which
the HLDS is running, are automatically forwarded to
the pc with the HLDS running. I hope it's clear :-)

This is done on your router, wlan router or any
other device you use to connect your network to
the internet. You will have to add entries for the
following ports into the port forwarding table:

TCP 7002 out
TCP 5273 out
UDP 27010 out
UDP 27012 in and out
UDP 27015 in (if your server runs on this port)


9.) Running your server

cd /usr/steam/hlds
./hlds_run -game cstrike


When you do this, your server should start. Among
the lines displayed you should see this:

"STEAM Auth Server"

If you do, congratulations your server is running and
authenticated itself in the steam network. Others from
around the world should see it in their search results.

If you do not, something went wrong. :-( Make sure you
have no additional firewall blocking the ports above.


10.) How to use the server

On the server you can now enter commands. There is
no need to use RCON. You are on the server.

Important commands are:

status
users
user <# from users>

But remember that most of the commands are available here:

http://server.counter-strike.net/server.php?cmd=cmdall

Or you can use:

cmdlist

This command displays all available commands.


11.) Improving download performance for players

Besides that you do not run any other application on the server, you can improve the download speed of maps and other files from the server by adding all the files (maps, sounds, images and so on) to a web server. This can even be an another computer on the internet!

If you use this feature, you will also be able to add a custom banner in the download dialog, that will be displayed to players whenever they download new files when connecting to your server.

Read more here:

http://serverop.j-w-m.de/div/sv_downloadurl.TXT

If you choose to put the web server on the game server; make sure that you also enable port forwarding for the port on which the web server (e.g. apache) is running.

# GL & HF # :D



[ Edited ]

faker mapper08/09/2006 17:49

made that one sticky too. good job again.

Shew22/11/2007 15:56

I've the server up running, but the addons won't work =/ how do I solve it?

edit: Getting this message:
Console initialized.
scandir failed:/home/lla/program/steam/./platform/SAVE
Protocol version 47
Exe version 1.1.2.5/Stdio (cstrike)
Exe build: 20:02:49 Oct 24 2006 (3651)
STEAM Auth Server
couldn't exec language.cfg
Server IP address 127.0.1.1:27015
Host_Error: Couldn't get DLL API from XÒ9µ!
FATAL ERROR (shutting down): Host_Error: Couldn't get DLL API from XÒ9µ!

[ Edited 11/22/07 - 16:29:31 ]

Hardrave ;>04/07/2010 22:35

I have two ruters!
"To get to work i most open booth?"
plz pm! :)

Page 1 of 1

Please log in to post replies.