Free games are what makes Linux awesome. One of the best free and open source games on the Linux platform is Xonotic. It’s a fast-paced shooter inspired by the “twitch” FPS genre of games (Quake, Unreal, etc). Playing it as a whole lot of fun, especially when you’ve got some friends with you. If you’d like to host a Xonotic game server, you’ll be interested to know that it’s much more straightforward than it sounds.
Xonotic has pretty great Linux support, and the game runs on just about any Linux distribution without trouble. Unfortunately, it doesn’t have a lot of mainstream Linux software support just yet, so before being able to set up a dedicated server, you’ll need to build the game, and all of its components.
Xonotic isn’t hosted on Github like most projects. Instead, it makes use of Gitlab and has its own dedicated Git server. To get the code, open up a terminal and install the latest version of the Git package on your Linux PC.
sudo apt install git
sudo apt-get install git
sudo pacman -S git
sudo dnf install git
sudo zypper install git
With the latest version of the Git tool up and running on your Linux PC, it’s now possible to grab the latest code from the game. Using the git clone command, grab the newest version of the Xonotic code.
git clone git://git.xonotic.org/xonotic/xonotic.git
Cloning the central Xonotic repo isn’t going to be fast. It is an entire game, after all. Give the terminal some time, and after a bit, the full code-base will be done downloading.
Using the CD command, move the terminal from the Home folder to the newly cloned xonotic folder on your Linux PC.
if (navigator.appVersion.indexOf(“Mac”)!=-1) document.write(”);
RECOMMENDED FOR YOU
Inside this folder, you’ll need to download even more data for the game. This download is for things like maps, textures and anything else that wasn’t in the first section of the download.
./all update -p
Updating Xonotic, so it has everything required to build, takes forever so be patient. Running all update downloads code from several branches of the Xonotic Git repo. When the downloading finishes, it’s safe to build the code. To build, run:
./all compile -r
Building a copy of Xonotic is going to take quite a long time, as it’s a massive game. Don’t expect it to finish right away, because it won’t. Let the terminal build everything and be patient. When it completes, you’ll be able to start up the game via terminal with:
./all run xonotic
Install Xonotic Without Building
Downloading a copy of Xonotic via Git is sure to get you all of the raw files for the game and the latest version. For die hard fans of the game, this is a great way to go. However, if you don’t feel like building the software, follow these instructions instead. First, head over to the Xonotic website and click the download button.
Xonotic doesn’t have a separate link for “Mac, Linux, and Windows.” Instead, everything is included in one Zip archive. To extract, open up a file manager, click “Downloads,” right-click on the Xonotic Zip-archive and select “extract” in the menu that appears.
When the archive finishes extracting, move the Xonotic folder to your Home directory. Once moved, go to the directory and select either xonotic64-sdl, xonotic32-sdl, and so on to run the game.
Alternatively, open up a terminal and run:
cd ~/Xonotic ./xonotic-linux64-sdl.sh
Running A Dedicated Server
If you’re just interested in running a dedicated Xonotic server, you may be wondering exactly why building the entire game was required. Well, everything builds to a launchable program. This program can run a game if you want to play it. Alternatively, you can launch this game with special command arguments and host a 24/7 server.
After building Xonotic, it’s possible to start a dedicated server right away. To do this, open up a terminal window and execute the following command:
./all run dedicated xonotic
Pre-Built Dedicated Server
Did you skip building Xonotic in favor of downloading the pre-compiled version of the game? If so, setting up and running a dedicated server is a little different.
Instead of the “all” command listed above. You’ll need to do the following. First, open up a terminal window and use the CD command to move the terminal from the Home folder to the Xonotic directory within /home/username/.
Inside of the Xonotic folder, you’ll need to move into a sub-folder called “server.” In this folder, all of the components required for running a 24/7 server are in here.
A Linux dedicated server can easily run via the script provided in the “server” directory.
mv server_linux.sh ~/Xonotic mv server.cfg ~/Xonotic/data
./server_linux.sh -sessionid xonotic-test
As long as all PC’s are connected to the same LAN as the server, Xonotic users should be able to quickly access any running servers in the “local”, or “LAN” section.