Jump to content

ServerHostingGuide

From Logic World Wiki
Revision as of 16:09, 25 October 2025 by Admin (talk | contribs)

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.


TODO: Who cares, rework this thing - use the sidebar menu (once I unbroke it's style).

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/ (This folder often has a different name)
		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.jecs 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.jecs
	config.jecs

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.jecs this file contains several settings, which you most likely will have to edit to run the server properly. More on configs below.
componentrestrictions.jecs 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.

Server types & Obtaining server software

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

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

The only noticeable difference between the internal and dedicated server, is that the dedicated server comes with a stripped `GameData/MHG/` base mod folder. Client-only assets have been removed.

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:

File: config.jecs
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.

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