Skip to content

Docker image running one instance of nQuake/server-linux

Notifications You must be signed in to change notification settings

nvtkaszpir/server-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nQuake server docker

The nQuake server project contains everything needed to run a QuakeWorld KTX server with community standard configuration. It also comes packaged with QTV and QWFWD, allowing for spectating games and forwarding QuakeWorld traffic, helping people reach lower pings across countries thanks to more intelligent routing.

This project encapsulates the nQuake server inside an Ubuntu 16.04 docker image and provides helper scripts (both shell scripts and PowerShell scripts) that make starting, stopping and restarting containers very easy.

When the containers are started, configuration files are linked to the conf/server folder inside the repository. These can then be altered if you want to update your server configuration. Don't forget to restart the servers after having modified the configuration!

Prerequisites

Before downloading and running nQuake server docker, you should install the following:

Configuring Docker on Windows

When Docker has been setup, make sure you share the drive that contains/will contain the nQuake server docker files.

To do this, right-click the Docker icon and select Settings, then click Shared Drives and check the drive that you will clone the nQuake server docker repository to.

Also, since nQuake server runs inside an Ubuntu image, you need to enable Linux containers if running on a Windows 10 host. Right-click the Docker icon and click Switch to Linux Containers...

To enable running scripts in PowerShell, you will need to enable the unrestricted execution policy. Open an elevated PowerShell prompt and run the following command:

Set-ExecutionPolicy Unrestricted

Answer y.

All done.

Downloading

To download the files, simply open a terminal or PowerShell prompt (depending on your OS):

git clone https://github.com/nQuake/server-docker.git nquakesv-docker

Building

Linux:

./scripts/build.sh

Windows (in elevated PowerShell prompt):

.\scripts\build.ps1

This will build the nQuake server docker image that will be used to spawn server containers.

Running

Linux:

./scripts/run.sh [mvdsv|qtv|qwfwd] [num]

Windows (in elevated PowerShell prompt):

.\scripts\run.ps1 [mvdsv|qtv|qwfwd] [num]

The num parameter is the amount of servers to start.

Example (Linux):

./scripts/run.sh mvdsv 2

This will start 2 mvdsv containers.

Choosing port range

Linux:

echo -n 28501 > conf/port-mvdsv

Windows (in elevated PowerShell prompt):

28501 | Out-File -Encoding ASCII -NoNewline conf/port-mvdsv

This will set the port range for mvdsv to 28501-(28501+n).

The ports for qtv and qwfwd are kept in conf/port-qtv and conf/port-qwfwd respectively.

IMPORTANT! While you CAN set the ports by simply editing the files by hand, it is not advised since it may result in newlines and other characters that will be interpreted by the scripts and halt execution due to bad formatting.

Restarting containers

Linux:

./scripts/restart.sh [mvdsv|qtv|qwfwd]

Windows (in elevated PowerShell prompt):

.\scripts\restart.ps1 [mvdsv|qtv|qwfwd]

Example (Linux):

./scripts/restart.sh qtv

This will stop the qtv container.

Stopping containers

Linux:

./scripts/stop.sh [mvdsv|qtv|qwfwd]

Windows (in elevated PowerShell prompt):

.\scripts\stop.ps1 [mvdsv|qtv|qwfwd]

Example (Windows):

.\scripts\stop.ps1 mvdsv

This will stop all mvdsv containers.

Scenarios

Installing and running 4 mvdsv servers, 1 qtv and 1 qwfwd on Linux:

git clone https://github.com/nQuake/server-docker.git nquakesv-docker
cd nquakesv-docker
./scripts/build.sh
./scripts/run.sh mvdsv 4
./scripts/run.sh qtv
./scripts/run.sh qwfwd

Installing and running 3 mvdsv servers and 1 qtv on Windows:

git clone https://github.com/nQuake/server-docker.git nquakesv-docker
cd nquakesv-docker
.\scripts\build.ps1
.\scripts\run.ps1 mvdsv 3
.\scripts\run.ps1 qtv

Configuring the server

You might want to change some settings on the server. The configuration files are located in conf/server after running a container.

These are the configuration files:

Filename Description
passwords.cfg Passwords for server administration
mvdsv.cfg Configuration for the mvdsv server
ktx.cfg Configuration for the ktx mod
port.cfg Base configuration for ktx ports
matchless.cfg Configuration for matchless mode (ffa)
vip_ip.cfg List of VIP users
ban_ip.cfg List of banned IP numbers
qtv.cfg Configuration for qtv server
qwfwd.cfg Configuration for qwfwd proxy
demos/ Folder for storing match demos
logs/ Folder for storing server logs

About

Docker image running one instance of nQuake/server-linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published