Minetest Server for Raspberry Pi

     I recently had the opportunity to help out somebody on the #minetest IRC channel. He was having trouble compiling Minetest on his Raspberry Pi. After trying to help him for an hour or two I got personally invested in the project. I have a few Pi's myself, mostly used for media players throughout the house, but I had a new one that I hadn't fully setup yet. I decided there was no better way to help somebody out than to try compiling myself to see exactly what the errors were. Following the instructions on the wiki I installed most of the dependencies, though I had some problems with client related dependencies, conflicts and missing packages. Fortunately we weren't looking to run the client on the raspberry, just a server, so I ran cmake with the following options,

cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 -DENABLE_REDIS=1 -DRUN_IN_PLACE=1 -DBUILD_CLIENT=0
     This resulted in a successful build of only the server, which was perfect. I was fairly certain the individual I was helping only wanted the 0.4.17.1 release, but I figured if I already had the dependencies all figured out I may as well build the dev version as well. The build process wasn't terribly difficult, but it does take some time as a Pi doesn't have the fastest of processors. As there could be other people that want to run a Minetest server on their Pi I've uploaded the archives onto my site. You will need to download libhiredis-dev​ with your package manager. (Probably sudo apt-get install libhiredis-dev​) for the following to work. Because this is only the server you'll have to do everything with config files and command line flags, there is no graphical user interface.
0.4.17.1 Server Only
5.0 Server Only

     Download the archive of your choosing and extract to the location of your choice. (tar xvzf 0.4.17.1.tar.gz) The executable will be in the bin directory and can be launched with ./minetestserver You are on your own for configuring the server and security, but there is plenty of information about that on the forums.

     On my Raspberry Pi3 B+ I was running around 30% CPU utilization when mapgen was running with a single player. You probably wouldn't want to run a public server on a Pi, but for something private or even just for a local server it would probably handle it. I was only testing with Minetest_game so keep that in mind. Max lag was about two seconds, but I was connected with WiFi and the Pi wasn't in an optimal location for strong WiFi signal. It'd probably be less on a wired connection.

There are several public servers known to be running on RPI and probably more too. Did you compile with or without luajit? I cannot get luajit to work with minetest on RPI. Getting luajit to work with minetest would speed it up considerably. SQLite runs just fine so you probably don't need both redis and leveldb compiled in.

I compiled without luajit.
I don't really know much about compiling anything custom, I just followed the instructions on the WIKI directly.

Add new comment