Minetest

Install server software for minetest on Openbsd:

Install Dependencies:

doas pkg_add g++ cmake luajit sqlite3 git jpeg png doxygen

NOTE: if prompted for a version for g++, version 11.2 is confirmed working

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;

Install Minetest Game

Minetest on its own is just a game engine. You also need to install a game for the server to load. The default minetest game is confusingly called Minetest Game and can be installed like this:

cd games
git clone https://github.com/minetest/minetest_game.git

Install IRCNow Game

If you want more than just the minetest_game mods, then use ircnow_game. It includes an IRC pack (with the fix below already included), ircnow_messages (based on the irc mod settings) and skin mod with uploader and minecraft skin (64x64) compatiblity.

doas pkg_add unzip
cd games
wget https://minetest.ircforever.org/ircnow_game.zip
unzip ircnow_game.zip

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

Check mtctl: https://wiki.miniontoby.host.ircnow.org/Miniontoby/Mtctl

There is full instruction for installing and usage

Installing Mods

Mods are installed in the mods directory where you installed minetest. As an example, lets install the irc mod so you can connect your in game chat to an irc channel. The irc mod uses submodules so you need to clone it with --recursive like so:

cd mods
git clone --recursive https://github.com/minetest-mods/irc.git

You also need to install luasocket to the system

pkg_add luasocket

You'll need to add irc to your list of secure.trusted_mods in minetest.conf and the following options for irc mod. Additional options are available. Check mods/irc/README.md for details.

secure.trusted_mods = irc

irc.server = irc.ircnow.org
irc.channel = #minetest
irc.interval = 2.0
irc.nick = MTDEV
irc.send_join_part = true
irc.realname = Join at YOUR.MINETEST.SERVER.ADDRESS.com:PORT

You also need to enable the irc mod for your world by editing the world.mt file. You'll find it in your worlds directory and should have a line like this. Set it to false to disable it.

load_mod_irc = true

NOTE: There is a known issue connecting to some irc servers that produces an error like this:

ERROR[Server]: IRC: Connection error: irc.example.com: /home/minetest/mods/irc/hooks.lua:174: attempt to index local 'user' (a nil value) -- Reconnecting in 600 seconds...

If you get this error, try modifying line 174 from this:

if user.nick and target == irc.config.channel then

to this:

if user and user.nick and target == irc.config.channel then

This checks that user isn't null before checking user.nick.