Skip to content

Instantly share code, notes, and snippets.

@ryanfantus
Last active October 27, 2024 10:54
Show Gist options
  • Save ryanfantus/bfa0c59c731ecd559eb7bf7386aa77c7 to your computer and use it in GitHub Desktop.
Save ryanfantus/bfa0c59c731ecd559eb7bf7386aa77c7 to your computer and use it in GitHub Desktop.
Quick guide to spin up a zandronum server to host some multiplayer doom

Quick zandronum-server on DigitalOcean setup with a dash of security

The intent is to quickly spin up a server, use it for a time, and then kill it. The reason for this is that there's no reason to persist a server that will simply cost money and dare people to attempt to hack it. :)

This does necessitate a DigitalOcean account and there will be some minor cost associated with this process, which depends on the tier of performance you configure. I've had luck with the $10/mo dual processor tier. We don't need any other bells and whistles like backups or IPV6 or anything. Keep it simple.

Initial droplet configuration

  1. Sign up for a DO account if you don't have one already
  2. Create a new droplet - select Ubuntu 20.04 (or latest stable) and go for the $10/month option. Anything else is likely overkill.
  3. SSH to the server as root and do the following:
apt update
apt upgrade
apt dist-upgrade
adduser zandronum
usermod -aG sudo zandronum
ufw allow OpenSSH
ufw allow 10666
ufw enable
sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config
systemctl restart sshd

At this point, your server will block any attempts to ssh in as root, giving us a modicum of security. Furthermore, you now have a 'zandronum' user that has sudo privileges. Hopefully you picked a secure password.

The ufw program is the uncomplicated firewall. We made sure to keep the SSH port open as well as opening the UDP port which will be owned by zandronum (both the user and the server app).

Configure and install zandronum

Logout by typing 'exit' and then SSH back to the server, this time as the 'zandronum' user.

sudo apt-add-repository 'deb http://debian.drdteam.org/ stable multiverse'
wget -O - http://debian.drdteam.org/drdteam.gpg | sudo apt-key add -
sudo apt update
sudo apt install zandronum-server unzip

Now we have the zandronum-server package. If you see an error about a missing cert above, don't worry, we actually fixed it with the second and third step anyway.

Next, we have to install an old version of openssl because zandronum-server depends on libcrypt.so.1.0.0 which is no longer a thing.

wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.6_amd64.deb
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.6_amd64.deb

Now the actual zandronum-server package will "just work" which is great, but we need some IWADs.

mkdir -p ~/.config/zandronum
wget https://github.com/Akbar30Bill/DOOM_wads/archive/master.zip
unzip master.zip
mv DOOM_wads-master/*.wad ~/.config/zandronum
rm -rf ~/DOOM_wads-master

Now, point a text editor at ~/.config/zandronum/zandronum.ini and configure to your liking. Also, google the command line arguments you can use to launch zandronum.

I'd highly recommend launching the 'zandronum-server' application inside of a screen session with a detached virtual tty. Then, just reattach it later if you want to kill the server.

Then, with a zandronum client of some sort, point it at your server's IP, port 10666.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment