Roll your server

...with Blackjack and hookers!

Hosting your own QuakeWorld server is not mandatory, but since not many of existing welcome hackers, I wrote down some notes for anyone who wishes to expand the playground.

Prerequisites

I would highly recommend running your server containerised. Running a managing more configs and/or services of this nature outside of Docker can be messy. Follow your distro specific documentation for installing docker properly.

You will also need official content files (.pak files) with game textures, models and so on. Luckily, the game costs less than cup of coffee, so this should not be a real problem.

[option A] mvdsv + KTX server

On your VPS in non-root users home, create directory qwhvh and inside it create these subdirs:

mkdir qwhvh qwhvh/id1 qwhvh/ktx qwhvh/demos qwhvh/logs && cd qwhvh

Copy your PAK0.pak and PAK1.pak files from Quake game files inside the id1/ dir. Easiest way to do it (if you don't have SFTP already established) is to temporarily upload them on the web and curl them directly to the directory.

Then create new or curl mine working config files. (Dockerfile docker-compose.yml ktx/server.cfg).

Now we may build the image:

docker compose build --no-cache

Now we may modify the game mode configs as the KTX generated the files needed. These can be found in ktx/configs/usermodes/. Check out example game mode configs in the KTX project repository.

Let's start the server.

docker compose up -d

Then open the game ports on distro firewall and the VPS application firewall settings in your account dashboard as well. And that's it, happy hacking!

[option B] FTEQW server

NOTE: For the purposes of this tutorial, I will assume that you didn't decided to run both mvdsv and FTE servers at once. If you did however, don't forget to change the server root directory name and port numbers, otherwise you would run into problems.

On your VPS in non-root users home, create directory qwhvh and inside it create these subdirs:

mkdir qwhvh qwhvh/id1 qwhvh/id1/maps && cd qwhvh

Copy your PAK0.pak and PAK1.pak files from Quake game files inside the id1/ dir. Easiest way to do it (if you don't have SFTP already established) is to temporarily upload them on the web and curl them directly to the directory.

Then create new or curl mine working config files. (Dockerfile docker-compose.yml id1/server.cfg).

Now we are ready to build.

docker compose build --no-cache

And start the server.

docker compose up -d

Then open the game ports on distro firewall and the VPS application firewall settings in your account dashboard as well. And that's it, happy hacking!

Adding a domain name

This is optional step. You can connect to server using domain name or directly with IP address

This is quite easy and doesn't require any server side config setup. First get your servers IP address. You should have it in your VPS panel or you can run command on your server.

hostname -I

Then you need to register (buy) the domain name. There is many registrars to choose from. Then, when in admin panel of your domain name registrar, simply point the A record to your IP address.

Customizing the server

Most common way to customize your server in competetive hack vs hack is adding custom maps and textures. To add custom map, simply curl the .bsp file you want from the quakeworld.nu map index directly to your maps directory.

For both servers that would be:

curl -o qwhvh/id1/maps/custom-map.bsp https://maps.quakeworld.nu/all/<custom-map-name>.bsp

To modify maps like adding custom textures (e.g. with your server logo), reffer to this Quake Wiki tutorial.

Known issues

Sometimes the server shows offline status, but is actually running. Logs show Setting nomaster mode and SV_BroadcastUpdateServerList: No master servers configured, repeated on every restart. The container simply lost DNS resolution and keeps falling back to "nomaster". This happens mostly on mvdsv + KTX server.

To fix this, simply re-build the container.