Skip to content

Instantly share code, notes, and snippets.

@yogthos
Last active April 27, 2024 19:56
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yogthos/1a2afa464f87f761214df5eb2a9bb031 to your computer and use it in GitHub Desktop.
Save yogthos/1a2afa464f87f761214df5eb2a9bb031 to your computer and use it in GitHub Desktop.
setting up a Xonotic server on Ubuntu 18

Guide for running a Xonotic dedicated server on Ubuntu 18.04

sudo apt install git gcc autoconf automake libtool libgmp3-dev g++ libz-dev libjpeg-dev libx11-dev libgl-dev libxpm-dev libasound2-dev libsdl2-dev unzip 
git clone git://git.xonotic.org/xonotic/xonotic.git
cd xonotic/
./all update -p
./all compile -r
cp server/server.cfg data/

test that the server is working

./all run dedicated xonotic

create a start script

#!/bin/bash
cd /home/<user>/xonotic/ && ./all run dedicated xonotic > /dev/null 2>&1

create a service file

sudo vim /lib/systemd/system/xonotic.service

add the following there

[Unit]
Description=Xonotic
After=network.target

[Service]
WorkingDirectory=/home/<user>/xonotic
ExecStart=/home/<user>/xonotic/run-dedicated.sh
User=<user>

[Install]
WantedBy=graphical.target #check target by running: systemctl get-default

enable and start the service

sudo systemctl daemon-reload
sudo systemctl enable xonotic.service
sudo systemctl start xonotic.service

check the server is running

ps -ef | grep darkplaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment