Gemini: Binary Conflict

Gemini: Binary Conflict

Not enough ratings
Gemini - Dedicated server setup
By Hoobalugalar_X
This guide will go through the steps necessary for setting up a Gemini: Binary Conflict dedicated server for Windows and Linux.
   
Award
Favorite
Favorited
Unfavorite
Windows - Installation
Create a folder for steamcmd, for example:
C:\SteamCMD

Download SteamCMD for Windows:
https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip

Extract the contents of the zip to the folder.

Open a command prompt window, quickest / most universal way:
press: Windows Key + R type: cmd click: Ok


Change directory into the folder you created for SteamCMD
cd C:\SteamCMD

**(If the directory you created is on a different drive than C: first type the drive letter followed by colon ":" to switch the cmd to that drive)** e.g.
D: cd D:\SteamCMD

Run the following to install the Gemini server: **Note "./GeminiServer1" will install to "C:\SteamCMD\GeminiServer1", you may change this to a path of your choosing**
steamcmd.exe +force_install_dir ./GeminiServer1 +login anonymous +app_update 1303430 validate +quit


Once SteamCMD quits the Gemini server will be successfully installed! If you make use of the auto update capabilities of the game/steam you shouldn't need to run this again.

** Note If you prefer to manually manage the server you will need to shut down the server and come back and run this command periodically when new updates are available **
Windows - Setup
In the server root directory (in our case "C:\SteamCMD\GeminiServer1") create a text file called:
steam.txt

In the file add the full path to the "steamcmd.exe" executable we just used to download the server, in our case:
C:\SteamCMD\steamcmd.exe
This is required for the auto update script to be able to call steamcmd when there is an update available.

In the server root directory run the batch script:
SetupDefaultServerSettings.bat

This will create the file:
<Server Root dir>\Gemini\Saved\Config\WindowsServer\ServerSettings.ini

If you edit this file you can alter how the server is run, such as:
- Server name: 20 characters max - Max players: 16 max - Map cycle: use a line for each map you would like your server to run, in the order you want them to switch - Coop max players: 5 max - Coop Map cycle: separate from the pvp map cycle as server cannot switch from pvp to coop modes (your startup map will determine if is a pvp or coop server) - Console variables to set: these allow you control certain aspects of how the game runs such as the number of bots, idle kick time, voting permissions or various game modes time/frag limit - Bot names

** Note see list of useful cvars which can be added to this file at the end of the guide **
Windows - Running
To run the server open a command prompt and change directory into the server root directory (in our case:
cd C:\SteamCMD\GeminiServer1

Then run the command with parameters:
GeminiServerAutoUpdate.bat fdm_crater -log -port=7778 -QueryPort=27016
Replacing "fdm_crater" with the starting map of your choice.
**Note: the mode of the starting map here will determine whether the server is PvP or Coop and cannot be changed whilst running**
**Also note: you will need the "-log" option if you don't want the server to run as a hidden background process**

You can also create a batch file in the root directory such as "RunGeminiServer.bat" and place the command / parameters within so the server can be run by double clicking it:
start GeminiServerAutoUpdate.bat fdm_crater -log -port=7778 -QueryPort=27016
**Note: you can also create a shortcut to "GeminiServerAutoUpdate.bat", then add the parameters "fdm_crater -log -port=7778 -QueryPort=27016" in the target properties (after the end quote " )
Windows - Domestic Connections
In order to run a dedicated server from your home network you will first need to forward ports from your router to the machine you plan to run the server on, by default the game uses 7777 and 27015.

However if you plan to join your own server from a client on the same computer or LAN, you will need to change the default server ports as the game client will require use of those same default ports.

As we already did in the previous section add "-port=7778 -QueryPort=27016" (or any ports of your choosing which are not already in use by another service) to your startup parameters, be sure to forward these ports from the router to the internal IP of the host machine in question (select UDP when port forwarding).

Your full startup parameters will look like:
GeminiServerAutoUpdate.bat fdm_crater -log -port=7778 -QueryPort=27016
Windows - Multiple Instances
Although multiple instances running from the same install directory are possible, it is NOT recommended! The auto update mechanism would not function properly as each instance of the server would not be shut down at the same time, so you would have to disable that system and install updates manually. Also each instance cannot have a separate "ServerSettings.ini" (so the server name and other settings would have to be identical for each instance).

Instead it is recommended for each instance of your server to have it own separate directory, that way separate settings can be set and the auto update mechanism can safely shut down each server and update those particular files when either no players are playing or at the end of a match.

To create multiple server directories you can either restart this guide for each changing "GeminiServer1" for "GeminiServer2" and so on... or duplicate and rename the already fully setup "GeminiServer1" folder, which when an instance is started from the new folder the auto update script will detect the directory it is running from and only update the files therein.

For each instance created you will need to change the ports the server uses for example:
"GeminiServerAutoUpdate.bat fdm_crater -log -port=7778 -QueryPort=27016" for server 1 "GeminiServerAutoUpdate.bat wp_aviancity -log -port=7779 -QueryPort=27017" for server 2 "GeminiServerAutoUpdate.bat ho_unearthed -log -port=7780 -QueryPort=27018" and so on.
** Note: don't forget to forward any ports set here to the host machine if you are running a domestic connection **

You can do this for as many server instances as you like (or your hosts hardware/bandwidth can handle).
Linux - Installation
This guide will be for Ubuntu servers (as this is a popular Linux distribution and my personal go to), but is likely adaptable to other distributions, as many of the steps should be the same aside from mainly differences in package managers / installing prerequisites.

Create a user account named "steam" to run SteamCMD safely, isolating it from the rest of the operating system. It is not recommended to run steamcmd while operating as the root user as to do so is a security risk.

As the root user (or user with sudo privileges), create the steam user (we will switch to this account later in order to run the SteamCMD and ultimately the Gemini server itself):
sudo adduser steam
Creating a password, then pressing return on the following setup prompts.

** Note: if running directly as the root user remove the "sudo" from the beginning of the commands, only keep it if running a separate account with sudo privileges, most commands will work regardless but some occasionally don't seem to like it.**

As Gemini requires a 64 bit machine you will need to add multiverse and other dependencies:
sudo add-apt-repository multiverse sudo dpkg --add-architecture i386 sudo apt update sudo apt install steamcmd sudo apt install screen

SteamCMD is now installed, this will allow us to install and update the Gemini server, whilst the screen program will allow us to run server instances on a headless server without having to keep an SSH connection open.

Now we have the prerequisites installed switch to the steam user account we created earlier:
sudo su steam

Make sure we are in steam users home directory:
cd

Run the following to install the Gemini server: **Note "./GeminiServer1" will install to "/home/steam/.steam/steamcmd/GeminiServer1", you may change this to a path of your choosing**
/usr/games/steamcmd +force_install_dir /home/steam/GeminiServer1 +login anonymous +app_update 1303430 validate +quit

Once SteamCMD quits the Gemini server will be successfully installed! If you make use of the auto update capabilities of the game/steam you shouldn't need to run this again.

** Note If you prefer to manually manage the server you will need to shut down the server and come back and run this command periodically when new updates are available **
Linux - Setup
As the steam user change directory to the root directory of our server, in our case:
cd /home/steam/GeminiServer1

Create a text file in this directory called "steam.txt":
nano steam.txt

In the file add the full path to the "steamcmd" executable we just used to download the server, in our case:
/usr/games/steamcmd
Press Ctrl-X to exit nano, followed by "Y" then "Return" to save changes. This is required for the auto update script to be able to call steamcmd when there is an update available.

Now run the following script:
./SetupDefaultServerSettings.sh
This will create the file:
<Server Root dir>/Gemini/Saved/Config/LinuxServer/ServerSettings.ini

By editing this file you can setup how you would like your server to run:
nano ./Gemini/Saved/Config/LinuxServer/ServerSettings.ini

Here is a description of some of the settings:
- Server name: 20 characters max - Max players: 16 max - Map cycle: use a line for each map you would like your server to run, in the order you want them to switch - Coop max players: 5 max - Coop Map cycle: separate from the pvp map cycle as server cannot switch from pvp to coop modes (your startup map will determine if is a pvp or coop server) - Console variables to set: these allow you control certain aspects of how the game runs such as the number of bots, idle kick time, voting permissions or various game modes time/frag limit - Bot names

When you are content with your server settings file press Ctrl-X to exit nano, saving the changes as you do so.

** Note see list of useful cvars which can be added to this file at the end of the guide **
Linux - Running
As the steam user change directory to the root directory of our server, in our case:
cd /home/steam/GeminiServer1

If you are running desktop Linux with terminal emulators available (which can be left open) you can run the server directly by running the following command with parameters:
./GeminiServerAutoUpdate.sh fdm_crater -log -port=7778 -QueryPort=27016
Replacing "fdm_crater" with the starting map of your choice.
**Note: the mode of the starting map here will determine whether the server is PvP or Coop and cannot be changed whilst running**

However the most likely use case for a Linux server is remote/headless via SSH in which case the terminal session will end when you disconnect from SSH. To allow the server to continue to run when we disconnect we can setup a background virtual terminal session via "screen" so instead run:
screen -Sdm geminiserver1 ./GeminiServerAutoUpdate.sh fdm_crater -log -port=7778 -QueryPort=27016
This will create a screen with the name of "geminiserver1" and launch the server inside of it, this can be listed, reattached, or quit at a later time via:
screen -ls (to see what screens are running) screen -r geminiserver1 (to reattach / control this instance) screen -XS geminiserver1 quit (to quit this instance)
Linux - Domestic Connections
In order to run a dedicated server from your home network you will first need to forward ports from your router to the machine you plan to run the server on, by default the game uses 7777 and 27015.

However if you plan to join your own server from a client on the same computer or LAN, you will need to change the default server ports as the game client will require use of those same default ports.

As we already did in the previous section add "-port=7778 -QueryPort=27016" (or any ports of your choosing which are not already in use by another service) to your startup parameters, be sure to forward these ports from the router to the internal IP of the host machine in question (select UDP when port forwarding).

Your full startup parameters will look like:
./GeminiServerAutoUpdate.sh fdm_crater -log -port=7778 -QueryPort=27016
Linux - Multiple Instances
Although multiple instances running from the same install directory are possible, it is NOT recommended! The auto update mechanism would not function properly as each instance of the server would not be shut down at the same time, so you would have to disable that system and install updates manually. Also each instance cannot have a separate "ServerSettings.ini" (so the server name and other settings would have to be identical for each instance).

Instead it is recommended for each instance of your server to have it own separate directory, that way separate settings can be set and the auto update mechanism can safely shut down each server and update those particular files when either no players are playing or at the end of a match.

To create multiple server directories you can either restart this guide for each, changing "GeminiServer1" for "GeminiServer2" and so on... or duplicate and rename the already fully setup "GeminiServer1" folder, which when an instance is started from the new folder the auto update script will detect the directory it is running from and only update the files therein.

To do the latter you will need to change up a directory to:
cd /home/steam

Then duplicate as "GeminiServer2": (and repeat for as many instances as you require)
cp -r ./GeminiServer1 ./GeminiServer2

For each instance created you will need to change the screen name as well as the ports each server uses.
e.g. Server 1:
screen -Sdm geminiserver1 ./GeminiServer1/GeminiServerAutoUpdate.sh fdm_crater -log -port=7778 -QueryPort=27016
Server 2:
screen -Sdm geminiserver2 ./GeminiServer2/GeminiServerAutoUpdate.sh wp_aviancity -log -port=7779 -QueryPort=27017
Server 3:
screen -Sdm geminiserver3 ./GeminiServer3/GeminiServerAutoUpdate.sh ho_unearthed -log -port=7780 -QueryPort=27018
And so on... ** Note: don't forget to forward any ports set here to the host machine if you are running a domestic connection **

You can do this for as many server instances as you like (or your hosts hardware/bandwidth can handle).
Useful CVars
Here is a list of useful commands along with their default values, any of these can be placed next to “ExecCvars=” on a new line of the “ServerSetting.ini” file in order to customise the gameplay of your dedicated server.
mp.warmuptime 60 - [Sets the time (in seconds) at the start of the match players have to warmup before the real match starts.] mp.cooldowntime 10 - [Sets the time (in seconds) at the end of the match players stand around seeing the name of the winning player/team] fdm.matchtimelimit 600 - [Sets the time (in seconds) a free-for-all deathmatch match can run for after warmup, after this time the player/team with the highest score will win, 0 is unlimited] fdm.fraglimit 20 - [Sets the amount of frags needed for a player to win the game in ffadm, 0 is unlimited.] ffa.respawntime 5 - [Sets the time it takes for players to respawn in ffadm after being killed.] mp.BalanceTeams 1 - [1 = Don’t allow a team to be joined if will cause unbalanced teams] tdm.fraglimit 50 - [Sets the amount of frags needed for a team to win the game in tdm, 0 is unlimited.] tdm.matchtimelimit 600 - [Sets the time (in seconds) a tdm match can run for after warmup, after this time the player/team with the highest score will win, 0 is unlimited] tdm.respawntime 10 - [Sets the time it takes for players to respawn after being killed in tdm.] wp.matchtimelimit 600 - [Sets the time (in seconds) a warpath match starts with before entering into sudden death, the ultimate length of time a wp match depends on the number of caps in live play which diminish for each cap, when the clock finally runs down the mode will enter sudden death] wp.respawntime 15 - [Sets the base time it takes for players to respawn after being killed in warpath, not counting last base spawn penalty] wp.respawnpenalty 10 - [Sets the time to be added onto the default warpath respawn time if team only owns base.] mp.botquota 0 - [Sets the amount of bots to add to the game (bots will always leave a server slot free so a real player can join)] mp.botjoinwithoutplayer 0 - [Sets if bots can join without a real player joining a team first.] mp.spawnprotection 3 - [Sets the amount of time for players to be invulnerable after spawning.] mp.idlekicktime 180 - [Sets the amount of time (in seconds) for players to be kicked from the game if they idle.] mp.autoupdate 1 - [Sets the game to allow auto updating by shutting down the server (when there are either no players or at the end of the current match) when there is a steam update available... set this to 0 if you want to manually update your server]