Quake
Mezmorki Oct 6, 2015 @ 9:38am
From Hell and Back: Guide to Running a NetQuake Server
The following is a guide (or better yet a testimony) for how I struggled and eventually persevered[quakeone.com] in hosting my own dedicated quake (netquake) server from home, obtaining a DNS name, and then twiddling my thumbs as I wait for the deluge of players. Most of what I describe below is me learning from mistakes, so hopefully I can spare you some agony should we wish to embark on such a painful venture yourself.

* Note, this guide assumes you are (like me) using Windows. If you are using Linux you probably don’t need this guide! But if you do, adjust accordingly.

** Note 2 - I don't own Quake on steam, so I can't post this in the guide section. Maybe a moderate can sticky this instead if it is useful for people?
Last edited by Mezmorki; Oct 6, 2015 @ 9:48am
< >
Showing 1-6 of 6 comments
Mezmorki Oct 6, 2015 @ 9:38am 
PART 1: Setting up the Home Network

At a minimum you need three pieces of hardware to get a server working:

#1 - A cable modem (or some other type of internet modem, duh)
#2 - A router (wifi router, combo modem/router, etc.) connected to your cable modem
#3 - A computer to host the dedicated server, connected to router with ethernet (don’t use wifi!)

The computer, ideally, is one that is not being used extensively for other tasks. I had an older WinXP laptop that I reformatted and cleaned up to use as a dedicated server. I don’t think the server demands are particularly demanding by today’s standards, so any computer made in the last 10 years should be more than adequate to host a dedicated server. The dedicated server should be connected to your router via ethernet. Don’t use wifi as the performance is going to be more unpredictable.

I don’t know exactly what sort of internet connection you really need to host a server. In my case, I have cable with a plan that nets be about 40bps downsteam and 15bps upstream as reported by various internet speed tests (e.g. http://www.speedtest.net). So far this has proven adequate. Compared to even 10 years, home internet speeds are much faster, so I think it is quite possible to host your own server at home.

Configuring the Router
Quake, specifically NetQuake, uses a default port of 26000 and only-god-knows-how-many other ports for the clients to connect. You will need a forward a large number of ports (at a minimum all of them, at least initially) to your server computer. We need to give the server a static IP address on the local network so that we can forward the ports to it correctly. Follow these steps:.

(1) Assign your server computer a static internal IP address.
Access your router’s configuration menu (read the manual for your router if you need to know how to do this) and look for the options (often under DHCP settings) for assigning static IP addresses. You will need to know your server computer’s ethernet card MAC address, and use that to assign a static ip to the server (e.g. 192.168.1.100). If you need to find your MAC address, open the command prompt (in Windows) and type “ipconfig /all” and you’ll see the MAC address listed under your ethernet adapter. Once you’ve assigned a static IP to the server, you can use “ipconfig” to verify that the static IP address has been assigned.

(2) Forward ports to the server.
Access your router’s configuration menu and look for the port forwarding / port range forwarding section (note that some Asus routers call port forwarding “Virtual Server” - I don’t know why but they do!). For now, forward nearly all the ports (I use 2000 - 60000) for both TCP +UDP. Later, and depending on what quake server engine you are using, you might be able to get away with opening less ports. More on that later.

Alternatively, or if you are needing to troubleshoot connection problems, you can put the server temporarily into a DMZ using its static IP address. The DMZ settings will be somewhere in the router’s configuration menu. Essentially, a DMZ automatically opens all the ports of the specified computer to the internet, so it can be useful for troubleshooting.

PART 2: Configuring the Quake Server

First things first, you need Quake. I was interesting in running a NetQuake server (as opposed to QuakeWorld), and the server engine of choice is ProQuake. Word on the street is that ProQuake 3.5[www.quakewiki.net] (the older version) is more battle-tested as a dedicated server platform, whereas the 4.X and above versions are more for clients. (ProQuake feature list: HERE[www.quaketerminus.com])

DO read the fineprint on installing ProQuake. I spent days wondering why clients couldn’t connect until I realized that ProQuake needs to be installed on top of WinQuake (as it uses many of WinQuake’s dll’s). At a minimum, you need the following to get a quake server working:

- WinQuake[www.quaddicted.com] installed into your “Quake” folder.
- ProQuake 3.5[http//ftp] extracted into your “Quake” folder (wqpro.exe being the executable to use)
- Original quake pak files located in Quake/id1 folder (pak0.pak and pak1.pak). You need to buy the game!

At this point, we need to create a shortcut (in windows) to wqpro.exe that will let us modify the command line parameters to get the dedicated server running correctly. Right-click on wqpro.exe and make a shortcut, then edit the shortcut “target” by editing the shortcut’s properties. Try the following command line to get you started:

c:\quake\wqpro.exe -dedicated 16 -condebug -mem 64 -zone 2048 -ip 192.168.1.??? -udpport 26000 -game ???? +deathmatch 1

What do all these command line parameters do?

-dedicated 16: launches the engine in dedicated server mode with a max of 16 clients. You can have the max clients at less than 16 if you want.

-condebug: saves a server console log when the server closes or crashes so you can review it later for troubleshooting purposes.

-mem 64: allocates 64mb of memory to the game. Alternative to -heapsize (which uses mbs)

-zone 2048: allocates 2 mb of alias memory

-ip 192.168.1.???: This IP should match your static IP address that you assigned the server computer in your router settings (e.g. 192.168.1.100).

-udpport 26000: This is the primary connection port for your server. If you are running multiple servers on the same machine, specify a different udpport for each (e.g. 26001). 26000 is the default port for NetQuake servers and clients.

-game ????: The ???? should correspond to the game mod folder for whatever mod you are running on your server. You don’t need to run a mod, in which case don’t use the -game parameter at all. More on running mods below.

+deathmatch 1: This puts the server into deathmatch mode. Note that the “+” instead of a “-” means that this is a console command being called through the command line, as opposed to the normal command line parameter. If you are using a server config file and/or a server mod, you probably want to control the game settings elsewhere in which case don’t include this in the command line.

Testing Server Connectivity
At this point, you should be able to test and see if your server is working correctly from a connectivity standpoint. On a local client computer, launch quake (whatever NetQuake client you are using, e.g. ProQuake, qrack, winquake, glquake), and type “connect 192.168.1.100” (or whatever local the local IP address for your server is). You should enter into the game! If so, congrats, you’ve passed the first test!

Next, you’ll want to test external connectivity (verifying that your port forwarding settings are working correctly). Get one of your buddies to launch quake try to connect using your WAN IP address. Your WAN IP address is usually listed in your router config, or you can simply google “my ip” and google will kindly report your WAN IP address that is provided by your internet service provider (ISP). Have your buddy type “connect x.x.x.x” (using your WAN ip) and see if they can join. If so, congrats!

Troubleshooting Connectivity Problems
In the process of getting my own server running, I’ve had nearly every conceivable problem that could happen, happen. So here are a number of troubleshooting things to try and check:

- If you can’t connect to your server locally, it could be a result of “cheapass router syndrome.” I cannot connect an ethernet-connected client to my ethernet-connected server if both are plugged into my router’s ethernet ports. I got a small 4-port switch (i.e. ethernet hub) and strangely enough plugging both client and server into the hub, and then connecting the hub to the router, lets it all work. I have a cheapass router, so this got around its deficiencies.

- Make sure that you can ping the server locally and remotely. Open the command prompt and type “ping x.x.x.x” for either the local server IP (if pining locally) or based on your WAN IP (if pinging from an external client). If you can’t ping, it could be that your router and/or your computer is blocking ping requests.

- Try disabling router firewall and/or your server computer firewall and see if that resolves connection issues.

- Try putting the server computer into a DMZ as described earlier.

- Try using a different quake executable/engine to host the server and see if that resolves the issue. I had luck using winquake and qrack for hosting servers as well as proquake.

Barebones Server Config
In general, you will want to create a server.cfg file in your quake\id1 folder (or in the appropriate mod folder) to specify additional server settings. A server config might look something like this (note that lines with “//” are comment lines are not read by the server):

//-------------------------------------------------------------------------
// My Quake Server Config Settings
//-------------------------------------------------------------------------

hostname “13 Acres of Hell!!!” // the server name displayed to players

fraglimit “30”
timelimit “15”

pausable “0” // don’t want people pausing the action!
sv_aim “2” // disables auto-aiming stuff that irritates people
sv_maxspeed “320” // 320 is the default player movement speed
sys_ticrate “0.025” // speed of info packet updates for better performance

deathmatch 1 // classic deathmatch mode

//coop 0/1 // enables or disables coop mode
//skill 0-3 //adjust difficulty for coop play (0 = easy; 3 = nightmare)

noexit 1 //1 = players cannot exit levels, 0 = players can exit levels)

samelevel 1 //1 = current level replays endlessly; 0 = level rotates to the next level)

changelevel dm1 //switches the map to DM1 when this config is run)

//-------------------------------------------------------------------------

To use your server.cfg, once you launch the dedicated server, simply type “exec server.cfg” (or whatever you named your .cfg file) to run it.

If you are running a server mod, may of the above options may have additional parameters or functions associated with them. For example, mods that support “deathmatch 3” mode (weapons stay) or different level rotations may modify some of these console variables (CVARs). Refer to your mods documentation on setting up an appropriate server config file.

If you want to host a QuakeWorld server, many of the same procedures here will apply, although you will be using a different selection of quake server and client software (e.g. ezquake, nquake).
Last edited by Mezmorki; Oct 6, 2015 @ 9:42am
Mezmorki Oct 6, 2015 @ 9:41am 
PART 3: Obtaining & Using a DNS Name

A DNS name provides an alternative means of connecting to your server that doesn’t require using your IP address. For hosting a public server especially, you should use a DNS name so that people don’t have to type your WAN IP address to connect to your server. Additionally, many internet provides use dynamic IPs for home connections, meaning that your IP address may change frequently, in which case you then have to constantly tell people what your new IP address is. Not a good situation.

There are a lot of DNS service you visit on the web (e.g. http://www.dyndns.com or http://www.noip.com), which will generally require you to pay an annual fee for a custom DNS name. We don’t want no stinking fees. An alternative is using the services of http://freedns.afraid.org/, which has a large number of domains that you can use to piggyback your own custom subdomain on.

Head over there, register, click on “subdomains” and browse the list of public domains that you can use. For example, I found “pwnz.org” and added a subdomain for “acres.pwnz.org” for my server. Fill out the little forum (use “A” type domain) and add your current WAN IP address. That’s pretty much it!

Within a few minutes (usually), you should be able to “ping your.dns.name” in the command prompt and see it resolve and ping your WAN IP. You can also use the command “nslookup your.dns.name” and that should report your WAN IP address. If those are resolving correctly to your IP address, they should be working correctly!

Dynamic DNS
If you have a dynamic IP address from your ISP (most of us probably do), then you’ll want to setup a means of updating your DNS service when your IP address changes. There are two ways you can do this.

Option 1 - Routers generally have some options for DDNS configuration, which will let you select a DNS service provider (e.g. dyndns.com), enter your account information, and establish a connection that will automatically update the DNS name when your IP changes. The problem with this approach is that most routers will only support a limited number of DNS providers, and increasingly the ones that charge you money. If you want to get around this and use, for example, freedns.afriad.org, you’ll need to update your router with custom firmware that supports your desired DNS service (e.g. DD-WRT). Using custom firmware on a router is a whole separate can worms beyond the scope of this article.

Option 2 - Run a DDNS utility on your server computer. This is much easier than flashing router firmware. Basically, your chosen DNS service provider may have one or more utility programs you can download and run in the background that monitors your IP and updates the DNS service if and when your IP changes. freedns.afraid.org has a number of windows utilities[freedns.afraid.org] that you can use to do this. “FreeDNS Update” is very straightforward to use. Download it, install it, add in your freedns.afraid.org user name + password, and it will pull down your list of DNS names and start monitoring.

Troubleshooting DNS Issues
See if you can connect locally and externally to server using the DNS name. If you are using a port other than the default for your server, clients will need to append the port name. In the quake console, they would type “connect your.dnsn.name:portnumber”, where portnumber is the value specified in the -udpport command line parameter.

If clients cannot connect, try using “nslookup your.dns.name” to verify that it is resolving correctly to your IP address. If it is, then there is some sort of ambiguous router problem at work. My cheapass router WILL NOT WORK with DNS names, as it fails to correctly route clients to the server. I swapped out my bad router for a different router and everything immediately started working.

Another discovery is that if you start your dns name with a subdomain that begins with a number, it may not resolve correctly. This is, I believe, a quake engine problem, but subdomains starting with a number apparently do not conform to international interwebz standards. Or something like that. I was trying to use 13acres.pwnz.org forever, and it just wouldn’t work. I dropped the 13 off the front and it instantly started working (so it’s just acres.pwnz.org). Go figure!


PART 4: Server-Side Mod

Most likely you will want to run some sort of server-side mod to expand the features and options available to players on your server. Generally, these features include things like custom messages of the day (MOTD) or welcome screens, custom map and level rotation support, in-game voting commands, expanded support for teamplay, new gameplay modes, and so on. Server-side modes are ideal because they do not require players to download and configure mods on the client side before they can join your server.

Regardless of which mod you end up running, you will need to read through the documentation and experiment with configuration settings to get the mod working as you wish. Mods are installed each in their own subfolder within your Quake directory (e.g. “c:\quake\runes”), and are run by adding the “-game MODNAME” to your dedicated server command line shortcut.

The most popular NetQuake server-side mods include:

- Clan Arena X[quakeone.com] (CaX): Various settings for round-based matches, teamplay modes, and custom level support (up to 10 maps only).

- Clan Ring Mod[www.crmod.com] (CRMOD): Lots of vote options, multiple modes (normal FFA, Match, Individual, Practice mode), deathmatch 3, teamplay options, custom map support (up to 10 maps only).

- RuneQuake[www.runequake.com]: Normal mode adds many dozen runes to the game for a pretty crazy game experience, but also supports non-rune gameplay, and even has a Head Hunters Mode (wOOt!). Great support on the Rune Quake Forums.

I’ve been using RuneQuake because it has better support for custom maps, really nice in-game voting options, and highly configurable game modes. The mod does require you to edit QuakeC source files that are provided and recompile the mod with your settings. The basic changes are very straightforward and a programming novice (like me!) can figure it out relatively easily.

Of course there are many other mods out there that you may wish to experiment with!


Conclusion

Hopefully this guide is/was useful for those wishing to setup their own dedicated quake servers. I spent weeks working back and forth to get all the bugs ironed out in my own setup. Unfortunately, most of my issues stemmed from having a lower quality router, and replacing it was critical for getting certain things (i.e. the DNS name) to work.

If you are hosting a netquake server, you may want to let the admins over at http://quakeone.com know so that they can update their server list.

Special thanks to Slot Zero, Endbringer, Spike, Mindf!3ldzX, Baker, and r00k for helping me along with all of this. I appreciate it!
Last edited by Mezmorki; Oct 6, 2015 @ 9:45am
Do you need a dynamic DNS name?
You know your ISP provides you with one per connection right?
Mezmorki Oct 6, 2015 @ 11:29am 
Originally posted by TabrisDarkPeace:
Do you need a dynamic DNS name?
You know your ISP provides you with one per connection right?

Your ISP might provide you with one ... totally depends. I don't think comcast that I use provides me with one. Besides, you might want more control over what your DNS name is. freedns.afraid.org has huge (as in 1000's) of domains registered that you can freely attach a subdomain to, so you have lot of choice.

Technically, no you do not need a DNS name, but it certainly makes it easier for people to remember your server and connect to it.
Last edited by Mezmorki; Oct 6, 2015 @ 11:30am
Hello Oct 7, 2015 @ 3:14am 
You could (re)post this in the Steam Guides section for better accessibility.
Mezmorki Oct 7, 2015 @ 5:57am 
Originally posted by negke:
You could (re)post this in the Steam Guides section for better accessibility.

I don't own Quake on steam, so it won't let me post a guide there. If someone else wants to re-post it there and give me credit back to this thread, I'm cool with that.
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Oct 6, 2015 @ 9:38am
Posts: 6