Close
0%
0%

Raspberry Minecraft Server

A self hosting LAN party Minecraft server that doesnt require an internet connection.

Similar projects worth following
Using a Raspberry Pi Model B with 512mb of ram as a Minecraft server that is also a self hosting AP for a wireless LAN party. Add a battery pack and you have about ~5 hours of playtime.

This whole project can be done on any Debian based Linux distro. After the initial Raspbian setup, the remainder of the instructions would be the exact same for Debian/Ubuntu systems as well.

The wifi dongle has to use a certain chipset to be used as an access point. It took me a week of frustration to finally realize this was my issue with my Tor Router project that was keeping everything from working. Adafruit has a wide selection of wifi dongles and supposedly any of the ones they sell are compatible for this type of use. The larger antennas can draw a lot of power, so plan on using a powered USB hub if you go with one with a bigger broadcasting range. To save cash, I found one on Newegg that works just fine. It doesnt transmit very far though, so stay in the same room as your Minecraft server with this dongle.

The server IP address is going to be 192.168.42.1 by default. Alternatively if your Raspberry is plugged into your router (for Internet access as well as Minecraft) you can connect to whatever IP address the eth0 port is on also. Whichever way, you will SSH in using the credentials you set up when configuring Raspian. Username is pi and whatever you set your password to. Once logged in, type "cd Minecraft" and then "./start" to start the server. Leave this window open. If you close it, it will terminate any running processes, aka, Minecraft. Alternatively, you can install 'screen' and run Minecraft under a screen session so that you can close the terminal window but keep the server running. This is my preference, since it is like having multiple windows open in terminal.

I have preconfigured all the settings to run optimally on the Raspberry. This is the exact same software I use to fun my full Minecraft server, but with different settings for view distance, difficulty, etc. Take a look at the server.properties file, the *.yml files and the start file. They can all be modified to your liking.

setup

The main configuration script that sets up a Minecraft server for you.

setup - 5.53 kB - 01/23/2016 at 04:30

Download

picraft.zip

The important files that the setup script will download automagically for you.

Zip Archive - 16.98 MB - 01/23/2016 at 03:21

Download

pifi.sh

This script turns your Pi into a WiFi access point

x-shellscript - 6.27 kB - 01/22/2016 at 21:47

Download

  • 1 × Raspberry Pi Model B, B+, or Pi 2 B You just need one of the models with 512mb of RAM or more, not the original with 256mb
  • 1 × SD Card - 8gig or larger recommended The B uses full size SD cards, the B+ uses microsd. Make sure you get the right one for your Raspberry. Class 10 is recommended
  • 1 × USB Wifi Dongle *IMPORTANT* Must have a certain chipset to work correctly. Links will be in the description
  • 1 × Raspberry Pi Case - optional, but recommended I like the clear ones that you can open the top to access the GPIO pins, but it is entirely up to you
  • 1 × USB Battery pack Not required, but makes it mobile. Must output minimum of 1 amp. A 2400mAh battery pack will last for ~5 hours

View all 6 components

  • 1
    Step 1

    I am going to assume anyone following this tutorial is familiar with booting a Raspberry Pi. Contact me if you need help with this part. Start with a fresh copy of Raspbian. Burn it to your SD card and boot up. At the Raspi-Config screen that pops up on the first boot, we will need to configure a few things.

  • 2
    Step 2

    First, expand the file system. We will need that extra space for the world you are about to create. Next, change the password to whatever you want it to be. After that, change the International Options to reflect wherever you live and the appropriate keyboard layout. To make the Raspberry keep up, it will need to be overclocked. Go to the Overclock settings, approve all the warnings, and set to Turbo. Under Advanced Options, change the hostname to something clever if you want, set the Memory Split to 16 and enable SSH. Approve these settings and let the Raspi reboot.

  • 3
    Step 3

    Once rebooted, log in with username pi and your new password. Run updates (btw, you need to be connected to the internet through the ethernet port for a while) by typing 'sudo apt-get update' and then 'sudo apt-get upgrade' This will take a while, so go do other things for a while.

View all 11 instructions

Enjoy this project?

Share

Discussions

malcolmcrown9 wrote 05/22/2023 at 20:23 point

Great! One question though can I use this to host my website and make it like my own private hosting. My website ain't that heavy see for yourself: scholarsadvise.com

  Are you sure? yes | no

Thomas wrote 12/16/2015 at 02:20 point

As an update about doing this project on the Pi 2: it works AMAZINGLY well.  I would consider migrating my primary world over to a Pi 2 with one exception: the Nether.  It does not transition over from one dimension to the other very well.  Other than that, the Pi 2 can host a Minecraft server extremely well.  Set the Nether to 'false' and nobody will guess what kind of hardware you are using.

  Are you sure? yes | no

cody wrote 07/13/2015 at 21:18 point

I know its asking a bit much... but do you think you could write the image for an 8gb sd card or larger for us and put it on mega upload or a torrent site? ive got the raspberry pi a+ and my usb hub just burnt out. Im using this wifi dongle: http://www.ebay.com/itm/181752449618?_trksid=p2057872.m2749.l2649&ssPageName=STRK:MEBIDX:IT

  Are you sure? yes | no

[deleted]

[this comment has been deleted]

Thomas wrote 03/10/2015 at 12:38 point

Ive never actually used noobs. It does require a full distribution like raspbian though. I cant say if it works with anything else, but ive been working with a slim version to save space too, called minibian

  Are you sure? yes | no

Thomas wrote 01/22/2016 at 20:28 point

As an update, Raspbian Jessie Lite works just fine for this installation

  Are you sure? yes | no

wastaffan wrote 02/20/2015 at 19:04 point

So I followed all of the instructions, but using a raspberry pi 2 unit. I set up the world and installed all of the software. But I keep running into an error with Hostapd, even with the usb wifi dongle installed. Am I missing a driver? Further experimentation is required. I might have to crack out one of my model b's for this project if I can't get it to work on my new raspi 2. Any suggestions that may save me some time? Also, great project. I am making this for my brother's birthday!

  Are you sure? yes | no

Thomas wrote 03/01/2015 at 23:11 point

Your error sounds like the same problem I was having initially.  I am willing to bet your wifi dongle doesnt support AP mode.  I had to buy the one in the link to fix that problem on mine.  Also make sure in the config file that your driver is the one its looking for.  Type 'sudo nano /etc/hostapd/hostapd.conf' and make sure the 'driver=' line has the right driver.  Mine is 'driver=rtl871xdrv'

Hope this helps!  Let me know how it works on the Pi 2.  Mine hasnt come in yet.

  Are you sure? yes | no

[deleted]

[this comment has been deleted]

Thomas wrote 03/01/2015 at 23:18 point

Sorry for the slow reply.  To answer everyones question about how it runs....meh.  I originally did all this on the original Pi B that only had 256 ram.  I could play on it alone as long as I stayed in a small area and didnt make the map load too quickly.  If my girlfriend logged in, we would crash.  On the 512 version however, it runs surprisingly well.  3 of us have been on it at once in 3 different locations and it didnt lag any worse for us than if you connect to a friends regular server with ~10mbps internet service.  Blocks wouldnt break on occasion but if you tried again they would.  For the hardware involved I was very impressed with how well it did, but I would never migrate my standard MC server over to one. 

  Are you sure? yes | no

Thomas wrote 03/01/2015 at 23:20 point

Also, make sure you are using as strong of a power supply as you can.  It does run better in Minecraft when I use a 2 amp charger instead of the plethora of 1 amp ones I have laying around.  That wifi dongle sucks more power than you would think.

  Are you sure? yes | no

Brendan Robert wrote 02/18/2015 at 21:01 point

That's great but it sounds like you're going to swap yourself to a laggy death if your map is big or you have too many mobs spawned.  All the same, more power to you!

  Are you sure? yes | no

Thomas wrote 03/01/2015 at 23:25 point

The config file I included in this writeup has been tweaked as much as I know how so that it can run on the Pi.  Mob activation is one of the things I changed, making them not become "active" and visible or aggressive until you are much closer to them than is the default.  This lowers CPU usage.   Their spawn rate is also lowered, but not to the point of making it boring

  Are you sure? yes | no

zakqwy wrote 02/17/2015 at 19:04 point

How many players have you comfortably supported? The servers I've spooled up all seem to need 100-150+ MB ram per player--did you run into the same limitations here?

  Are you sure? yes | no

Thomas wrote 03/01/2015 at 23:22 point

Ive only has the opportunity to have 3 of us it so far, but it did pretty well on the 512mb versions.  Look at my reply to Malik above for recommendations.  Thanks

  Are you sure? yes | no

dave wrote 02/08/2015 at 22:36 point

It's crazy what you can do with Raspberry. :O

  Are you sure? yes | no

Thomas wrote 02/10/2015 at 03:10 point

They are a lot of fun. I cant wait to get the new Pi 2 they just came out with.  

  Are you sure? yes | no

dave wrote 02/10/2015 at 06:23 point

I never used them, I wouldn't know where to begin. I am just using a few microcontrollers, everything else is beyond my knowladge.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates