So.. I dont see much point in running a dedicated server on a system that I need to boot every now and then (talking about windows here) and I've been running Left 4 Dead, CS, DoD etc servers on my linux box for a while now but I havent run any Unreal Engine servers. So I was thinking if we as a community could write up a tutorial of how to install, setup and run a Linux Dedicated Server of Killing Floor. Now I know how to operate the hldsupdatetool so I'll start up by writing a tutorial on how to install the server but since I dont even know myself how to setup and run it I'd like you my fellow server admins to help out in writing this tutorial.
So here goes:
UPDATED: May 18th -> v0.5
UPDATED: May 17th -> v0.41
UPDATED: May 16th -> v0.4
UPDATED: May 16th -> v0.3
UPDATED: May 15th -> v0.2
Original post: May 15th
PART 1: Installing the server
The info below pertaining to hldsupdate is obsolete as of Killing Floor update 1036. Please refer to this thread for the new method of using SteamCMD.
Hosting a Dedicated Server with SteamCMD
PART 2: The quick and dirty start:
This part is for all of you who dont care much about how "well" and organised the server is setup. This part will get you started the quick way.
Like many others I couldnt locate the KillingFloor.ini from the <server>/system directory but it actually is under your home directory in a hidden folder ~/.killingfloor/System (see http://forums.tripwireinteractive.com/showthread.php?t=30916 for more information)
NOTE! The KillingFloor.ini will not be created before you start the server at least one time!
1. Before starting the server fire up your web browser and allready put in the addressbar the address to your server and port 8075 like this but DONT press enter yet:
http://12.345.67.89:8075 (the address here is NOT the one for you to use)
2. Navigate into the kfserver/system directory and run:
3. As soon as the server has started go to your webbrowser and hit enter on the address you put in earlier. It will now ask for username and password and enter admin on both as provided earlier. Now in the WedAdmin interface navigate to "Defaults" on the top bar and click "Server" on the left sidemenu to setup the server Admin name and Admin password. Make them up and then click "Accept". After this jump back to the server window and stop it by pressing ctrl-c. Restart the server with just:
and relogin with the Admin name and password you put in the "Server" setup dialog. Now you can configure the server as you like from the WebAdmin.
Check PART 4: Post-installation tips for some tips on running the server afterwards.
There are many posts on this forum about setting up the server configurations so I wont go into these for now. (See links at the bottom of this post.)
PART 3: Running the server(s)
Okay here is a bit more complex but more organised way of running a server or if you plan on running multiple instances of KF Server on your server this will help the administrating.
First of all I know there is a few different kinds of ways of running multiple servers. One is to install every instance in its own directory. The other is using multiple KillingFloor<insert number>.ini files. I will try to make this tutorial as general as possible and I hope you can use your own brains to apply the information provided here to your own needs. But let us start!
1. After installing the server you might notice that there is something missing that we have allready talked about, the KillingFloor.ini. You can either run the server once (HOLD ON, dont do it yet! Use the code below to start) or you can copy the default.ini as KillingFloor.ini:
NOTE!!!!
Never EVER edit default.ini!!!!!!
http://forums.tripwireinteractive.com/showthread.php?t=30640
a) Copying default.ini as KillingFloor.ini (I have not tested this method myself)
b) Running the server once
After the server has started just hit CTRL-C to shut it down.
Now it all comes down to choices. Rather than trying to write every possible solution for your needs, I'm going to try to explain the switches and choices about how you decide to run your servers.
First of all, the -nohomedir switch makes the server use the .ini files in the same directory as you are running it from. This is handy when you have installed just one set of binaries for the server but still want to run multiple instances, so you make KillingFloor1.ini for server 1, KillingFloor2.ini for server 2 etc.
You might also want to have a different set of binaries for each server (kfserver1 & kfserver2 directories for example) but then using the -nohomedir switch might be a bit troublesome since all the .ini files will be in different directories. If you use different folders for different server instances, leave out the -nohomedir switch.
Summary:
a) 1 binary, many servers, use -nohomedir, *.ini are in kfserver/system
b) many binaries (directories), many servers, DONT use -nohomedir, *.ini are in ~/.killingfloor/System
c) just one server, choose whichever way you want and find better for your needs
2. Lets edit the KillingFloor.ini next with your favourite text editor:
NOTE!!! From now on the .ini file and the location is related to the choice you made on step 1. If setting up multiple server you need to edit each .ini separately as each server instance needs its own .ini file.
Okay now some things you WANT to edit:
a) under [Engine.GameReplicationInfo] add an AdminName so you can login from the WebAdmin and change ServerName so you can find it in the serverbrowser!
b) under [Engine.AccessControl] add an AdminPassword (this will be always saved as plaintext)
c) under [UWeb.WebServer] make sure that bEnabled=True if you want to use the WebAdmin to control the server
These options should suffice to run a single instance of the server. If you are setting up multiple servers read on, else you can skip to step 3.
For setting up multiple servers you need to have a unique port for each instance of course. The default port for KF server is 7707 but that is not the only port (see http://forums.tripwireinteractive.com/showthread.php?t=30634). But as explained in that post, the default port controls all the other ports (except WebAdmin):
7707 UDP/IP (Game Port)
7708 UDP/IP (Query Port)
7717 UDP/IP (GameSpy Query Port)
28852 TCP/IP and UDP (Allows your Server to Connect to the Master Server Browser)
8075 TCP/IP (Port set via ListenPort that your WebAdmin will run on)
20560 UDP/IP (Steam Port)
A good way to separate different server instances is to use +100 for each server (server 1 = default 7707, server 2 = 7807 etc). This will also affect all the other ports like this:
Server 1 is at the default configuration above (7707 etc).
Server 2 would be:
7807 UDP/IP (Game Port)
7808 UDP/IP (Query Port)
7817 UDP/IP (GameSpy Query Port)
28952 TCP/IP and UDP (Allows your Server to Connect to the Master Server Browser)
8075 TCP/IP (Port set via ListenPort that your WebAdmin will run on)
20660 UDP/IP (Steam Port)
(Notice the WebAdmin port staying the same, I left it on purpose because it is a separate config value)
d) in the beginning of KillingFloor.ini under edit Port setting for the Game por...ripwireinteractive.com/showthread.php?t=31044
Quick startup script(start/stop/restart)... Hope this is of any use.
Make sure to change the GAME_PATH
If this script doesnt work, contact LeAdGuEsT.
TIP IV: Terrorkarottes very advanced startup scripts
Terrorkarotte has made some very advanced fine tuning for running your servers (not for beginners). You can find them a few posts downward: http://forums.tripwireinteractive.com/showpost.php?p=438068&postcount=4
If any of these scripts doesnt work, contact Terrorkarotte.
TIP V: Server logs
If you are running multiple servers you might want to specify exactly where and what name the log files should be. You can do that by adding log=<unique name>.log in the startup line. For example you might want to have a logs directory in the ~/.killingfloor/System where you put all the logs of your servers then do this:
then navigate into the kfserver/system directory and run:
this will create a server2.log in the logs directory.
Changelog:
LINKS
arramus' dedicated server tutorial for windows(also with lots of configuration info):
http://forums.tripwireinteractive.com/showthread.php?t=30579
LeAdGuEsT's excellent startupscript for linux:
http://forums.tripwireinteractive.com/showthread.php?t=31044
Zetsumeis How to enable high quality audio codec for dedicated servers:
http://forums.tripwireinteractive.com/showthread.php?t=31589
Thank you for the following people for helping with this tutorial:
Tagert
arramus
LeAdGuEsT
Terrorkarotte
Vociferous
PLEASE help me write this tutorial! If you find mistakes in my tutorial or if you have suggestions be free to tell me about them and I will correct it.
So here goes:
UPDATED: May 18th -> v0.5
UPDATED: May 17th -> v0.41
UPDATED: May 16th -> v0.4
UPDATED: May 16th -> v0.3
UPDATED: May 15th -> v0.2
Original post: May 15th
PART 1: Installing the server
The info below pertaining to hldsupdate is obsolete as of Killing Floor update 1036. Please refer to this thread for the new method of using SteamCMD.
Hosting a Dedicated Server with SteamCMD
Spoiler!
1. First thing
Spoiler!
to do is make a directory for the server to run in. That is fairly simple:
I used kfserver as the name myself but you are free to pick any name you want.
2. Next thing to do is navigate into that directory and download the hldsupdatetool.bin from Steam:
I used wget here but again you are free to use whatever you need to do to download the file.
3. Next we need to setup the file permissions so we can run the file:
4. Then we run the updatetool and after you accept the license agreement you run the steamclient to update it for the latest:
NOTE: You might need to run the ./steam command for a few times until it has fully updated itself. You will know that it is updated to the latest if after running ./steam it will show all the commands.
5. Now we get to the part where we install the kfserver itself:
This command is fairly obvious in what it does; it will install Killing Floor to the current directory. You can choose another directory for the -dir if you wish.
After running this program the steam client will download the server files to the specified location and it might take a while depending on your internet connection speed.
6. Confirm the server is up-to-date by running the last command again:
NOTE: As with the steamclient itself you might have to do this a couple of times. Repeat the command for as long as the client says that the server is running the latest version.
Code:
$ mkdir kfserver
2. Next thing to do is navigate into that directory and download the hldsupdatetool.bin from Steam:
Code:
$ cd kfserver
[kfserver]$ wget [URL]http://storefront.steampowered.com/download/hldsupdatetool.bin[/URL]
3. Next we need to setup the file permissions so we can run the file:
Code:
[kfserver]$ chmod +x hldsupdatetool.bin
Code:
[kfserver]$ ./hldsuptatetool.bin
<insert license agreement here and say "yes">
[kfserver]$ ./steam
5. Now we get to the part where we install the kfserver itself:
Code:
[kfserver]$ ./steam -command update -game killingfloor -dir .
After running this program the steam client will download the server files to the specified location and it might take a while depending on your internet connection speed.
6. Confirm the server is up-to-date by running the last command again:
Code:
[kfserver]$ ./steam -command update -game killingfloor -dir .
PART 2: The quick and dirty start:
This part is for all of you who dont care much about how "well" and organised the server is setup. This part will get you started the quick way.
Like many others I couldnt locate the KillingFloor.ini from the <server>/system directory but it actually is under your home directory in a hidden folder ~/.killingfloor/System (see http://forums.tripwireinteractive.com/showthread.php?t=30916 for more information)
NOTE! The KillingFloor.ini will not be created before you start the server at least one time!
1. Before starting the server fire up your web browser and allready put in the addressbar the address to your server and port 8075 like this but DONT press enter yet:
http://12.345.67.89:8075 (the address here is NOT the one for you to use)
2. Navigate into the kfserver/system directory and run:
Code:
[system]$ ./ucc-bin server KF-BioticsLab.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6?AdminName=admin?AdminPassword=admin
Code:
[system]$ ./ucc-bin server KF-BioticsLab.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6
Check PART 4: Post-installation tips for some tips on running the server afterwards.
There are many posts on this forum about setting up the server configurations so I wont go into these for now. (See links at the bottom of this post.)
PART 3: Running the server(s)
Okay here is a bit more complex but more organised way of running a server or if you plan on running multiple instances of KF Server on your server this will help the administrating.
First of all I know there is a few different kinds of ways of running multiple servers. One is to install every instance in its own directory. The other is using multiple KillingFloor<insert number>.ini files. I will try to make this tutorial as general as possible and I hope you can use your own brains to apply the information provided here to your own needs. But let us start!
1. After installing the server you might notice that there is something missing that we have allready talked about, the KillingFloor.ini. You can either run the server once (HOLD ON, dont do it yet! Use the code below to start) or you can copy the default.ini as KillingFloor.ini:
NOTE!!!!
Never EVER edit default.ini!!!!!!
http://forums.tripwireinteractive.com/showthread.php?t=30640
a) Copying default.ini as KillingFloor.ini (I have not tested this method myself)
Code:
[system]$ cp default.ini KillingFloor.ini
Code:
[system]$ ./ucc-bin server KF-BioticsLab.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6 -nohomedir
Now it all comes down to choices. Rather than trying to write every possible solution for your needs, I'm going to try to explain the switches and choices about how you decide to run your servers.
First of all, the -nohomedir switch makes the server use the .ini files in the same directory as you are running it from. This is handy when you have installed just one set of binaries for the server but still want to run multiple instances, so you make KillingFloor1.ini for server 1, KillingFloor2.ini for server 2 etc.
You might also want to have a different set of binaries for each server (kfserver1 & kfserver2 directories for example) but then using the -nohomedir switch might be a bit troublesome since all the .ini files will be in different directories. If you use different folders for different server instances, leave out the -nohomedir switch.
Summary:
a) 1 binary, many servers, use -nohomedir, *.ini are in kfserver/system
b) many binaries (directories), many servers, DONT use -nohomedir, *.ini are in ~/.killingfloor/System
c) just one server, choose whichever way you want and find better for your needs
2. Lets edit the KillingFloor.ini next with your favourite text editor:
NOTE!!! From now on the .ini file and the location is related to the choice you made on step 1. If setting up multiple server you need to edit each .ini separately as each server instance needs its own .ini file.
Code:
[system]$ nano KillingFloor.ini
a) under [Engine.GameReplicationInfo] add an AdminName so you can login from the WebAdmin and change ServerName so you can find it in the serverbrowser!
b) under [Engine.AccessControl] add an AdminPassword (this will be always saved as plaintext)
c) under [UWeb.WebServer] make sure that bEnabled=True if you want to use the WebAdmin to control the server
These options should suffice to run a single instance of the server. If you are setting up multiple servers read on, else you can skip to step 3.
For setting up multiple servers you need to have a unique port for each instance of course. The default port for KF server is 7707 but that is not the only port (see http://forums.tripwireinteractive.com/showthread.php?t=30634). But as explained in that post, the default port controls all the other ports (except WebAdmin):
7707 UDP/IP (Game Port)
7708 UDP/IP (Query Port)
7717 UDP/IP (GameSpy Query Port)
28852 TCP/IP and UDP (Allows your Server to Connect to the Master Server Browser)
8075 TCP/IP (Port set via ListenPort that your WebAdmin will run on)
20560 UDP/IP (Steam Port)
A good way to separate different server instances is to use +100 for each server (server 1 = default 7707, server 2 = 7807 etc). This will also affect all the other ports like this:
Server 1 is at the default configuration above (7707 etc).
Server 2 would be:
7807 UDP/IP (Game Port)
7808 UDP/IP (Query Port)
7817 UDP/IP (GameSpy Query Port)
28952 TCP/IP and UDP (Allows your Server to Connect to the Master Server Browser)
8075 TCP/IP (Port set via ListenPort that your WebAdmin will run on)
20660 UDP/IP (Steam Port)
(Notice the WebAdmin port staying the same, I left it on purpose because it is a separate config value)
d) in the beginning of KillingFloor.ini under edit Port setting for the Game por...ripwireinteractive.com/showthread.php?t=31044
Quick startup script(start/stop/restart)... Hope this is of any use.
Make sure to change the GAME_PATH
Code:
#!/bin/bash
#
# Init file for Killing Floor server
#
# chkconfig: 35 90 12
# description: Killing Floor
#
# source function library
. /etc/rc.d/init.d/functions
SCREEN_NAME=killing-floor
GAME_PATH=//srcds_l/killingfloor/system
start()
{
cd $GAME_PATH && /usr/bin/screen -A -m -d -S $SCREEN_NAME ./ucc-bin server KF-BioticsLab.rom?game=KFmod.KFGameType?VACSecure=true?MaxPlayers=6
}
stop()
{
PID=`ps fax | grep $SCREEN_NAME | grep SCREEN | awk '{ print $1 }'`
kill $PID
}
restart()
{
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
TIP IV: Terrorkarottes very advanced startup scripts
Terrorkarotte has made some very advanced fine tuning for running your servers (not for beginners). You can find them a few posts downward: http://forums.tripwireinteractive.com/showpost.php?p=438068&postcount=4
If any of these scripts doesnt work, contact Terrorkarotte.
TIP V: Server logs
If you are running multiple servers you might want to specify exactly where and what name the log files should be. You can do that by adding log=<unique name>.log in the startup line. For example you might want to have a logs directory in the ~/.killingfloor/System where you put all the logs of your servers then do this:
Code:
mkdir ~/.killingfloor/System/logs
Code:
./ucc-bin server KF-BioticsLab.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6 ini=KillingFloor2.ini log=logs/server2.log
Changelog:
Code:
v0.5
-Rewrote and renamed parts 2 & 3
-Added the actual script from LeAdGuEsT and a direct link Terrorkarottes advanced scripts to the first post
-Added a tip about logging
-A touch of color ;)
v0.41, May 17th 2009
-Added mention of Terrorkarottes scripts
v0.4, May 16th 2009
-Added post installation TIP II
-Added link to LeAdGuEsT's startup script
v0.3, May 16th 2009
-Added the Links section
v0.2, May 15th 2009
-Wrote parts 2 and 3 to get a quick start
-Added Part 4 for tips
Original post, May 15th 2009
arramus' dedicated server tutorial for windows(also with lots of configuration info):
http://forums.tripwireinteractive.com/showthread.php?t=30579
LeAdGuEsT's excellent startupscript for linux:
http://forums.tripwireinteractive.com/showthread.php?t=31044
Zetsumeis How to enable high quality audio codec for dedicated servers:
http://forums.tripwireinteractive.com/showthread.php?t=31589
Thank you for the following people for helping with this tutorial:
Tagert
arramus
LeAdGuEsT
Terrorkarotte
Vociferous
PLEASE help me write this tutorial! If you find mistakes in my tutorial or if you have suggestions be free to tell me about them and I will correct it.
Last edited by a moderator: