Sign inSign up

nephatrine/quake2-q2pro

By nephatrine

•Updated 6 days ago

Container w/ Q2Pro

Image
0

10K+

nephatrine/quake2-q2pro repository overview

⁠Quake II Dedicated Server

Git: NephCode Git: GitHub OCI: NephCode OCI: DockerHub unRAID License: ISC

This is an Alpine-based container hosting a Q2Pro dedicated game server.

To serve the optional HTTP mirror for game files, you will need a web server, such as nephatrine/nginx-ssl⁠.

⁠Supported Tags

  • quake2-q2pro:latest: Q2Pro Master Branch

⁠Software

⁠Configuration

These are the configuration and data files you will likely need to be aware of and potentially customize. QUAKE2_DATA, if unspecified, will default to /mnt/config/data/quake2.

  • ${QUAKE2_DATA}/baseq2/server.cfg
  • ${QUAKE2_DATA}/*

Modifications to some of these may require a service restart to pull in the changes made.

⁠Container Variables
  • TZ: Time Zone (i.e. America/New_York)
  • PUID: Mounted File Owner User ID
  • PGID: Mounted File Owner Group ID
  • QUAKE2_DATA: Use Quake II Here (i.e. /mnt/config/data/quake2)
  • QUAKE2_INSTALL: Install Quake II Here (i.e. /mnt/config/data/quake2)
  • QUAKE2_MIRROR: Create HTTP Mirror Here (i.e. /mnt/mirror/www/quake2)
  • GAME_START: Extra Game Arguments (i.e. +exec server.cfg)

⁠Testing

⁠docker-compose
⁠Simple Server

This is just a simple Quake II server.

services:
  quake2-q2pro:
    image: nephatrine/quake2-q2pro:latest
    container_name: quake2-q2pro
    environment:
      TZ: America/New_York
      PUID: 1000
      PGID: 1000
    ports:
      - 27910:27910/udp
    volumes:
      - /mnt/containers/quake2-q2pro:/mnt/config
⁠Server w/ HTTP Mirror

This setup uses a simple NGINX container to serve an HTTP mirror of the maps and other game files so that modern Quake II clients can download missing files more easily.

services:
  quake2-q2pro:
    image: nephatrine/quake2-q2pro:latest
    container_name: quake2-q2pro
    environment:
      TZ: America/New_York
      PUID: 1000
      PGID: 1000
      QUAKE2_MIRROR: /mnt/mirror/www/default
    ports:
      - 27910:27910/udp
    volumes:
      - /mnt/containers/quake2-q2pro:/mnt/config
      - /mnt/containers/quake2-http:/mnt/mirror
  quake2-http:
    image: nephatrine/nginx-ssl:latest
    container_name: quake2-http
    environment:
      TZ: America/New_York
      PUID: 1000
      PGID: 1000
      ADMINIP: 127.0.0.1
      TRUSTSN: 192.168.0.0/16
      DNSADDR: 8.8.8.8 8.8.4.4
    ports:
      - 80:8080/tcp
    volumes:
      - /mnt/containers/quake2-http:/mnt/config
⁠Multiple Servers

In some cases you may want to run multiple Quake II servers on a host that all share the same data directory to avoid file duplication. In this case, you can set up one of the containers to install the Quake II data to and then point the other containers to the first's data directory.

services:
  quake2-q2pro-1:
    image: nephatrine/quake2-q2pro:latest
    container_name: quake2-q2pro-1
    environment:
      TZ: America/New_York
      PUID: 1000
      PGID: 1000
      QUAKE2_INSTALL: /mnt/shared/data/quake2
      GAME_START: +set net_port 27910 +exec server.cfg
    ports:
      - 27910:27910/udp
    volumes:
      - /mnt/containers/quake2-q2pro-1:/mnt/config
      - /mnt/containers/quake2-data:/mnt/shared
  quake2-q2pro-2:
    image: nephatrine/quake2-q2pro:latest
    container_name: quake2-q2pro-2
    environment:
      TZ: America/New_York
      PUID: 1000
      PGID: 1000
      QUAKE2_DATA: /mnt/shared/data/quake2
      GAME_START: +set net_port 27911 +game ctf +exec server.cfg
    ports:
      - 27911:27911/udp
    depends_on:
      - quake2-q2pro-1
    volumes:
      - /mnt/containers/quake2-q2pro-2:/mnt/config
      - /mnt/containers/quake2-data:/mnt/shared

We specify the +set net_port 27911 argument for the secondary server to change the actual internal port rather than just setting the composed ports as 27911:27910/udp because the internally set port is also the port advertised on master servers so needs to match the external port if you plan on showing up properly.

⁠docker run
docker run --rm -ti code.nephatrine.net/nephnet/quake2-q2pro:latest /bin/bash

Tag summary

Content type

Image

Digest

sha256:49a9fb57d…

Size

30 MB

Last updated

6 days ago

docker pull nephatrine/quake2-q2pro