NetPanzer Server Setup HowTo

2020-01-12 16:05:22

Matthias Braun, Copyright © 2004

Table of Contents

This is a preliminary version of the netpanzer server howto. Feedback and improvement to the scripts, tips&tricks are appreciated.


The server comes with the normal netpanzer package, look into the README there on how to install netpanzer.


You can find the server configuration file in your home directory in .netpanzer/config/netpanzer-dedicated.ini. If this file doesn't exist yet, start your server once and quit (by using the quit command) and this file should have been created. You can find a description of all theconfig commands in the netpanzer README.


If your server is using a firewall, you have to forward port 3030 TCP+UDP. You can change this port with the port setting in the config file.

Startscripts and Tools

Restart on crash

Unfortunately the netpanzer server is not as stable yet as it should be. So you should install a script that restarts the server automatically in case of a crash. This can be achieved with the following script (called


# insert the directory of the server binary here

cd $DIR
while [ $running = "yes" ]; do
    ./netpanzer -d $@
    if [ $? -ge 128 ]; then
        echo "`date`: Restarting server after crash"
        # wait a bit to not blow cpu and logfiles on constant crashs
        sleep 30
        #normal exit


Typically you don't always want to monitor your server in a terminal window. Also in case your monitoring terminal terminates the server is normally stopped too. To solve these problems there's a handy little tool called Screen that allows you to run your applications in a virtual terminal to which you can attach/detach at any time.

So typically you write another script with your startup parameters like this (also take a look at the Security Warning at the end of this document for the commented variants).


# insert the directory of the here 

cd $DIR

# starts the server in a screen. Please consider using 1 of the 2 variants below
# for increased security
screen -A -m -d -S netpanzer ./ $@

# This version switches to a more secure user account
# screen -A -m -d -S netpanzer su - netpserver -c "./ $@"

# This version starts the server in a chroot environment and with a different
# user for even more security
# screen -A -m -d -S netpanzer chroot /home/netpserver su - netpserver -c "./ $@"

You can attach to this virtual netpanzer terminal by typing screen -r netpanzer. You can detach again by pressing CTRL+A and then CTRL+D. See the Screen documentation for details.

Integration into the system

Often you want to further integrate the server into your system so that it is automatically started on startup and checked on a regular basis.

Init Scripts

Most linux and bsd systems come with an init script system that takes care of starting and stopping services on the system. Creating such initscripts is distribution specific, so I just present the script for gentoo here as an example:


depend() {
    need net

start() {
    ebegin "Starting netpanzer server"
    start-stop-daemon --start --quiet --pidfile /var/run/ --exec /usr/local/scripts/ --pidfile=/var/run/
    eend $?

stop() {
    ebegin "Stopping netpanzer server"
    start-stop-daemon --stop --quiet --pidfile /var/run/
    eedn $?

Cron Jobs

If you can't integrate the server into the initscripts of your system (if you have only a user account for example) then you can use cron to make sure your server stays running even after system restarts. You should write another script that checks for a running server and eventually restarts it (called


if echo "$procs" | grep netpanzer > /dev/null; then

# start netpanzer server
cd /usr/local/scripts

You should start this script regularly in a cronjob. By adding the following line in your crontab (type crontab -e to edit your crontab). This will check the server every hour (54 minutes after the full hour) to make sure it is still running.

# min hour day month dayofweek command
54 * * * * /bin/sh /usr/local/scripts/

Security Warning

The code of the server hasn't undergone an in-depth review for security holes yet, so you should expect the possibility that attackers can find buffer overflows to obtain control over the netpanzer executable and the user account the server is running. (Experience shows that this also happens with other servers that claim to be secure...)

Therefore it is recommended to run the server in a special user account with limited rights. On linux/bsd you should also consider using a chroot environment for increased security. Consult external documentation about details. The screen startup script shown above also demonstrates in a comment how to do this with the su and chroot commands.

Additional Tools

PHP Server Browser

Tobias Blersch has written a php script which allows you display a list of running netpanzer servers on your homepage. You can find it at the download section of netpanzer in the misc category.


The netpanzer masterserver protocol is compatible with qstat ( You can query for netpanzer server with the command: 

**quakestat -gsm, netpanzer**

There are several tools and scripts available to display server status on homepages with the help of qstat.

This website uses Cookies to provide you with the best possible service. Please see our Privacy Policy for more information. Click the check box below to accept cookies. Then confirm with a click on "Save".