Jump to content

ServerHostingGuide: Difference between revisions

From Logic World Wiki
Created page with "In this document I will slowly and iteratively collect information about how to setup and host a server. Whenever someone asks about how to setup a server, I will try to add all information required here. The goal is to send someone this page, to have them understand what to do. --- The document is structured into following sections: - [Server structure](#server-structure) - [Obtaining server](#obtaining-server) - [Starting server](#starting-server) - [Configuring..."
 
No edit summary
Line 1: Line 1:
In this document I will slowly and iteratively collect information about how to setup and host a server.
<p>In this document I will slowly and iteratively collect information about how to setup and host a server.<br />
Whenever someone asks about how to setup a server, I will try to add all information required here.
Whenever someone asks about how to setup a server, I will try to add all information required here.<br />
The goal is to send someone this page, to have them understand what to do.
The goal is to send someone this page, to have them understand what to do.</p>
 
<hr />
---
<p>The document is structured into following sections:</p>
 
<ul>
The document is structured into following sections:
<li><a href="#server-structure">Server structure</a></li>
 
<li><a href="#obtaining-server">Obtaining server</a></li>
- [Server structure](#server-structure)
<li><a href="#starting-server">Starting server</a></li>
- [Obtaining server](#obtaining-server)
<li><a href="#configuring-server">Configuring server</a></li>
- [Starting server](#starting-server)
<li><a href="#using-server">Using server</a></li>
- [Configuring server](#configuring-server)
<li><a href="#network-setup">Network setup</a></li>
- [Using server](#using-server)
</ul>
- [Network setup](#network-setup)
<h1><a inert href="#server-structure" aria-hidden="true" class="anchor" id="server-structure"></a>Server structure</h1>
 
<h3><a inert href="#minimal-structure" aria-hidden="true" class="anchor" id="minimal-structure"></a>Minimal structure:</h3>
# Server structure
<p>To run a server, you need at least the following files:</p>
 
<pre style="background-color:#2b303b;"><code><span style="color:#c0c5ce;">ServerFolder/
### Minimal structure:
</span><span style="color:#c0c5ce;"> GameData/
 
</span><span style="color:#c0c5ce;"> MHG/[...]
To run a server, you need at least the following files:
</span><span style="color:#c0c5ce;"> Server/
 
</span><span style="color:#c0c5ce;"> Server.exe (On Windows)
```
</span><span style="color:#c0c5ce;"> Server (On Linux)
ServerFolder/
</span><span style="color:#c0c5ce;"> [...] (Several DLLs and other files/folders)
GameData/
</span></code></pre>
MHG/[...]
<p>All other files will be generated by the server, once it is started.</p>
Server/
<p><code>GameData/</code> contains all mods which the server might load. Each mod must contain a <code>manifest.succ</code> file.<br />
Server.exe (On Windows)
<code>GameData/MHG/</code> contains the base mod of the game, without it, the server won't start.<br />
Server (On Linux)
<code>Server/</code> contains all files required to run the server software (except for the base mod).<br />
[...] (Several DLLs and other files/folders)
<code>Server/Server.exe</code> (Windows) or <code>Server/Server</code> (Linux) are the executable files, these have to be executed to start the server.</p>
```
<h3><a inert href="#full-structure" aria-hidden="true" class="anchor" id="full-structure"></a>Full structure:</h3>
 
<p>A fully functional server has the following files and folders:<br />
All other files will be generated by the server, once it is started.
All of these files will be generated once the server is started.</p>
 
<pre style="background-color:#2b303b;"><code><span style="color:#c0c5ce;">ServerFolder/
`GameData/` contains all mods which the server might load. Each mod must contain a `manifest.succ` file.
</span><span style="color:#c0c5ce;"> GameData/
`GameData/MHG/` contains the base mod of the game, without it, the server won't start.
</span><span style="color:#c0c5ce;"> MHG/
`Server/` contains all files required to run the server software (except for the base mod).
</span><span style="color:#c0c5ce;"> [...]/
`Server/Server.exe` (Windows) or `Server/Server` (Linux) are the executable files, these have to be executed to start the server.
</span><span style="color:#c0c5ce;"> Server/
 
</span><span style="color:#c0c5ce;"> cache/
### Full structure:
</span><span style="color:#c0c5ce;"> log.txt
 
</span><span style="color:#c0c5ce;"> [...] (See above)
A fully functional server has the following files and folders:
</span><span style="color:#c0c5ce;"> logs/
All of these files will be generated once the server is started.
</span><span style="color:#c0c5ce;"> licc-server/
 
</span><span style="color:#c0c5ce;"> autoexec.lsf
```
</span><span style="color:#c0c5ce;"> saves/&lt;world-name&gt;/
ServerFolder/
</span><span style="color:#c0c5ce;"> backups/saves/&lt;world-name&gt;/&lt;date-time&gt;/ (Save backups)
GameData/
</span><span style="color:#c0c5ce;"> componentrestrictions.succ
MHG/
</span><span style="color:#c0c5ce;"> config.succ
[...]/
</span></code></pre>
Server/
<p><code>Server/cache/</code> contains compiled mod DLLs, in some cases it is required to delete this folder.<br />
cache/
<code>Server/log.txt</code> some log file, gets overwritten with each start, not very important.<br />
log.txt
<code>logs/</code> contains the log files which contain text that gets printed via loggers to console.<br />
[...] (See above)
<code>licc-server/autoexec.lsf</code> this file contains &quot;commands&quot; which get executed once the server start. This is part of the LICC framework that manages commands.</p>
logs/
<p><code>saves/&lt;world-name&gt;</code> contains all the worlds which the server can start by world-name.<br />
licc-server/
<code>backups/</code> contains backups of the active save - done on &quot;force loading&quot;, or via the backup interval.</p>
autoexec.lsf
<p><code>config.succ</code> this file contains several settings, which you most likely will have to edit to run the server properly. More on configs below.<br />
saves/<world-name>/
<code>componentrestrictions.succ</code> this file contains settings restrictions, like the maximum and minimum amount of pegs for Displays &amp; AND-Gates. At least for AND gates, you should increase the amount of pegs to 8 (biased), so that clients can make use of more pegs.</p>
backups/saves/<world-name>/<date-time>/ (Save backups)
<h1><a inert href="#obtaining-server" aria-hidden="true" class="anchor" id="obtaining-server"></a>Obtaining server</h1>
componentrestrictions.succ
<p>The server is available for Windows, Linux (and I think MacOS too).<br />
config.succ
The only way that these differntiate is by the executable file (<code>Server</code> &amp; <code>Server.exe</code>).</p>
```
<p>The game comes with an internal server and a dedicated server. You can use either.</p>
 
<h2><a inert href="#via-the-logic-world-game-internal-server" aria-hidden="true" class="anchor" id="via-the-logic-world-game-internal-server"></a>Via the <code>Logic World</code> game (internal server):</h2>
`Server/cache/` contains compiled mod DLLs, in some cases it is required to delete this folder.
<p>The base game by default comes with an &quot;internal&quot; server, which is 100% equal to the dedicated server.<br />
`Server/log.txt` some log file, gets overwritten with each start, not very important. 
If you have the game (<code>Logic World</code>) installed, you can simply copy the <code>Server</code> and <code>GameData</code> folders to a new folder and you have a fresh dedicated server.</p>
`logs/` contains the log files which contain text that gets printed via loggers to console. 
<p>The executable of the internal server matches your current Operating System.</p>
`licc-server/autoexec.lsf` this file contains "commands" which get executed once the server start. This is part of the LICC framework that manages commands.
<p>You can even start the internal server, in the same folder as the game is installed and running in.<br />
 
Just be aware that you then cannot/should not use SinglePlayer for the world that the server is currently using.<br />
`saves/<world-name>` contains all the worlds which the server can start by world-name. 
And <code>Logic World</code> might overwrite your <code>config.succ</code> settings to run the internal server / SinglePlayer. Means LW removes password and disables verified.</p>
`backups/` contains backups of the active save - done on "force loading", or via the backup interval.
<h2><a inert href="#via-dedicated-server" aria-hidden="true" class="anchor" id="via-dedicated-server"></a>Via Dedicated Server:</h2>
 
<p>If you do not copy or use the internal server files, you can install/download a dedicated server.</p>
`config.succ` this file contains several settings, which you most likely will have to edit to run the server properly. More on configs below. 
<p>It should be available on <strong>Itch</strong> and <strong>Steam</strong>.</p>
`componentrestrictions.succ` this file contains settings restrictions, like the maximum and minimum amount of pegs for Displays & AND-Gates. At least for AND gates, you should increase the amount of pegs to 8 (biased), so that clients can make use of more pegs.
<p>TODO: Add details for Itch downloads. I don't have the Itch version of the game.</p>
 
<h3><a inert href="#via-steam" aria-hidden="true" class="anchor" id="via-steam"></a>Via Steam:</h3>
# Obtaining server
<p>If you bought the game on Steam, you can install the base game <code>Logic World</code> and play it.<br />
 
But in the &quot;Tool&quot; category in your library you will find <code>Logic World Dedicated Server</code>, install it.<br />
The server is available for Windows, Linux (and I think MacOS too).
Be aware that the &quot;Tool&quot; category is hidden by default, check the dropdown above your games list.</p>
The only way that these differntiate is by the executable file (`Server` & `Server.exe`).
<p>The dedicated server comes with the minimal server file setup.<br />
 
You can simply start &amp; stop it via Steam, but then you do not get a live console.<br />
The game comes with an internal server and a dedicated server. You can use either.
I recommend, you follow the usual procedure described in this document to start the server.</p>
 
<h4><a inert href="#remote--other-os-via-steamcmd" aria-hidden="true" class="anchor" id="remote--other-os-via-steamcmd"></a>Remote &amp; Other OS Via SteamCMD:</h4>
## Via the `Logic World` game (internal server):
<p>If you play on Windows, but need a Linux dedicated server you can download the dedicated server from Steam with the program <code>Steamcmd</code>.</p>
 
<p><a href="https://developer.valvesoftware.com/wiki/SteamCMD">https://developer.valvesoftware.com/wiki/SteamCMD</a></p>
The base game by default comes with an "internal" server, which is 100% equal to the dedicated server.
<p><strong>TODO</strong>: Add description and information of how to use <code>steamcmd</code> to download the dedicated server for your OS of choice.</p>
If you have the game (`Logic World`) installed, you can simply copy the `Server` and `GameData` folders to a new folder and you have a fresh dedicated server.
<h1><a inert href="#starting-server" aria-hidden="true" class="anchor" id="starting-server"></a>Starting server</h1>
 
<p>You could start the dedicated server from Steam.<br />
The executable of the internal server matches your current Operating System.
But it is recommended to copy the server files to a new directory.<br />
 
That way it is more easy to setup multiple servers. Or servers with different configuration.</p>
You can even start the internal server, in the same folder as the game is installed and running in.
<p>For every system follow the following instructions:</p>
Just be aware that you then cannot/should not use SinglePlayer for the world that the server is currently using.
<p>Copy the <code>Server</code> and the <code>GameData</code> folder into a new folder (can be located anywhere on your system). For this example lets name it <code>ServerFolder</code>.<br />
And `Logic World` might overwrite your `config.succ` settings to run the internal server / SinglePlayer. Means LW removes password and disables verified.
And open a Terminal in that folder.</p>
 
<p>You ofc can create launch scripts in the <code>ServerFolder</code>, in case that you are supplying some arguments to the server (see configuration section below).</p>
## Via Dedicated Server:
<h3><a inert href="#windows" aria-hidden="true" class="anchor" id="windows"></a>Windows:</h3>
 
<p><strong>TODO</strong>: Add more details here - I don't use Windows.</p>
If you do not copy or use the internal server files, you can install/download a dedicated server.
<p>If you have explorer open in the <code>ServerFolder</code>. You can click on the path bar on top and input <code>%cmd%</code> to open a CMD terminal at the correct location.</p>
 
<p>CMD: Run <code>Server\Server.exe</code> in a terminal.</p>
It should be available on **Itch** and **Steam**.
<h3><a inert href="#linux--probably-macos-too" aria-hidden="true" class="anchor" id="linux--probably-macos-too"></a>Linux (&amp; probably MacOS too?):</h3>
 
<p>Set the permission for the executable (one time job - if you copy it, it persists):<br />
TODO: Add details for Itch downloads. I don't have the Itch version of the game.
<code>chmod +x ./Server/Server</code></p>
 
<p>Run the server:<br />
### Via Steam:
<code>./Server/Server</code></p>
 
<h1><a inert href="#configuring-server" aria-hidden="true" class="anchor" id="configuring-server"></a>Configuring server</h1>
If you bought the game on Steam, you can install the base game `Logic World` and play it.
<p>Logic World has several places where configuration can be done:</p>
But in the "Tool" category in your library you will find `Logic World Dedicated Server`, install it.
<ul>
Be aware that the "Tool" category is hidden by default, check the dropdown above your games list.
<li>The save itself can be configured in several aspects (world type).</li>
 
<li>The server configuration files <code>config.succ</code> &amp; <code>componentrestrictions.succ</code>.</li>
The dedicated server comes with the minimal server file setup.
<li>The server executable command-line arguments.</li>
You can simply start & stop it via Steam, but then you do not get a live console.
</ul>
I recommend, you follow the usual procedure described in this document to start the server.
<h2><a inert href="#save" aria-hidden="true" class="anchor" id="save"></a>Save:</h2>
 
<p>You can configure the world type and the spawn position per world.<br />
#### Remote & Other OS Via SteamCMD:
The most easy way to configure your world type, is to create the save in your client and move/copy it over to the server.</p>
 
<h3><a inert href="#manual-configuration" aria-hidden="true" class="anchor" id="manual-configuration"></a>Manual configuration:</h3>
If you play on Windows, but need a Linux dedicated server you can download the dedicated server from Steam with the program `Steamcmd`.
<p>In a save file you will find <code>worldinfo.succ</code>, which contains the <code>WorldTypeID</code> and the <code>WorldSpawnPosition</code>.<br />
 
The <code>WorldTypeID</code> can be any valid world type name, that is installed on the Logic World client. The two most important are: <code>MHG.Grasslands</code> &amp; <code>MHG.Gridlands</code>.</p>
https://developer.valvesoftware.com/wiki/SteamCMD
<p>The <code>MHG.Gridlands</code> world type also has some extra configuration.<br />
 
You can find it in <code>ExtraData/MHG.WorldTypeData.succ</code> in your save folder.<br />
**TODO**: Add description and information of how to use `steamcmd` to download the dedicated server for your OS of choice.
The default Gridlands world data file looks like this:</p>
 
<pre style="background-color:#2b303b;"><code><span style="color:#c0c5ce;">DataType: LogicWorld.SharedCode.Data.GridlandsWorldData
# Starting server
</span><span style="color:#c0c5ce;">Data:
 
</span><span style="color:#c0c5ce;">    ColorA: 222222
You could start the dedicated server from Steam.
</span><span style="color:#c0c5ce;">    ColorB: 005A6C
But it is recommended to copy the server files to a new directory.
</span><span style="color:#c0c5ce;">    BigCellSizeX: 64
That way it is more easy to setup multiple servers. Or servers with different configuration.
</span><span style="color:#c0c5ce;">    BigCellSizeZ: 64
 
</span></code></pre>
For every system follow the following instructions:
<h2><a inert href="#config-file" aria-hidden="true" class="anchor" id="config-file"></a>Config file:</h2>
 
<h3><a inert href="#configsucc" aria-hidden="true" class="anchor" id="configsucc"></a><code>config.succ</code>:</h3>
Copy the `Server` and the `GameData` folder into a new folder (can be located anywhere on your system). For this example lets name it `ServerFolder`. 
<table>
And open a Terminal in that folder.
<thead>
 
<tr>
You ofc can create launch scripts in the `ServerFolder`, in case that you are supplying some arguments to the server (see configuration section below).
<th>Key</th>
 
<th>Type</th>
### Windows:
<th>Default</th>
 
<th>Description</th>
**TODO**: Add more details here - I don't use Windows.
</tr>
 
</thead>
If you have explorer open in the `ServerFolder`. You can click on the path bar on top and input `%cmd%` to open a CMD terminal at the correct location.
<tbody>
 
<tr>
CMD: Run `Server\Server.exe` in a terminal.
<td>ServerTPS</td>
 
<td>double</td>
### Linux (& probably MacOS too?):
<td>60</td>
 
<td>How many server ticks per second are processed. Each server tick network packets &amp; simulation will be processed and updates are sent to the clients.</td>
Set the permission for the executable (one time job - if you copy it, it persists): 
</tr>
`chmod +x ./Server/Server`
<tr>
 
<td>Simulation:</td>
Run the server: 
<td></td>
`./Server/Server`
<td></td>
 
<td></td>
# Configuring server
</tr>
 
<tr>
Logic World has several places where configuration can be done:
<td>DefaultSimulationTPS</td>
- The save itself can be configured in several aspects (world type).
<td>double</td>
- The server configuration files `config.succ` & `componentrestrictions.succ`.
<td>30</td>
- The server executable command-line arguments.
<td>The TPS the simulation resets to</td>
 
</tr>
## Save:
<tr>
 
<td>MaximumSimulationTPS</td>
You can configure the world type and the spawn position per world.
<td>double</td>
The most easy way to configure your world type, is to create the save in your client and move/copy it over to the server.
<td>100000</td>
 
<td></td>
### Manual configuration:
</tr>
 
<tr>
In a save file you will find `worldinfo.succ`, which contains the `WorldTypeID` and the `WorldSpawnPosition`.
<td>MaxAllowedTimeStepSeconds</td>
The `WorldTypeID` can be any valid world type name, that is installed on the Logic World client. The two most important are: `MHG.Grasslands` & `MHG.Gridlands`.
<td>float</td>
 
<td>0.3</td>
The `MHG.Gridlands` world type also has some extra configuration. 
<td>0.91.1- Duration the simulation may take to simulate ticks during a single server tick.</td>
You can find it in `ExtraData/MHG.WorldTypeData.succ` in your save folder. 
</tr>
The default Gridlands world data file looks like this:
<tr>
 
<td>MaxAllowedSimulationTickDebtSeconds</td>
```
<td>double</td>
DataType: LogicWorld.SharedCode.Data.GridlandsWorldData
<td>1</td>
Data:
<td>0.91.2+ Amount of tick time (accumulated time of ticks to process), that might be caught up. Once reached, simulation skips ticks to reset debt.</td>
    ColorA: 222222
</tr>
    ColorB: 005A6C
<tr>
    BigCellSizeX: 64
<td>PauseSimulationWhenServerEmpty</td>
    BigCellSizeZ: 64
<td>bool</td>
```
<td>true</td>
 
<td></td>
## Config file:
</tr>
 
<tr>
### `config.succ`:
<td>Saving:</td>
 
<td></td>
| Key | Type | Default | Description |
<td></td>
| --- | --- | --- | --- |
<td></td>
| ServerTPS | double | 60 | How many server ticks per second are processed. Each server tick network packets & simulation will be processed and updates are sent to the clients. |
</tr>
| Simulation: | | | |
<tr>
| DefaultSimulationTPS | double | 30 | The TPS the simulation resets to |
<td>SaveOnClose</td>
| MaximumSimulationTPS | double | 100000 |  |
<td>bool</td>
| MaxAllowedTimeStepSeconds | float | 0.3 | 0.91.1- Duration the simulation may take to simulate ticks during a single server tick. |
<td>true</td>
| MaxAllowedSimulationTickDebtSeconds | double | 1 | 0.91.2+ Amount of tick time (accumulated time of ticks to process), that might be caught up. Once reached, simulation skips ticks to reset debt. |
<td></td>
| PauseSimulationWhenServerEmpty | bool | true | |
</tr>
| Saving: | | | |
<tr>
| SaveOnClose | bool | true |
<td>SaveWhenServerEmpties</td>
| SaveWhenServerEmpties | bool | true |
<td>bool</td>
| DoAutosaveWhileServerIsEmpty | bool | false | 0.91.2+ |
<td>true</td>
| DoAutosave | bool | true |
<td></td>
| AutosaveIntervalSeconds | float | 60 |
</tr>
| Backups: | | |
<tr>
| DoAutoBackup | bool | true | |
<td>DoAutosaveWhileServerIsEmpty</td>
| DoAutoBackupsWhileServerIsEmpty | bool | false | 0.91.2+ |
<td>bool</td>
| AutoBackupIntervalSeconds | float | 300 | |
<td>false</td>
| BackupOnSave | bool | false | |
<td>0.91.2+</td>
| MaxBackups | int | 10 | |
</tr>
| BackupsPath | string | "backups" | |
<tr>
| --- | | | |
<td>DoAutosave</td>
| EnableDiscovery | bool | true | |
<td>bool</td>
| MOTD | string | #random | |
<td>true</td>
| AnnounceOnLocalNetwork | bool | true | If the server|
<td></td>
| AnnounceOnLocalNetworkIntervalSeconds | float | 1 | |
</tr>
| --- | | | |
<tr>
| DefaultSave | string | "World" | The save name to be loaded from the `Saves` folder. |
<td>AutosaveIntervalSeconds</td>
| DefaultPort | int | 43531 | The port, the server listens to connection. The client will try to connect to the default port if none is specified. |
<td>float</td>
| --- | | | |
<td>60</td>
| InternetProtocolOverride | ENUM | |
<td></td>
| --- | | | |
</tr>
| UsePassword | bool | false |
<tr>
| Password | string | "this is a very secure password" |
<td>Backups:</td>
| VerifiedMode | bool | false |
<td></td>
| --- | | | |
<td></td>
| MaxPlayers | int | 20 |
<td></td>
| --- | | | |
</tr>
| Admin_IDs | string\[] | - |
<tr>
| UseWhitelist | bool| false |
<td>DoAutoBackup</td>
| Whitelisted_IDs | string[] | - |
<td>bool</td>
| Banned_IDs | string[] | - |
<td>true</td>
| Banned_IPs | ip[] | - |
<td></td>
| --- | | | |
</tr>
| ChatMessageLengthLimit | int | 2100 | |
<tr>
| PlayerTimeOutSeconds | int | 60 | |
<td>DoAutoBackupsWhileServerIsEmpty</td>
| --- | | | |
<td>bool</td>
| AllowConnectionsFromADifferentGameVersion | bool | false | |
<td>false</td>
 
<td>0.91.2+</td>
TODO: Finish the descriptions and maybe reorder the entries? They match the default order though.
</tr>
 
<tr>
### `componentrestrictions.succ`:
<td>AutoBackupIntervalSeconds</td>
 
<td>float</td>
This file allows to configure the allowed/valid amount of pegs per component with variable peg count.
<td>300</td>
Variable peg count components are: `MHG.AndGate` & `MHG.StandingDisplay` & `MHG.PanelDisplay`
<td></td>
You can set 4 values per component: Input-peg min/max & Output-peg min/max
</tr>
 
<tr>
But other component restrictions might be added to this file in future.
<td>BackupOnSave</td>
 
<td>bool</td>
## Server arguments:
<td>false</td>
 
<td></td>
As of 0.91.2 you can use `--help` to see a list of arguments which the server accepts.
</tr>
 
<tr>
With normal server usage, you can simply setup everything via the `config.succ` file. 
<td>MaxBackups</td>
If you have multiple servers, but intend to only have the DLLs once, you might intend to use some arguments. 
<td>int</td>
Many arguments are used by the client when starting the internal server, as that tries to not use `config.succ`.
<td>10</td>
 
<td></td>
| Long | Short | Type | Description |
</tr>
| --- | --- | --- | --- |
<tr>
| Console: | | | |
<td>BackupsPath</td>
| plain-text | t | flag | Windows: Disables some ANSI terminal interaction. Disable by default on UNIX systems. |
<td>string</td>
| no-color | n | flag | Prevents the printing of colors. Not sure if this is only logging, or actual active removal of colors. |
<td>&quot;backups&quot;</td>
| aa | | | |
<td></td>
| working-dir | w | folder | |
</tr>
| root | r | folder | |
<tr>
| save | s | string | |
<td>---</td>
| port | p | int | |
<td></td>
| forceLoad | f | flag | |
<td></td>
| log-file | l | file | Default: "log.txt" |
<td></td>
| aa | | | |
</tr>
| offline | o | flag | |
<tr>
| integrated | | flag | **Hidden** An umbrella argument, which will tell the server it is started for SinglePlayer usage. TODO: Side effects (Disable password/verified + set offline argument + no wait at shutdown)|
<td>EnableDiscovery</td>
| parent-pid | | int | **Hidden** Allows the server to monitor the parent process (client) and shutdown if the client crashes. |
<td>bool</td>
| token | | string | **Hidden** *IDK* |
<td>true</td>
| Tools: | | | Tools which won't make the server start, but print data or perform things. |
<td></td>
| version | v | flag | Print the version and quit. |
</tr>
| benchmark | | string | Perform a benchmark with provided name and quit. |
<tr>
| graph | | flag | **Hidden** Prints a dependency framework graph or so? To file? |
<td>MOTD</td>
 
<td>string</td>
TODO: Finish table here...
<td>#random</td>
 
<td></td>
# Using server:
</tr>
 
<tr>
If you are on the client, you can send server commands to the server with the `server "<command goes here>"` command. 
<td>AnnounceOnLocalNetwork</td>
You must be in SinglePlayer though or your name must be one entry in the `Admin_IDs` list in `config.succ`.
<td>bool</td>
 
<td>true</td>
To see a list of all server commands run `help` in the servers console.
<td>If the server</td>
 
</tr>
To stop the server simply run `exit` to stop the server (or use `Control+C`).
<tr>
 
<td>AnnounceOnLocalNetworkIntervalSeconds</td>
# Network setup:
<td>float</td>
 
<td>1</td>
UDP `<default port>`
<td></td>
Portforwarding? Firewall? VPN?
</tr>
 
<tr>
IPv4 vs IPv6
<td>---</td>
 
<td></td>
Last remaining networking bug `localhost` on client wrongly resolved.
<td></td>
<td></td>
</tr>
<tr>
<td>DefaultSave</td>
<td>string</td>
<td>&quot;World&quot;</td>
<td>The save name to be loaded from the <code>Saves</code> folder.</td>
</tr>
<tr>
<td>DefaultPort</td>
<td>int</td>
<td>43531</td>
<td>The port, the server listens to connection. The client will try to connect to the default port if none is specified.</td>
</tr>
<tr>
<td>---</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>InternetProtocolOverride</td>
<td>ENUM</td>
<td></td>
<td></td>
</tr>
<tr>
<td>---</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>UsePassword</td>
<td>bool</td>
<td>false</td>
<td></td>
</tr>
<tr>
<td>Password</td>
<td>string</td>
<td>&quot;this is a very secure password&quot;</td>
<td></td>
</tr>
<tr>
<td>VerifiedMode</td>
<td>bool</td>
<td>false</td>
<td></td>
</tr>
<tr>
<td>---</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>MaxPlayers</td>
<td>int</td>
<td>20</td>
<td></td>
</tr>
<tr>
<td>---</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Admin_IDs</td>
<td>string<span data-escaped-char>[</span>]</td>
<td>-</td>
<td></td>
</tr>
<tr>
<td>UseWhitelist</td>
<td>bool</td>
<td>false</td>
<td></td>
</tr>
<tr>
<td>Whitelisted_IDs</td>
<td>string[]</td>
<td>-</td>
<td></td>
</tr>
<tr>
<td>Banned_IDs</td>
<td>string[]</td>
<td>-</td>
<td></td>
</tr>
<tr>
<td>Banned_IPs</td>
<td>ip[]</td>
<td>-</td>
<td></td>
</tr>
<tr>
<td>---</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>ChatMessageLengthLimit</td>
<td>int</td>
<td>2100</td>
<td></td>
</tr>
<tr>
<td>PlayerTimeOutSeconds</td>
<td>int</td>
<td>60</td>
<td></td>
</tr>
<tr>
<td>---</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>AllowConnectionsFromADifferentGameVersion</td>
<td>bool</td>
<td>false</td>
<td></td>
</tr>
</tbody>
</table>
<p>TODO: Finish the descriptions and maybe reorder the entries? They match the default order though.</p>
<h3><a inert href="#componentrestrictionssucc" aria-hidden="true" class="anchor" id="componentrestrictionssucc"></a><code>componentrestrictions.succ</code>:</h3>
<p>This file allows to configure the allowed/valid amount of pegs per component with variable peg count.<br />
Variable peg count components are: <code>MHG.AndGate</code> &amp; <code>MHG.StandingDisplay</code> &amp; <code>MHG.PanelDisplay</code><br />
You can set 4 values per component: Input-peg min/max &amp; Output-peg min/max</p>
<p>But other component restrictions might be added to this file in future.</p>
<h2><a inert href="#server-arguments" aria-hidden="true" class="anchor" id="server-arguments"></a>Server arguments:</h2>
<p>As of 0.91.2 you can use <code>--help</code> to see a list of arguments which the server accepts.</p>
<p>With normal server usage, you can simply setup everything via the <code>config.succ</code> file.<br />
If you have multiple servers, but intend to only have the DLLs once, you might intend to use some arguments.<br />
Many arguments are used by the client when starting the internal server, as that tries to not use <code>config.succ</code>.</p>
<table>
<thead>
<tr>
<th>Long</th>
<th>Short</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Console:</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>plain-text</td>
<td>t</td>
<td>flag</td>
<td>Windows: Disables some ANSI terminal interaction. Disable by default on UNIX systems.</td>
</tr>
<tr>
<td>no-color</td>
<td>n</td>
<td>flag</td>
<td>Prevents the printing of colors. Not sure if this is only logging, or actual active removal of colors.</td>
</tr>
<tr>
<td>aa</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>working-dir</td>
<td>w</td>
<td>folder</td>
<td></td>
</tr>
<tr>
<td>root</td>
<td>r</td>
<td>folder</td>
<td></td>
</tr>
<tr>
<td>save</td>
<td>s</td>
<td>string</td>
<td></td>
</tr>
<tr>
<td>port</td>
<td>p</td>
<td>int</td>
<td></td>
</tr>
<tr>
<td>forceLoad</td>
<td>f</td>
<td>flag</td>
<td></td>
</tr>
<tr>
<td>log-file</td>
<td>l</td>
<td>file</td>
<td>Default: &quot;log.txt&quot;</td>
</tr>
<tr>
<td>aa</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>offline</td>
<td>o</td>
<td>flag</td>
<td></td>
</tr>
<tr>
<td>integrated</td>
<td></td>
<td>flag</td>
<td><strong>Hidden</strong> An umbrella argument, which will tell the server it is started for SinglePlayer usage. TODO: Side effects (Disable password/verified + set offline argument + no wait at shutdown)</td>
</tr>
<tr>
<td>parent-pid</td>
<td></td>
<td>int</td>
<td><strong>Hidden</strong> Allows the server to monitor the parent process (client) and shutdown if the client crashes.</td>
</tr>
<tr>
<td>token</td>
<td></td>
<td>string</td>
<td><strong>Hidden</strong> <em>IDK</em></td>
</tr>
<tr>
<td>Tools:</td>
<td></td>
<td></td>
<td>Tools which won't make the server start, but print data or perform things.</td>
</tr>
<tr>
<td>version</td>
<td>v</td>
<td>flag</td>
<td>Print the version and quit.</td>
</tr>
<tr>
<td>benchmark</td>
<td></td>
<td>string</td>
<td>Perform a benchmark with provided name and quit.</td>
</tr>
<tr>
<td>graph</td>
<td></td>
<td>flag</td>
<td><strong>Hidden</strong> Prints a dependency framework graph or so? To file?</td>
</tr>
</tbody>
</table>
<p>TODO: Finish table here...</p>
<h1><a inert href="#using-server" aria-hidden="true" class="anchor" id="using-server"></a>Using server:</h1>
<p>If you are on the client, you can send server commands to the server with the <code>server &quot;&lt;command goes here&gt;&quot;</code> command.<br />
You must be in SinglePlayer though or your name must be one entry in the <code>Admin_IDs</code> list in <code>config.succ</code>.</p>
<p>To see a list of all server commands run <code>help</code> in the servers console.</p>
<p>To stop the server simply run <code>exit</code> to stop the server (or use <code>Control+C</code>).</p>
<h1><a inert href="#network-setup" aria-hidden="true" class="anchor" id="network-setup"></a>Network setup:</h1>
<p>UDP <code>&lt;default port&gt;</code><br />
Portforwarding? Firewall? VPN?</p>
<p>IPv4 vs IPv6</p>
<p>Last remaining networking bug <code>localhost</code> on client wrongly resolved.</p>

Revision as of 14:01, 24 October 2025

In this document I will slowly and iteratively collect information about how to setup and host a server.
Whenever someone asks about how to setup a server, I will try to add all information required here.
The goal is to send someone this page, to have them understand what to do.


The document is structured into following sections:

  • <a href="#server-structure">Server structure</a>
  • <a href="#obtaining-server">Obtaining server</a>
  • <a href="#starting-server">Starting server</a>
  • <a href="#configuring-server">Configuring server</a>
  • <a href="#using-server">Using server</a>
  • <a href="#network-setup">Network setup</a>

<a inert href="#server-structure" aria-hidden="true" class="anchor" id="server-structure"></a>Server structure

<a inert href="#minimal-structure" aria-hidden="true" class="anchor" id="minimal-structure"></a>Minimal structure:

To run a server, you need at least the following files:

<code><span style="color:#c0c5ce;">ServerFolder/
</span><span style="color:#c0c5ce;">	GameData/
</span><span style="color:#c0c5ce;">		MHG/[...]
</span><span style="color:#c0c5ce;">	Server/
</span><span style="color:#c0c5ce;">		Server.exe (On Windows)
</span><span style="color:#c0c5ce;">		Server (On Linux)
</span><span style="color:#c0c5ce;">		[...] (Several DLLs and other files/folders)
</span></code>

All other files will be generated by the server, once it is started.

GameData/ contains all mods which the server might load. Each mod must contain a manifest.succ file.
GameData/MHG/ contains the base mod of the game, without it, the server won't start.
Server/ contains all files required to run the server software (except for the base mod).
Server/Server.exe (Windows) or Server/Server (Linux) are the executable files, these have to be executed to start the server.

<a inert href="#full-structure" aria-hidden="true" class="anchor" id="full-structure"></a>Full structure:

A fully functional server has the following files and folders:
All of these files will be generated once the server is started.

<code><span style="color:#c0c5ce;">ServerFolder/
</span><span style="color:#c0c5ce;">	GameData/
</span><span style="color:#c0c5ce;">		MHG/
</span><span style="color:#c0c5ce;">		[...]/
</span><span style="color:#c0c5ce;">	Server/
</span><span style="color:#c0c5ce;">		cache/
</span><span style="color:#c0c5ce;">		log.txt
</span><span style="color:#c0c5ce;">		[...] (See above)
</span><span style="color:#c0c5ce;">	logs/
</span><span style="color:#c0c5ce;">	licc-server/
</span><span style="color:#c0c5ce;">		autoexec.lsf
</span><span style="color:#c0c5ce;">	saves/<world-name>/
</span><span style="color:#c0c5ce;">	backups/saves/<world-name>/<date-time>/ (Save backups)
</span><span style="color:#c0c5ce;">	componentrestrictions.succ
</span><span style="color:#c0c5ce;">	config.succ
</span></code>

Server/cache/ contains compiled mod DLLs, in some cases it is required to delete this folder.
Server/log.txt some log file, gets overwritten with each start, not very important.
logs/ contains the log files which contain text that gets printed via loggers to console.
licc-server/autoexec.lsf this file contains "commands" which get executed once the server start. This is part of the LICC framework that manages commands.

saves/<world-name> contains all the worlds which the server can start by world-name.
backups/ contains backups of the active save - done on "force loading", or via the backup interval.

config.succ this file contains several settings, which you most likely will have to edit to run the server properly. More on configs below.
componentrestrictions.succ this file contains settings restrictions, like the maximum and minimum amount of pegs for Displays & AND-Gates. At least for AND gates, you should increase the amount of pegs to 8 (biased), so that clients can make use of more pegs.

<a inert href="#obtaining-server" aria-hidden="true" class="anchor" id="obtaining-server"></a>Obtaining server

The server is available for Windows, Linux (and I think MacOS too).
The only way that these differntiate is by the executable file (Server & Server.exe).

The game comes with an internal server and a dedicated server. You can use either.

<a inert href="#via-the-logic-world-game-internal-server" aria-hidden="true" class="anchor" id="via-the-logic-world-game-internal-server"></a>Via the Logic World game (internal server):

The base game by default comes with an "internal" server, which is 100% equal to the dedicated server.
If you have the game (Logic World) installed, you can simply copy the Server and GameData folders to a new folder and you have a fresh dedicated server.

The executable of the internal server matches your current Operating System.

You can even start the internal server, in the same folder as the game is installed and running in.
Just be aware that you then cannot/should not use SinglePlayer for the world that the server is currently using.
And Logic World might overwrite your config.succ settings to run the internal server / SinglePlayer. Means LW removes password and disables verified.

<a inert href="#via-dedicated-server" aria-hidden="true" class="anchor" id="via-dedicated-server"></a>Via Dedicated Server:

If you do not copy or use the internal server files, you can install/download a dedicated server.

It should be available on Itch and Steam.

TODO: Add details for Itch downloads. I don't have the Itch version of the game.

<a inert href="#via-steam" aria-hidden="true" class="anchor" id="via-steam"></a>Via Steam:

If you bought the game on Steam, you can install the base game Logic World and play it.
But in the "Tool" category in your library you will find Logic World Dedicated Server, install it.
Be aware that the "Tool" category is hidden by default, check the dropdown above your games list.

The dedicated server comes with the minimal server file setup.
You can simply start & stop it via Steam, but then you do not get a live console.
I recommend, you follow the usual procedure described in this document to start the server.

<a inert href="#remote--other-os-via-steamcmd" aria-hidden="true" class="anchor" id="remote--other-os-via-steamcmd"></a>Remote & Other OS Via SteamCMD:

If you play on Windows, but need a Linux dedicated server you can download the dedicated server from Steam with the program Steamcmd.

<a href="https://developer.valvesoftware.com/wiki/SteamCMD">https://developer.valvesoftware.com/wiki/SteamCMD</a>

TODO: Add description and information of how to use steamcmd to download the dedicated server for your OS of choice.

<a inert href="#starting-server" aria-hidden="true" class="anchor" id="starting-server"></a>Starting server

You could start the dedicated server from Steam.
But it is recommended to copy the server files to a new directory.
That way it is more easy to setup multiple servers. Or servers with different configuration.

For every system follow the following instructions:

Copy the Server and the GameData folder into a new folder (can be located anywhere on your system). For this example lets name it ServerFolder.
And open a Terminal in that folder.

You ofc can create launch scripts in the ServerFolder, in case that you are supplying some arguments to the server (see configuration section below).

<a inert href="#windows" aria-hidden="true" class="anchor" id="windows"></a>Windows:

TODO: Add more details here - I don't use Windows.

If you have explorer open in the ServerFolder. You can click on the path bar on top and input %cmd% to open a CMD terminal at the correct location.

CMD: Run Server\Server.exe in a terminal.

<a inert href="#linux--probably-macos-too" aria-hidden="true" class="anchor" id="linux--probably-macos-too"></a>Linux (& probably MacOS too?):

Set the permission for the executable (one time job - if you copy it, it persists):
chmod +x ./Server/Server

Run the server:
./Server/Server

<a inert href="#configuring-server" aria-hidden="true" class="anchor" id="configuring-server"></a>Configuring server

Logic World has several places where configuration can be done:

  • The save itself can be configured in several aspects (world type).
  • The server configuration files config.succ & componentrestrictions.succ.
  • The server executable command-line arguments.

<a inert href="#save" aria-hidden="true" class="anchor" id="save"></a>Save:

You can configure the world type and the spawn position per world.
The most easy way to configure your world type, is to create the save in your client and move/copy it over to the server.

<a inert href="#manual-configuration" aria-hidden="true" class="anchor" id="manual-configuration"></a>Manual configuration:

In a save file you will find worldinfo.succ, which contains the WorldTypeID and the WorldSpawnPosition.
The WorldTypeID can be any valid world type name, that is installed on the Logic World client. The two most important are: MHG.Grasslands & MHG.Gridlands.

The MHG.Gridlands world type also has some extra configuration.
You can find it in ExtraData/MHG.WorldTypeData.succ in your save folder.
The default Gridlands world data file looks like this:

<code><span style="color:#c0c5ce;">DataType: LogicWorld.SharedCode.Data.GridlandsWorldData
</span><span style="color:#c0c5ce;">Data:
</span><span style="color:#c0c5ce;">    ColorA: 222222
</span><span style="color:#c0c5ce;">    ColorB: 005A6C
</span><span style="color:#c0c5ce;">    BigCellSizeX: 64
</span><span style="color:#c0c5ce;">    BigCellSizeZ: 64
</span></code>

<a inert href="#config-file" aria-hidden="true" class="anchor" id="config-file"></a>Config file:

<a inert href="#configsucc" aria-hidden="true" class="anchor" id="configsucc"></a>config.succ:

<thead> </thead> <tbody> </tbody>
Key Type Default Description
ServerTPS double 60 How many server ticks per second are processed. Each server tick network packets & simulation will be processed and updates are sent to the clients.
Simulation:
DefaultSimulationTPS double 30 The TPS the simulation resets to
MaximumSimulationTPS double 100000
MaxAllowedTimeStepSeconds float 0.3 0.91.1- Duration the simulation may take to simulate ticks during a single server tick.
MaxAllowedSimulationTickDebtSeconds double 1 0.91.2+ Amount of tick time (accumulated time of ticks to process), that might be caught up. Once reached, simulation skips ticks to reset debt.
PauseSimulationWhenServerEmpty bool true
Saving:
SaveOnClose bool true
SaveWhenServerEmpties bool true
DoAutosaveWhileServerIsEmpty bool false 0.91.2+
DoAutosave bool true
AutosaveIntervalSeconds float 60
Backups:
DoAutoBackup bool true
DoAutoBackupsWhileServerIsEmpty bool false 0.91.2+
AutoBackupIntervalSeconds float 300
BackupOnSave bool false
MaxBackups int 10
BackupsPath string "backups"
---
EnableDiscovery bool true
MOTD string #random
AnnounceOnLocalNetwork bool true If the server
AnnounceOnLocalNetworkIntervalSeconds float 1
---
DefaultSave string "World" The save name to be loaded from the Saves folder.
DefaultPort int 43531 The port, the server listens to connection. The client will try to connect to the default port if none is specified.
---
InternetProtocolOverride ENUM
---
UsePassword bool false
Password string "this is a very secure password"
VerifiedMode bool false
---
MaxPlayers int 20
---
Admin_IDs string[] -
UseWhitelist bool false
Whitelisted_IDs string[] -
Banned_IDs string[] -
Banned_IPs ip[] -
---
ChatMessageLengthLimit int 2100
PlayerTimeOutSeconds int 60
---
AllowConnectionsFromADifferentGameVersion bool false

TODO: Finish the descriptions and maybe reorder the entries? They match the default order though.

<a inert href="#componentrestrictionssucc" aria-hidden="true" class="anchor" id="componentrestrictionssucc"></a>componentrestrictions.succ:

This file allows to configure the allowed/valid amount of pegs per component with variable peg count.
Variable peg count components are: MHG.AndGate & MHG.StandingDisplay & MHG.PanelDisplay
You can set 4 values per component: Input-peg min/max & Output-peg min/max

But other component restrictions might be added to this file in future.

<a inert href="#server-arguments" aria-hidden="true" class="anchor" id="server-arguments"></a>Server arguments:

As of 0.91.2 you can use --help to see a list of arguments which the server accepts.

With normal server usage, you can simply setup everything via the config.succ file.
If you have multiple servers, but intend to only have the DLLs once, you might intend to use some arguments.
Many arguments are used by the client when starting the internal server, as that tries to not use config.succ.

<thead> </thead> <tbody> </tbody>
Long Short Type Description
Console:
plain-text t flag Windows: Disables some ANSI terminal interaction. Disable by default on UNIX systems.
no-color n flag Prevents the printing of colors. Not sure if this is only logging, or actual active removal of colors.
aa
working-dir w folder
root r folder
save s string
port p int
forceLoad f flag
log-file l file Default: "log.txt"
aa
offline o flag
integrated flag Hidden An umbrella argument, which will tell the server it is started for SinglePlayer usage. TODO: Side effects (Disable password/verified + set offline argument + no wait at shutdown)
parent-pid int Hidden Allows the server to monitor the parent process (client) and shutdown if the client crashes.
token string Hidden IDK
Tools: Tools which won't make the server start, but print data or perform things.
version v flag Print the version and quit.
benchmark string Perform a benchmark with provided name and quit.
graph flag Hidden Prints a dependency framework graph or so? To file?

TODO: Finish table here...

<a inert href="#using-server" aria-hidden="true" class="anchor" id="using-server"></a>Using server:

If you are on the client, you can send server commands to the server with the server "<command goes here>" command.
You must be in SinglePlayer though or your name must be one entry in the Admin_IDs list in config.succ.

To see a list of all server commands run help in the servers console.

To stop the server simply run exit to stop the server (or use Control+C).

<a inert href="#network-setup" aria-hidden="true" class="anchor" id="network-setup"></a>Network setup:

UDP <default port>
Portforwarding? Firewall? VPN?

IPv4 vs IPv6

Last remaining networking bug localhost on client wrongly resolved.