Jump to content

ServerHostingGuide: Difference between revisions

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

Server structure

Minimal structure:

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

ServerFolder/
	GameData/
		MHG/[...]
	Server/
		Server.exe (On Windows)
		Server (On Linux)
		[...] (Several DLLs and other files/folders)

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.

Full structure:

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

ServerFolder/
	GameData/
		MHG/
		[...]/
	Server/
		cache/
		log.txt
		[...] (See above)
	logs/
	licc-server/
		autoexec.lsf
	saves/<world-name>/
	backups/saves/<world-name>/<date-time>/ (Save backups)
	componentrestrictions.succ
	config.succ

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.

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.

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.

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.

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.

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.

https://developer.valvesoftware.com/wiki/SteamCMD

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

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).

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.

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

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.

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.

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:

DataType: LogicWorld.SharedCode.Data.GridlandsWorldData
Data:
    ColorA: 222222
    ColorB: 005A6C
    BigCellSizeX: 64
    BigCellSizeZ: 64

Config file:

config.succ:

| 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.

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.

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.

| 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...

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).

Network setup:

UDP <default port> Portforwarding? Firewall? VPN?

IPv4 vs IPv6

Last remaining networking bug localhost on client wrongly resolved.