This page describes basic installation on Linux. It will help you install the Mod on a home server. This guide is not helpful when you host your server with a game server provider (GSP). If that's the case, we suggest you read the Config.cfg file carefully on your FTP or ask your GSP to configure it.
Before you start fiddling with 1fx. Mod, you should first check the integrity of the SoF2 installation directory you're going to install the Mod in. We often see lots of oddities and bugs arise due to all sorts of client-side Mods already installed, that due to sharing files with the server-side of SoF2MP interfere with the proper working of 1fx. Mod.
As a general rule of thumb, always install 1fx. Mod in a clean SoF2 installation directory that you only use to host the server. It will save you lots of trouble later on.
The requirements of running 1fx. Mod on Linux are a little higher than SoF2. Take note of the extra requirements:
Head over to the 1fx. Mod download page and head down to the download section. Take note of the SoF2 version. If you want a v1.00 (Full, or "Silver") server, select the v1.00 package for Linux. If you want a v1.03 (Gold) server, select the v1.03 package for Linux. This package is a .tar.gz archive.
After downloading the package, extract the contents. It's best to do this in an empty directory so you'll easily find the files after extracting. You can do this either from with your preferred archive manager or directly from the terminal. In the examples below, we'll do it from within the terminal.
After extracting you'll find two new directories:
Open the "Server files" directory and copy all directories found to the SoF2 installation directory you're going to use to host 1fx. Mod. In our example, this is only the "1fx" directory.
Please note: There may be more directories in the "Server files" directory, next to the "1fx" directory. Be sure to copy all directories and files found in the "Server files" directory to the SoF2 installation, even if they don't appear on the screenshot above.
After you finished copying, it will look a little like this (your mileage may vary):
Congratulations! You just installed 1fx. Mod! Yes, it's really this easy.
Next on, you probably want to configure your server before starting it. Fortunately, it's very easy to configure your server. First on, go into your "1fx" directory and find the Config.cfg file. This file contains 90% of your server configuration.
Open the Config.cfg file with your editor of choice. If you're unsure, using nano is usually a good option.
Don't forget to also adjust the intial mapcycle found in the "files" directory (mapcycle.txt).
Look for the "Start Server.sh" file in the "1fx" directory to start your server. If you downloaded the Universal package, it may also be called "Start Linux Server.sh".
Execute it, and you're done! Your server is now running. You can use the "1fxver" command to check what 1fx. Mod version you're running. By opening the game you should be able to find this new server in your local server list!
Below are a few tips and tricks that may come in handy, but didn't really fit in the main tutorial. Use them how you see fit.
Included in the downloaded 1fx. Mod download package are the extra utility scripts. Those are scripts written in Python and will run on every major platform without issues.
You will need at least Python 3.3 to run them correctly. If you're compiling Python from source because the Python your distribution has is too old, you'll also need the 'libsqlite3-dev' package installed in order to build Python with SQLite support.
Your game may throw the following error when starting with 1fx. Mod: Patching the executable failed! Aborting the game.
This may occur on newer distributions that have a protection for ptrace attaching to processes. We use ptrace in order to apply the dynamic runtime memory patches, so it is absolutely required for 1fx. Mod that this functionality works.
To fix this issue, edit the /etc/sysctl.d/10-ptrace.conf file (create it if it doesn't exist yet), and add the following to it: kernel.yama.ptrace_scope = 0
The above fix tells the kernel that ptrace may attach to all running process again, like it traditionally did on Linux. A reboot is necessary.
This applies only to the debug builds of 1fx. Mod, like the Nightly builds. When 1fx. Mod crashes it tries to write the stack trace to the crashdump file. Using the stack trace, debugging is a lot easier for us as we're usually able to pinpoint the exact location of the problem.
If this doesn't work, the game may write the following to the log file: ERROR: No stack frames present to log. You're also able to detect this problem because there will be no stack trace written to the crashdump file. This usually only happens on 64 bit systems.
The fix is to install the 32 bit GNU C shared libraries. On Debian, the required packages to install are 'lib32gcc1' and 'libc6-i386'. The package names may vary for other Linux distributions.
If for some other reason the patches fail to apply, sometimes due to a "Unknown signal 32" error, the problem is usually your VPS. 1fx. Mod is known to have problems with VPSes that use OpenVZ virtualization. This is because you have absolutely no control over the kernel on a VPS using OpenVZ virtualization: the kernel is shared with the host. Other hypervisors, such as KVM, Xen or ESXi don't share the same problems because the guest OS has its own kernel.
OpenVZ may be fine for running websites and such, for 1fx. Mod it is simply a no-go. We usually recommend people to take a KVM VPS, where you're certain 1fx. Mod will work properly.
Wait, what? SoF2 server on a Raspberry Pi? Even though it's ARM?
Yes! That's totally possible with the use of extra software like ExaGear. We tested it ourselves on a Raspberry Pi 2B and found out it worked flawlessly. Map switches are a bit slow due to the limited I/O (especially if you're used to using a SSD), but even the time it takes to switch maps is acceptable.
Unfortunately, the Linux binary of SoF2MP only works for v1.03 servers. The extra libraries v1.00 servers use won't run on ExaGear. For v1.00 you can still emulate the Windows version, albeit a little bit slower, but works perfectly nevertheless.
There you have it. If you want a cheap dedicated SoF2 server, that draws little power and want to get more into the world of Linux, this may be something for you.