Raspberry Pi MineOS Minecraft Server


I have built a few Minecraft R Pi servers but wanted more functionality that what the other guides were building their servers.  So I built this several times and it works but isn’t as powerful as any of the x86_64 systems but it is pretty cool to do.  First let me list the stuff I used to create this server.

  1. Raspberry Pi 2
  2. MineOS webpages
  3. SDFormatter
  4. Win32disk
  5. Ubuntu R Pi image
  6. 16 Gig MicroSD card
  7. Putty

The reason I didn’t user Rasbian is due to the overall size of the image.  The Ubuntu 14.04 image is only 1.75G vs 3.05G Rasbian image.  So to prep the OS I did a few things. The Ubuntu image can be downloaded from https://wiki.ubuntu.com/ARM/RaspberryPi .  The default user is ubuntu and a password of ubuntu.  So I used my Windows machine to setup my MicroSD card and write the image to the card.  I used SDFormatter to format the card and Windisk32 to write the image.  You can do this with Linux as well and the Ubuntu webpage has all the directions you need to accomplish this.  Now you should be ready to pop this bad boy into the R Pi.

The first boot will need a monitor and keyboard connected to the R Pi because the OS doesn’t have an ssh server installed by default.    So enter sudo su – to elevate to the root prompt and type apt-get update.  If just tried to install the openssh server from the git go but it kept failing until I ran the update.  You should also follow the following instruction from the Ubuntu webpage.

There are no Raspbian-specific utilities included, specifically no automatic root resizer. However, it’s not hard to do manually. Once booted:

 $ sudo fdisk /dev/mmcblk0

–  You can use fdisk -l to see the available size of your Micro SD before increasing the size.

Delete the second partition (d, 2), then re-create it using the defaults (n, p, 2, enter, enter), then write and exit (w). Reboot the system, then:

$ sudo resize2fs /dev/mmcblk0p2

There is no swap partition/file included. If you want swap, it’s recommended you do:

 $ sudo apt-get install dphys-swapfile

You should have a (resized) SD card at least 8GB, because by default it will want to create a ~2GB swapfile and allow for the actual game files to grow.  This gave me a 1866 Meg swap space.

This will give you the full Micro SD card space and add a swap that the R Pi will need even with the 1G of memory the R Pi 2 has.  Below is a before and after df -h for this server.





 Now that the drive space is ready it is time to download and install the MineOS webpages.  This part is optional but I really like the functionality that it brings to the server.  First thing is to go to http://minecraft.codeemo.com/mineoswiki/index.php?title=MineOS_(apt-get).  This would be the apt-get link for the Ubuntu install we are using here.  If you decide you want to use MineOS you can go the link above and install it.

MineOS makes downloading and setting up the server pretty easy,  if you are not going to use MineOS you can wget the minecraft server from  https://minecraft.net/download .  I personally like Spigot better however with the copyright problems you can’t just download it anymore.  So if you want to use Spigot you can build it using the instructions on their website. The link to setup the MineOS webpage is at the bottom of the post.  Also the link to build instructions for Spigot is at the bottom of the post.

On distributions featuring apt-get, you can install dependencies with these commands:
As root:
apt-get update apt-get -y install -y nodejs nodejs-legacy npm git rdiff-backup screen openjdk-7-jre-headless


MineOS requires rsync 3.1.0+, which comes default in Ubuntu 14.04 and later. Ensure you have a recent enough version.
Installing MineOS scripts with git
As root:

mkdir -p /usr/games
cd /usr/games git clone https://github.com/hexparrot/mineos-node.git minecraft
cd minecraft
git config core.filemode false
chmod +x service.js mineos_console.js generate-sslcert.sh webui.js npm install –all
ln -s /usr/games/minecraft/mineos_console.py /usr/local/bin/mineos

As updates are made frequently to the MineOS scripts, you should make a habit of updating the webui via git on a regular basis. Updating the web-ui does not require a host or server restart.
Running the MineOS Web Service
Starting the web-ui at boot

This method uses upstart, which is available on Ubuntu 14.04 by default.

Have the web interface start
As root:
cp /usr/games/minecraft/init/upstart_conf /etc/init/mineos.conf start mineos

Using secure HTTPS operation

Before you can start the server, you must generate a self-signed certificate for HTTPS functionality: /etc/ssl/certs/mineos.{pem,crt,key}
As root:
cd /usr/games/minecraft ./generate-sslcert.sh
Starting/Stopping the webui

Remember, you won’t need to do this on subsequent restarts, as the initscript will take care of it.
As root:
start mineos stop mineos

Using the webui

The scripts, by default, will run a server operating on port 8443 and place minecraft data files into /var/games/minecraft.

When creating minecraft servers, it is required to use an unprivileged user to create and manage Minecraft servers. For most distros, this will be with the adduser username command. The password you set during user creation will also be the password used for the web-ui.

In your browser, visit the location: https://xxx.yyy.zzz.aaa:8443

Servers may only be created by unprivileged users, or in other words: not root. Be sure to log in as any unprivileged user to create any servers you wish and leverage group membership to share control of servers with others!


standalone UI


Another reason that I use Spigot is for the plugins that can be added to the server.  The main one I would add is called Dynmap.  This plugin simply draws a map of the areas that you have explored.  This can be opened in a web browser and can be set to very fine detail for map resolution.  It will give you a map like the following.


Spigot:  https://www.spigotmc.org/threads/minecraft-1-8-8-release.81138/

Dynmap:  http://dev.bukkit.org/bukkit-plugins/dynmap/

The one thing I did find is that the R Pi works for a Minecraft server but it needs some tweaking to get it to work well.  I think the R Pi 2 has enough power to really run the server as long as it has a small map, but it needs some tweaking to really get it to run well.  I experienced lag and blocks reappearing after you had broken it.  Now you can strip everything out and just run a Minecraft server without any add-on but that is part of what makes the server functional to me.  But running the server by itself in a terminal on the R Pi does work but I still has some lag and performance problems.  So  for the people that will say don’t use an R Pi to build a Minecraft server I say why not.  I understand it is low powered and was not built for this, but what was it built for.  It was built for people to buy and tinker with, program and see what it can do.

  So in closing the R Pi 2 will work as a Minecraft server and the performance isn’t that bad.  It could use some tweaking and once it is figured out I am sure it will be a low power option to a power hungry desktop.  Not that it will out perform it, but it is cheap and can stay on all day without using a Kilowatt of power.  So tinker around see how it goes.  It you have any questions about this setup feel free to leave a comment.

You may also like...

Leave a Reply

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

Time limit is exhausted. Please reload the CAPTCHA.