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. I was just barely able to outrun the mapgen with a single player connected. If you want to take a look at the performance feel free to join play.nathansalapat.com port 3000 Don't do any serious building as this is only a temporary server.

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.

So how would you describe the performance of this configuration? 30% CPU utilization doesn't sound too bad while mapgen is running. Do you think it'd be possible to run a medium sized server off of one of these little maker boards? I've been looking for descriptive accounts of people doing this but there aren't many. I'm a bit curious about the feasibility of this type of project.

Thanks.

I think it would be very possible to run a decent server off a Pi. You'd just need to be smart about what mods you use so as to not have insane amounts of lag. I'm currently hosting a public server for somebody on the Pi and there is often 15+ seconds of lag, but that is largely due to the mod set they are using. If a few mods were removed the performance would probably be fine, but they don't seem to care about the massive lag spikes.

Add new comment