Table of Contents

Information

Prerequisites

Notes

Create Group and User

sudo groupadd 'xonotic' && sudo useradd -c 'Xonotic system account' -d '/var/lib/xonotic' -g 'xonotic' -m -r 'xonotic'

Dependencies

sudo dnf install 'git'

Firewall

sudo firewall-cmd --add-port='26000'/'udp' --permanent && sudo firewall-cmd --reload

Download Initial Source

sudo git clone -b 'master' 'git://git.xonotic.org/xonotic/xonotic.git' '/srv/xonotic' && sudo chown -R 'xonotic':'xonotic' '/srv/xonotic' && sync

Compile

Change User

sudo su 'xonotic' -s '/usr/bin/bash'

Download Complete Source

cd '/srv/xonotic' && '/srv/xonotic/all' update -l 'best' && sync

Compile

cd '/srv/xonotic' && '/srv/xonotic/all' compile -r 'dedicated' && sync

Settings

Change User

sudo su 'xonotic' -s '/usr/bin/bash'

Copy Config

mkdir -p '/var/lib/xonotic/.xonotic/data' && cp '/srv/xonotic/server/server.cfg' '/var/lib/xonotic/.xonotic/data/server.cfg'

Xonotic

nano '/var/lib/xonotic/.xonotic/data/server.cfg'
sv_public 1
sv_status_privacy 1
hostname "RoE | Xonotic - Realm of Espionage Official InstaGib ($g_xonoticversion)"
sv_motd "Welcome to the Realm of Espionage Xonotic server! InstaGib all day every day :p"
maxplayers 16

g_maplist_shuffle 1
g_maplist_mostrecent_count 3

gametype dm

skill 9
minplayers 3
g_maplist_check_waypoints 1

sv_maxidle 120

//sv_weaponstats_file http://www.xonotic.org/weaponbalance/
g_playerstats_uri "http://stats.xonotic.org/stats/submit"

g_instagib 1

g_grappling_hook 1
g_jetpack 1

Services

Dedicated Server

Service

sudo -e '/etc/systemd/system/xonotic-dedi.service' && sudo systemctl daemon-reload && sudo systemctl enable 'xonotic-dedi' --now && sudo systemctl status 'xonotic-dedi' -l
[Unit]
Description=Xonotic Dedicated Server
Wants=network-online.target
After=network-online.target

[Service]
User=xonotic
Group=xonotic
Type=simple
WorkingDirectory=/srv/xonotic
ExecStart='/srv/xonotic/all' run 'dedicated'
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

Updater

Service

sudo -e '/etc/systemd/system/xonotic-up.service'
[Service]
User=xonotic
Group=xonotic
Type=oneshot
WorkingDirectory=/srv/xonotic
ExecStart='/srv/xonotic/all' clean --reclone
ExecStart='/srv/xonotic/all' compile -r 'dedicated'
ExecStart='/usr/bin/sync'

Timer

sudo -e '/etc/systemd/system/xonotic-up.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'xonotic-up.timer' --now && sudo systemctl start 'xonotic-up' && sudo systemctl status 'xonotic-up' -l
[Unit]
Description=Xonotic Git Updater and Compiler
Wants=network-online.target
After=network-online.target

[Timer]
OnCalendar=*-*-* 02:15:00
Persistent=true

[Install]
WantedBy=timers.target

Restarter

Service

sudo -e '/etc/systemd/system/xonotic-re.service'
[Service]
Type=oneshot
ExecStart='/usr/bin/systemctl' stop 'xonotic-dedi'
ExecStart='/usr/bin/sync'
ExecStart='/usr/bin/systemctl' start 'xonotic-dedi'

Timer

sudo -e '/etc/systemd/system/xonotic-re.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'xonotic-re.timer' --now && sudo systemctl start 'xonotic-re' && sudo systemctl status 'xonotic-re' -l
[Unit]
Description=Xonotic Dedicated Server Restarter
Wants=network-online.target
After=network-online.target

[Timer]
OnCalendar=*-*-* 02:30:00
Persistent=true

[Install]
WantedBy=timers.target
3)
Xonotic