Setting up a server on Linux: Difference between revisions

Line 50: Line 50:


==Email configuration==
==Email configuration==
The server allows password reset, through e-mail. The parameters passed to the client execution can be as follows:


==Reporting issues==
==Reporting issues==

Revision as of 18:26, 29 January 2023

As of January 2023, the server code cannot be properly run under most common distributions, in a server environment. The reason behind this has to do, with the bleeding edge dependencies the server code uses, particularly Qt dependencies.

This guide will assume an Arch Linux environment.

Download

Download the server version of the latest compilation of the game. You may find the download under the Releases page


Installing the dependencies

Install the Qt dependencies of the game, such as:

sudo pacman -Syu qt6-base
sudo pacman -Syu qt6-multimedia
sudo pacman -Syu openssl
sudo pacman -Syu sqlite

Depending on the version of the game server you are trying to run, these dependencies might change or require more installations. Consult the source code and on Github, in case you run into issues.

Running the server

Once you have installed the server's dependencies, you may run the executable. As of January 2023, the location of the binary is at

~/Commander_Wars_Release/bin/

Upon first running, the game will create a file Commander_Wars.ini. This file contains the configuration needed to run the server. In particular these are relevant to the configuration of the server:

Notice: These parameters can also be set with IPv6

[Network]
GamePort=9001
SecondaryServerAdress=127.0.0.1
Server=true
ServerAdress=127.0.0.1
ServerListenAdress=
ServerPort=9002
ServerSecondaryListenAdress=
SlaveDespawnTime=30
SlaveHostOptions="127.0.0.1&&10000&20000;127.0.0.1&&50000&65535"
SlaveListenAdress=
SlaveServerPort=9003

The SlaveDespawnTime is the time given in seconds, before an inactive match is liberated from the RAM of the server. As of January of 2023, there is a work in progress, to allow inactive matches, to be activated again, letting players to continue a previously despawned match.

GamePort and Serverport must be allowed under the firewall options of your server to allow the communication with the clients.

SlavehostOptions lets you set the range of ports through which the clients can connect, thus allowing each new match to be hosted under a new port.

Parameter && in 127.0.0.1&&10000&20000 allows setting the first port and the & allows setting the last port. Finally a ; allows another IP(s) and port ranges to be set.

Email configuration

The server allows password reset, through e-mail. The parameters passed to the client execution can be as follows:

Reporting issues

As of now, the issues can be directly reported through the github Issues Page open one up, in case there are glitches or bugs found.