Jump to content

Dedicated Server Setup Guide

From Logic World Wiki
This article is a stub. Please help expand it by adding content.


Required Specs

The required machine to run a Logic World server depends a lot on the complexity and amount of circuits you build in the world and how many players will be using it at the same time.

For a couple of players, a 4gb server is plenty.

Linux (Ubuntu)

This guide assumes the following:

  • Ubuntu 24.04 has been freshly installed.
  • The server has a public IP Address

Update and Install Packages

Enable 32-bit packages
sudo dpkg --add-architecture i386
Enable multiverse repositories
sudo add-apt-repository multiverse
These two commands allow steamcmd to be installed which is the tool used to install the Logic world server software.

Update the system
sudo apt-get update
sudo apt-get upgrade -y --no-install-recommends

These update your package manager and install updates for any installed packages.

Install new packages
sudo apt-get install -y --no-install-recommends steamcmd screen ufw

steamcmd is used to install Logic world.
screen is used to keep Logic World running even if you close the terminal.
ufw is used to control the firewall.

Allow connections for Logic World in the firewall
sudo ufw allow 43531/udp

Setup a Logic World User

We are now going to create a user that will run the logic world server.

Create the user:
sudo adduser logicworld
This is start a wizard to guide you through creating the user, the only important setting is the password, all other settings can be left blank.

Switch to the User:
sudo su logicworld
This command will make you the new user you just created. If you would like to switch back to your initial user type exit. For now, stay as the logicworld user, all the following commands need to be run by them.

Install Logic World Server

Make sure you are currently in your home directory.
cd

Create a directory where we can install logic world.
mkdir -p /home/logicworld/logic_world/logic_world_ds/
Everything for Logic World will be placed in the logic_world folder, logic_world_ds will contain the logic world server software.
Use steamcmd to install the Logic World server, make sure to replace <USERNAME> with your steam username.
Note: this is not the same as your display name, to find your username in Steam go to Help > Steam Support. This page will display "What do you need help with, <USERNAME>"
steamcmd +force_install_dir /home/logicworld/logic_world/logic_world_ds/ +login <USERNAME> +app_update 1252670 validate +quit

If you want to run the exciting but unstable public-preview version of Logic World, run the following command instead of the previous one steamcmd +force_install_dir /home/logicworld/logic_world/logic_world_ds/ +login <USERNAME> +app_update 1252670 -beta public-previews validate +quit
Make sure all connecting clients are also running public preview or they will be unable to connect.

If it is your first time running steamcmd, you will be asked to login to your account.
If you are using the Steam Guard app and the server is hosted in a different location to where you currently are it may refuse to let you log in.
One way to get around this security measure is to use a VPN on your phone in the same area the server is hosted in. (Eg, I setup my server in cloud hosting based in Singapore, so used a VPN to make it look like my phone was in Singapore)

Configure your new Server

Create a shortcut to the Gamedata folder
ln -s /home/logicworld/logic_world/logic_world_ds/GameData/ /home/logicworld/logic_world/GameData

Change the default password.
This command will change the password to 12345678, modify this to set your own password.
sed -i 's/this is a very secure password/12345678/g' ~/logic_world/logic_world_ds/config.jecs The config file is located at ~/logic_world/logic_world_ds/config.jecs you can use vim or nano if you want to customize it further.

Create Management Scripts

Create the start up script
printf "#!/usr/bin/env bash\n\nscreen -L -m -d -S lwserver \$(find /home/logicworld/logic_world/logic_world_ds -name 'net*' -type d | head -1)/Server\n" > ~/start_lw_server.sh
Make it executable
chmod +x ~/start_lw_server.sh

Create the update script
Make sure to replace <USERNAME> with your username, same as you did when installing the server.
printf "#!/usr/bin/env bash\n\nsteamcmd +force_install_dir /home/logicworld/logic_world/logic_world_ds/ +login <USERNAME> +app_update 1252670 validate +quit\n" > ~/update_logic_world_server.sh
Or, it you are using the public-preview version use this to command instead.
printf "#!/usr/bin/env bash\n\nsteamcmd +force_install_dir /home/logicworld/logic_world/logic_world_ds/ +login <USERNAME> +app_update 1252670 -beta public-previews validate +quit\n" > ~/update_logic_world_server.sh

Make the update script executable
chmod +x ~/update_logic_world_server.sh

Start the Server

To start your new server run this command.
./start_lw_server.sh
This will start the server in the background, if you are able to connect to the server with your Logic World game you can now disconnect from the server.

If you need to log in again to make changes make sure to run sudo su logicworld to switch to your user then run cd to go to your home directory.
From here you can:
Start the server: ./start_lw_server.sh
Update the server: ./update_logic_world_server.sh
View the output of the running server: screen -r
To stop viewing the running server output press ctrl+a then press d
If you would like to stop the server instead, press ctrl+c
while viewing the output.