3D Gaming World Article

Quake 2 Server Setup Guide

Quake 2 Server Setup Guide v1.0
By d0gmA
Last Updated Thursday, April 12, 2001

This Guide will walk you through setting up a Quake 2 Server on either Windows95 or WindowsNT.  I have chosen to walk you through setting up a CTF server as Zoid has done most of the work for you and it is a good setup to learn from.  Please also let me know of any typos, broken links, or things that are not clear in the guide and I will also work to resolve these issues.

Whats New
The Machine
The Installation
Configuring the Server
    The Command Line
    The server.cfg
    Starting the Server
    Sample server.cfg
    The Variables
    Custom Variables
Remote Administration
Installing Mods
   Ground Zero
Skins and Models
Other Resources

What's New
March 25 -
Started Adding my new Linux Quake 2 server setup Guide.   Combined with this doccument you shouldn't have any problem getting a Q2 server up and running in RedHat.

March 16 - Updated some info on the pages.

December 2 - Added the Heretic II Quick and Direty Guide I also have in the works a guide for SiN and Half-Life.

October 11 - Added mini Linux setup guide

October 9 - Added info for setting up a Ground Zero Server with the mission Pack.

Added Whats new Section.

The Machine
You can run Quake 2 on the following platforms: WindowsNT, WindowsNT Alpha, Windows95/98, Linux, and Solaris.  I recommend at least a Pentium with at least 32 meg of RAM.  You should have at least 400 MB of harddisk space depending on the amount of mods you will house.

Here is some good advice from Brian Hook from id Software on running a Quake 2 Server:

CPU Speed & RAM
When setting up a server a good rule of thumb is one person per 8 MHz for Pentium and Alpha machines. So a PPro/200 can probably handle a 25 person game, and a Pentium II/450 can probably handle 50-55 players. The best single processor machine you can get to run a server is probably a 633MHz DEC Alpha box from Enorex or Aspen Systems -- a reasonable system runs about $5000 and could support 75 or so players. As for RAM, obviously the more the better, but a minimum of 64MB is reasonable.

Big Game vs. Many Small Games
Load is definitely lower with multiple games than with a single game, i.e. one game with 64 players has a larger load than 8 games with 8 players each.

SMP or CPU Farm?
An SMP machine of some type would be a good server, unfortunately the only 4 way SMP systems available are overpriced and still use Pentium Pro/200 processors. It's more cost effective and convenient to run a cluster of single processor systems. And if you're trying to save some bucks, a large farm of low end machines is pretty damn economical, e.g. a cluster of Pentium/133 machines, each running 16 player games. Also a farm has the advantage of being more fault tolerant than having all your games hosted on a single server.

Network Bandwidth
You will also need to keep in mind network bandwidth considerations. The number we've been using is 3KB/player/second, so a T1 which does about 200KB second should be able to support a 64 player game, but keep in mind that this will FULLY saturate that T1, and the minute you open a Web browser everyone will become lagged.

Back to Top

The Installation

Install Quake 2
OK this one is pretty self explanatory Install Quake 2 on the server using the using the Normal Install Size (224 MB).  Obviously you wouldn't want to run your server from the CD and the Maximum install only copies the movies to your HD which will be worthless on a server.

Optional:  I typically delete the docs directory and the text files in the root of Quake2 as these are not going to be of much use as well.

Patch the Server
The next thing you will want to do is apply the latest patch to your server: Currently v3.20 from our Quake 2 Patch Page.  I recommend getting the q2-3.20-x86-full-ctf.exe version currently q2-3.20-x86-full-ctf.exe (19.3 MB) as this will include the Deathmatch Maps and the Capture the Flag Maps so if you want to run DM or CTF they are there.

Back to Top

Configuring the Server

The Command Line
The first thing you want to do is set up your server pretty generic to make sure you have everything together.  Use Notepad or DOS's Edit to create a batch file called ctf.bat in your Quake2 directory that looks like this:

quake2 +set dedicated 1 +set game ctf +exec server.cfg

This is the command line that I use and can be varied by personal preference.  The +set dedicated 1 tells quake 2 to run as a dedicated server.  The +set game ctf tells Quake 2 to look in the ctf directory and run that gamex86.dll thus making the game what ever mod that is in that directory. The +exec server.cfg will tell it to run your server script which we will set up next.

If you would like to run your server on a different port than the default 27910 or you would like to have multiple servers running on the same machine you can also add the +set port variable to the command line.  This way you could run a deathmatch server on port 27910 and a Capture the flag server on port 27920.

quake2 +set dedicated 1 +set port 27920 +set game ctf +exec server.cfg

Mods Galore
The +set game variable is what you want to set depending on the mod you are going to run.  If you want to run Capture the Flag then you would use +set game ctf.   The MOD that you want to run will decide what to use here.  For specifics check with your mod's documentation.

Rocket Arena 2 +set game arena
Capture the Flag +set game ctf
Lithium II +set game lithium

The server.cfg

What is it?
The easiest way to set up your server is by creating a server.cfg which is basically a script that sets up all the game variables.  I say this is the easiest because you can create a server.cfg in every mod's directory so when you when you want to change the mod all you have to do is vary the "+set game" part of the command line.  Most mods such as CTF, LMCTF, lithium, and Rocket Arena 2 come with pre-made server.cfg's so all you have to do is edit them to meet your requirements.  This way when you start your server with the +exec server.cfg in the command line it will use all the variables specified in the server.cfg to configure your server.

Associate the cfg
To edit a server.cfg that is already present such as the one provided with CTF you simply open explorer and locate the server.cfg in the Quake2\ctf\ directory and double click it.  Under most circumstances this will not be associated with any program and windows95/NT will ask you what program you would like to open it with.  I always associate it with note pad that way I can edit more conveniently.

Creating the server.cfg
If the MOD you want to use doesn't include a server.cfg it is simple enough to create your own.  Use NotePad or DOS's Edit to create a new file and then save it to the specific mod directory that you are creating the script for.  Example: To set up a Capture the Flag server you would create your server.cfg in the Quake2\ctf\ dir.

Set the Initial Map
The last line of your server.cfg should be the name of the first map you want the server to start on NOTE:  If you don't set the initial map the server will halt as no map was specified.

Starting the server
If you setup a batchfile for your server it is a tidy habbit to create a shortcut to it and then specify that is is to close on exit so while your server is running you don't have to DOS boxes open.  The other alternative is to simply create a shortcut with the command line in it.  The third method (which I use) is to use QHost to launch the server as you can start, stop, and administer the server from anywhere you have a network connection to the server.

The last step is to fire up the server and then make sure everything is working as you expected.  If you started the server with a shortcut or batchfile, you will have a DOS box (Console) that will allow you to use any of the console commands in.  To stop the server simply type "quit" in the console and the server will shut down and exit.  If you started the server with QHost you will have to use QView to access the Console.  Consult the QHost doccumentaion for details.

Sample Server.cfg
Here is a sample server.cfg that I use on my CTF server:

//Zoid CTF w/CTF Standard Log 1.0
set dmflags 280084
set hostname "3DGW CTF 1.02"
set website "http://www.3dfxworld.ml.org/hellsgates/" s
set Admin "d0gmA@3dgw.com" s
set deathmatch 1
set maxclients 16
set fraglimit 150
set capturelimit 8
set timelimit 30
set public 1
set stdlogfile 1
set rcon_password "lala"
set allow_download 0
setmaster q2master.planetquake.com
map q2ctf1

Back to Top

The Variables
Here you will find the most used and most important variables to be set in your server.cfg.  To use these variables you simply put them on their own line in your server.cfg and assign a value to them according to what you want.  For a full list of variables that are available to Quake 2 I recommend you check The Console.

allow_download 0/1
- Toggles whether or not clients can download files from the server.
-Set to 1 to allow downloads
Example: set allow_download 0

You can also specify which items are downloadable with the following:  NOTE: allow_download 1 must be set for these to work.

allow_download_maps 0/1
-Toggles whether or not clients can download maps from the server
-set to 1 to allow downloads
Example: set allow_download_maps 1

allow_download_models 0/1
-Toggles whether or not clients can download models from the server
-set to 1 to allow downloads
Example: set allow_download_models 1

allow_download_players 0/1
-Toggles whether or not clients can download player skins from the server
-set to 1 to allow downloads
Example: set allow_download_players 1

allow_download_sounds 0/1
-Toggles whether or not clients can download sounds from the server
-Set to 1 to allow downloads
Example: set allow_download_sounds 1

capturelimit <#>
-Sets the maximum number of flag captures before the level changes
Example: set capturelimit 8

dmflags <#>
-Sets the Bitflags for deathmatch options
-Set by adding up all of the following values that you want to use:

1 - No Health.
2 - No Powerups.
4 - Weapons Stay.
8 - No Falling Damage.
16 - Instant Powerups.
32 - Same Map.
64 - Teams by Skin.
128 - Teams by Model.
256 - No Friendly Fire.
512 - Spawn Farthest.
1024 - Force Respawn.
2048 - No Armor.
4096 - Allow Exit.
8192 - Infinite Ammo.
16384 - Quad Drop.
32768 - Fixed FOV.
131072 - CTF Forced Join.
262144 - Armor Protect.
524288 - CTF No Tech Powerups.

Example: set dmflags 280084

The default dmflags here (280084) is set up as:

which works out to:
4 + 16 + 512 + 1024 + 16384 + 262144 = 280084

hostname "<name>"
- This sets the Name of your server.
Example: set hostname "Quake 2 CTF Server"

maxclients <#>
- This sets the maximum number of clients allowed on your server.
Example: set maxclients 16

fraglimit <#>
- This sets the maximum number of frags before the server switches to the next map
Example: set fraglimit 150

timelimit <max minutes before map change>
- This sets the maximum time the match will go before switching maps
Example: set timelimit 30

rcon_password <password>
- This sets the remote Console Password
example: rcon_password hacked

public 0/1
- Setting this to 1 makes it a public server and will make it report to the id Master server to show up in GameSpy
-To make your server report to a master other than the id Master use the setmaster command below.
Example: set public 1

- Allows you to specify a master server to report to
Example: setmaster q2master.planetquake.com

You can get a list of master servers from gamespys server page.

Back to Top

Custom Variables
You can setup Custom rules in your server.cfg for any miscellaneous stuff you would like to provide for GameSpy users such as the Web Site for the server or the admins e-mail address by setting the variable and adding an s after it like the following:

set WebSite "http://www.3dfxworld.ml.org/hellsgates/" s
set Admin "d0gmA" s
set e-mail "d0gmA@3dgw.com" s
set location "Michigan, USA" s

The s at the end tells GameSpy to pass this information on to the users GameSpy Rules section.  If the Custom rule contains a Web site address double clicking it in GameSpy will open the page in your browser.

I typically recommend that you set up 4 custom variables named Admin, e-mail, Location, and WebSite so that people that play on your server can contact you with problems and can find the web site associated with the server to find out about news, stats, mods, custom files, or anything else related to your server.

Back to Top

Remote Administration

If you want to be able to administer your server remotely one of the best choices is QHost from Xoanan Industries.  QHost runs on WindowsNT as a service and allows you to use QView to start, stop, schedule, and administer your server.  QHost allows you full use of the server console from a remote location.   QHost will also restart your server if it crashes.  For more information on QHost and Qview visit the Xoanan Industries web site.  QHost & QView also work with Quake, QuakeWorld, Hexen II, and Quake 2.   QHost is currently in beta but I have found it to be a very stable and very handy tool for running a remote Quake 2 server.

Another great Utility for the Quake 2 server operator is WarFTPD.  I typically set up WarFTPD so I have direct ftp access to the servers Quake2 directory so I can use QHost to stop the server and then ftp up any updates, patches or new mods that I want to add to the server.  WarFTPD is freeware and can be found at Jgaa's Internet.

Back to Top

Installing Mods

Read the Instructions
The first rule of setting up a mod is to read the instructions and make sure you understand what they say.  Unfortunately though you will find that a lot of time is spent making the mod and very little time is spent on documenting it.  Most mods require to go into their own directory under the Quake2 directory.  One thing to watch for with mods is some will tell you to make a directory for the mod under the Quake2 directory and then unzip their mod to that new directory.  Other mods will tell you to simply unzip the file to your Quake2 directory.  DO NOT TRUST THEM.  A good rule of thumb that I ALWAYS use is to unzip the mod to a temp directory and then copy all the files over to the appropriate directory.  I cannot tell you how many mods I have installed that were supposed to restore the appropriate directory but didn't and ended up as a pile of files in the root of my Quake2 dir.

Configure the Mod
Most mods will come with a server.cfg but some don't and will explain what needs to be included in it or in cases such as Lithium will include a lithium.cfg or something with their mods name .cfg.  In the case of Lithium I just copied the Lithium.cfg to server.cfg.  If it has no server.cfg then create one using the instructions above about the server.cfg.

Then you typically want to edit the server.cfg to include custom settings such as your hostname, maxclients, and add the custom variables as explained above.

Then all that is required is for you to change the command line so it reflects the correct mod.  Notice all you should have to change is the +set game variable in the command line:

quake2 +set dedicated 1 +set game ctf +exec server.cfg

As long as you took my advice above and configured everything in the server.cfg then you will be all set and switching from one mod to another will be as easy as changing the ctf to arena in the command line.  After you change the command line fire up the server either with QHost or your batch file and you should be on your way.

Back to Top

Ground Zero
Setting up a server using the Quake II Mission Pack 2: Ground Zero is pretty straigt forward except you have some new vatiables you can now use for the various new features that Rogue has coded into the pack.

Simply make a directory called rogue under your Quake 2 directory and copy pak0.pak, gamex86.dll to it and create a server.cfg as explained above and you have a Ground Zero server.

Here is the server section from the Release Notes:


    Quake II Mission Pack: Ground Zero is a simple add-on to the server. All of the normal/original deathmatch options apply, with the following additional flags:

    Deathmatch Flag Value Description
    DF_NO_MINES 131072 This removes A-M Bombs, Teslas, and Prox. Mines.
    DF_NO_STACK_DOUBLE 262144 This keeps players from adding Quad-damage and Double-damage to get 8X damage.
    DF_NO_NUKES 524288 This removes A-M Bombs.
    DF_NO_SPHERES 1048576 This removes spheres from play.

    The following is a list of the recognized deathmatch flags including the four mentioned above.

    DF_NO_ARMOR 2048
    DF_ALLOW_EXIT 4096
    DF_QUAD_DROP 16384
    DF_FIXED_FOV 32768
    DF_NO_MINES 131072 Quake II Mission Pack: Ground Zero Only
    DF_NO_STACK_DOUBLE 262144 Quake II Mission Pack: Ground Zero Only
    DF_NO_NUKES 524288 Quake II Mission Pack: Ground Zero Only
    DF_NO_SPHERES 1048576 Quake II Mission Pack: Ground Zero Only
    DF_DUALFIRE_DROP 65536 Quake II Mission Pack: The Reckoning Only


    CVar Default Value Description
    huntercam Default ON(1) This toggles ON/OFF the Hunter Sphere chase camera
    strong_mines Default OFF(0) This lets "quad" and "double" mines last the full time period.
    randomrespawn Default OFF (0) This makes deathmatch items respawn randomly within a group (i.e. health stays health, ammo stays ammor, etc.).
    gamerules 2 N/A Sets the deathmatch game for TAG.


Other new CVars

Spectator support added. A new cvar is built into the client, "spectator."  Setting it to value other than "0" will allow you join a game as a spectator.  While in spectator mode, you can press the attack button to enter a chasecam mode and follow other players. Using the inventory keys (by default the left and right square brackets) you can switch between players in the game while using the chasecam.  You may enter and leave spectator mode while connected. Doing so resets your score to zero.

New cvar for the game.dll: spectator_password. If set to a value (other than "none"), users must set their spectator variable to this value in order to join the server as a spectator. This password is independent of the normal user password.

New console command for players, "playerlist". This will cause the server to give you a text list of the players on the server, including their connect time, score, ping and spectator status. This is handy if not everyone fits on the scoreboard on busy servers.

New cvar for the game.dll: sv_maplist. This can be set to a list of map names that the server should autorotate through, rather than using the nextmap set in the actual map files themselves.  For example: set sv_maplist "rdm1 rdm3 rdm14 rdm5" will cause the server to rotate through those maps.

New server cvar: sv_airaccelerate. This controls the optional air acceleration facility. The default value is 0, which disables air control.    The usual value to replicate the air control seen in the original Quake and later versions of Quakeworld is 10. 10 allows for much more air control (as was seen in 3.15). This value is ignored in single player and coop.

Back to Top

Skins and Models
Quake 2 like QuakeWorld allows players to use different player skins and even cooler is the ability for users to use different models.  I like to keep a pretty good stock of models and skins on my server.  In my search for Quake 2 Models and skins I have found The Quake 2 Player Model Pack (Q2PMP) to be the greatest source of Models and skins.  I typically download the Server pack and only include the most popular models and skins on the server to save space.  One nice thing about the Server Pack 3.0 is that they have removed all the bad skins (mostly black).  The drawback is that they have included a lot of skins and models and it is a 78 meg download.

Using The PMP
To use the Player Model Pack and Skins you simply have to put them in the appropriate directory under the baseq2\players  directory.  Typically I have male, female, crakhor, cyborg, and zumlin with carefull attention to making sure each Player Model has a set of CTF skins.  In order to make sure the skins and models are downloadable you should also make sure all of the model and skin names and extentions are in lower case or they won't always work correctly. 

Back to Top

Other Resources
Here are some other great resources for Quake 2 server admins.

The q2servers FAQ Revision 1.3 - A great Quake 2 server FAQ from the Q2servers list at Planet Quake
The Console - A great reference guide for all the console commands in Quake 2
Fahrenheit176's Quake 2 Console Command list - Another great reference for console commands.
The Linux Quake Server Pages - Lots of good information for Linux Quake and Quake 2 servers.
LQ: Linux Quake and Utilities - Another great page for setting up Linux Servers

Back to Top

This Guide is hosted by 3D Gaming World the place for all your 3D Gaming Needs
Also feel free to check out my Quake 2 Server Hell's Gates²


Back to 3DGW

Copyright 1997, 1998, 1999, 2000 3D Gaming World All Rights Reserved.  Graphics, Logos, Images and brands are Trademarks and Copyrights of their respective owners. Privacy Policy