Tutorial: Setting Up An Elite Force Server Under Linux

I get a lot of questions about Setting up gameservers on linux and I promised that I’d put up a noob’s guide to setting up linux gameservers. Ok.. so that was at least 8 months ago, but better late than never right?

This tutorial assumes that you have some blend of Linux already installed, and you can access the command line. These two things are beyond the scope of this tutorial and If you havent gotten this far yet you likely will not have much luck with this tutorial. I’m also going under the assumption you know how to mount a cd, use ftp, and already have an ftp server setup, again these are beyond the scope of this tutorial. Although if you choose server installation on most linux distros during the install process you’ll have a ftp server installed by default.

There are a couple different situations that someone hosting a game server will be in. The first is they are hosting it from home, on a linux box they have setup from scratch. The other two scenerios involve renting space on a shared server at a datacenter, or leasing a whole dedicated server from a datacenter.

If you have ‘root’ access you will want to create a new user for the game server. If your renting space on a shared server you can just skip creating a new user and install the game server under your existing account. If you dont know if you have root, then you probably dont.

If you dont have root access, skip down to ‘installing the archive’
To add a user, you simply use the ‘adduser’ command. The syntax is:

adduser newusername

Some blends of linux will ask you some additional questions which you can leave blank (except for the password!).

Depending on your Linux distribution, you may need to add (or change) the password with a separate command. Use the passwd command. The syntax is:

passwd username

You will be prompted for your new password.

Su to the user you have created for the server (i.e. su username)

For this tutorial we will assume that the username is simply ‘username’.

installing the archive

Lets be sure we are in the user’s directory by simpy typing:
cd /home/username

The first thing you will want to do is get the dedicated server binaries. Grab those from the Beer garden site using the following command:

wget http://beer-garden.n5net.com/stveflinuxdedicated120.zip

Unzip the archive:
unzip stveflinuxdedicated120.zip

The unzip command should extract the archive and create a new folder called Linux. since this is ugly, we’ll rename the folder to something more appropriate. We’ll call the folder stvef, do this with the following command.

mv Linux stvef

Next we’ll want to switch to the newly created folder and grab the expansion pack and some other updates. Do that with the following series of commands.

cd stvef
wget http://thilo.kickchat.com/efport-progress/bin/linux/iostvefded-1.37.i386
cd baseEF
wget http://thilo.kickchat.com/efport-progress/bin/vm/pak92.pk3
wget http://maps.beer-garden.n5net.com/maps/pak3.pk3  **** This is a broken link, upload it from your local baseEF
cd ..
cd ..
chmod -r 0700 stvef

The final part of the installation is getting the game media paks to the server. These are the files located in the baseEF folder on the CDROM, or from your local copy of the game. If you have physical access to the machine you can pull these straight from the CDROM, if not you can use FTP to get them up to the server.

You’ll need to copy over the pak0.pk3, pak1.pk3 and pak2.pk3 files. They neeed to be placed in the stvef/baseEF folder that we have created during the install process.

Remember we have already pulled the game media from the expansion pack above when we grabbed the pak3.pk3 file so you need not worry about the expansion pak disk.

Now you have installed the Linux dedicated server. Now what?

Creating the startup scripts.

The server is pretty much non-functional without a startup script and a server configuration.

Lets hop back to the main user directory using the following command:
cd /home/username

There are two scripts we’ll create to run the server. One script will actually start the server, the other script will run via a cron job to check to see if the server is running and restart it if it goes down.

The first script is the startup script. so create a new file in your favorite text editor called start.sh

here is what we are going to put in this one:

cd /home/username/stvef
./iostvefded-1.37.i386 +set net_ip +set dedicated 2 +exec server.cfg > /dev/null 2>&1 &
echo “Starting Elite Force”

You will want to replace the bolded items to reflect your username, ip address, and server configuration file.

The next script is optional, this script will check to see that the server is running and restart it if it isnt. We’ll call this script serverup.sh So again, open up your favorite text editor and copy the following.

process=`ps wx | grep iostvefded | grep -v grep | wc | gawk ‘{print $1}’`

if [ “X$process” = “X0” ]
echo “Could not find Game Server Running. Restarting it”

echo “Game Server is running. No Action Needed.”

Again, replace the bolded ‘username’ with the username you have created for the server. You will also want to setup a cron job to run this script every 15 minutes or so.

You’ll want these files to be placed in the /home/username directory. You’ll also want to set the permissions so that you can actually run the scripts.

chmod 0700 /home/username/*.sh

Now all that is left is to create a server configuration. The start.sh script we created earlier tells the server to startup with a server configuration called server.cfg.

The example server configuration that comes in the Elite Force dedicated server archive is useless, you wont get anywhere using it. I suggest grabbing the pack of sample configuration scripts I created here:

You will want to place your server configuration in the /home/USERNAME/stvef/baseEF directory.

Now you are ready to startup your server. to start your server use the following commands:

cd /home/username

To be sure the server is running you can type ps x. You should see a process with iostvefded* in the name. Now try to connect to the server through the game.

On a side note, if your running this out of your home you’ll want to forward all of the appropriate UDP ports.

Hope that helps.. if you run into problems you may want to check here:

And remember quake 3 and Elite Force are extremely similar as far as running a linux server.

About Shafe

Brian Shaffer is a veteran programmer, programming professionally since 1991. His first gaming computer was a Commodore Vic-20 in the 80s. Shafe founded The Beer Garden on October 23, 2004 and continues to run and maintain it along with several members of the gaming community.