[How to] Set up Minetestserver on raspberry Pi [RPI]

Post Reply
jbb
Member
Posts: 78
Joined: Tue Dec 09, 2014 17:16
GitHub: JBBgameich
IRC: JBB
In-game: JBB
Contact:

[How to] Set up Minetestserver on raspberry Pi [RPI]

by jbb » Post

This is a guide on setting up a minetest server on a raspberry pi, using the raspbian / debian OS. I don't know if somebody already made such a guide, but I wanted to share my experiences.

I tested this steps on a rasberry pi 3 with Minibian / Raspbian / debian jessie (8).
  • First thing: find an image for your raspberry Pi. I used Minibian for that. Minibian is a really minimal version of Debian / raspbian, ideal for servers. You can download minibian here: https://minibianpi.wordpress.com/download/
  • Write the image to an Sdcard. You can use win32 Disk imager in windows or

    Code: Select all

    dd if=<image.img> of=</dev/yoursdcard> bs=1M
    in linux.
    You can get the name of your Sdcard in

    Code: Select all

    fdisk -l
    Here is external help on dd: https://wiki.ubuntuusers.de/dd/
  • Now boot up your Pi after you inserted your sdcard. SSH is already preinstalled in the image, so you could continue with this steps from an other pc using PUTTY or ssh. Username / Password is root / raspberry. Now there is an optional step: You can add this lines to the /etc/apt/sources.list file to get the latest packages from debian:

    Code: Select all

    sudo nano /etc/apt/sources.list
    Add this lines and press CTL + O to save:

    Code: Select all

    deb http://ftp.de.debian.org/debian jessie main contrib non-free
    deb-src http://ftp.de.debian.org/debian jessie main non-free contrib
    
    Then run

    Code: Select all

    sudo apt update
    .
  • Everything should be up to date, so let's do an upgrade

    Code: Select all

    sudo apt full-upgrade
  • Now if you try installing minetest, you will get a really outdated version. The preferred way is following the instructions from here: https://wiki.debian.org/Backports
    So add this

    Code: Select all

    deb http://httpredir.debian.org/debian jessie-backports main contrib non-free
    to your souces.list, use apt update and install minetest from backports:

    Code: Select all

    apt -t jessie-backports install minetest
    .
    Spoiler
    The other way is compiling minetest yourself, if you already used the other method skip this:
    Add this to your souces.list

    Code: Select all

    sudo nano /etc/apt/sources.list.d/mt.list
    and
    paste this line into the file and save (CTL + O):

    Code: Select all

    deb-src http://ppa.launchpad.net/minetestdevs/stable/ubuntu vivid main
    (for all expired users: there is only the source needed because the repo don't contains minetest for armhf.)
    Then run

    Code: Select all

    sudo apt update
    and

    Code: Select all

    sudo apt install apt-src
    , after that finished run

    Code: Select all

    sudo apt-src update
    Spoiler
    Buid Minetest for your raspberry pi:
    First, go into root mode:

    Code: Select all

    sudo -i
    and then install the minetest source:

    Code: Select all

    apt-src install minetest
    Then build minetest from source:

    Code: Select all

    apt-src build minetest
    This can really take a long time, the raspi's processor isn't so fast.
    When it finished tipp

    Code: Select all

    dpkg --install minetest_
    and press the autocomplete key. Choose the file ending with ".deb".
    The folder will look similar to this: (to get this list use the "ls" command" (do not swap the l and s otherwise it's not list but steam locomotive)[/size)
    _______________________________________________________________________________________
    root@minibian# ls
    minetest-0.4.14 minetest_0.4.14-ppa3~ubuntu15.04.1.dsc
    minetest_0.4.14-ppa3~ubuntu15.04.1_armhf.changes minetest_0.4.14-ppa3~ubuntu15.04.1.tar.xz
    minetest_0.4.14-ppa3~ubuntu15.04.1_armhf.deb
    _______________________________________________________________________________________
    In this example the wanted file is "minetest_0.4.14-ppa3~ubuntu15.04.1_armhf.deb"

    If you need further help with this, look here:
    https://wiki.debian.org/apt-src


    When install finished, you should be able to copy your minetest map to your server using filezilla.

    TIP: it's a good idea to create a seperate user for minetest, for security reasons. You can add one by "adduser minetest", and login as minetest next time.
  • Now you can start the server as described on the minetest wiki:

    Code: Select all

    nohup minetest --server --worldname <your world>
When I first tried running the minetesserver on a raspberry pi 3, I was really surprised of it's power. I tested with up to 10 players and the server still runs great.

Please say if I forgot something, or if something don't works anymore.
I hope I could help you
Last edited by jbb on Wed Dec 07, 2016 15:54, edited 1 time in total.
Minetest runs better on Linux. So I'm using Linux.

User avatar
captpete
Member
Posts: 134
Joined: Fri Nov 25, 2016 03:02

Re: [How to] Set up Minetestserver on raspberry Pi [RPI]

by captpete » Post

I have a question: where are the data directories (textures, mods, worlds, etc.) for MineTest in Pi?

Also you left out getting minetest-server in your apt-get which sets up the minetest.conf file in /etc/minetest, a minetestserver file in /usr/lib/minetest and a /var/games/minetest-server/.minetest/worlds/[your world] (where all the world directories should be placed under I think) .

correction: /usr/share/games/minetest/ seems to be created once minetestserver is run (minetestserver --info) and THAT contains the MineTest directory structure.

jbb
Member
Posts: 78
Joined: Tue Dec 09, 2014 17:16
GitHub: JBBgameich
IRC: JBB
In-game: JBB
Contact:

Re: [How to] Set up Minetestserver on raspberry Pi [RPI]

by jbb » Post

I normally create a new user for the minetest server, and run it manually using minetest --server --worldname ....
Then all worlds, mods etc. are stored in /home/minetestuser/.minetest/. You can also use minetestserver, if you need automatic start on boot. The normal raspbian image uses the default user "pi", so everything would be stored in /home/pi, on the sdcard. The minibian image I used has only the root user created, and it's often a bad Idea of letting services which are accesable from the internet running on the root account, so I use the user "minetest" for it.
Minetest runs better on Linux. So I'm using Linux.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest