Most of this might be obvious to people who are experienced with Linux, but it may not be to others, and the documentation doesn't really explain it completely, so here are some basic steps for getting a dedicated server up and running under Linux.

For starters, you need the Linux version of the demo, and the latest Linux Demo Patches obviously. The files are called UT2003-Demo-Linux.sh.bin, ut2003lnx_demo1080b.sh.bin, and ut2003lnx_demo1080c.sh.bin, and you can download them at these locations:

http://beyondunreal.com/dl.php?f=official/ut2003/UT2003-Demo-Linux.sh.bin
http://www.beyondunreal.com/dl.php?f=official/ut2003lnx_demo1080b.sh.bin
http://www.beyondunreal.com/dl.php?f=official/ut2003/ut2003lnx_demo1080c.sh.bin

Once you have them, drop them in a directory that has enough space to hold them while it decompresses. My suggestion is at least 300 Mb, since the installed Linux demo is 214 Mb or thereabouts. Before you can run the installers, you need to make sure that they are executable. On your linux box, in the directory with the installers, run these commands:

chmod u+x UT2003-Demo-Linux.sh.bin
chmod u+x ut2003lnx_demo1080b.sh.bin
chmod u+x ut2003lnx_demo1080c.sh.bin

Then, you can run the installers by running the command:

./UT2003-Demo-Linux.sh.bin

and it will begin the install process. Follow the series of questions. If you choose to install it in the default location of /usr/local/games/ut2003_demo you may need to run the installer as root. Again, make sure that the install directory has enough space to handle the installed demo.

Then, install the patches:

./ut2003lnx_demo1080b.sh.bin
./ut2003lnx_demo1080c.sh.bin

If all goes well, you'll have the demo installed on your Linux server. From this point on, I'll assume that you put in in /usr/local/games/ut2003_demo. Inside of the demo directory, there is a System directory. In that directory, there is a file called "ucc-bin", which is the command we are after. If you cd into /usr/local/games/ut2003_demo and type:

./ucc-bin server DM-Antalus

You'll have a stock UT2003 Demo DM server up and running. It's really that simple. The fun starts when you decide that you want to change some of the defaults and/or run a different game type. By default, the server will look for a file called Default.ini (duh) in the System directory and uses that as your server ini file. If you want to customize your ini file, make a copy of that original file with:

cp Default.ini YourServer.ini

and then open up YourServer.ini in your favorite text editor. You probably don't need to touch the majority of the stuff in that file since a lot of it revolves around running the game as a client, but there are a few important things. First, in the section marked [URL], you may change the Port value so your server runs on a different port. The standard port is 7777, which is used automatically if you don't change this. If you do change it, you'll need to tell people about it in your unreal:// url. For example, if you changed it to 8888, you'd need to give the url: unreal://ip.of.your.server:8888 to people who want to play on it.

Once mods start to appear for UT2003, you'll be customizing the Core.System section in order to tell UT2003 where the mod files are located, but for now, we can skip over that section entirely. If you jump down a few sections to a section called:

[IpDrv.TcpNetDriver]

There are a few performance tuning items in here that you might want to take note of. First, you may as well turn AllowDownloads off by setting it to "False", since there isn't really anything to download yet. This is TEH DEMO after all. The next two items are ConnectionTimeout and InitialConnectionTimeout, and are measured in seconds. If you lower these, you can control how long your server will wait for a player to join initially (IntialConnectionTimeout), or on subsequent map changes (ConnectionTimeout). If these are left high, your server can eat up valuable bandwidth by trying to send information to clients that may have timed out. With UT, people often complained about lag right after a map change. This was one of the reasons why. You may also want to lower MaxClientRate to something more reasonable for your internet connection. The default is 25000, which means that the server will happily try to send a client 25Kb/sec worth of game information if it asks for it, which will probably soak up most of a normal internet connection. For more information about Packets and Rate settings, you might want to read my original article about it here:

http://malhavoc.homeunix.com/personal/news/articles/2_1.html

This had been on both Stomped and GameAdmins.com, although I can no longer find it on the latter for some reason.

Another section you might be interested in is:

[Engine.GameReplicationInfo]

In here, you can do stuff like change the name of your server and set your email address and what not. If you don't change these, you'll end up with "Another UT2003 Server" being listed in the server browser window. We can't have that, now can we?

So, set ServerName, ShortName, AdminName, and AdminEmail to whatever you like. There are also MOTDLines that can be changed as well.

In addition to these sections, there are [XGame.xDeathMatch], [XGame.xCTFGame], and [XGame.xBombingRun] sections that contain specific configuration settings for each game type. If you wanted to run a Bombing Run server, for instance, you'd change the settings in [XGame.xBombingRun].

What about map rotations? Well, right now the demo only comes with a few maps, but you can change the rotation in the section called [Engine.Console]. There are lines that look like:

DemoLevels[0]=DM-Asbestos
DemoLevels[1]=DM-Antalus
DemoLevels[2]=BR-Anubis

I should point out that the Default.ini has DM-Curse3 listed as a map in the rotation! This map does NOT come with the demo and if left in here will most likely cause problems with map rotation on DM servers. You should remove it.

After all that, how do you start a game with this new ini file? Well, on your command line, you'd just run:

./ucc-bin server DM-Antalus -nohomedir -ini=YourServer.ini

and it will load YourServer.ini instead of the Default.ini file. The -nohomedir argument just tells UT2003 to save any config settings in the /usr/local/games/ut2003_demo directory instead of the home directory of the person who is running it. It may be useful for servers, or if more than one person can start the server and you want the configs saved in one place. If you use this, make sure you have write permission in the directory.

One last thing. Changing game types. UT2003 seems to be able to detect the gametype based on the map name on the command line, but if you want to be safe, you can take on a query string after the map name. For instance, if you wanted to run a Bombing Run server, you can use:

./ucc-bin server BR-Anubis?XGame.xBombingRun -nohomedir -ini=YourServer.ini

and life will be fine.

Hmmmmm.. what else. Oh yes. You probably want to be able to log out after starting this server, so the "screen" command will be useful. Screen lets you start an interactive process and then detach it so it runs interactively in a screened window so you can log out. Very useful. type: "man screen" on your server if you have it and want more info.

What about getting the WebAdmin application to work? This seems to be a sticking point for many server administrators, nd it's fairly easy to set up, but you need to know a few things. First, locate the [UWeb.WebServer] section in your ini file and make sure the following attributes are set:

bEnabled=True
ListenPort=7789

The first one is False by default, and the second one doesn't exist at all, so you need to add it. You may use any port you want, but be sure not to use one of the ports used by the game (like what you put in the Port setting, or the port setting +1, the Port setting + 10, and the Port setting + 11. Those seem to be consumed by the Beacons for broadcasting to master servers and allowing server queries.

In addition to these changes, the command line for starting the server needs to be tweaked in order to set the Admin and AdminPass settings. This means that in addition to specifying your game type and map name, you need to also prepend ?AdminName=youradminname?AdminPassword=yourpassword

So, after all this, the command for getting your server up and running then becomes:

./ucc-bin server BR-Anubis?XGame.xBombingRun?AdminName=admin?AdminPassword=sekrit -nohomedir -ini=YourServer.ini

which would set the admin login to "admin" and the password to "sekrit". The url to get access to your WebAdmin system becomes:

http://your.ip.address:7789/ServerAdmin

where you'd substitute the IP address of your server and the port you chose to run the WebAdmin system on, respectively.

Some people have also asked me about mutators. Mutators can be added to the command line the same way they worked in Unreal Tournament, with the ?mutator= flag. The trick is knowing what comes after that (well, naturally). Your best bet is look at the various *.int files in the System directory to see what's available. Two very common mutators are the "InstaGib" mutator and the "Low Gravity" mutator. If you look at the XGame.int file, you'll see a section for MutInstaGib. Likewise, if you look at the UnrealGame.int file, you'll see something for MutLowGrav. So, both of these can be used with either ?mutator=XGame.MutInstaGib or ?mutator=UnrealGame.MutLowGrav. They can be combined, if you wish (mmmm... InstaGib Lowgrav servers.... ). To accomplish this, just separate the Mutator names with commas. So, to run both of these mutators, you'd use ?mutator=XGame.MutInstaGib,UnrealGame.MutLowGrav

What else... oh yes. Occasionally, a server will crash. It's not a matter of "if", it's a matter of "when". As such, I've included a little shell script that will restart your server if it does die completely on you. Feel free to tweak the config variables up at the top of the file to suit your own game.

#!/bin/sh
GAMEPATH=/usr/local/ut2003_demo/System
ADMINNAME=admin
ADMINPASS=sekrit
MAPNAME=BR-Anubis
INIFILE=MalHavocServer.ini

while true
do
${GAMEPATH}/ucc-bin server ${MAPNAME}?AdminName=${ADMINNAME}?AdminPassword=${ADMINPASS} -nohomedir -ini=${INIFILE}
echo "server last crashed on " >> ${GAMEPATH}/crashlog.txt
echo `/bin/date` >> ${GAMEPATH}/crashlog.txt
done

OH! Finally, one other thing. For those of you (like me) who run your server behind a firewall, you will need to forward ports back to the machine so people outside the firewall can connect to it. On my Linux gateway running IPtables, I run the following commands (as root) to forward packet requests back to my server:

/sbin/iptables -A FORWARD -i eth0 -o eth1 -p udp --dport 7777 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A FORWARD -i eth0 -o eth1 -p udp --dport 7778 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

/sbin/iptables -A PREROUTING -t nat -p udp -d 10.35.54.213 --dport 7777 -j DNAT --to 192.168.1.4:7777
/sbin/iptables -A PREROUTING -t nat -p udp -d 10.35.54.213 --dport 7778 -j DNAT --to 192.168.1.4:7778

To do this, obviously, you need a kernel with NAT and port forwarding support compiled into it, as well as the iptables utility. Notice that I don't forward requests back for the WebAdmin system, since I'd rather not make the Port available for that outside of my own network.

Any questions, drop me a note. If you want me to expand on any of this, let me know. I'll be out of town for a few days, but I'll try to get back to you.