Dedicated Servers

Handbook Dedicated Servers - Memories of Mars Version 1.12

Introduction
The Memories of Mars Dedicated Server is available via Steam as a Dedicated Server. It can be hosted by players who do not own the game themselves as well as on dedicated servers which can log into Steam anonymously. The server is available for Windows and Linux 64 bit versions

Requirements
The server currently has the following requirements:

Via Steam GUI
You can find the dedicated server (without having to own Memories of Mars) in your Steam library as "Memories of Mars - Dedicated Server" in the Tools category. You can install it the same way as any other game on Steam.

Via steamcmd
For dedicated servers and platforms without a graphical user interface, you can use Valve's steamcmd tool to install the dedicated server. Use the following steps to install the dedicated server via steamcmd

1. Make sure you are not logged in as root on Linux. The server will not start when root rights are detected.

2. Download steamcmd (see https://developer.valvesoftware.com/wiki/SteamCMD#Package_from_repositories) a. Probably easiest with something like sudo apt-get install steamcmd

3. Start steamcmd by typing steamcmd

4. If it is required that you login (valid until the server has been released), login using login

5. Unless you want to install to the default directory, choose your install directory by using force_install_dir. 6. Download the server by issuing app_update 897590

Updating
While Memories of Mars is in Early Access, there will be quite frequent updates. The game client will always be updated to the latest version via Steam. Most patches during Early access will break compatibility of existing clients with the servers due to major code and content changes being made, therefore, the dedicated server will have to be updated in order to see servers. If you don't see your dedicated server in the Steam server browser or in-game, make sure it has the same version as the game client.

If you installed your Dedicated Server via the Steam UI, just wait for the update to be applied.

If you installed via steamcmd, use the same command again to update the server to the latest state:

app_update 897590

Database-breaking patches
We are taking care that no database-breaking changes are put into the server code during a season of Memories of Mars. If, for some reason, we have to patch the database itself, we will announce this beforehand in patch notes.

To make sure you are up to date with the information about the game and upcoming patches, please follow the news on the Steam page of the game and join our Discord (https://discord.gg/7c6rvnv).

Configuring a server
Your private server is configurable via the file DedicatedServerConfig.cfg that you can find in the main folder where Steam downloaded the private server to. The following is an example file: {

"ServerName": "My Private Server", "ServerPassword": "password123", "ServerID": "PS_01", "MapName": "Main", "MaxPlayers": 2, "EnablePVP": false, "EnablePVPBuildings": false, "EnablePVPAreas": true, "EnableEAC": true, "DailyRestartUTCHour": "12", "Headless": false, "UserWhitelist": "", "UserBlacklist": "", "Admins": "13374213374213370" } The available fields are:

Overriding with Commandline Arguments
The following variables can be overwritten via commandline argument. In the case of "MULTIHOME" there is no applicable variable in the DedicatedServerConfig, so the variable can only be set via commandline argument.

If no commandline argument is set, the value from the config file is used.

Restarts
The Memories of Mars server needs to be restarted twice daily, this is set up with the option DailyRestartUTCHour. Before the restart, the server will announce that it will restart in the in-game chat. After the server has been shut down, its process will end.

You are provided with two options for starting the game server:

Without automatic restarting after the twice-daily shutdown With automatic restarting after the twice-daily shutdown

The server will shut down regardless of which option you choose. We currently don't support disabling this automatic shutdown system. If you don't need to run the server for 24h a day, you can set the DailyRestartUTCHour to a time outside of your regular playtime to not have the server shut down during play.

Windows
Either use the Steam UI to start the server, or navigate to the install folder of the game. In both cases, make sure to edit the config file for setting up the server beforehand.

Without automatic restarts
You can start the server and it will run until it shuts down by starting the game

in the Steam UI with the default start option

directly by starting the file Game\Binaries\Win64\MemoriesOfMarsServer.exe.

With automatic restarts
To run the server with automatic restarts:

in the Steam UI choose the start option Launch Game Server (restart automatically) Run the batch script Run Server.bat.

Without automatic restarts
To start the server, start the script MemoriesOfMarsServer.sh in the installation folder of the game.

With automatic restarts
To start the server with automatic restarts, start the script RunServer.sh in the installation folder of the game. You might consider running this in the background or in a screen so it persists your login session.

Port-Forwarding
A game server needs to ports to be open on UDP and TCP. Both ports are specified in the DedicatedServerConfig.cfg and can be changed to whatever ports you want (as long as they are different from each other). A public server needs to have both ports open. Depending on your setup of the host machine (the one running the server), you may need to open the ports in a firewall and in the internet router. Look up your router model on this website on how to do that: https://portforward.com/

LAN server
Every server is automatically available on LAN, as long as it is run correctly with Steam or SteamCMD and can connect to Steam through the BeaconPort. If you want a LAN-only server you have to set a password or block the outgoing game port (default 7777) of the server in the router, so that it can't connect to the internet. The BeaconPort (default 15000) still needs to be open for the server to work correctly!

In-game browser
Choose either ALL or PRIVATE in the filter settings of the in-game server browser and connect to your server.

Steam server browser
You can join a server from the Steam server browser.

Database Maintenance
The files for the database will be stored in the following folder: Game/Saved/DB/{ServerID}/{SeasonID}.

You can create an easy backup of your files by copying everthing inside this folder and paste it elsewhere.

Once the game reaches a new season the database folder will create a new database inside a new season folder. The data from the previous season is still stored, but will not be used for the new season. The reason for that is, that we can not guarantee that the way the data is stored will not change between seasons. So you will start with a clean database in a new season, just like on the public servers.

If you are still willing to try to save your old data somehow you can try to manually copy the data over from the previous season. This might or might not work, depending on the changes made. So expect your game to cause some problems afterwards. If you can't get the game to run anymore after this just delete all the files you put in there and make sure you have a clean database.

NOTE: There will be no support by us for manually moving old databases to your newer server in case of database-breaking changes between seasons.

Reporting Errors
In case you encounter an error with the server, please inform us about it by using the game's support page at https://fs30.formsite.com/505g ames/mars/index.html

Please attach any information that can help us track down the error. Especially server logs and crash dumps are interesting for us. This information can be found in:

Windows
The subfolder Game\Saved contains the data written by the servers. Especially the Game.log in the subfolder Game\Saved\Logs is good for us, as well as the contents of the latest crash report in a subfolder of Game\Saved\Crashes.

Linux
The subfolder Game/Saved contains the data written by the servers. Especially the Game.log in the subfolder Game\Saved\Logs is good for us. Additionally, the server creates a core dump, which you will find in the root folder of the game server as a file starting with core.

Admin Tools
Admins on a Dedicated Server are able to open an AdminTools window with F8. The key to show the window can be changed in the Input Settings (in case F8 doesn't work make sure it's bound there). From here you have the option to execute a selection of cheats to author your server.

Player List
The Player List shows all players that are currently connected to your server. At the bottom you have buttons to kick a selected player, teleport to them or teleport them to your current location.

Cheat List
The Cheat List contains a selection of cheats you are allowed to execute as admin. Here you can find the usual cheats like toggling GodMode, spawning AIs or refill your HP and survival stats. To execute a cheat select it from the list and click the Execute Button at the bottom. There's also a cheat for changing the Server Password. Note that executing this cheat will not change the password in the DedicatedServerConfig and therefore will only be temporary. Also changing from no password to having a password or vice versa will not be reflected at runtime. You would need to restart your server and change the password in your DedicatedServerConfig to accomplish that.

Items
The Item List contains all items sorted by category. Here you cheat items into your inventory by selecting the item and clicking the Execute Button at the bottom. There's also a number field where you can enter the amount of items you want to receive. To make it easier to find the items you desire, we added a search bar as well as the option to mark items as favourites which will then appear inside the Favourites category at the very top.

PDA Map
Admins also have the option to teleport themselves to an arbitrary location on the map. To do that, just open the map in your PDA, right-click on the location you want to teleport to and select the "CHEAT: Teleport here" option from the context menu.

Two error messages on server start
There will be two error messages on server start from Steam (Process Entry Point not found). Those can be clicked away without any issues and the server will run fine. Those error messages will be fixed in an upcoming version of the server.

I can't see my server in the server list
Please make sure you followed all instructions above, especially the one about port forwarding and firewalls. Make sure your firewall is open for the two ports in the DedicatedServerConfig for both UDP and TCP and that your router is forwarding them to you as well. 90% of all issues with the server come down to closed ports, so check it thoroughly. Also make sure to only run one instance per server on each installation and port configuration. If you run two servers simultaneously on the same configuration they might interfere with each other and none of them might work.

You can run multiple servers per computer, but have to do that via commandline overrides of ports. That is for advanced users only!

What about all those warnings/errors in the log! What am I doing wrong?
Nothing actually. Servers will throw a lot of warnings right now, but you can safely ignore them at this moment. They are not for you to fix, but us.