- Notifications
You must be signed in to change notification settings - Fork0
Universal binaries for ioquake3 dedicated server. Host a Quake 3 Arena server anywhere, from toasters, through PCs and smartphones, to IBM Z mainframes! This is a mirror of my GitLab repository.
License
Emzi0767/ioq3-universal
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This project aims to create universal binaries for ioquake3 dedicated server, allowing you to turn any device with ageneral-purpose processor into a Quake 3 Arena dedicated server.
Executable binaries can be grabbed from:
The Docker images are available at:
The distribution includesonly the server binary. To obtain the Quake 3 Arena .pk3 files necessary to run the server,you must purchase a legitimate copy of Quake 3 Arena. You can do so in places such as:
- Steam
- GOG
- eBay (used physical copy; make sure it's authentic, however)
- perhaps other videogame retailers
Whatever you do, avoid key resellers. They are more likely to scam you than provide you with a legitimate, workingcopy.
If you happen to own an old copy, make sure it's updated to Point Release 1.32c:
The image contains a statically-linked version of the ioquake3 dedicated server. The following platforms are supported:
- x86 (i386) - old PCs
- x86-64 (AMD64) - modern PCs
- AArch64 (ARM64, ARMv8) - modern SBCs like Raspberry Pi 4, modern smartphones, modern routers
- ARMv7 - older SBCs like Raspberry Pi 2, old smartphones, older routers
- ARMv6 - very old SBCs like Raspberry Pi 1, very old smartphones, very old routers
- PowerPC 64 little-endian (PPC64le) - IBM POWER-based computers, old gaming consoles
- S/390 (s390x) - IBM Z-based mainframes
- RISC-V64 (riscv64) - uh... yes. but look on the bright side: it can host a Quake 3 Arena server now!
I can make an attempt to provide images for other architectures, provided LLVM has a compiler toolchain available forthe target platform. If you have any requests, let me know via issues, or make a merge request!
The image is distroless, and contains only the statically-linked binary of the dedicated server. As such, no shell isavailable inside.
The image tag is:mzgit.io/emzi0767/ioq3-universal/ioq3-universal:latest
Image requires having access to originalpak*.pk3
files from Quake 3 Arena 1.32 point release. The directorycontaining them will have to be mounted to the container at/quake/baseq3
. You will also have to create a writabledirectory, owned by uid 666/gid 666 to mount at/quake/home
. These can be created with the following command:mkdir -p baseq3 home && sudo chown -R 666:666 home
Assuming your.pk3
files are placed in abaseq3
directory in the current working directory, and you have ahome
directory with the required permissions, the fastest way to get a server running is via the following command:
docker run -it --read-only \ --mount type=bind,src=./baseq3,dst=/quake/baseq3,readonly \ --mount type=bind,src=./home,dst=/quake/home \ -p 27960:27960/udp \ --name=quake3 \ mzgit.io/emzi0767/ioq3-universal/ioq3-universal:latest
You will need to make sure that UDP port 27960 is accessible for both incoming and outgoing traffic on the host.
NOTE: Docker Desktop for Windows introduces networking issues, which make it impossible to connect to a serverhosted under it. As such, it is recommended you install Docker (but not Docker Desktop) in a VM or WSL, and run it inthat, or host the container on another machine altogether.
You can also use a specific version instead oflatest
, these are available underci-NNNNN
, e.g.ci-00007
.
Note that by default the server will not be playable, you need to at least load a map. For details, see section below.In case of inputting commands to the server's console, you must omit+set
.
Due to the tiny footprint of this image (generally <32MiB RAM usage), it is possible to host a Quake 3 Arena server on asufficiently powerful MikroTik router. For more information on how to use containers on RouterOS 7,see RouterOS documentation. It isstrongly recommended touse USB storage, as containers might wear down your devices internal storage very fast.
It should be noted that only ARM- and ARM64-based routers, and CHR instances can run this image, due to architecturesupport. To find out which architecture your router is based on, log in via WinBox or CLI, and run/system/resource/print
(or find analogous option in WinBox), and look forcpu:
section.
Because MikroTik's container implementation doesn't handle distroless containers at all, a special Alpine Linux-basedimage set was prepared for this purpose, under the tag ofmzgit.io/emzi0767/ioq3-universal/ioq3-mikrotik:latest
.
First step is preparing mounts. You will need 2 of them. In CLI, these can be set up via:
/container/mounts/add name=quake3-baseq3 dst=/home/quake3/ioq3/baseq3 src=/local/path/to/baseq3add name=quake3-home dst=/home/quake3/.q3a src=/local/path/to/quake-home
Next you will have to import the image to the router. On a PC with docker, do the following, depending on router'sarchitecture:
- CHR (x64):
docker pull --platform=linux/amd64 mzgit.io/emzi0767/ioq3-universal/ioq3-mikrotik:latest
- ARM:
docker pull --platform=linux/arm/v7 mzgit.io/emzi0767/ioq3-universal/ioq3-mikrotik:latest
- ARM64/CHR (AMPERE):
docker pull --platform=linux/arm64/v8 mzgit.io/emzi0767/ioq3-universal/ioq3-mikrotik:latest
In all below commands you have substitute provided paths and addresses with ones appropriate to your environment.
Next step is exporting the image:docker save mzgit.io/emzi0767/ioq3-universal/ioq3-mikrotik:latest -o quake3.tar
. You will have totransfer this file to the router. The easiest method is SCP, if you have FTP set up:scp quake3.tar admin@192.168.88.1:/path/to/images/quake3.tar
.
Once transferred, you will need to create a VETH interface on the router, and set up the container:
/interface/veth/add name=veth-quake \ address=container_ip \ gateway=container_gateway/container/add file=/path/to/images/quake3.tar \ interface=veth-quake \ root-dir=/path/to/containers/quake3 \ mounts=quake3-baseq3,quake3-home \ logging=yes
This will create a container in a stopped state. You can start it now, this will cause it to error out but it willcreate necessary directories. Final step is to transfer your.pk3
files to the router. This can, again, be easily donewith scp:scp pak*.pk3 admin@192.168.88.1:/local/path/to/baseq3
. Once this is done, you can restart the container andit should work this time. Note that this will not do much at this stage. To actually launch a game, load maps, spawnbots, etc., you will need to find a way to edit configs stored in thequake3-home
mount for the server, or you willhave to specify those options viacmd=
parameter to/container/add
(e.g.cmd="+set bot_enable 1 +set g_spskill 2 +set bot_minplayers 4 +map q3dm7"
). Currently it is not possible to interactwith stdin of a container running on a MikroTik, so you should also enable rcon if you want to manage the server withoutrestarting it. For more command info, see static binary section.
In addition to Docker images, the CI process now spits out static binaries (found under Deploy > Package Registry) forall supported architecture. These binaries are statically-linked against musl libc using Clang, LLVM, and LLD. Thesebinaries are standalone insofar as additional binaries and libraries go. The.pk3
files required for the server to runmust still be supplied separately.
The binaries come in 2 flavours, stripped and non-stripped. The former have all unnecessary data (such as debugginginformation) removed, making the binaries smaller. There is, however, no performance impact to this.
To run the server, create a directory namedbaseq3
where the server binary is created, and put your.pk3
files init. Create a folder for the server to store its configuration in, and make sure the user which the server will run ascan write to it (typically you want permissions to be 700 or 755, with owner being the user). To run the server, youneed to specify several arguments on the command line:
./ioq3ded-static +set dedicated 1 +set sv_allowDownload 0 +set com_hunkmegs 64 +set com_homepath /path/to/the/config/dir
In this state, the server will not be playable. You need to at least load a map (+set map q3dm7
). If you wish toenable bots, you can additionally specify+set bot_enable 1 +set g_spskill 2 +set bot_minplayers 4
(replace 4 with thedesired minimum total number of players). Every actual player joining will replace 1 bot, so specifying 4 means that if2 players join, only 2 bots will remain.g_spskill
controls bot difficulty level: 2 is default, 0 is easiest, 5 ishardest. Further command and variable documentation can be foundhere.
While the static binaries can be ran under Android, it requires jumping through some extra hoops. Google no longerallows distributing apps with this functionality via the Play Store. This means that you cannot run the static serverbinary under e.g. Termux, if it was installed from the Play Store. It can still be done via apps that were compiledwith such functionality, such as Termux installed from GitHub or F-Droid. But not everyone wishes to put in that extraeffort, and therefore I opted to provide a solution in the same spirit as the MikroTik container. These binaries arecompiled against Bionic libc, using Android NDK. The binaries require API level 24 (Android 7.0).
I currently provide binaries for the following architectures:
- ARMv7 - old smartphones and tablets, also some very low-end devices
- AArch64 (ARM64, ARMv8) - modern smartphones and tablets
- x86 (i686) - some old smartphones and tablets
- x86-64 (AMD64) - mostly emulators
- RISC-V64 (riscv64; requires API level 35 / Android 15) - prototypes, probably
These binaries can be ran under terminal emulator apps installed from the Play Store as well as any other source.To install and run the server, follow the same instructions as for the static binaries.
Ever had an old computer and nothing to do with it? Well, in my case, the motivator was seeing if my MikroTik hAP ac²router, which has 128MB of RAM, could host a game. But since I was creating a build setup for a rather old CPUarchitecture, why not include other old and/or exotic architectures while at it?
About
Universal binaries for ioquake3 dedicated server. Host a Quake 3 Arena server anywhere, from toasters, through PCs and smartphones, to IBM Z mainframes! This is a mirror of my GitLab repository.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.