A Raspberry Pi Minecraft Server is a cost-effective way to have your very own private server with your friends or just for stuffing around on.
I have had mine running for quite some time now and haven’t come across too many problems. It is very important to know that this server will not be able to hold many people. From my experience anything over five the server starts to get a bit wonky. I found the optimal amount of people is only two to three, but this can be improved upon by tweaking the server.
We are also going to be using the spigot version of Minecraft as the default install didn’t work for me. I found it crashed a lot, lagged and was very unstable.
In this project, we will utilize Java that should already be installed on the Raspberry Pi (If you’re using the full version of Raspbian). We will make a few changes to optimize the server for the Raspberry Pi 2 or 3 if you have one. We will also set it up so you can access it on the web and also reboot if the Pi goes offline for any reason.
If you want to see visually how to setup the server, then check out my video below otherwise, I have a detailed text explanation immediately below the video. If you like the video, please make sure you subscribe to the channel, so you’re kept up to date.
Equipment
Please find the equipment that I used for making this Raspberry Pi Minecraft server below.
Recommended:
8 GB+ SD Card or Micro SD Card if you’re using a Raspberry Pi 2, 3 or B+
Ethernet Cord or WiFi dongle (I recommend using an Ethernet cord)
Optional:
Setting up the Raspberry Pi Minecraft Server
Firstly, we will need to install Raspbian onto the Raspberry Pi. If you haven’t already done this, then check out my awesome guide on installing NOOBs Raspberry Pi. It will take you through all the steps that you will need to do.
Important: You will need to be on the latest versions of Raspbian (Jessie & Stretch). If not then you will find that Java is not installed, this will need to be done if you wish to get this server working. I highly recommend updating to Jessie or Stretch.
In this tutorial, we will work entirely in the terminal. It is probably best we boot straight into the terminal so we can save on memory by not loading the GUI.
1. First, let’s bring Raspbian up to the latest version by entering the following.
sudo apt-get update
sudo apt-get upgrade
2. Now we will need to make a couple of changes in the config tool. Let’s bring the tool up by entering the following:
sudo raspi-config
(If you need more information regarding the raspi-config tool check out my guide)
3. First, let’s go to Advanced Options->Memory Split, update this to 16. (This will allow for more memory to be free for the server)
4. Also, you don’t want to boot into the Raspbian desktop so ensure boot options is set to the CLI (Command Line Interface) instead. This change will help give the server as much processing power as possible.
5. Enable overclocking to High.
6. Finally, also enable SSH so we can access the Pi remotely if required (Unless you already have it enabled).
7. Now go to finish and reboot.
8. We will now want the IP address of our Pi for when we try to connect to our server. To get the Raspberry Pi IP address enter the following command:
sudo hostname -I
9. Now we will need the Minecraft server file, and we’re going to use a builder tool that is supplied by spigot, to get this enter the following commands:
sudo mkdir /home/minecraft
cd /home/minecraft
sudo wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
10. Now we will want to run the build tools file, so it creates our spigot server. It will take about 15-30 minutes to finish. Add --rev 1.9
to the end of the command to get the latest version. Don’t forget to change 1.9 in the command to the latest version number.
sudo java -jar BuildTools.jar
Important: If you have a Raspberry Pi B+, B or any variation before the Raspberry Pi 2 then the build tools will likely fail. You can instead download the spigot.jar directly from file mirror using the following command:
sudo wget https://pimylifeup.com/out/spigotlatestbuild
sudo mv spigotlatestbuild spigotlatestbuild.jar
If you want a previous version for some reason, you can use one of the following.
sudo wget http://www.mediafire.com/file/fa8f2ofpfs048r6/spigot-1.12.1.jar
sudo wget http://www.mediafire.com/download/pg7xzshq5cdmfjx/spigot-1.10.2.jar
11. To make sure the spigot server successfully downloaded and saved simply type ls and should see spigot.jar.
ls
Make sure you remain in the /home/minecraft
folder as we want all the server files to be created in here. If you start the server in a different folder, it will create the files in there.
12. Now we’re ready to launch the server, to do this enter the following command. (You may need to change the version number depending on what version you’re using e.g. spigot-1.9.jar)
Raspberry Pi
sudo java -Xms256M -Xmx496M -jar /home/minecraft/spigotlatestbuild.jar nogui
Raspberry Pi 2 & 3
sudo java -Xms512M -Xmx1008M -jar /home/minecraft/spigotlatestbuild.jar nogui
The server will stop straight away as we will need to agree to the Eula. You can do this by opening the Eula by typing the following command.
sudo nano eula.txt
13. In here change false to TRUE, once done save and exit by pressing ctrl+x then y.
14. Now relaunch the server, it will take a while to create a map so give it about 3-5 minutes. If you ever reboot again, it will only take 30 seconds to load if the map has already been created.
15. The server should now be running and accessible over the local network.
16. You might want to mod your user now so that you can use all the server commands when you log in if we have it auto-boot on startup accessing the server is slightly more difficult. To mod your user, simply run the following command when the server has launched (Replacing username with your username):
op username
17. The Raspberry Pi Minecraft server will now be up and running fine, but you may want to do some optimizations to the server to make it run even better.
Connecting to the Minecraft Server on Raspberry Pi
If you’re on a local network, then it should be pretty easy to connect to the Raspberry Pi Minecraft server. To test it out do the following:
Load up Minecraft on a PC within the same local network as the Pi.
Go to multiplayer and then your server might pop up in the local list. If it doesn’t simply go to direct connect and enter the IP we got earlier on the Pi using the command hostname -I.
If you want to allow access to the Minecraft server via the internet, then you will need to setup port forwarding.
If you want to learn how to do this, then head over to my guide on setting up Raspberry Pi port forwarding. You will need to port forward the port 25565 (Unless you change it in the server properties)to the IP of your Pi.
Configuring the Server
Here are a few tips for configuring the server and getting it up and running.
Optimizing the Raspberry Pi Minecraft Server
Now to get the most out of our Raspberry Pi Minecraft server, we will want to install a plugin to help optimize the performance.
Firstly let’s install the NoSpawnChunks plugin, this will help prevent the Minecraft server from chewing up too much RAM.
cd /home/minecraft/plugins
sudo wget -O NoSpawnChunks.jar https://pimylifeup.com/out/nospawnchunks
There are other plugins out there that can help with performance, just simply use the wget command to download them to the Pi as we did above.
Editing the Minecraft properties
Now you probably want to know how to edit the server properties. This ability to edit is very important for optimizing the server and customizing it to how you want the server to be. If you want more information for each of the server settings you can find a good page on all the server properties here.
To enter the server properties, enter the following:
sudo nano /home/minecraft/server.properties
Now in here, we will want to change a few settings to help optimize the performance of the server. You change these and other settings to whatever you like however you want but keep in mind the Pi can’t handle too much processing.
view-distance=04
max-player=5
Boot on Startup
Let’s first start by making a simple startup script. To do this let’s first create the file by entering:
sudo nano /home/minecraft-start.sh
In here simply add the following lines so that the Raspberry Pi Minecraft server will start up correctly. (Make sure the spigot version is correct)
#!/bin/bash
cd /home/minecraft
sudo java -Xms512M -Xmx1008M -jar /home/minecraft/spigotlatestbuild.jar nogui &
If you want the server to startup automatically on reboot, then we need to add it to the rc.local
file. To do this enter the following:
sudo nano /etc/rc.local
In here, add the following line right before the exit line.
bash /home/minecraft-start.sh
Once done, exit and save.
Now the server should start on reboot automatically. If you want to test this simply enter the following:
sudo reboot
To check if the script is running either try to load the server in Minecraft or the terminal of your Pi enter:
ps aux | grep "minecraft-start.sh"
This command will return two results you only need to pay attention to the first.
If you need to kill the process get the process id from the above command, it is the first number after the username (In this case it should be root).
To kill the process simply enter the following (Replacing {pid} with process id):
sudo kill {pid}
If you want to get access to the server on the command line then you will need to shutdown the server and load it back it back using the normal command (not the autostart file).
I hope this tutorial has helped you in setting up a stable version of a Raspberry Pi Minecraft server. If you like this tutorial, then be sure to check out our many other Raspberry Pi Projects.
Also feel free to drop us a comment below if you have better optimization settings, plugins or ideas. Also if you’re having trouble let us know below.
Anyway to add USB flash memory to allow Minecraft to host more people?
so by setting up a raspberry this way, people from other countries can host the server, no?
Only by port forwarding your pi
They can yes.
Although it is possible to create more swaps partitions over USB media, it is not advisable because of the latency of read/write speeds over USB 2.0. It is not as fast as USB 3.0 with an Solid State Disk
Question. I tried to use
sudo /opt/jdk1.8.0_60/bin/java –Xms512M –Xmx1008M -jar /home/minecraft/spigot-1.8.8.jar nogui
, but it keep telling me Error: Could not find or load main class –Xms512M. Is there any step I miss? If I runsudo /opt/jdk1.8.0_60/bin/java –jar /home/minecraft/spigot-1.8.8.jar nogui
, it runs perfectly but I thing is slower.Hey Carlos,
I have looked into this and found an error with the formatting of the “-” before the Xms.
The code below should work correctly and I have also fixed it in the code above.
sudo /opt/jdk1.8.0_60/bin/java -Xms512M -Xmx1008M -jar /home/minecraft/spigot-1.8.8.jar nogui
Thanks Gus. By the way, your page PI My Lifeup is awesome. Thanks for sharing all this knowledge and information with us.
Hello from a newbie.
Now that I have my minecraft server up, how do I connect to it to play? Do i have to use another raspberry pi? If I connect from my windows 7 pc, do I have to pay for it just to connect to my server?
Thanks.
to connect to any minecraft server, including one run by yourself, you need to have an account with Mojang. whenever a client connects to a server, the server validates with Mojang that the account is valid.
if you haven’t already done so, it’s a once off small purchase. once you have an account you can play online, by yourself, with friends and on your own local network. all upgrades and revisions are provided at no additional cost.
Not at all.. Just change the option online-mode from true to false in the server.properties file.
Error: Unable to access jarfile /home/minecraft/spigot-1.8.8.jar
I’m not sure how ti fix this. i did a search for spigot-1.8.8.jar and could not find it. i have followed your steps. Was good up to this point.
Hi Aron,
Sounds likely that the buildtools didn’t succeed/didn’t create the spigot file. I have now updated the tutorial so you can download the server file directly .
Gus, thank you. Once I get home I’ll have a look.
The Pi is unable to access the Jar file because it’s not the right jar. Spigot has updated since then and now the jar is called something different. Now it is called spigot-1.9.4.jar You need to change the start command for the later versions.
1. Create the file that starts the server:
sudo nano /home/minecraft/start
…and put this in the file:
#!/bin/bash
cd /home/minecraft
java -Xmx900M -Xms900M -jar spigot-1.8.8.jar nogui
When you’re done typing that in, press “ctrl-o”, “enter” then “ctrl-x”
2. Make it executable:
chmod a+x /home/minecraft/start
3. Then start the server using the command :
/home/minecraft/start
Do this command to give your root system access to the files
sudo chmod -R ugo+rw /home/minecraft
Spigot-1.8.8.jar is not generating when I run
“sudo /opt/jdk1.8.0_60/bin/java -jar BuildTools.jar”
I cannot seem to find this file anywhere. Please help.
Same problem. I did see the following message that might help.
Downloaded file: work/minecraft_server.1.8.8.jar with md5: a0671390aa0691e70a950155aab06ffb
Found good Minecraft hash (a0671390aa0691e70a950155aab06ffb)
Final mapped jar: work/mapped.ba9a3cce.jar does not exist, creating!
Exception in thread “main” java.lang.OutOfMemoryError: Java heap space
at org.objectweb.asm.ByteVector.enlarge(ByteVector.java:335)
at org.objectweb.asm.ByteVector.putByteArray(ByteVector.java:316)
at org.objectweb.asm.ClassReader.copyPool(ClassReader.java:363)
at org.objectweb.asm.ClassWriter.(ClassWriter.java:655)
at net.md_5.ss.model.ClassInfo.remap(ClassInfo.java:119)
at net.md_5.ss.SpecialSource.map(SpecialSource.java:96)
at net.md_5.ss.SpecialSource.main(SpecialSource.java:44)
Exception in thread “main” java.lang.RuntimeException: Error running command, return status !=0: [java, -jar, BuildData/bin/SpecialSource-2.jar, map, -i, work/minecraft_server.1.8.8.jar, -m, BuildData/mappings/bukkit-1.8.8-cl.csrg, -o, work/mapped.ba9a3cce.jar-cl]
at org.spigotmc.builder.Builder.runProcess(Builder.java:517)
at org.spigotmc.builder.Builder.main(Builder.java:280)
pi@raspberrypi /home/minecraft $ ls
apache-maven-3.2.5 BuildTools.jar Bukkit Spigot
BuildData BuildTools.log.txt CraftBukkit work
pi@raspberrypi /home/minecraft $
Thanks Andre that error is handy. Can you please let me know if this was on the Raspberry 2 or a previous version?
I’ll test it out and see if I can recreate the error.
same here, seems like the pi B (old version) doesn’t have enough memory.
Downloaded file: work/minecraft_server.1.8.8.jar with md5: a0671390aa0691e70a950155aab06ffb
Found good Minecraft hash (a0671390aa0691e70a950155aab06ffb)
Final mapped jar: work/mapped.ba9a3cce.jar does not exist, creating!
Exception in thread “main” java.lang.OutOfMemoryError: Java heap space
at net.md_5.ss.model.ClassInfo.getParentClasses(ClassInfo.java:91)
at net.md_5.ss.remapper.EnhancedRemapper.findMethodDeclarer(EnhancedRemapper.java:73)
—Edited—
at net.md_5.ss.SpecialSource.main(SpecialSource.java:44)
Exception in thread “main” java.lang.RuntimeException: Error running command, return status !=0: [java, -jar, BuildData/bin/SpecialSource-2.jar, map, -i, work/minecraft_server.1.8.8.jar, -m, BuildData/mappings/bukkit-1.8.8-cl.csrg, -o, work/mapped.ba9a3cce.jar-cl]
at org.spigotmc.builder.Builder.runProcess(Builder.java:517)
at org.spigotmc.builder.Builder.main(Builder.java:280)
I ended up compiling minecraft with windows, then installed vsfptd on the pi and ftp’d the compiled files across.
The server is up and running now, however it would probably have been faster to tar the files on the pc, ftp the one file and then extract on the pi
On the board is shows it as Raspberry Pi B+ V1.2 2014.
With 512 MB.
pi@raspberrypi ~ $ free -m
total used free shared buffers cached
Mem: 482 54 428 0 8 23
-/+ buffers/cache: 23 459
Swap: 99 0 99
pi@raspberrypi ~ $
exactly the same thing for me… Raspberry Pi 1 (version B)
How do I get the server to create a new world? And what are some more performance boosting tips?
I’m not positive, but I believe that if you delete the worlds folder and reboot, it will create a new world. Or, if you wanted to save the world, just move it out of the server folder and into somewhere else, and because the folder is not there, the server will make a new world.
Also, if you are looking to upload a world of your own to the server, you could take a world out of the .minecraft folder on your PC and move it into the server folder where the old world used to be.
Hopefully that made sense.
I was good up to step 16. When I try sudo /opt/jdk1.8.0_60/bin/java -Xms512M -Xmx1008 -jar/home/minecraft/spigot-1.8.8.jar nogui I get the following response: Unrecognized option: -jar/home/minecraft/spigot-1.8.8.jar Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
Any idea on what I may be doing wrong? I appreciate the help. My 3 kids are anxious to play together.
Hi Robert,
Looking at the the error you have posted it looks like you’re missing a space in-between the -jar and /home/minecraft/sigot-1.8.8.jar.
You are also missing a M after the 1008 number.
Hope this helps! Please let me know if you’re having more problems.
Gus,
I wiped the SD card and started over. I downloaded the spigot file from the mediafire.com website and all looks right. Again, at step 16 when I try sudo /opt/jdk1.8.0_60/bin/java -Xms512M -Xmx1008M -jar /home/minecraft/spigot-1.8.8.jar nogui I get the following: Error: Unable to access jarful /home/minecraft/spigot-1.8.8.jar.
Any ideas?
Hey Robert,
Do you have Raspbian Jessie? If so, you don’t need the /opt/jdk1.8.0_60/bin/ before java as Java is preinstalled on Jessie.
Also, did you download the jar file into /home/minecraft or into the root folder?
If I try to use this command: “sudo /opt/jdk1.8.0_60/bin/java -Xms512M -Xmx1008M -jar /home/minecraft/spigot-1.8.8.jar nogui”, I get this Error:” Error: Unable to acssess jafile /home/minecraft/spigot-1.8.8.jar”. What shot I do? (I have a Rasperry pi 2)
Hi Tobi,
First thing to do is make sure the spigot-1.8.8.jar file exists by running the following command:
ls /home/minecraft/spigot-1.8.8.jar
.If it doesn’t then simply run the buildtools again and look to see if an error occurs.
Otherwise it may be an issue with permissions on that particular file. (Eg. Java doesn’t have the rights to access it)
Hope this helps! Let me know if you’re still having problems.
It isn’t working to download java it gives my 404 errors
Hi Gus,
I run Buidtools twice because spigot-1.8.8.jar wont appear. the second time copy that:
Pulling updates for /home/minecraft/BuildData/.git
Successfully fetched updates!
————————————————————————————
Found good Minecraft hash (a0671390aa0691e70a950155aab06ffb)
Final mapped jar: work/mapped.ba9a3cce.jar does not exist, creating!
Can you help me?
Thanks Diogo,
I got your latest comment and have a solution. The buildtools we’re using for the Raspberry Pi Minecraft server chew up too much memory for any version of the Pi before the Raspberry Pi 2.
I have instead compiled the spigot file and is available for download using the following command:
sudo wget http://www.mediafire.com/download/kvkkxsu7ws6nhvz/spigot-1.8.8.jar
Hi folks,
Does anyone know how to input server commands from the terminal?
When running the server manually I can enter commands, but how can I access the server when it starts automaticly on boot?
the solution is to use the gnu “screen” command which you can install using:
sudo apt-get install screen
configure your Pi not to automatically start the minecraft server. once you have booted up, SSH into the Pi and start a new screen session using:
screen -S mcs
this starts up a new “screen” called “mcs” (short for “minecraft screen”, but you could use any name you like.)
start up the server per normal. when you want to disconnected, use the sequence: Control-a d
this will detach you from the minecraft screen session and return you to a prompt. the minecraft server is still running in the screen session you started earlier.
you can now logout of your Pi.
to get back to the console again, SSH into your Pi and use the command
screen -ls
to list all of the running screen sessions. you will see your minecraft server session there with a name like 3829.mcs. reattach to this session by using:
screen -r 3829.mcs
(substitute the appropriate number above with the one you from the screen -ls command).
it is possible to make minecraft start up automatically in a screen session on bootup, but how to do that exceeds what I can provide in a blog comment 🙂
for a cheat sheet on screen commands, see this site:
http://aperiodic.net/screen/quick_reference
note that you are not limited to a single screen. you could have multiple screens running – one for minecraft, one for general purpose usage etc. when you “disconnect” all of these screens will stay alive.
enjoy 🙂
You said: “it is possible to make Minecraft start up automatically in a screen session on bootup, but how to do that exceeds what I can provide in a blog comment”
Well here is the simplest way I can think of:
As stated in Gus’ “Boot on Statup” section, edit the
/etc/rc.local
file, but instead of adding a line referencing minecraft-start.sh use the following command:cd /home/minecraft && screen -dmS minecraft /opt/jdk1.8.0_60/bin/java -Xms512M -Xmx1008M -jar /home/minecraft/spigot-1.9.jar nogui
This command should go right before the line reading exit. Now when your system starts up Minecraft will start in a detached screen session which you can resume / rejoin by running the command:
sudo screen -r minecraft
OR if you only have one screen session running you can shorten the command to sudo screen -r which will resume the only active screen session.
When you resume/ rejoin your screen session, you will see your Minecraft server’s screen, and be able to interact with it normally. When your done simply close your putty window, or use the following key combination:
- a
- d
In either case the minecraft server will continue to run, and you will be able to rejoin it at any time with the screen command. Well until you minecraft server, as that will incidentally result in the screen session being closed / terminated.
Apologies for adding to the clutter – but this is the most clear and concise guide on the internet. I really want to thank you for simplifying everything. We are having so much fun with the server and your guide helped me out – especially with the screen command – trying to understand that elsewhere was very frustrating. Thank you again
I have a Kano kit I just bought. I tried the instructions within LXTerminal but that gives me an error “sudo: apt: command not found”. Do I need to prepare a Rasbian SD card or is there a way to install MC server on the Kano kit. What I’ve read is that the Kano kit comes with Rasbian installed. Help please! Thanks in advance.
Update: I was able to resolve my own question. I have the server running now and was able to connect from another PC on the same device. This is a very well written guide and perfect for a novice like me!
Once I fired up MC server, I am at a “>” prompt but not sure how to proceed to the optimization steps or exit the minecraft prompt.
I also have a kano and got the server running now. But how can I leave the kano system and stop the kano program to get more free memory? Upon reboot it always enters automatically into the kano program.
Hi Gus!
Thanks for nice tutorial, I got server running when I downloaded ready-built spigot. I’m very new in this world (of Minecraft 😉 ), so maybe it sounds a naive question, but is there any free Minecraft clients for RPI(2) that can connect to this server?
Best wishes,
Tonis
The clients for all platforms are provided by Mojang for free download, but you need to have a Mojang account to connect to any Minecraft server – even one that you are running yourself.
The authentication and authorisation is performed by the server when you connect from the client.
how can i restart just the server and see the white-list document from the pi using command?
How can i make 3 pi’s work together to run one minecraft server ?
I dont think you can however if your thinking of owning a big server there are many paid hosting website you can use
I got the latest update of Raspbian for my Pi 2 (the Jesse version).
After turning my Raspberry Pi 2 into a MineCraft server startx would not work anymore.
It hangs on a blank screen.
Strange!
I suspect you followed the (excellent!) instructions too closely. : ) In step 3, the instructions tell you to set the memory split to 16, which is probably not leaving enough RAM for the graphics controller to start the GUI:
“First let’s go to Advanced Options->Memory Split, update this to 16. (This will allow for more memory to be free for the server)”
You will likely need to set the split to a higher number in order to use X. But this will reduce the RAM available to the CPU, which may impact the performance of your Minecraft server. The best solution is to dedicate a Pi to running Minecraft server and get another Pi to run X.
Hello,
I have a simple problem that can hopefully be solved with a simple command line.
How to i access the command console after closing out a session in a program like PuTTY? Any help would be appreciated!
-Jonathan
Hello,
Unfortunately the eula doesnt want to open in nano and when i go into my files the eula is called eula.txt.save. i cannot even open it vi the text editor!!! please can you help me as soon as possible
Thanks
Hi!
I have just made this project but when I’m trying to enter the server from a laptop in my local network the server stop responding and the server is rebooting (not the pi just the server program), have tried to adjust the overclocking up and down but no result…
What do u think Gus?
MVH Samuel
How do i delete all of the files because they wont delete…
It’s taking up too much space on my pi 🙁
If you want to remove everything you just installed from this tutorial make sure you first kill the minecraft process. This is detailed in the boot at start up.
You will then need to run the following commands:
This first command will remove the java we downloaded and unzipped
sudo rm -R /opt/jdk1.8.0_60
This second command will remove the minecraft folder/files.
sudo rm -R /home/minecraft
** Be careful when running the above commands as they will remove everything in those folders and the folders themselves.
If you want to confirm it has been removed simply run:
sudo ls /home
The minecraft folder should no longer exist. You can do a similar command to check the /opt/ folder.
Also don’t forget to remove the bash call from the rc.local file if you added that in the start up script stage.
Thanx for this great guide! All seems to be working, but when I try to connect MC to the server I get the following error:
java.net.ConnectException: Connection refused
This is local, I haven’t tried it yet from the outside.
I’m getting this too. It’s usually as a result of the server version and client version not matching. But as I downloaded my client from the official site I’m not sure about how to fix it.
Same problem here, “Connection refused”. How can I fix that?
Thanks! Ludwig.
More likely than not, you haven’t put the EULA as true, which is a trouble I had
I loved this walk-through. Could you possibly make one for PocketMine Server. My kids are addicted.
Could someone please tell me how players outside my local network can connect to the server? And by the way, great tutorial, first one that’s worked very smoothly.
http://pimylifeup.com/raspberry-pi-port-forwarding/
Hi Nate, This can really vary since it depends on your internet connection speed etc. However I would say the Raspberry Pi probably will struggle with more than just a few players. Roughly I would say 5 but I haven’t been able to test this.
I was wondering about dynamic DNS and that link above really helped, but it didn’t help with other people connecting to the MC server. Would someone have to enter (my routers’s ip):25565 when adding a server in Minecraft? After I forwarded port 25565 to the Pi’s local IP (the 192.168.1.xxx)? Sorry, I’m kinda new at this.
Hi Nate,
Yes that is correct once you have setup port forwarding anyone not on your local network will need to connect via your external IP.(If you’re not sure what your external IP is just google “My IP” and it should let you know what it is) It should look something like xx.xxx.xxx.xxx:25565 when someone enters it.
If you need some specific router instructions, http://www.portforward.com/ has some great step by step instructions for many common devices.
I forwarded the port to the pi, but no luck. Would the problem be with having two routers?
Hey Gus! Thank you heaps for this tutorial, I got my server working… But :\
I’m using a Model B and I followed all of the lines. But its slow as ever, just wondering if I should install a new version of java? I tried to install this one:
http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-arm32-vfp-hflt.tar.gz?AuthParam=1445905057_620fbf309d330bb0cfa0e10b54a1a809
but then I tried the code to unzip it:
sudo tar zxvf jdk-8u65-linux-arm32-vfp-hflt.tar.gz -C /opt
but it didnt work… Please help!
Thank you for this guide. Easy to set up and works well.
Only problem i have is once I’ve booted and the server is running no commands i type are working.
Not even sudo commands work.
I can type anything but it just doesn’t do anything. I can’t get back to the config file or to the gui.
Any suggestions?
I have the same Problem. Everytime i boot my raspberry pi b+ the Server starts automatically and then i can’t even stop the Server. Can somebody help me?
Same thing here. I can type, but get no response to anything except Ctrl+alt+del, which reboots and it returns to the same state.
I’ve got the same problem, maybe the autostart line should be done with nohup?
I ended up reinstalling the whole thing. Only because I didn’t have any other linux machines with a spare sd card reader. Otherwise you could mount up the card in another linux box and change back the rc.local file.
I got the same problem. I also ended up reinstalling my whole device. at least now I might install some kind of safety button if I do sth stupid again 😀
I am having the same problem.
I guess I should have added a ‘&’ to run the server in the background. I do not know but maybe that would have helped.
I have this issue as well. I was hoping someone would post a solution though. Any ideas?
The latest RaspianOS has java jdk8 pre-installed so no need to call java from /opt…
Thanks Leon! I have updated the tutorial with a couple of notes so people will be aware of this.
Thanks Leon and Gus!
How do I update to Java 8?
It should be already to go, it was for me at least.
https://www.raspberrypi.org/blog/oracle-java-on-raspberry-pi/
Oh wait, I see you want to update. I guess you just need tp replace oracle-java7-jdk with oracle-java8-jdk
Well, It already comes with Java 8 so I just found out but…
I can’t use this command:
sudo /opt/jdk1.8.0_60/bin/java -jar filename.jar
It says that is doesn’t recognise the command.
Thanks Leon!
Just use
sudo java -jar filename.jar
Dear Gus,
You have made a perfect tutorial to generate the new raspberry pi 2 and new bukkit jar file 1.8.8. My son is so happy now, we are playing day and night! XD
I have manage to use “screen” and auto startup script to boot up my minecraft server.
I used this tutorial to get it done!
https://coderwall.com/p/quflrg/run-a-script-on-startup-in-a-detached-screen-on-a-raspberry-pi
for the one who could not figured out yet.
Happy crafting!!!
regards,
Peter
Curious what command you used, in the /etc/rc.local file I’m using:
cd /home/minecraft && screen -dmS minecraft /opt/jdk1.8.0_60/bin/java -Xms512M -Xmx1008M -jar /home/minecraft1_9/spigot-1.9.jar nogui
Hi, thanks for this awesome tutorial! Worked really fine, but wehre can I get the OP rights?! Within a normal server, there´s the console, but the pi dind´t got a console for something like that, didn´t it? Could you tell me, wehre I have to do the settings to get OP on the server?!
Thanks from Germany Nik
I tried this on a first issue RP model-B (the one with 256mb of memory), but it was way too slow and disconnects after a short amount of time.
Trying to overclock that model to turbo caused it to crash on startup so I had to keep it to moderate overclocking.
However, I’m going to try this on an old eeepc-701-4G, with debian. The process is almost the same — instead using http://www.webupd8.org/2014/03/oracle-java-8-stable-released-install.html for the java install and updates.
I’m just waiting for the 2GB memory module to arrive from China.