Minetest

Install server software for minetest on Openbsd:

Install Dependencies:

doas pkg_add g++ cmake luajit sqlite git

Build IrrlichtMt:

git clone https://github.com/minetest/irrlicht.git;
cd irrlicht;
cmake . -B build -DBUILD_SHARED_LIBS=FALSE;
cmake --build build;

Build Minetest:

cd ../;
git clone https://github.com/minetest/minetest.git;
cd minetest;
cmake . -B build -DCMAKE_PREFIX_PATH=../irrlicht/build -DRUN_IN_PLACE=TRUE -DBUILD_CLIENT=FALSE -DBUILD_SERVER=TRUE -DENABLE_SOUND=OFF -DENABLE_GETTEXT=OFF -DENABLE_CURSES=OFF -DENABLE_POSTGRESQL=OFF -DENABLE_LEVELDB=OFF -DENABLE_REDIS=OFF -DENABLE_SPATIAL=OFF;
cmake --build build;

Running the server:

Running a server the default way

  • add world folder or let it be created.
  • Edit minetest.conf: <SOMETHING> = required, [SOMETHING] = optional, <something || anything> = or
name = <INGAME NICKNAME>
server_name = <SERVER NAME>
server_description = <SERVER DESCRIPTION>
server_address = <YOUR VPS ADDRESS>
server_url = [YOUR SERVER PAGE URL]
server_announce = <true || false>
serverlist_url = servers.minetest.net
port = <YOUR PORT>
bind_address = [YOUR BIND ADDRESS]
ipv6_server = <true || false>
motd = Welcome by my server
max_users = <YOUR MAX>
enable_damage = <true || false>
creative_mode = <true || false>
  • run the world: ./bin/minetestserver --world worlds/<WORLDNAME> --config minetest.conf

Running multiple servers the easier way

Install the packages

Firstly you need to install the mtctl command that I, Miniontoby, have written.

You can do that by executing: $ curl -sSL https://ircforever.org/mtctl.php | doas ksh

if curl and/or wget are not installed, execute: $ doas pkg_add curl wget

After that has been done, you need to firstly do: $ mtctl list That will setup your settings, you need to fill in 'YES', then the folder where you installed minetest in (Can be /home/YOURUSERNAME/minetest), then you are done

Usage

To create a server, just execute $ mtctl create <worldname>

To start a server, just execute $ mtctl start <worldname>

To stop a server, just execute $ mtctl stop <worldname>

To restart a server, just execute $ mtctl restart <worldname>

To list all your servers, just execute $ mtctl list