This document explains how to install, configure and maintain servers for various popular multiplayer games.
</para>
</abstract>
</articleinfo>
<sect1 id="intro">
<title>Introduction</title>
<para>
This document describes how to install, configure and maintain dedicated servers for various popular multiplayer games, such as the Quake series, Half-Life/Counter-Strike and other first-person shooters. Linux makes a great operating system for game servers because of its stability and speed (not to mention it's Free).
</para>
<sect2 id="copyright">
<title>Copyright and License</title>
<para>
This document is (c) 2001-2002 Anders Jensen-Urstad. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at <ulink url="http://www.gnu.org/copyleft/fdl.html">http://www.gnu.org/copyleft/fdl.html</ulink>.
</para>
</sect2>
<sect2 id="history">
<title>History</title>
<para>
I wrote this document because I couldn't find any decent documents covering more than one game. Wading through piles of readmes, guides, howtos and webpages can be quite tedious.
</para>
<para>
<revhistory>
<revision>
<revnumber>1.0</revnumber>
<date>2002-12-16</date>
<authorinitials>aju</authorinitials>
<revremark>
Added KTeams Pro to QW. Updated most version numbers and links. Removed the actual GFDL from the document. Many minor changes.
</revremark>
</revision>
<revision>
<revnumber>0.99</revnumber>
<date>2001-07-08</date>
<authorinitials>aju</authorinitials>
<revremark>
Changed license, minor fixes.
</revremark>
</revision>
<revision>
<revnumber>0.23</revnumber>
<date>2001-03-03</date>
<authorinitials>aju</authorinitials>
<revremark>
Revised and changed Half-Life/Counter-Strike.
</revremark>
</revision>
<revision>
<revnumber>0.22</revnumber>
<date>2001-01-28</date>
<authorinitials>aju</authorinitials>
<revremark>
Added Rocket Arena 3 and Alliance to Quake3.
</revremark>
</revision>
<revision>
<revnumber>0.22</revnumber>
<date>2001-01-26</date>
<authorinitials>aju</authorinitials>
<revremark>
Added Security and permissions, revised QuakeWorld; added QuakeForge. Revised LMCTF. Added Lithium II, L-Fire DM and L-Fire CTF. Revised Q2Admin.
</revremark>
</revision>
<revision>
<revnumber>0.21</revnumber>
<date>2001-01-15</date>
<authorinitials>aju</authorinitials>
<revremark>
Updated Half-Life/Counter-Strike. Added Rocket Arena to QuakeWorld.
</revremark>
</revision>
<revision>
<revnumber>0.20</revnumber>
<date>2001-01-14</date>
<authorinitials>aju</authorinitials>
<revremark>
First draft.
</revremark>
</revision>
</revhistory>
</para>
</sect2>
<sect2 id="newversions">
<title>New versions</title>
<para>
The newest version of this document can be found at its homepage <ulink url="http://x.unix.se/howto/">http://x.unix.se/howto/</ulink> (both HTML and its SGML source).
Other versions may be found in different formats at the <ulink url="http://www.tldp.org/">Linux Documentation Project</ulink>.
</para>
</sect2>
<sect2 id="credits">
<title>Credits</title>
<para>
I've gathered information from lots and lots of different READMEs, HOWTOs, web pages, and of course personal experience.
The Unreal Tournament section was written by Knight Walker <email>kwalker@aros.net</email>.
</para>
<para>
<itemizedlist>
<listitem>
<para>
Christer <email>vendor@nfn.net</email> helped with some parts about QuakeWorld.
</para>
</listitem>
<listitem>
<para>
The <ulink url="http://www.tldp.org/HOWTO/Quake-HOWTO.html">Quake-HOWTO</ulink> by Bob Zimbinski <email>bobz@mr.net</email> gave info about various things.
</para>
</listitem>
<listitem>
<para>
The <ulink url="http://www.bluesnews.com/faqs/q2s-faq.html">Q2 Server FAQ</ulink>.
id Software for making the best multiplayer games.
</para>
</listitem>
<listitem>
<para>
Dave "Zoid" Kirsch for making Threewave CTF for all the Quake games and for the Linux ports!
</para>
</listitem>
<listitem>
<para>
Loki Entertainment Software for their work on Quake3 and for everything they contributed to the Linux and open-source community.
</para>
</listitem>
</itemizedlist>
</para>
</sect2>
<sect2 id="feedback">
<title>Feedback</title>
<para>
If you have any questions, comments, suggestions, corrections or whatever, please mail them to <email>anders@unix.se</email>.
</para>
</sect2>
</sect1>
<sect1 id="basics">
<title>Basics</title>
<para>
Game servers can consume a lot of CPU and bandwidth (depending on the game and the number of connected players). If you don't own the machine and want to run a server from your account, ask the system administrator first.
</para>
<sect2 id="permissions">
<title>Security and permissions</title>
<para>
All dedicated servers are strongly recommended to be run from another user than root. I recommend that you create a new user that handles all the game servers. You may not have permission to create certain directories mentioned in this document as a normal user, for example <filename>/usr/local/games/quake3</filename>. If so, create it as root and then <literal>chown user:group /usr/local/games/quake</literal>, where user is your username and group your group, or simply create it in your home directory.
</para>
</sect2>
<sect2 id="keeprunning">
<title>Keeping the server running</title>
<para>If your game server crashes, a shell script like the one below might come in handy so you won't have to restart it manually. It can easily be modified for whatever server(s) you're running.
Put this in crontab (crontab -e). It will execute sv_up.sh (the shell script above) every 10 minutes and its output is sent to /dev/null (in other words, it disappears instead of being mailed to you).
</para>
</sect2>
</sect1>
<sect1 id="quakeworld">
<title>QuakeWorld</title>
<para>
QuakeWorld is a multiplayer-only version of Quake with optimized network code. id Software released the source code for Quake/QuakeWorld in 1999, spawning a number of projects set out to improve, optimize and add more features to the code and make it more secure. <ulink url="http://www.quakeforge.net">QuakeForge</ulink> is quite well-developed on the client side, but mvdsv (part of the <ulink url="http://qwex.does.it">qwextended</ulink> project) seems to be the most popular server in the QW community. It's famous for its ability to record demos from each player's POV (Point of View) and store them for retrieval by the players.</para>
<sect2 id="qwrequirements">
<title>System requirements</title>
<para>
Here are the minimum system requirements for the QW (QuakeWorld) server. Remember that the requirements vary depending on the number of clients.
</para>
<para>
<itemizedlist>
<listitem>
<para>
Pentium 90 or better
</para>
</listitem>
<listitem>
<para>
16 MB RAM
</para>
</listitem>
<listitem>
<para>
The *.pak files from the Quake CD-ROM
</para>
</listitem>
<listitem>
<para>
Kernel 2.0.24 or later
</para>
</listitem>
<listitem>
<para>
Enough free space on your HDD (depends on what you want to install; at least 40-70 MB)
</para>
</listitem>
</itemizedlist>
</para>
</sect2>
<sect2 id="qwinstalling">
<title>Installing</title>
<para>
id Software's old qwsv is quite dated and should not be used (nor <emphasis>can</emphasis> it be used in most cases, since it's built for the ancient libc5). So, use either mvdsv or QuakeForge.
</para>
<para>
<emphasis>Note:</emphasis> Both mvdsv QuakeForge are actively being developed (more or less), and it's highly possible that newer versions than the ones linked below have been released, so check <ulink url="http://qwex.does.it/">http://qwex.does.it/</ulink> or <ulink url="http://quakeforge.net/files.php">http://quakeforge.net/files.php</ulink> before you proceed further.
<prompt>$</prompt> <command>./configure --prefix=$HOME/quake --bindir=$HOME/quake; make; make install</command>
</screen>
<para>
This will <emphasis>at least</emphasis> build qf-server, nq-server (RealQuake) and some client binaries. We don't need the latter; you can choose not to compile them, or simply remove them later. Anyway, if the compilation went fine you should now have a binary called qf-server in <filename>$HOME/quake</filename>, where $HOME is your home directory (usually /home/user).
</para>
<para>
You might want to rename mdsv or qw-server to qwsv, since that's what I'll call it in the rest of this document. Now create the directory <literal>id1</literal> in the quake directory and copy the pak0.pak and pak1.pak files from your Quake CD or wherever you have them into that directory:
Now you're ready to run qwsv. Start it by running <literal>./qwsv</literal> in the quake directory. It should work fine (if not, make sure all the filenames are in lower-case). Try connecting to your server with a client.
</para>
</sect2>
<sect2 id="qwconfiguring">
<title>Configuring</title>
<para>
Now it's time to configure your QW server. Make a server.cfg file in the id1 directory containing the following:
</para>
<screen format="linespecific">
sv_gamedir qw
deathmatch 1
hostname "QW testserver"
serverinfo admin "webmaster@xyz.com"
serverinfo url "http://url.net"
rcon_password xxxx
timelimit 35
fraglimit 150
noexit 1
pausable 0
samelevel 2
maxclients 16
map dm3
floodprot 4 8 30
floodprotmsg "You have activated the flood protection and will be silenced for 30 seconds"
maxspectators 2
allow_dowload 1
allow_download_skins 1
allow_download_models 1
allow_download_sounds 1
allow_download_maps 1
</screen>
<para>
As you can see the server.cfg file contains all kinds of variables the server uses.
</para>
<para>
<itemizedlist>
<listitem><para><literal>-master IP-address</literal> - Command line parameter. Connects to the specified master server. QWSV starts in masterless mode by default.
</para></listitem>
<listitem><para><literal>-port</literal> - Specifies which port the server will listen to, default is 27500.</para></listitem>
<listitem><para><literal>gamedir</literal> - Which game directory you want to use. Change it if you want to run a mod. The QW directory is used by default.</para></listitem>
<listitem><para><literal>deathmatch</literal> - Can be set to 1, 2 or 3. 1 = Normal deathmatch; Weapons/items can be picked up and respawned (30 sec respawn time). 2 = Weapon stay. You can only pick up a weapon once, ammo & armor doesn't respawn. 3 = Combination between 1 and 2. You can only pick up a weapon once, ammo respawns after 15 seconds, everything else respawns normally.</para></listitem>
<listitem><para><literal>serverinfo admin</literal> - The admin's e-mail address.</para></listitem>
<listitem><para><literal>serverinfo url</literal> - Server URL.</para></listitem>
<listitem><para><literal>timelimit</literal> - Match ends when timelimit (specified in minutes) is reached.</para></listitem>
<listitem><para><literal>fraglimit</literal> - Match ends when fraglimit is reached.</para></listitem>
<listitem><para><literal>maxclients</literal> - Max number of players.</para></listitem>
<listitem><para><literal>map mapname</literal> - Map that will be played.</para></listitem>
<listitem><para><literal>maxspectators</literal> - Max number of spectators.</para></listitem>
<listitem><para><literal>password</literal> - Password protect the server. Clients must set a matching password to be able to connect.</para></listitem>
<listitem><para><literal>rcon_password</literal> - Password used for remote administration.</para></listitem>
<listitem><para><literal>allow_download</literal> - Set this to 1 to allow clients to download files they don't have from the server.</para></listitem>
The above command runs the qwsv server in the background and sends the output to /dev/null (if you want to log the output, just replace /dev/null with /blah/qw.log or whatever). -port specifies the port the server will use; QW's default is 27500.
For a complete list of commands and the official QW manual, see <ulink url="http://www.quakeworld.net">QuakeWorld.net</ulink>. For a list of special commands that can be used with mvdsv, see the <ulink url="http://www.wsb.poznan.pl/~pawel/q/q/qwex/readme.txt">qwex readme</ulink>.
</para>
</sect2>
<sect2 id="qwctf">
<title>Threewave CTF (Capture The Flag)</title>
<para>
Capture The Flag, or CTF for short, is - or was, at least - the most popular Quake modification. There are many different CTF variants. Threewave CTF is the original and most popular CTF modification for QW.
You need the following files:
</para>
<para>
<itemizedlist>
<listitem><para><ulink url="ftp://ftp.sunet.se/pub/games/PC/idgames2/planetquake/threewave/ctf/server/3wave42.zip">ftp://ftp.sunet.se/planetquake/threewave/ctf/server/3wave42.zip</ulink> - All the server files.</para></listitem>
<listitem><para><ulink url="ftp://ftp.sunet.se/pub/games/PC/idgames2/planetquake/threewave/ctf/server/3wave421.zip">ftp://ftp.sunet.se/planetquake/threewave/ctf/server/3wave421.zip</ulink> - Some bugs fixed (4.2 is required).</para></listitem>
<listitem><para><ulink url="ftp://ftp.sunet.se/pub/games/PC/idgames2/planetquake/threewave/ctf/client/3wctfc.zip">ftp://ftp.sunet.se/planetquake/threewave/ctf/client/3wctfc.zip</ulink> - All the CTF maps.</para></listitem>
</itemizedlist>
</para>
<para>
Create a ctf directory and extract all the files you downloaded to it:
For more information, read <filename>ctf/server.txt</filename>.
</para>
</sect2>
<sect2 id="qwkt">
<title>Kombat Teams Pro</title>
<para>
Kombat Teams is a very popular mod that's been around for a long time. Most QW servers run it. KTeams greatly simplifies all forms of DM games by supplying commands to set teams, timer, readiness and much more.
Default is a 1on1 server. To start a 2on2 server you'd add +exec 2on2.cfg, or +exec 4on4.cfg for a 4on4 server, or +exec free.cfg for a free for all server. KTPro comes with a bunch of scripts which do this; ktpro1on1, ktpron2on2, etc. in the quake directory. Check out all the configuration examples in <filename>ktprosrv/</filename> and the documentation in <filename>ktpro.doc/</filename>.
</para>
</sect2>
<sect2 id="qwra">
<title>Rocket Arena</title>
<para>
<ulink url="http://www.planetquake.com/servers/arena/">Rocket Arena</ulink> is a very exciting modification. It's one-on-one games with the simple rule "winner stays, loser goes". Each player waits for his/her turn to fight in the arena. Every player gets full armor (200), 100 health and all weapons when they enter the arena. The winner stays to fight again, the loser goes back to the line. Simple? Yes. Boring? Not at all!
</para>
<para>
Now, on to installing this modification. Get the following files:
</para>
<para>
<itemizedlist>
<listitem><para><ulink url="ftp://ftp.sunet.se/pub/games/PC/idgames2/planetquake/servers/arena/fasrv12.zip">ftp://ftp.sunet.se/pub/games/PC/idgames2/planetquake/servers/arena/fasrv12.zip</ulink> - All the server files.</para></listitem>
<listitem><para><ulink url="ftp://ftp.sunet.se/pub/games/PC/idgames2/planetquake/servers/arena/farena12.zip">ftp://ftp.sunet.se/pub/games/PC/idgames2/planetquake/servers/arena/farena12.zip</ulink> - The required client files (maps and sounds).</para></listitem>
</itemizedlist>
</para>
<para>
Create a directory called <filename>arena</filename> in your quake directory and unzip the above files to it:
For the map rotation you can choose one of the following (of course you can edit these or make your own, remember that the last map must loop to the first):
</para>
<para>
<itemizedlist>
<listitem><para><literal>rotate.cfg</literal> - All the Final Arena maps.</para></listitem>
<listitem><para><literal>newmaps.cfg</literal> - The new Final Arena and the TF arena maps.</para></listitem>
<listitem><para><literal>classic.cfg</literal> - The most popular older Arena maps.</para></listitem>
</itemizedlist>
</para>
</sect2>
</sect1>
<sect1 id="quake2">
<title>Quake II</title>
<para>
Quake II is the sequel to Quake, featuring great multiplayer capabilities just like its prequel.
</para>
<sect2 id="q2sysreq">
<title>System requirements</title>
<para>
As always, the minimum system requirements vary depending on the number of clients.
</para>
<para>
<itemizedlist>
<listitem><para>A Pentium-class processor or better is recommended. More players = more CPU.</para></listitem>
<listitem><para>At least 16 MB RAM. 1 MB per player is recommended.</para></listitem>
<listitem><para>Some maps require more CPU/RAM than others.</para></listitem>
<listitem><para>The *.pak files from the Quake II CD-ROM.</para></listitem>
<listitem><para>Enough free space on your HDD, at least ~500 MB.</para></listitem>
<listitem><para>If you're going to run a Q2 server on the Internet, make sure you have enough bandwidth. The more players the more bandwidth you need.</para></listitem>
</itemizedlist>
</para>
</sect2>
<sect2 id="q2installing">
<title>Installing</title>
<para>
To start a Q2 server you need the Q2 client package and the pak files from the Q2 CD. Download the one that suits your system (glibc, unless your distribution is really ancient):
It should work fine and people should be able to connect to it.
</para>
</sect2>
<sect2 id="q2configuring">
<title>Configuring</title>
<para>
You'll want to create a server config (cfg) file. Put the following in a file called server.cfg in the baseq2 directory and modify it as you like:
</para>
<screen>
set hostname "Q2 testserver"
set deathmatch "1"
set rcon_password "xxxx"
set timelimit "30"
set fraglimit "100"
set maxclients "16"
set allow_download "1"
set allow_download_players "0"
set allow_download_models "1"
set allow_download_sounds "1"
set allow_download_maps "1"
</screen>
<para>
Settings:
</para>
<itemizedlist>
<listitem><para><literal>dmflags</literal> - A bitflag, controls gameplay options.</para></listitem>
<listitem><para><literal>fraglimit</literal> - Next map is loaded when fraglimit is reached.</para></listitem>
<listitem><para><literal>timelimit</literal> - Next map is loaded when timelimit is reached.</para></listitem>
<listitem><para><literal>map</literal> - Which map to start.</para></listitem>
<listitem><para><literal>maxclients</literal> - Max number of players.</para></listitem>
<listitem><para><literal>hostname</literal> - Name of the server.</para></listitem>
<listitem><para><literal>deathmatch</literal> - If you want to play DM (deathmatch), set this to 1.</para></listitem>
<listitem><para><literal>game</literal> - Which mod directory to use, if you want to play a mod.</para></listitem>
<listitem><para><literal>port</literal> - Which port you want the server to listen to.</para></listitem>
</itemizedlist>
<para>
Now start the server with <literal>./quake2 +set dedicated 1 +exec server.cfg</literal>. Your config file will be read and the variables in it will be used.
You can have different config files for different game types, for example ffa.cfg, ctf.cfg, etc. with customized settings. They should all be in the baseq2 directory.
</para>
<para>
To have your server listed on the master servers (so people using GameSpy, XQF and similar programs can see your server), type <literal>set public 1</literal> in the server console or in the config file.
With the command <literal>set setmaster 'master server'</literal> you can change master server (default is id Software's master server).
</para>
</sect2>
<sect2 id="q2ctf">
<title>Q2CTF (Capture The Flag)</title>
<para>
Download one of the following (you'll most likely want the glibc one, unless your distribution is ancient).
You'll also want the Q2CTF package with the CTF maps, <ulink url="ftp://ftp.sunet.se/pub/pc/games/idgames2/idstuff/quake2/ctf/q2ctf150.zip">ftp://ftp.sunet.se/pub/pc/games/idgames2/idstuff/quake2/ctf/q2ctf150.zip</ulink> (9.1 MB). Unzip it to the ctf directory.
To start a CTF server, run <literal>./quake2 +set dedicated 1 +set game ctf +exec server.cfg</literal>, where server.cfg is a file you should create in the ctf directory, containing this:
</para>
<screen>
deathmatch 3
maxclients 12
rcon_password password
fraglimit 0
timelimit 30
set hostname "Q2CTF Testserver"
set admin "admin@xyz.com"
map q2ctf1
</screen>
</sect2>
<sect2 id="q2lmctf">
<title>LMCTF (Loki's Minions CTF)</title>
<para>
<ulink url="http://www.planetquake.com/lmctf">LMCTF</ulink>, Loki's Minions CTF, is a popular CTF modification for Q2. You need all the following files:
There are some files in the lmctf directory that you'll probably want to edit: <filename>server.cfg</filename> is the main cfg file containing many standard server options. <filename>maplist.txt</filename> contains the list of maps the server cycles through.
To alter the map list, create a file in your root Q2 directory called maplist.txt containing the names of the maps and add +map mapname to the command line when you start the server, where <literal>mapname</literal> is the name of the first map in the maplist.txt you just created.
The file <filename>motd.txt</filename> contains the "message of the day" clients will see when joining the server.
</para>
<para>
For more information on LMCTF, see its <ulink url="http://www.planetquake.com/lmctf">homepage</ulink>.
</para>
</sect2>
<sect2 id="q2ra">
<title>Rocket Arena 2</title>
<para>
To run a <ulink url="http://www.planetquake.com/servers/arena/">Rocket Arena 2</ulink> server you need the following files:
Edit <filename>server.cfg</filename> to your liking. Another file that you may want to edit is <filename>arena.cfg</filename>, which is used to customize settings on a per arena basis as well as map rotation information. Start the server:
</para>
<screen format="linespecific">
<prompt>$</prompt> <command>./quake2 +set dedicated 1 +set game arena +exec server.cfg
</command>
</screen>
</sect2>
<sect2 id="q2lithium">
<title>Lithium II</title>
<para>
<ulink url="http://www.planetquake.com/lithium">Lithium II</ulink> is a very popular and configurable server-side deathmatch mod, adding things like the grappling hook and letting you configure pretty much everything; see its readme.txt file for more information. Download the following file:
<ulink url="http://www.planetquake.com/lfire">L-Fire</ulink> DM is a server-side mod that adds many features to Q2, such as organized match support, anti-spam, highscore lists for each level, profanity filtering, etc. What you need:
You can run L-Fire DM from either the <filename>baseq2</filename> directory (in that case it'll show up as a standard DM mod in GameSpy and similar tools, or you can give it its own directory (<filename>lfiredm</filename> or whatever you prefer). Extract the archive (actually, it only contains two files, gamei386.so and readme.txt), or in other words place gamei386.so in your directory of choice.
<filename>LFireDM_v1_11_Config.tar.gz</filename> contains many config files which you may want to edit. Extract it to the directory where you put gamei386.so:
<ulink url="http://www.planetquake.com/lfire">L-Fire</ulink> CTF is like L-Fire DM a server-side mod that adds many features to Q2CTF like match support, anti-spam, highscore lists for each level, rocket arena/sudden death overtime, etc. What you need:
<filename>LFireCTF_v1_20_Config.tar.gz</filename> contains a bunch of configuration files which you may want to edit. Extract it to the Q2CTF directory:
<ulink url="http://www.planetquake.com/q2admin/">Q2Admin</ulink> is a very good transparent proxy modificatiom that adds many admin functions, and the most important, ZBot/Ratbot (among other things) detection to preven cheating.
Q2Admin works with all Q2 mods transparently by filtering communication between the server and the mod it's running on top of.
I recommend that you install Q2Admin if you're going to run a public server. Download this file:
Now you should have a file called <filename>q2admin.so</filename> in the q2admin directory. For each mod you want to protect with Q2Admin, copy the <filename>install</filename> and <filename>q2admin.so</filename> files to each mod directory and optionally the *.txt files if you want to customize the Q2Admin settings for different mods.
Run install, <literal>./install</literal> (chmod +x install if it's not executable) and start the server as usual. The install script moves gamei386.so to gamei386.real.so and q2admin.so to gamei386.so. Run install again to move the files back to their original names.
There's a huge number of commands; See <filename>readme.txt</filename> included in the q2admin package for everything you need to know.
</para>
</sect2>
</sect1>
<sect1 id="quake3">
<title>Quake III Arena</title>
<para>
Quake III is the latest game in the Quake series, designed as a multiplayer deathmatch game.
</para>
<sect2 id="q3sysreq">
<title>System requirements</title>
<para>
As always, the system requirements vary depending on the number of players on your server.
</para>
<para>
<itemizedlist>
<listitem><para>Pentium II 266MHz. More CPU = more players.</para></listitem>
<listitem><para>At least 64 MB RAM.</para></listitem>
<listitem><para>Kernel 2.2.9 or higher, glibc 2.1.</para></listitem>
<listitem><para>The *.pk3 files from the Quake III Arena CD-ROM.</para></listitem>
<listitem><para>At least ~500 MB free space on your HDD.</para></listitem>
<listitem><para>Enough bandwidth if you're going to run an Internet server. More players = more bandwidth.</para></listitem>
</itemizedlist>
</para>
</sect2>
<sect2 id="q3installing">
<title>Installing</title>
<para>
First download the latest Q3A Linux point release. As of this version of the HOWTO it's v1.32b, but that may have changed when you read this.
Go to the Q3 directory and test the dedicated server, <literal>./q3ded</literal>.
</para>
</sect2>
<sect2 id="q3configuring">
<title>Configuring</title>
<para>
Now it's time to write some config files. They contain all the variables the server will use (maps to be played, gametype, etc..). All cfg's must be in the baseq3 directory. The file q3config.cfg is <emphasis>always</emphasis> executed.
I recommend that you have different cfg's for different gametypes, for example ctf.cfg, ffa.cfg, and so on. You can use q3config.cfg for general settings, and then another cfg on top of it.
Run <literal>./linuxq3ded +exec configfile.cfg</literal> to start the dedicated server and execute the specified config file.
This is what my FFA (Free For All) config file looks like:
</para>
<screen>
set sv_hostname "Foofighters FFA DM"
set sv_maxclients 10
set g_motd "To be or not to be..."
set g_forcerespawn 15
set rconpassword "password"
set g_gametype 1
set fraglimit 50
set timelimit 20
//Here's the map-cycle. When fraglimit or timelimit is reached, the map is automatically changed.
//Otherwise it would just play the same map again.
set m1 "map q3dm1; set nextmap vstr m2"
set m2 "map q3dm2; set nextmap vstr m3"
set m3 "map q3dm3; set nextmap vstr m4"
set m4 "map q3tourney1; set nextmap vstr m5"
set m5 "map q3dm4; set nextmap vstr m6"
set m6 "map q3dm5; set nextmap vstr m7"
set m7 "map q3dm6; set nextmap vstr m8"
set m8 "map q3tourney2; set nextmap vstr m9"
set m9 "map q3dm7; set nextmap vstr m10"
set m10 "map q3dm8; set nextmap vstr m11"
set m11 "map q3dm9; set nextmap vstr m12"
set m12 "map q3tourney3; set nextmap vstr m13"
set m13 "map q3dm10; set nextmap vstr m14"
set m14 "map q3dm11; set nextmap vstr m15"
set m15 "map q3dm12; set nextmap vstr m16"
set m16 "map q3tourney4; set nextmap vstr m17"
set m17 "map q3dm13; set nextmap vstr m18"
set m18 "map q3dm14; set nextmap vstr m19"
set m19 "map q3dm15; set nextmap vstr m20"
set m20 "map q3tourney5; set nextmap vstr m21"
set m21 "map q3dm16; set nextmap vstr m22"
set m22 "map q3dm17; set nextmap vstr m23"
set m23 "map q3dm18; set nextmap vstr m24"
set m24 "map q3dm19; set nextmap vstr m25"
set m25 "map q3tourney6; set nextmap vstr m1"
</screen>
<para>
<itemizedlist>
<listitem><para><literal>sv_maxclients</literal> - Max number of players.</para></listitem>
<listitem><para><literal>g_motd</literal> - The message people will see on the bottom of the screen when they connect.</para></listitem>
<listitem><para><literal>g_forcerespawn</literal> - Number of seconds until a client is automatically respawned, if the client doesn't do it by itself. Set it to 0 to disable force respawn.</para></listitem>
Start the server with <literal>./q3ded +exec configfile.cfg</literal>. You can execute cfg's directly from the server console with the command <literal>exec configfile.cfg</literal>.
If you want to run the server in the background, immune to hangups, start using <literal>nohup ./q3ded +exec ffa.cfg &</literal>.
</para>
</sect2>
<sect2 id="q3ctf">
<title>Q3CTF (Capture The Flag)</title>
<para>
CTF is built into Q3A (Q3CTF). Four CTF maps are included with Q3A, but you will want to download Dave 'Zoid' Kirsch's (the author of CTF for Q1/Q2/Q3) excellent Q3WCTF maps - <ulink url="ftp://ftp.sunet.se/pubi/pc/games/idgames2/planetquake/mappacks/q3wctf.zip">ftp://ftp.sunet.se/pubi/pc/games/idgames2/planetquake/mappacks/q3wctf.zip</ulink> (7.8 MB).
Here's a CTF cfg which includes all CTF maps in the mapcycle. Paste it in a new file, ctf.cfg, in the baseq3 directory:
</para>
<screen>
set sv_hostname "Foofighters CTF"
set sv_maxclients 16
set g_motd "To be or not to be.."
set g_forcerespawn 10
set rconpassword "password"
set g_gametype 4
set m1 "capturelimit 8; map q3ctf1; set nextmap vstr m2"
set m2 "capturelimit 8; map q3ctf2 ; set nextmap vstr m3"
set m3 "capturelimit 8; map q3ctf3 ; set nextmap vstr m4"
set m4 "capturelimit 8; map q3wctf1 ; set nextmap vstr m5"
set m5 "capturelimit 8; map q3wctf2 ; set nextmap vstr m6"
set m6 "capturelimit 8; map q3wctf3 ; set nextmap vstr m1"
vstr m1
</screen>
<para>
Start with <literal>./q3ded +exec ctf.cfg</literal>.
</para>
</sect2>
<sect2 id="q3ra3">
<title>Rocket Arena 3</title>
<para>
<ulink url="http://www.planetquake.com/servers/arena/">Rocket Arena</ulink> 3 is the popular Quake3 version of Rocket Arena. You need the following files:
Use <literal>+set dedicated 1</literal> to run a private server or <literal>+set dedicated 2</literal> to run a public. For more info on RA3 configuration options, read <filename>readsrv.txt</filename> in your <filename>arena</filename> directory.
</para>
</sect2>
<sect2 id="q3alliance">
<title>Alliance</title>
<para>
<ulink url="http://www.planetquake.com/alliance/">Alliance</ulink> is a popular CTF/DM mod. It offers three different game styles:
</para>
<para>
<itemizedlist>
<listitem><para><emphasis>Alliance</emphasis> - Enhanced CTF with offhanded grappling hook (players can use the grapple and shoot their weapons at the same time).</para></listitem>
<listitem><para><emphasis>Combat</emphasis> - Resembles the mod Expert Q2. Players spawn with all weapons plus health and ammo regenerate. Slightly different weapons balance, physics and grappling hook style.</para></listitem>
<listitem><para><emphasis>Instagib</emphasis> - An interesting (and very entertaining) game type where players spawn with an enhanced rail gun with an infinite ammount of ammo. When you shoot your enemy they are instantly gibbed (killed), so health is not an issue here (also, the rail gun is the only weapon).</para></listitem>
</itemizedlist>
</para>
<para>
All the above game styles can be played as CTF, FFA, Team DM or Tourney. Note that the mod was made with CTF in mind. Anyway, you need the following files:
Edit <literal>maplist.cfg</literal> to change the map rotation. Two large Alliance map packs can be downloaded from its <ulink url="http://www.planetquake.com/alliance/">homepage</ulink>.
</para>
</sect2>
</sect1>
<sect1 id="halflife">
<title>Half-Life</title>
<para>Half-Life is the most popular multiplayer first-person shooter on the Internet as of this version of the HOWTO - mainly thanks to the modification <ulink url="http://www.counter-strike.net">Counter-Strike</ulink>, hereafter referred to as CS.
</para>
<sect2 id="hlsysreq">
<title>System requirements</title>
<para>
The system requirements vary depending on how many players you have on your server.
</para>
<para>
<itemizedlist>
<listitem><para>CPU - Depends on the number of clients. At least P2 266 for hosting a full game, the more the better. 400MHz recommended.</para></listitem>
When you've downloaded the above file, create a directory for HLDS and run the downloaded file (specify $HOME/hlds as the directory to install to, if that's what you want):
If the 'Auth' is missing it's probably because your server is using an incorrect IP address. Type status in the server console and it will spit out some info.
If your IP isn't what it should be, quit the server with the exit command and start it again with this command:
If it doesn't work now, you might be behind a firewall. If that's the case, let's just hope the network admin is friendly - make him open the port(s) you need. 27015 is the default port.
</para>
<para>
If you want to run a modification instead of regular DM or teamplay, pass the -game modname argument to hlds. Example: <literal>./hlds_l -game tfc +maxplayers 12 +map 2fort</literal>.
</para>
<para>
The server reads autoexec.cfg, server.cfg, motd.txt and mapcycle.txt. Edit these to your liking. Autoexec.cfg is only executed when you start the server. Server.cfg is executed at every map change. Motd.txt contains the text that players will see when they join your server; a good idea is to put your server name, homepage (server stats page?) and contact info in it. Mapcycle.txt contains the list of maps you want rotated on your server. Type in all the maps you want there, each on its own line, without the ".bsp" extension.
</para>
<para>
<itemizedlist>
<listitem><para><literal>sv_aim</literal> - Setting this to 1 causes the crosshairs to turn red when placed over a player.</para></listitem>
<listitem><para><literal>pausable</literal> - Clients are allowed to pause the server.</para></listitem>
<listitem><para><literal>mp_timelimit</literal> - Server changes map when timelimit (in minutes) is reached.</para></listitem>
<listitem><para><literal>mp_fraglimit</literal> - Server changes map when fraglimit is reached.</para></listitem>
<listitem><para><literal>mp_footsteps</literal> - Setting this to 0 turns off footsteps.</para></listitem>
<listitem><para><literal>mp_flashlight</literal> - Clients can use flashlights (useful on dark maps).</para></listitem>
<listitem><para><literal>mp_falldamage</literal> - Realistic fall damage.</para></listitem>
<listitem><para><literal>mp_friendlyfire</literal> - Allows players to kill people on the same team. More realistic, but this can be very problematic without active admins playing on the server, so on public servers it might be a good idea to set this to 0 to avoid lamers killing their own team members.</para></listitem>
</itemizedlist>
</para>
<para>
Min/max rates - The commands <literal>sv_maxrate xxxx</literal> and <literal>sv_minrate xxxx</literal> force clients to use the specified rate.
This is useful if you, for example, don't want LPB's stealing bandwidth (which makes HPW's annoyed) - type <literal>sv_maxrate 6000</literal> to do this. If you on the other hand want to run a server for LPB's,
set the minimum rate to something around 9000 with <literal>sv_minrate 9000</literal>.
</para>
<para>
Kicking/Banning - Each player is assigned an userid by the server. Type <literal>users</literal> in the server console to see the players id's. Usually you can kick people simply by typing <literal>kick nick</literal>, but this can be difficult if a client has a long nick or is using strange characters.
If this is the case, you can kick clients by their id with <literal>kick # </literal>.
If you want to ban a client, preventing them from coming back to the server, find their uniqueid with the <literal>users</literal> command and then ban with <literal>banid minutes uniqueid</literal>, where minutes is the number of minutes you want to ban the player (0 makes the ban permanent), and uniqueid the player's uniqueid.
To keep players banned even after restarting the server, type <literal>writeid</literal> before you quit the server, and add <literal>exec banned.cfg</literal> to your server.cfg so that the next time you start your server, it will read the uniqueid's in banned.cfg.
You can also kick and ban a client at the same time with <literal>banid uniqueid kick</literal>.
Remove a ban with <literal>removeid id</literal>, and don't forget to remove it from server.cfg if it's there too.
</para>
<para>
RCON - RCON lets clients on your server execute server commands remotely. Add the line <literal>rcon_password "password"</literal> to server.cfg. Clients type rcon_password password in the console and can then execute server commands, like rcon kick, rcon mapchange, etc. This is good if you want to deal with abusive players directly when you're playing on the server, or maybe let a few other trustworthy persons do it.
To use rcon when playing on your server, type <literal>rcon_password password</literal> in the in-game console. You can now execute several commands if the password was correct, but remember that you must add rcon before every command, for example <literal>rcon kick player</literal>.
</para>
</sect2>
<sect2 id="hlcstrike">
<title>Counter-Strike</title>
<para>First you need, of course, a working Half-Life server. Download the latest CS package. As of this revision of the HOWTO it's 1.5, but that may have changed when you read this.
Edit the <literal>/usr/local/games/hlds/cstrike/server.cfg</literal> file to change it to your liking and optimize the server. The file <literal>mapcycle.txt</literal> contains the list of maps to be included in the map cycle, and <literal>motd.txt</literal> contains the MOTD - Message Of The Day.
</para>
<para>
Maps - By typing mp_timelimit 1 in the console, the server will go to the next map in the cycle. The command changelevel followed by the mapname makes the server change to the specified map.
The maps must be in your cstrike/maps directory.
</para>
<para>
For more information on CS servers, see <ulink url="http://server.counter-strike.net">http://server.counter-strike.net</ulink>.
</para>
</sect2>
</sect1>
<sect1 id="ut">
<title>Unreal Tournament</title>
<para>
Unreal Tournament is a very addictive first person shooter which is designed to be run in one of several modes; DeathMatch, Capture the Flag, Last Man Standing and Assault are the most popular. It features bots, a bevy of weapons and plenty of community support. It was originally ported as an in-house development effort at Epic but later releases are handled by
Loki Software. Current version as of this writing is 436.
</para>
<sect2 id="utsysreq">
<title>System requirements</title>
<para>
As always, the system requirements will vary slightly depending on the
number of players on the server. Here are the basics:
</para>
<para>
<itemizedlist>
<listitem>
<para>
Pentium 266 (For more than 8 users, a faster server is recommended)
</para>
</listitem>
<listitem>
<para>
At least 32 MB RAM (For a VERY dedicated machine. The more maps,
skins, mutators, bots, and players that are online, the more RAM the
server will use.) 64 MB is highly recommended.
</para>
</listitem>
<listitem>
<para>
Linux kernel 2.2.14 or later, Glibc 2.1 or later.
</para>
</listitem>
<listitem>
<para>
The retail Unreal Tournament CD (Just the first one is necessary).
</para>
</listitem>
<listitem>
<para>
At least 500 MB disk space. Maps, skins, and mods will require a bit more.
</para>
</listitem>
<listitem>
<para>
Enough bandwidth if you're going to run an Internet server. Epic recommends about 20kbps per player.
</para>
</listitem>
</itemizedlist>
</para>
</sect2>
<sect2 id="utinstalling">
<title>Installing</title>
<para>
First, download the latest ut-install file from Loki's website. As of