Chapter 16. Setting up and Running your own Server

Table of Contents

16.1. Clients and Dedicated vs. Listen Servers
16.1.1. Why Use Dedicated Servers?
16.2. Public vs. Private and Stats Logging
16.3. Interacting with the Server Directly
16.4. Configuring Your Server
16.4.1. Port
16.4.2. Map Cycles
16.5. Admin Tasks

Running your own AudioQuake server allows total control over which maps, gametypes and rules you play. It can also be a fun and rewarding thing to do. If you would like to try setting up your own server, we recommend that you have a go – it will provide you with your ideal game setup and other AudioQuake players with an extra place to play (if you run a public server).

16.1. Clients and Dedicated vs. Listen Servers

Quake is a “client-server” game. This means that at any time, to play the game you need a client and a server. The client is the program that the user interacts with, that outputs audio/video and captures input (to be used when moving the player or typing in the console). The server runs the game itself. It controls the environment (lifts, buttons) and items in it (powerups, monsters) and keeps track of scoring in multiplayer games. If you're playing a singleplayer game or practice match on your own computer, the client and the server are both running on your computer. If you're playing an Internet multiplayer game, the server could be hundreds of miles away.

When setting up a server, the most fundamental decision is what type of server to set up. Dedicated servers are programs that only perform the task of running the game. They do not output any audio/video and don't allow you to play a game on them directly. Listen servers, however, act as the singleplayer and offline game modes do – except that they allow connections from other players on the Internet. From your point-of-view, this makes listen servers “feel” very similar to the on or offline games you've been accustomed to playing up until now.

16.1.1. Why Use Dedicated Servers?

Though they may seem much more convenient and useful, it is generally seen as bad practice to run a listen server. The main idea is that there is a delay involved for all players on a server (measured by their “ping” time). This delay is introduced due to the fact that the player's input and output data has to be transmitted over the Internet to and from the server. A player who is directly connected to a listen server has no delay and therefore the lowest ping time on that server. This gives them a great advantage when playing the game.

Most servers on the Internet are dedicated ones. They try to be as fair as possible with respect to ping times by being remote from all players. For this reason, we strongly recommend that you run a dedicated server if you can. Even if you only have one computer or the server is on your local network (and therefore quick to access) we still recommend you run a dedicated server because it's the standard. The instructions in this chapter will assume you're using a dedicated server but they will work similarly in listen mode.

Another advantage to dedicated servers (which is most likely welcomed by anyone setting one up) is that they don't require terribly fancy computers to run on. This is partly because they don't need to perform any rendering of audio/video data, which can take quite a lot of computing power.

16.2. Public vs. Private and Stats Logging

This topic and many others is dealt with on the Stats and Servers site (in the FAQ section) – be sure to check it out for the latest information.

16.3. Interacting with the Server Directly

You can do all sorts of things with the server by interacting with its console when you start it. Tasks such as setting the gametype and map, getting status and kicking players (as well as chatting to the players from outside) can be done via the server's console directly. However, this is not always practical (you may be in the game yourself when you want to change the map, for example). In this case, you can use the “remote console” admin feature. It is beyond the scope of this manual to explain, but you can find out a lot about it and many other features by using the approach detailed in Appendix B, Finding out More – The Web is Your Friend!.

It is recommended that you run a dedicated server on Linux, using the screen program. This allows you to safely detatch from the machine without stopping the server. Furthermore, it is recommended that you copy the standard output of the server to a log file (this will help us fix bugs, should they arise).

16.4. Configuring Your Server

It is very important that you configure your server properly before running it. To do this you will need to edit the server.cfg file, which lives in the id1/ subdirectory of your AudioQuake installation. Please use a plain text editor on the file. There are many comments in the file that explain how to set things up, so they will not be reiterated here.

This section does, however, explain some of the more complex parts of the configuration.

16.4.1. Port

You may need your server to listen for incoming connections on a port other than the standard one (27500). This could be because of restrictions on your network, for example. To configure the server to listen on a particular port, you'll need to specify the port you want it to listen on on the command line. The following is an example of setting the dedicated server to listen on port 4242.

$ zqds [other options] -port 4242
                    

The port should show up in the Stats and Servers site, but it may be a good idea to remind your players to type in your server's address in the form hostname:port when they wish to connect to it.

16.4.2. Map Cycles

You can specify a list of maps in your config file so that the server is not always playing on the same level. The server will move to the next map after each game is over. By making this list circular (i.e. after the last map, we tell the server to start again) we can keep the rotation going.

Here is an example of how you'd set up such a map cycle (or “rotation”) in server.cfg. Say you have four maps; A, B, C and D. You wish for them all to be used one after the other ad infinitum. Here is what you'd put into the config file:

localinfo A B
localinfo B C
localinfo C D
localinfo D A
                    

Note

You can only specify two maps with each use of localinfo – you're effectively telling the game which map is next given the current one.

16.5. Admin Tasks

You'll find yourself needing to carry out a number of tasks as an admin. To get the best information on how to do these jobs, please consult Appendix B, Finding out More – The Web is Your Friend!. Also, please join the mailing list for server admins. We use it to provide a lot of useful information and arrange regular matches.