Build your OWN Quake On LAN
We regularly get asked for the login to Quake On LAN so people can make their own changes or just for curiosity. It’s not ideal for us to be giving out these details, mainly for security reasons (we are giving away the details to hundreds of installs out in the wild). However, we have decided to go one better – we will give the instructions to to build your own Quake On LAN!
The setup for Quake On LAN is actually relatively simple. It involves 5 elements
- A server binary that works on ARM
- GPL’d versions of all the Quake Deathmatch maps
- A script to launch the server
- A cron job to keep the server up and talk to the web server
- PHP script on the server side to log and report user IP addresses
The following steps allow you to install/configure the first 4 elements yourself, and add any customization you require to your particular instance.
You will need an SD card of at least 2GB in size on hand.
Download a the minimal Debian image for Raspberry Pi based on Debian Jessie, from here. Write the image to an SD card in the usual manner. For example:
dd if=raspbian-jessie-lite.img of=/dev/sdb
Insert the card into a Raspberry Pi and connect to a monitor and keyboard. Don’t forget to connect to your LAN via ethernet too. Boot it up and get the IP address from the command line using the ifconfig command (the default login password in “raspberry”.
As root (sudo -i to change user) make sure the following directory exists: /usr/local/games/quake. Navigate to that directory using the cd command.
Download the tarball file we have put together for you. It contain the Quake directory structure (excluding proprietary content) plus the pre-compiled Quakeworld binary for the server (courtesy of FTE QuakeWorld). The command to use is as follows:
wget http://www.quakeonlan.net/files/quakeonlan.tar.gz .
Now extract the file
tar -xvzf quakeonlan.tar.gz
We also need to create a launch script at /usr/local/bin/quake. You can use any editor you want, we prefer nano
Make the contents look like this:
#!/bin/bash cd /usr/local/games/quake/ # Forces a check-in with the server at http://www.quakeonlan.net # This is how clients know the IP of the Raspberry Pi on their LAN # This will need modification for wlan adapters # These 2 lines CAN be commented out if you assign a static IP address ip=$(ip addr show eth0 | grep -o 'inet [0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+' | grep -o [0-9].*) curl --silent http://www.quakeonlan.net/register.php?ip=$ip # Don't remove this bit though, it ensures the server stays up if [[ ! `pidof -s fteqw.sv` ]]; then # Restart Server exec ./fteqw.sv > /dev/null &2>&1 fi
and press CTRL + x to save/close the file.
Make the new file executable
chmod +x /usr/local/bin/quake
and double check the server binary is executable, just in case it lost this flag along the way somewhere (less troubleshooting later on)
chmod +x /usr/local/games/quake/fteqw.sv
now we need to make sure the script is called every minute. Execute crontab -e and add a line
* * * * * /usr/local/bin/quake
at the end of the file. CTRL + x to save/close.
Reboot. Your Quake On LAN box is now ready to go, and no longer needs screen keyboard etc. All it needs is power and an ethernet cable into your router LAN port! Ideally, you should change the default password on the RPi and you should ONLY boot up your RPi or a private network, as we always intended for this project.
If you need to customise your install in some way, now you can. Just ssh to the IP address of the RPi (as reported on this site) and execute whatever command you need, anytime you want!
$ ssh [email protected] <-- type this command in Linux Shell or else use PuTTY on Windows [email protected]'s password: <-- default password is "raspberry" The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Thu Jul 21 10:15:42 2016 from 192.168.1.198 [email protected]:~ $ sudo -i <-- type this to gain root access [email protected]:~# <-- you can now make changes to the system
Now that you are logged in to the RPi, you could for example configure it to use wireless rather than wired networking (assuming you have a wireless adapter).
In this example you would want the file to look like the screenshot below. You’ll need to swap “YOUR_SSID” and “YOUR_PASSWORD” for your WIFI name and password. Once done, save & close down nano in the normal manner.
Reboot the RPi and unplug the wired ethernet cable. Your Quakeworld server should still be available on the LAN. I haven’t tested this method, I’m just giving it as an example of how you now have full control over your Quakeworld server.