Minetest server install

7 Comments

If you want to practice at home building Minetest structures with python programs, you will need to install Minetest server with its mods. Before we start, make sure you have completed the Minetest client install.

The steps to configure the server are:

  1. Install git
  2. Install mods. irc, irc_commands, irc_builder, signs_lib
  3. Configure IRC

Git

Windows users will need to download the latest from https://git-scm.com/ and install. This will also install Git-Bash which is a command line shell similar to those on Mac and Linux.

Linux and Mac users should already have git installed. To test, type the following in the Terminal:

git --version

If it is not installed it will give an error message saying “command not found”. Mac users can download the software from the above site or install it using brew as they did with minetest.

brew install git # Mac

Linux users can install using one of the following if it is not already installed.

apt install git # Ubuntu, Debian
yum install git # Fedora, Centos, Red Hat

Luasocket

The irc mod for minetest requires luasocket. This is difficult to install on windows so I have built a 64 bit version of minetest with irc mod and luasocket already built in. It can be downloaded from minetest-0.5.0-6cfd699b-irc-win64.zip.

On Mac, install luasocket using brew and luarocks.

brew install lua51
luarocks-5.1 install luasocket

On Ubuntu install luasocket using apt and luarocks.

apt install luarocks
luarocks install luasocket

Minetest mods

The following commands are to be typed into Git-Bash (Windows) or Terminal (Mac, Linux). Change directory to the minetest mods directory. If the directory doesn’t exist you may have to create it.

Windows 64 bit

cd Documents/minetest-0.5.0-6cfd699b-irc-win64/mods

Mac

cd Library/Application\ Support/minetest/mods
git clone --recursive https://github.com/minetest-mods/irc.git

Linux

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

Windows / Mac / Linux

git clone https://github.com/ShadowNinja/minetest-irc_commands.git
git clone https://github.com/minetest-mods/signs_lib.git
git clone https://github.com/timcu/irc_builder.git
mv minetest-irc_commands irc_commands

Configure mods and IRC

Every Minetest world in which you want to use these mods needs to have them enabled.

  1. Run Minetest.
  2. Select [Settings] tab, then [Advanced Settings] button in bottom left
  3. Expand: + Server / Singleplayer + Security
  4. [Edit] secure.trusted+mods. type in irc
  5. Expand: + Mods + irc + Basic
  6. [Edit] Bot nickname. For example: mtserver
  7. [Edit] IRC server. I like Rizon which has server: irc.rizon.net
  8. [Edit] Channel to join. Choose a unique channel . eg ##minetest3214
  9. Port number can be 6667 and Auto-connect enabled. Channels starting with ## are generally temporary channels. Remember these settings to use in your python program. Make sure your IRC server allows several connections from the same IP address.
  10. From the [Local Game] tab, select your world and click on [Configure]
  11. Select mod on the right and click the “enabled” check box above for each of the four
  12. Click [Save] button to return to [Local Game] tab
  13. Type in a password in green password field and click [Host Game]
  14. Users who wish to build structures from python will need privilege irc_builder. After they have logged in grant them this privilege by typing /grant username irc_builder

Program in Python 3

Now you can start to write programs in Python which will build structures in Minetest. Remember to install ircbuilder python module in your python virtual environment so that your program can communicate with IRC and hence with Minetest. You can do this in PyCharm Edu from Settings (Windows) or Preferences (Mac) > Project > Project Interpreter > + (and type in ircbuilder).

Categories: CoderDojo, Minetest

7 Replies to “Minetest server install”

  1. Hello,

    Thanks for sharing these instructions. We are learning Python programming with Minetest at Brisbane CodeDojo.

    We attempted to setup the Minetest server on our ‘Windows’10 PC’ but we were unable to load the ‘irc’ mod to Minetest successfully at the step 11 (‘socket’ module loading failure).

    I wonder if we should download additional packages/files to load the ‘irc’ mod to Minetest ?

    1. Hi Taka

      You shouldn’t need to install anything else. Are you using a public IRC server (such as irc.rizon.net) or a private IRC server (such as the one we use at coderdojo 192.168.*.*). If you want to use a public server you need to have access to the Internet. If you want to use a private server you will need to set up your own private IRC server. At coderdojo we are running ngircd as an IRC server. It is an effort to set up but necessary because we don’t have Internet access from the LAN at coderdojo.

  2. I have just tried instructions on Windows and realise the problem. LuaSocket needs to be installed. On Mac and Linux this is installed with “luarocks install luasocket”. However I am not sure how to install luarocks on Windows. I will let you know when I work it out.

    1. Hello Tim,

      Thanks a lot for your time to look into this issue.

      No luck so far to install the missing modules, and I stopped to setup a Minetest server on Windows. Now that I am installing Ubuntu 16.04 LTS.

      Hope we can continue the Python programming tasks from CoderDojo at home this time.

  3. I haven’t solved the Windows install problem yet. However, I know it works on Ubuntu. First you install luarocks. Then install luasocket

    sudo apt install luarocks
    sudo luarocks install luasocket

    You should also make sure you have the latest version of minetest 0.4.16. If not you will need to install the ppa for minetest.

    sudo add-apt-repository ppa:minetestdevs/stable
    sudo apt update
    sudo apt upgrade

Leave a Reply

Your email address will not be published. Required fields are marked *