Host a Server

  1. Windows
    1. Advanced server options
    2. Hosting multiple Arch00 content servers
    3. Troubleshooting
  2. Linux
    1. Downloading necessary files
    2. Configuring the distribution
    3. Enabling multi-arch support
    4. Fixing ServerOptions encoding
    5. Specifying ServerOptions
      1. Customizing MPCustomizations
    6. Running the server
  3. Setting up AWS Lightsail
    1. Creating an account
    2. Purchasing a linux VM
    3. Opening ports
  4. Common issues

FEAR Server supports both Windows and Linux.


Windows

If you want to host a server in Windows, you can do It with the FEAR Combat Installer, but the prefered method is with the Dedicated Server package.

This will run the server and show It in a small window. Now you can open the game and join in the LAN Section.

For Linux, you keep the exact same process than before!

You can also Add custom content and maps to your FEAR Combat Server.


Advanced Server Options.

For special needs, like running multiple servers you may need to create a .bat file to start the server.

Create a new text file in the game (or server) folder and name It MyServerA.bat for example.

You can use this sample code:

@ ECHO OFF
::Change the path to log files:
set LOGPATH=C:\SHARED\Logs
::Change the ServerOptionsFile name, withtout the .txt extension. for a file named ServerOptions-TDM.txt use:
set SERVEROPTIONSFILE=MXT-TDM-Nights
::Do not change the following commands unless you know what you are doing ;)
set datetimef=%date:~-4,4%-%date:~-10,2%-%date:~-7,2%_%time:~0,2%.%time:~3,2%.%time:~6,2%
set LOGF=%LOGPATH%\%SERVEROPTIONSFILE%_%datetimef%.log
start fearserver.exe -optionsfile "%SERVEROPTIONSFILE%" +errorlog 1 +alwaysflushlog 1 +errorlogfile "%LOGF%"

Then create a shortcut to the file, It can be for example, in the desktop, so you have easy access to It.

This sample will:

  • Use a specific “ServerOptions-TDM” txt file for ServerOptions. You can specify different options file for hosting several servers.
  • Create a log file with date/time on the filename (for example: fearserver.tdm.2014-04-06_205924.log). Please note that this date/time format may be locale-dependant. You can change the path where you want the file to be created.

When hosting more than 1 server, remember to use a different port for each server! Using the same port for more than 1 server will eventually make the Master Server Ignore all of the servers coming from that IP.


Hosting Multiple Arch00 content Servers.

In order to host both stock, custom and custom with different sets of custom content servers, you need also to use the options:

-archcfg “ServerMod.archcfg”
-userdirectory ServerMod_User

Where ServerMod.archcfg is the name of the file containing the custom Arch00 file list needed for your modded server.
And ServerMod_User is the folder, usually in the root game directory containing the AdditionalContent folder with the custom content you want.

This should allow you to host as much as needed different server configurations while keeping a single setup game.


Troubleshooting.

1) I can’t see my server In the ingame & FEAR-Community.org page!

This can be caused by several reasons:

a) First you need to check If your server is listed here:

http://master.fear-combat.org/api/serverlist-raw.php

If you can’t see your server listed here, It’s being blocked by your AV/firewall.

b) If you can see the server in the previous list, but not ingame, the server can reach the master server, but clients can’t. So you are behind NAT, and you need the proper port forwarding. This changes depending on your hardware and the way you connect to the web, so you need to google about It.

c) I still can’t see my server, or my server stops responding after some mins.

You may have too much custom content files added to your server. This is known to cause problems like this; To get a 100% responsive server, max num or custom content files, including mods and maps, should be maximum 10, with a players limit of 18 players. for 10 players you can add 1 or 2 custom files more.

You can actually add more files, but this could make the server stop replying once you get more players. This is currently being researched, you can get more updates in this forum thread.


Linux

Contained in this document are steps on how to create a FEAR Combat server for most distributions of Linux. This guide will focus specifically on Debian 10.5 as this is cheaply available as an Amazon Lightsail Virtual Machine. Note that these commands assume basic Linux knowledge and a user who is in the sudo group. For problems, please see the Common Issues section at the bottom of this document.

These instructions also assume that you have an AWS Lightsail Virtual Machine setup to use xrdp with an xfce desktop environment. More information about how to setup a Lightsail Virtual Machine can be found in the section AWS Lightsail Section.

More information about setting up a xrdp server with an xfce environment can be found here (this is for Ubuntu but the same process works for Debian):

https://serverspace.us/support/help/how-to-configure-xrdp-server-on-ubuntu-18-04/

 

1. Downloading necessary files:

You will first need to download the dedicated server files from the community page. This download can be found at:

https://fear-community.org/download/6091/

This will give you a “.gz.tar” file which can be extracted in various ways. The simplest way to do this is to use the “tar” command if you are using Ubuntu or Debian which is:

$tar -xf archive.tar.gz -C /home/FEARServer/files

After this has been downloaded, you should see a folder consisting of all the files needed to run the server.

2. Configuring the distribution:

Now that we have the necessary files, we will need to configure our Debian distribution to be able to run them, as they are only 32 bit. To do this, we need to enable multiarch support and download the older c++ libraries that the fearserver.bin program needs to run. You can use the following commands to enable 32-bit support:

$ dpkg --add-architecture i386
$ apt-get update
$ apt-get install libc6-i386

(This information was found on https://stackoverflow.com/questions/49705309/cant-run-32-bit-binary-on-64-bit-debian/49705376)

3. Enabling multi-arch support:

Once we have enabled multicarch support, we need to download the older c++ libraries. This can be done with the command:

$ sudo apt-get install libstdc++5:i386

After this has finished running, we can test the installation. The first run of this installation should give us an error message stating that we are unable to host the game session. This is normal and will be resolved in the next step. Here is what our console should look like now assuming everything else is working up until this point:

4. Fixing ServerOptions encoding:

There are two issues that occur when trying to setup the ServerOptions.txt file that will prevent the server from initializing. To resolve these issues, we need to first ensure that our ServerOptions.txt file is encoded properly. In the ServerOptions.txt file itself, it says that we need it to be converted to ANSI, however this is outdated information.

Verify that your txt file is encoded as UTF-8. This can be done with the popular text editor geany. This can be done via:

Document -> Set Encoding -> Unicode -> UTF-8 -> Save.

5. Specifying ServerOptions:

Now we need to specify which options file we are going to use. To do this, open the ./start.sh script in nano, or geany under sudo using a command like:

$ sudo nano ./start.sh

We will then need to add -optionsfile flag along with the path of our ServerOptions.txt file. Our ./start.sh file should look something like this, except you will use your own path to the txt file:

#!/bin/sh
export LD_LIBRARY_PATH=$PWD$LD_LIBRARY_PATH
./fearserver.bin -optionsfile /home/fear-admin/Desktop/FEARServer/FEAR/ServerOptions/Streets_of_FEARutf8.txt

5.a Customizing MPCustomizations:

If you want to add custom rules to your server using MPCustomizations, you will need to follow the same procedure above but using the -mpcustomizations flag. Your ./start.sh file should now look like this:

./fearserver.bin -mpcustomizations /home/fear-admin/Desktop/FEARServer/FEAR/MPCustomizations.txt -optionsfile /home/fear-admin/Desktop/FEARServer/FEAR/ServerOptions/Streets_of_FEARutf8.txt

(This information was provided by Wild)

6. Running the server:

We can now run the ./start.sh command, and the server should be initialized. You should see the server load and will look like this:

Setting up AWS Lightsail:

1. Creating an account:

Create an account for AWS Lightsail. Information on this can be found at:

https://aws.amazon.com/lightsail/

2. Purchasing a linux VM:

Purchase a Debian 10.5 Virtual Machine. This is done by clicking (1) “Create Instance:”

And then (2) choosing “Linux/Unix” followed by (3) “Debian 10.5.”

You will now need to choose your monthly plan. Here I chose the (4) $10 one, but you may be able to use others.

3. Opening ports:

Now we need to enable the ports so that our game can be seen by players in game. To do this, open your Debian instance and click on (1) “Networking:”

Scroll down and navigate to the Firewall section, and click on (2) “Add rule:”

We need to (3) add the custom TCP and UDP ports 27888 (or whichever port you want to use for your server; just be sure to change it in ServerOptions.txt as well). You will need to add these two ports individually.

Common Issues:

Q: When I run the ./start.sh command, I get the error:

./start.sh: 3: ./fearserver.bin not found

A: You did not setup multiarch support. Please see Step 2. This error occurs because newer distributions of Linux do not support 32-bit applications and will give this generic error message when it tries to run the file.

Q: When I run the ./start.sh command, I get the error:

./fearserver.bin: error while loading shared libraries:
libstdc++.so.5: cannot open shared object file: No such file or directory

A: This means that you do not have the c++ libraries required to run the fearserver.bin file. Please see Step 3. The reason we need these older c++ libraries is that fearserver.bin is very old at this point, and essentially needs older ‘versions’ of c++ to run.

Q: When I run the ./start.sh command, I get the error:

ERROR - Unable to host the game session.
Please verify that the Server Options file specifies a valid game mode.

A: This means you have not setup your ServerOptions.txt file correctly, or it is missing. Please see Step 4. This can sometimes caused by a bad path when using the -optionsfile flag, or by a incorrectly encoded ServerOptions.txt.