Daniel Lemire's blog

, 289 min read

Setting up a “robust” Minecraft server (Java Edition) on a Raspberry Pi

396 thoughts on “Setting up a “robust” Minecraft server (Java Edition) on a Raspberry Pi”

  1. Peter says:

    Hi I followed your tutorial and everything seemed to install correctly. However when i tried to start the server for the first time i get the message Error: Unable to access jarfile spigot-1.9.jar can you tell me what I am need to do to correct this.

    1. Right. The command: java -jar BuildTools.jar will create a jar file, type ls spigot*.jar to find how the jar file is called, it might not be spigot-1.9.jar if you are installing a different version of spigot.

    2. Francesco says:

      Try to use “sudo” before starting server.

      1. If you need to use “sudo” to start the server, then you did not follow the instructions. I do not recommend running the server through “sudo”.

  2. Paul Young says:

    Easily the best tutorial I have found. Worked a treat. Thanks.

  3. use this for the latest version, otherwise 1.9.2 is built

    java -jar BuildTools.jar –rev 1.9.4

  4. Greg says:

    Excellent tutorial, thank you.

    My little Pi 3 is running a minecraft server right now.

  5. Bart says:

    Hi, thanks for your work! I do have a problem, in the next script:
    if ! screen -list | grep -q “minecraft”; then
    cd /home/pi/minecraft/1.9.2 ( i did ad a “.2”)
    while true; do
    screen -S minecraft -d -m java -jar -Xms512M -Xmx1008M spigot-1.9.2.jar nogui && break ( i did ad a “.2 ” here as wel)
    done
    fi
    it says:”no such file or directory” When i look in the minecraft folder, i don’s see a file or folder named 1.9 or 1.9.2.

    any idea’s what i am doing wrong?

    Regards

    1. Replace “cd /home/pi/minecraft/1.9.2” with “cd /home/pi/minecraft”.

      1. Jaden Wijata says:

        Works great

  6. Adrian says:

    Err… Help..!
    Got to the pint of the start-up script and added the part to call it from ‘rc.local’.
    Re-booted the Pi , text scrolls up the screen as normal, gets to the part where it calls the script and then just prints out…
    ‘/home/pi/minecraft/minecraft.sh: line 4: screen: command not found’ continuously.
    Any ideas what is wrong, and how do i get back into my Pi?.

    1. Have you typed sudo apt-get install netatalk screen?

  7. Adrian says:

    Ah… that sorted it. It would help if I read your instructions properly. 🙂
    The Minecraft server is working brilliantly now on my Pi3.
    Thanks for you help and a speedy response.

  8. Geordie says:

    Awesome work and thank you very much. Is it possible to have multiple worlds (survival/creative etc) with different names so that we can play together or apart and log in using different server properties or similar?

    1. Heath Mitchell says:

      Look up Multiverse Spigot. Put it in your plugins folder (in the folder where the server was set up somewhere) and look up how to use it.

    2. Sombeboydy says:

      There should be a spigotplugin for that

  9. Bokkie says:

    When starting with the lite Raspbian image, you need to install the following additional packages: oracle-java8-jdk, git

    1. Jason says:

      Absolutely correct! So glad I saw your comment buried in here! I don’t want to waste valuable resources for a GUI I’ll never use, so I have my Pi multi-server running on lite. Was having a terrible time getting this to work until I saw your comment. I did an apt-get remove openjdk* then apt-get install oracle-java8-jdk and BOOM! IT WORKS!

      Thank You!

      1. I don’t want to waste valuable resources for a GUI I’ll never use

        I guess you refer to disk usage. However, large SD cards are quite cheap. You can get an 8GB SD card for less than 10$.

  10. Sean Griffin says:

    I have written your script as you have done but I get the error.

    Usage: grep [OPTION]… PATTERN [FILE]…
    Try ‘grep –help’ for more information.

    ./minecraft.sh: 4: ./minecraft.sh: minecraft: not found

    1. Can you type…

      $ grep --version

      1. Sean Griffin says:

        I had the script written wrong but still it didn’t work.

        When I corrected the script it ran the minecraft server but gave errors and crashed.

        I am not sure of the errors as it was going to fast to read.

      2. Sean Griffin says:

        the CLI should be sudo grep –version

        the version I am running is 2.20

        I am not sure if it is a error with the script or if its the netatalk screen?

        I can boot the server up by itself without the script

        Cheers

        Sean

        1. the CLI should be sudo grep –version

          You should use sudo with care as it can mess up file permissions.

      3. Sean Griffin says:

        I am running the latest Raspbian Jessie (Lite) update also running the latest build of BuildTools.jar and running a raspberry pi 3.

        Not sure what else I can do to get the script to work.

        Do you think a reinstall of Netatalk might work or an older version?

        Cheers

        Sean

        1. I recommend starting from a clean image and following the instructions carefully, step by step. They are thoroughly tested and definitively work on a Raspberry Pi 3. If you do not want to do this, you will have to find how your system is messed up.

          1. Sean Griffin says:

            I have installed a new image and the script is not working still.

            I followed the instructions to the letter.

            If I was rude Daniel I am sorry didn’t mean to be.

            1. You are not rude but these instructions are thoroughly tested and definitively work.

              1. Jos Gordon says:

                Hi Daniel,
                I wouldn’t say it definitely works, but it does in most cases.

                For example – netstat shows the pi listening on ports 22 and 25565 but I am unable to connect on the latter. Fing, on the other hand, shows only port 22 open – Connections to 25565 fail. Security/firewall settings on the pi possibly.

                Your instructions, while very detailed, make certain assumptions. The version of raspian, security settings, Minecraft server version. With the most current full version of raspian there appears to be an issue. It is a great starting point though and I thank you for publishing this.

                1. With the most current full version of raspian there appears to be an issue.

                  I did a fresh setup two weeks ago with the latest Raspbian (2018-11-13) and it worked for me, as it had always done. It is possible that something changed in the ecosystem and that my instructions are no longer adequate, and that I was just lucky…

                  However, I would argue that it would be useful for you to qualify what you mean by “I am unable to connect”. Presumably, you started the server and it runs fine. So everything in my instructions worked for you, except that “you are unable to connect”. Ok.

                  Can you elaborate…?

                  For example, which Minecraft client are you using?

                  1. Furthermore, your comment suggests that it is related to the current version. Can we deduce that you did it with an earlier version and that you verified that it worked. Otherwise, how could you tell that the problem is related to the current version of the OS?

        2. Please use the full Raspbian as specified in the instructions.

      4. Sean Griffin says:

        One error is : ERROR Unable to locate appender File for logger

  11. Sissyneck says:

    Thanks very much for taking the time to develop this and to write it up, by far the most thorough and clear instructions I’ve found. My kids and I got a server up and running in a few hours last weekend.
    Now that the 1.10 update has arrived, I wonder if you have any tips for going about installing the update.
    Thanks again.

    1. Gabe says:

      I’ve just done this for the first time on our little Pi2 – it can barely handle the load but it’s good enough for some father/son goofing around!

      I’m not using Spigot, I’m using the default minecraft server jar file.
      So: download the new version 1.10 server jar file from minecraft.net.
      Put it in the same directory as your previous server file.
      Update the minecraft.sh script by changing the filename from the old to the new file.
      I’m not sure if it will generate a new World or not – I started at 1.10 because we just today pulled the long-dormant Pi2 out of its storage.

      1. TinyZombie says:

        I know this post was from last year, but for anyone reading this, don’t do what this guy did. The Mojang server is way too slow on the Pi (even a Pi3). Spigot is definitely worth the extra time and effort to build, it’s waaay faster than the default Minecraft server!

        1. RicG says:

          I’ve been running a server on a Pi3 using Spigot for nearly a year. Every now and then it kicks me off in the middle of cavorting around the world, but that seems to be happening more recently since updating a few of the plugins. I’m running Multiverse, Multiverse Portals, Multiverse Sign Portals, and Slimefun with a few SF addons. I’ve also started using BetterFoliage and Conquest resource pack on the client side, and the game has never looked better! I just need to figure out why the crashes seem to be happening a little more frequently, but it’s not enough to make the overall experience unpleasant.

  12. Caleb Allen says:

    Thanks, very helpful guide. If anyone gets a TransportException or some kind of SSL error, the –disable-certificate-check flag can come in handy with BuildTools. GIT errors can be solved by clearing the working folder and starting again. Also in my case I had time to grab a coffee and two sausage rolls, head out for the afternoon, come back, write this comment and it’s still not finished on my Raspberry Pi 3.

    1. Yes, the whole setup takes a surprisingly long time. Unfortunately, one cannot legally distribute a ready-made image.

      1. Caleb Allen says:

        I don’t know if it’s just me, but from a Raspbian Lite image, I’ve been overrun with SSL errors. The only way to get BuildTools to start was to disable cert checking; then I had to restart the process several times to get it to complete a build and when I thought it was nearly done it went on to throw a maven plugin download transport cert error. I thought I had it, but it’s just gone and failed now.

        1. Are you sure you grabbed the right spigot? Check which version you have…

          $jar xvf BuildTools.jar META-INF/MANIFEST.MF
          $cat META-INF/MANIFEST.MF
          
          1. Caleb Allen says:

            Retried with Raspbian Jessie Full rather than Lite, worked first time with no issues.

  13. Joe says:

    Great write-up. Everything worked like a charm.

  14. Raphaël says:

    Hello Daniel, from Paris.

    I am very thankful for this step by step recipe. The only trouble i do encounter is when after launching the server, I’d like to return to the shell typing “ctrl-a d”. Doesn’t work. But I do suspect a wrong action on my side which I couldn’t figure out.

    And I was wondering if there is a way to change the parameters of the world we created from survival to creative / terrain aspect, etc.

    Thank you again.

    1. The only trouble i do encounter is when after launching the server, I’d like to return to the shell typing “ctrl-a d”.

      If you have followed my instructions, then after starting the server, you should still be in the bash shell.

      If you open a screen to access the server terminal, then, by definition, you will be in a screen session, and those can be closed by hitting “ctrl-a” then “d”.

      And I was wondering if there is a way to change the parameters of the world we created from survival to creative / terrain aspect, etc.

      Of course. You can configure the server in various ways. It is outside the scope of my blog post however.

  15. AJ says:

    It is important to note that the directions will not work if you are using Raspi 3 with Jessie Lite.
    So far I’ve had to install several packages including java and git, change classpath etc. and I am still facing errors.
    Exception in thread “main” org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of reset command. {0}

  16. Zbysek says:

    First I want to thank you Daniel.
    So thank you for this guide. I have raspberry pi 3 and right now it is running minecraft server so I can play it with my kids during rainy days.

    Zbysek

  17. Aebkea says:

    Is there something more efficient about the Spigot build of Minecraft over the one distributed by Mojang, allowing the former to run better on a Raspberry Pi than the latter?

    1. Most people running a server want the option of customizing it, something that Spigot makes trivial. A vanilla server would probably work well on a Raspberry Pi, but you would not be able to benefit from the Spigot ecosystem.

  18. Denbert says:

    Great readings – I’ve tried alot on the PI2 with no luck – I’ll be ordering a PI3 now and come back with feedback.

    / Dennis

  19. Travis Lehman says:

    Daniel,

    Just wanted to say thank you so much! I’m very new to linux, but not new to minecraft. Just bought a Raspberry Pi 3 and was super excited to set it up, but naturally without programming basics, I had no idea how. Thanks to you my server is now up and running. Thanks man!

  20. Greg Kennedy says:

    What’s the reason for installing Netatalk? That is a package used for sharing your stuff with Apple computers – using the RPi as an Apple (AFP) file server, Appletalk print server, etc. It does not seem at all necessary for getting Minecraft-server working.

    1. That’s correct but my instructions should work whether you have a Mac, Windows or Linux PC. If you have a Mac, netatalk simply makes the Raspberry Pi discoverable by Macs and iOS devices (iPhone). Even if you do not need it, it does no harm and it does not require any effort. It is free convenience.

  21. Julio says:

    Daniel,

    Thank you so much for your post.

    How to uninstall BuildTools.jar (I executed the command: java -jar BuildTools.jar in my raspberry pi 2 with KODI) . I would like to install it in a new raspberry pi 3 without any other application.

    Thank you in advance.

    Julio

    1. How to uninstall BuildTools.jar

      It doesn’t get installed.

  22. RT says:

    This is great! I’m ordering a Pi 3 today, and this will be the first thing I put on it.

  23. Julio says:

    Perhaps my question is better in this way:

    How to remove the installation of server (…) by executting command: java -jar BuildTools.jar? Should I remove directories (apache-maven, BuildData, Bukkit, CraftBukkit, Spigot and work) which were created by BuildTools? Anything else?

    Thank you in advance,

    Julio

  24. Mac says:

    Great post – thank you! When setting RAMTMP=yes, the tmpfs file already includes some other parameters (commented out). Is it worth uncommenting any of these and/or modifying them? I have a Pi 2. Thanks!

    # Size limits. Please see tmpfs(5) for details on how to configure
    # tmpfs size limits.
    #TMPFS_SIZE=20%VM
    #RUN_SIZE=10%
    #LOCK_SIZE=5242880 # 5MiB
    #SHM_SIZE=
    #TMP_SIZE=

    # Mount tmpfs on /tmp if there is less than the limit size (in kiB) on
    # the root filesystem (overriding RAMTMP).
    #TMP_OVERFLOW_LIMIT=1024

    1. I don’t know whether these other parameters need adjusting.

  25. Asher Straubing says:

    I Keep getting a Connection lost error, It reads : Internal Exception: Java.io.IOEexception: And existing connection was forcibly closed by the remote host. After it boots me off the sever crashes and i need to reboot the server manually and just will crash 10-20 minutes later do you have any idea whats going on?

    1. I recommend restarting from the start, with a fresh image. Please follow the instructions carefully, step by step. They work reliably, but, unfortunately, too many people skip ahead or take liberties.

  26. max says:

    Hello,

    I’ve followed everything but the server wont run with “java -Xms512M -Xmx1008M -jar spigot-1.10.2.jar nogui”. I need to add a sudo in front.

    The problem is that when I edit the minecraft.sh file by doing:
    “sudo screen -S minecraft -d -m java -jar -Xms512M -Xmx1008M spigot-1.10.2.jar nogui && break”
    or
    “screen -S minecraft -d -m sudo java -jar -Xms512M -Xmx1008M spigot-1.10.2.jar nogui && break”
    the server doesn’t restart when it crashes… I’ve ran out of ideas to try and fix this. Help would be much appreciated.
    Thanks in advance!
    Max

    1. I’ve followed everything but the server wont run with “java -Xms512M -Xmx1008M -jar spigot-1.10.2.jar nogui”. I need to add a sudo in front.

      Please start from a fresh image, follow the instructions exactly as they appear without taking any liberty. In particular, do not run the server as root.

  27. Joe says:

    How am I able to freely make the server available on the Internet? Do I JUST need to portforward? I’m confused
    Thanks

    1. Opening up a server at home to the Internet through your Internet service provider requires some expertise beyond what you’ll find in this blog post.

  28. Squ1zZy says:

    Works like a charm. Thanks!

  29. Steve says:

    Very nice and useful~~

    Thanks

  30. sburggsx says:

    For a while now I have needed a script to restart a process running under screen on reboot. While it may sound simple, your script was exactly what I needed. Thanks for that!

  31. Sean says:

    Hi, I am using your tutorial and I havent gotten very far yet, right now i am trying to make the server headless using the windows 10 bash shell (I also tried putty) but when I type the command to connect and make the raspi headless, I get this message “Connect to host rasberrypi port 22: is temporarily unavailable” Yes I did enable ssh in raspi config steps. Help please?

    1. You should be getting a message about being unable to connect to “raspberrypi.local” not “raspberrypi” because I never wrote to connect to “raspberrypi”.

      1. Christian says:

        i am having a similar issue mine says “unable to open connection to raspberrypi.local Host does not exist” i also tried using the IP address for it as well with the same result.

  32. Stadtpirat says:

    Hi,
    thanks for the great tutorial! An improvement for you setup:

    java -jar -server -Xms512M -Xmx1008M spigot-1.9.jar nogui

    Everything below 2G heap space triggers Java to choose the client JVM, which lacks some performace features made for servers.

    http://docs.oracle.com/javase/8/docs/technotes/guides/vm/performance-enhancements-7.html

    Memory footprint gets a little bigger(430 MB), but cpu load is much lower.

    1. Do you have benchmarks showing that the server flag actually improves the performance?

      1. Stadtpirat says:

        I checked cpu load with htop, and know what the flag does from my time as a former java-developer.
        is there any good practice to benchmark a minecraft server under identical circumstances, to get robust and significant results?

        1. The main problem we face with respect to running a stable Minecraft server on a Raspberry Pi is running out of resources, including memory. We want to minimize “pauses” caused by garbage collection and, ultimately, we want to reduce the risk that we will run out of memory entirely.

          If you run the server for any length of time with actual users, what you get are people who complain about latency.

          So we want a JVM optimized for low-latency.

          In this context, my question is whether the server flag will improve latency in low-memory conditions?

          No. I do not know how to benchmark it, but I am uneasy about recommending an extra flag without any supporting evidence.

  33. Mathieu says:

    Very intetesting tutoriel, I found here info that I never seen.

    Quick question about Neither world, does it work ? I don’t see in your tutorial that you deactivate it.

    Thanks !

    1. If we do not disable it, then I suppose it should work.

  34. Denbert says:

    Great tutorial – All though I cant get the startup script working:

    if ! screen -list | grep -q “minecraft”; then
    cd /home/minecraft
    while true; do
    screen -S minecraft -d -m java -jar -Xms512M -Xmx1008M spigot-1.10.2.jar nogui && break
    done
    fi

    Yes, I’m running it as user minecraft, therefore the /home/minecraft

    If I run this command in the terminal as user minecraft in home dir, it runs great:

    screen -S minecraft -d -m java -jar -Xms512M -Xmx1008M spigot-1.10.2.jar nogui

    Any suggestion, to point me in the right direction?

    1. You have to explain what this means : “I cant get the startup script working”.

      1. Denbert says:

        Hi Daniel,

        Well – the Minecraft server don´t start with the startup script.

        minecraft@pi:~$ ./minecraft.sh

        No errors, it just don´t start

        The monecraft.sh file has permission 755

        / Dennis

      2. Denbert says:

        Hi Daniel,

        Well – the Minecraft server don´t start with the startup script.

        minecraft@pi:~$ ./minecraft.sh

        No errors, it just don´t start

        The minecraft.sh file has permission 755

        1. the Minecraft server don’t start with the startup script

          Do this and report the result:

          minecraft@pi:~$ ./minecraft.sh
          minecraft@pi:~$ screen -r minecraft
          
          1. Thias Light says:

            same issue, however; when i run the ‘./minecraft.sh’ I’m given a syntax error: unexpected end of file

            I used an ssh client to copy and paste the code directly, making only the necessary spigot version change. Still can’t figure it out.

            Code follows:
            if ! screen -list | grep -q “minecraft”; then
            cd /home/pi/minecraft
            while true; do
            screen -S minecraft -d -m java -jar -Xms512M -Xmx1008M
            spigot-1.11.2.jar nogui && break
            done
            fi

            1. What you reproduce in your comment is not a copy-paste of the code in the blog post. There are six lines of code, not seven. Please check again.

              1. Jimmy says:

                Hey Just so you know Most people do this on there raspberry pi. What you posted MAY look like 6 lines to you but when i pasted it it took 7 lines Everything is fixed but Not everyone has the same resolution you do. Try using a 1260×1023 monitor and then BOOM 7 lines GET YO FACTS STRAIGHT!

  35. erikg says:

    greetings, from the netherlands. Im installing minecraft server for my kids, but do not know anything about the game 😉
    Installed the full raspian version in pi3 and followed your instructions. The server starts up and runs. The minecraft server is found in the minecraft client (on LAN). but cannot connect because of authentication failure. Internet search suggest disabling online-mode. Then the client can connect.
    Any idea what the issue with the authentication ? Is it a problem is the online-mode stays disabled ?

    1. If you are running the server on your home network without exposing it to the Internet, you should be fine.

  36. Abe says:

    I just wanted to thank you for this tutorial. It was just what I needed.

  37. Marc says:

    My kid and I followed the instructions, except the netatalk installation as this is only for Apple. And we did do the automated starting of the server at reboot. My kid uses a different user than pi, and he did the whole instructions with this user. We made the minecraft.sh script and it worked. But once we adapted the RAMTMP setting and rebooted, we could not run the script anymore. It says: “could not find minecraft.sh” while we are in the folder containing the script, and where the jar file is. If we just start the command itself for the server, it works fine. We did do the chmod action.

    1. My instructions assume that the user is “pi”. You can still make it work if you take liberties and change your user name, but you then need to adapt the instructions accordingly.

      I recommend that you follow the instructions as-is.

      1. Marc says:

        Thought so. Just bought additional sd cards, so we can try again. Keep you posted. Just thought it was weird that it worked before the reboot.

    2. Nelson says:

      Try this to start the script:
      ./minecraft.sh
      This assumes you are in the /minecraft directory.
      The ./ forces the shell to look in the current directory, which doesn’t alway exist in you path.
      Nelson

  38. Eric says:

    How do you go about adding mods? tried doing a google search but was not able to find anything that was a straight, cut and dry step by step detailed list of instructions.

    1. I have instructions regarding plugins (please check my instructions again if you missed it).

  39. Ferry says:

    hello daniel i thank you very match for the minecraft server.
    everything is working. even minecraft.sh

    Ferry a son of Marc

    1. Great.

  40. Martin says:

    Excellent tutorial.
    Went exactly as planned.

    This is probably the first ever tutorial that actually worked exactly as explained.
    Well done and thank you.

  41. hans says:

    how many people can play at the same time (playerslot) ?

    1. I have not stress tested the server with respect to the number of users. A few certainly.

      I’d be interested in any numbers people have…

      1. M.Lionheart says:

        I’m running it using a Pi 3 and a 375gb WD Pi Drive and the following mods: Dynmap, Multiverse, Multiverse Portals, Multiverse Netherportals. We have two fairly large world files we connect using Multiverse.

        I’ve ran concurrently with 6 people (2 local, and 4 remote). As long as we have it set to pause the dynmap renders when people login, we can all play normally with some occasional block update lag. It works about as well as when I used to play mc on the same pc that the mc server was run on. Generating a new Nether portal has caused a crash about a third of the time.

        My friends and I are starting to look into using this method using a 4-node pi cluster. If we have any success I’ll let you know.

        1. Nick says:

          This may be a stupid question, but how do you connect remotely? As I understand, the server name is “raspberrypi.local.” Do you have to do something extra to connect remotely, and these instructions are just for local connections?

          Thanks

          1. If you mean that you want to make the pi available on the Internet, it is covered in the guide.

            1. Nick says:

              Thanks

    2. Nelson says:

      I’ve run with 4 grandkids at one time. Did crash on occasion.

      1. Yes, sadly, it does crash. I haven’t found a way to make it perfectly robust.

  42. jakob says:

    So i have the problem ./minecraft.sh> line 4> screen> sommand not found and also when i type screen in console it says command not found. any suggestions

    1. You did not follow all of the instructions.

  43. CT says:

    Thanks Daniel… Works like a charm…
    Now to find tutorials to make our own mods for the server. Since this is a server, I don’t suppose we can easily create custom mobs for the game? The client will need to know how the mobs work and the custom textures too…

    1. I am not a Minecraft expert, but I actually assume that you can change game textures without having to change anything at the server level.

  44. Koen says:

    Thanks for the tutorial Daniel. It’s working for me as well.

    And i’m still running in graphic mode. Also running an Apache webserver. And changed my hostname. The server runs well for me.

    A small thing, as a Raspberry Pi and Linux beginner, i had it little difficult with:
    Install a couple of extra packages: sudo apt-get install netatalk screen. Do not skip this important step as we need screen. (The netatalk package is only needed if you have a Mac. In such cases, the netatalk allows your Mac to interact with the Pi more easily on the network.)
    I luckily find out, if you do not have a Mac, you still have to run: sudo apt-get install screen.

    To make the server accessible from the internet. You have to forward 25565 in your router to your local Raspberry-Pi IP address.

    It’s easy if you know some of routers, but if not, it’s difficult to do. Since every home router isn’t the same and Port Forward settings could be in an different place or naming.

    I later found this site: https://portforward.com/softwareguides/minecraft/portforward-minecraft.htm (when searching for RealVNC ports).

    1. I luckily find out, if you do not have a Mac, you still have to run: sudo apt-get install screen.

      My recommendation is to run sudo apt-get install netatalk screen as made clear by the following comment (Do not skip this important step as we need screen.). For some reason, people seem to object to having to install netatalk. I don’t understand why. But if you do object, then sure, type sudo apt-get install screen.

      1. Koen says:

        I did not know netatalk and screen are two different applications. Also not knowing you can install mutiple applications in one line.

        For a complete beginner, i would write it as: sudo apt-get install screen. And a second line sudo apt-get install netatalk.

        So i think that is way some people think it’s everything or nothing. And maybe they miss installing screen, because they don’t have a Mac.

        1. I tell people to type sudo apt-get install netatalk screen. I then tell not to skip this important step.

          If one decides to skip the command… I am not exactly sure what else I can do.

  45. Spencer Davis says:

    Hello. I greatly appreciate this post. Which leads me to my next question… I haven’t played since 1.3.2 (minecraft) and want to host a modded server for myself and some friends. I mention my experience with the older version because I don’t know
    1) how to mod a server
    2) I’ve modded older clients
    3) is it a similar process?
    Thanks in advance, as I can’t seem to find anything on this elsewhere.

    1. I honestly wouldn’t know. I don’t play Minecraft, I just learned how to setup a server.

  46. doug henley says:

    I’m running a pi 3 with Raspien and get an error message the jar file doesn’t exist when I search ls spigot*.jar

    Can you assist?

  47. Roary8383 says:

    Excellent tutorial. Thankyou for your time and effort to produce it. This is my FIRST raspberry Pi experience and everything has worked well :-).

  48. Vaughn says:

    The order type is simple to complete and clearly asks for all wanted data.

  49. Alex says:

    Ho Daniel, I wanted to know if with this server you can also play with a Android client.
    Now I have installed, in my tablet, the v0.16.1 version of the Minecraft Pocket Edition.
    Thanks

    1. @Alex I do not know but I suspect not. Minecraft Pocket Edition appears to be a different piece of software.

  50. Mathijs Planting says:

    So, I compiled it on my Chromebook instead (which only took a few min.), and ran the Spigot jar on my Raspberry Pi. Everything seemed to work, except I was getting some SSL security warnings. I couldn’t figure out how to solve it, so I tried to compile it on the Raspberry Pi itself, which indeed took forever… When it was finally done it didn’t create any jar file… I have no clue how to fix these warnings, hopefully someone can help me out.

    1. Mathijs Planting says:

      My bad, I was running the lite version… Downloaded the full version, and everything’s working fine now!

      Thanks a lot for your awesome guide!

  51. Anders Forslund says:

    Hello Daniel
    Thanks so very much for creating these instructions! I followed them and everything worked well the first try and my kids have been playing with the server for several months.
    Now it seems that we need to upgrade the server to the latest spigot. Could you please give some advice/help with instructions for how to do that as well?
    /Anders

    1. There is no safe way to do an in-place Spigot update, as far as I know. I would recommend starting from scratch with a fresh Raspbian installation, on a new SD card.

      1. Corey Dryja says:

        Just posted instructions on how to update the Spigot file. You’ll need to run the Buildtools command again, pointing the command to the new Spigot file. Just posted instructions at the bottom of the thread.

        The commands have been tested and it works.

  52. Koen says:

    Whaaa, can’t play Minecraft anymore.
    Outdated server! I’m still on 1.10.2. Is the message i got.
    Does Spigot automatically change when Minecraft also changes to a new version?

    Already found this post: https://www.spigotmc.org/threads/bukkit-craftbukkit-spigot-1-11-released.193887/ (from today).

    I will read the post later. Kids are waking up, so daddy time for me. But my biggest question. When i do start al over. How can i create a backup from my current World? It would be nice NOT to start over in Minecraft as well.

    I will post my experiences.

  53. Corey Dryja says:

    Here’s the fix to update the outdated Spigot file

    All commands to be run in:
    /home/pi/minecraft

    1) rm craftbukkit-1.10.2.jar
    2) rm spigot-1.10.2.jar
    3) java -jar BuildTools.jar –rev 1.11
    4) java -jar -Xms512M -Xmx1008M spigot-1.11.jar nogui

    Don’t forget to update your startup scripts.

    Enjoy!

  54. Koen says:

    And it all works again!!

    Spigot updated their server to version 1.11. With version 1.10.2 i could not play Minecraft anymore. “Outdated server! I’m still on 1.10.2.” Is the message i got.

    What i did:

    I made a backup (copy) of the \world map. But this was not necessary.

    sudo apt-get update
    sudo apt-get upgrade
    (do not know if is necessary)

    After this i started the tutorial from point 11:
    wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
    (also not sure if it is necessasy)

    Point 12:

    java -jar BuildTools.jar –rev 1.11
    The “–rev 1.11” is necessary, because else toy still would get a spigot-1.10.2.jar file.

    Point 13:
    The eula.txt still exists with eula=true, so nothing to do here.

    After this point you can start the minecraft server.

    Mention point 15 where you have to change the version number in.

    I did not remove any files. I did not make an new Raspbian image. Just an very ugly update, which is not ugly at all.

    Hope this is clear enough for you.

  55. carlos says:

    Hello Daniel
    Thanks so very much for creating these tutorial!
    I followed them and everything of instalation worked well, but how can i connect to the server from android devices?
    Thanks in advanced

  56. Jordan says:

    Hi, thanks for the guide, It was very usefull to get the base server up and running on the pi
    The next challenge is to put some mods on. This proved to be more challenging than dropping them into the mods folder.
    1) get forge installer 1.7.10. Why 1.7.10? There are more mods for 1.7.10 than of the other MineCraft builds. Create a new dir called something like minecraft1.7.10 and copy it to the server via SFTP.
    2) Run: sudo java -jar forge-1.7.10-10.13.4.1558-1.7.10-installer.jar –installServer. This will download the corresponding 1.7.10 server and make a universal file
    3) Run: java -jar -Xms512M -Xmx1500M forge-1.7.10-10.13.4.1558-1.7.10-universal.jar nogui/ to start the server the first time. Change the eula.txt file described above and run again. Your base server is now setup
    4) Get a 1.7.10 mod like copious dogs and copy it into the /minecraft1.7.10/mods dir
    5) stop and start the server. monitor the startup with screen -r minecraft. You can usually see some messages about mods being loaded.

    Client: The client and the server need to be at the same levels of mods and forge. It makes it a pain to get others on the server, but the mods make it much more fun.
    1) On the client you also need the install of forge 1.7.10 with the UI choosing the client.
    2) Download the same copious dogs mod as above version 1.7.10
    3) start minecraft, create a new profile. Choose the forge 1.7.10 version and then open the game directory.
    4) Copy the mod downloaded in step 3 into mods.
    5) Start with the newly created profile and connect the server as before.
    6) Check the inventory to see if you dogs. No dogs then review the steps above.

    After you get the mods you want don’t change them willy-nilly. If you have any remote players then you will need to redistribute them again.

  57. Rob says:

    Just wanted to say thank you for this guide. I was able to get a server rolled out for my daughter and her friends after the public server they were on had some very perverted teenagers on it harassing her.

    For those who want to update, its very easy to do by going to the spigotmc site and running the command to update usually linked on the site. Example, to update to the SpigotMC 1.11 server, run the command “sudo java -jar BuildTools.jar –rev 1.11” and then get another cup of coffee while it downloads and compiles.

  58. Richard J Foster says:

    Many thanks for these instructions. One weirdness I encountered that may be of interest to others: For some reason the router assigned by our ISP uses .home instead of .local as the local domain suffix. This meant that “raspberrypi.local” resolved to an entirely different (and public!) ip address. Fortunately I spotted it before going any further, and was able to confirm the correct local address using ifconfig on the Pi itself, and that “raspberrypi.home” did indeed resolve to the correct address.

  59. Iain Henderson says:

    Debian Jessie is Systemd based which give you a slightly simpler startup script (as in you can just plug in the pi and have it startup)
    Create the following file /etc/systemd/system/SpigotMC.service with the following contents:
    [Unit]
    Description=Spigot MineCraft Server

    [Service]
    User=minecraft
    Group=minecraft
    ExecStart=/usr/bin/screen -S minecraft -D -m /usr/bin/java -server -jar -Xms512M -Xmx1008M spigot-1.10.2.jar nogui
    WorkingDirectory=/home/pi
    Restart=on-failure
    RestartSec=5s

    [Install]
    WantedBy=multi-user.target

    If you create a symbolic link from the latest Spigot to spigot.jar (i.e. ln -sfT spigot-1.10.2.jar spigot.jar), then you can change that in the service and upgrade by updating the symlink.

    Also control-a, control-d will detach from a screen session.

    1. Iain Henderson says:

      Almost forgot, you’ll need to enable it by running
      sudo systemctl enable SpigotMC

      1. Iain Henderson says:

        Finally, change
        Restart=on-failure
        to
        Restart=always
        And the server will restart if it encounters any trouble

  60. si says:

    if only the rest of the internet was this helpful.
    best tutorial if seen. and worked first time.
    thanks

  61. Nelson says:

    Thank you for the clear and precise tutorial. I’ll ask this to the people who are following this blog as I’m like Daniel and just set up the server for kids and grandkids. I’ve been running 1.9.2 and all was well. After upgrading to 1.11 I can’t get the windows java client to connect. I’ve looked everywhere and I don’t see how to get a Minecraft client on windows 10 to connect to 1.11.
    Anyone out here have an answer?

    Apologies to Daniel if this is too off topic.
    Nelson

    1. Nelson says:

      Kick self in head:
      I had to change the profile in the Windows client to accept the latest version. I had set it to 1.9.2 a long time ago.

  62. Nico says:

    Thanks for the manual, works like a charm

  63. M says:

    Hi, this may be a silly question:
    How do I adjust this tutorial to play Minecraft 1.8 instead of the more recent 1.11?
    Thanks!

  64. Cooth says:

    Thanks also for the tutorial. had it working for a bit but must have changed something and make a mistake in one of the lines of code as when the raspberry pi restarts it constantly comes up with

    /home/pi/minecraft/minecraft.sh: line 3: screen: command not found

    Is there anyway to stop it automatically running so I can fix it?

    1. Jimmy says:

      … did you not do this command? “sudo apt-get install netatalk screen”? or this one? “sudo apt-get install screen”??? <— is the problem. next time dont skip a step XD

  65. Christian says:

    Hi I am trying to get my PC connected to the server by ssh but when i type the name it says that the host does not exist. Please help!

    1. Seb says:

      You need the IP address, if you did not by any chance set up DNS in your local network. 😉

  66. Logan Kuzyk says:

    Hi Daniel, thanks for making this very comprehensive and helpful guide.

    I got the server working when I manually started it from the command line but I just can’t seem to get it working with the minecraft.sh file. It brings me back to the shell as the instructions said it should but when I type screen -r minecraft it says “There is no screen to be resumed matching minecraft.”

    Any help would be appreciated.

    1. Logan Kuzyk says:

      I re-wrote the minecraft.sh file and everything seems to be working fine, thanks anyway!

      1. Thias Light says:

        Did you make any changes? I’m getting a “syntax error: unexpected end of file”

        1. No. The code is the same and it is well tested.

      2. Thias Light says:

        Did you change anything in the re-write?

        1. There is no “re-write”.

  67. Raphaël says:

    Hello everyone,
    I found surprisingly a way to update everything to the last version of Minecraft.
    Now it would be absolutely great if someone could point me to a way to enable / apply on this Minecraft server, Python scripts…

  68. Gregger says:

    For everyone getting Errors:
    The new Version 1.11.2. (Dec16/Jan17) seems to be broken. You will get Errors after the “java -jar BuildTools.jar” command (but first your Pi will work for hours …). There is nothing wrong with Daniels guide 🙂
    I just keep on using the old version (i tried the update on a different sd-card) and ignore the “please update your server” message. So you can either use the old version or wait for an update.

    1. Raphaël says:

      Hello Gregger,
      just a quick note to let you know that the Minecraft Launcher 1.6.70 + Minecraft version 1.11.2 is working on the Raspberry Pi 3 I updated ( without understanding a thing ).

    2. Adriano says:

      So what do we do to get this working now?

  69. Christian Jung says:

    Hello Daniel,

    very thorough tutorial! Thank you very much. But since I had a hard time to get the server running after each reboot I thought I share my finding here (I am running Raspbian GNU/Linux 8 (jessie)). I finally got things going with a different approach. I start the server via cron job and not via a call from rc.local.

    This done as follows:

    type “crontab -e” in the terminal and in the editor you must add the following line:

    @reboot /home/pi/minecraft/minecraft.sh

    Be sure to have an empty line after this line if it is the last line in the script and save it. An output stating “crontab: installing new crontab” should appear. Finally you should remove the call of the minecraft.sh script from the rc.local file.

    Do a reboot and enjoy 🙂

    1. The “@reboot” command in cron is finicky.

      The best way to run Minecraft as a server would be to setup a service.

  70. Nathaniel Deimler says:

    thanks for the tutorial. the server appears to be running but minecraft will not connect to it. the error message says failed to connect to server. unknown host name. I was wondering how to fix this. Thanks

  71. joshua says:

    sudo apt-get install netatalk screen avahi-daemon. this doesnt work everything fails

  72. joshua says:

    Start the server again using the script: ./minecraft.sh. It will return you to the shell. To access the console of the server type screen -r minecraft, to return to the shell type ctrl-a d. At any point, you can now disconnect from the server. The server is still running. You do not need to remain connected to the Raspberry Pi.

    this is the point where it stops working. once i put in ./minecraft.sh it spams me with errors.

    i also have no idea what shell or console mean in this setting.

    the server is also directly connected to my computer and shuts of once i exit out of the terminal. i would love some help if anyone could offer assistance.

  73. Griffon says:

    So I’m wondering if did something wrong. It’s taking hours to stat the mincraft server on a pi3
    endless
    [18:46:40 INFO]: Preparing spawn area: 16%
    [18:46:42 INFO]: Preparing spawn area: 16%
    It dose this every time it starts…
    Any thoughts on how long it should take or where the wheels came off?
    I have one build difference, which is it’s running on retropi build instead the main line (I will be getting another card to test a straight build).
    Thanks

    1. It’s taking hours to stat the mincraft server on a pi3

      I think that “hours” is a big long, but it should definitively take a long time to start the server initially. The instructions say: “Start the server (…) It will take forever (…) Go drink more coffee.”

      1. Griffon says:

        Yeah, I read that thanks…. but this was a crazy over night build time, also once up rubber banding while connected was unplayable nothing animated or moved right.

        I did fresh build today on noobs and every thing seems to be better. Build times are are seconds not hours per percent… Whole intial load took maybe 5 minutes now.
        I think something with the retropi build was messed up bad and either hogging the CPU or something with the java version.
        Anyway pretty sure starting over on a new card (as suggested in the doc) was the right way to go.

  74. donaldo says:

    sigh, errors

    Checked out: d4f98a3918e69673b2c0486b5651c5fe912b3c8d
    Attempting to build Minecraft with details: VersionInfo(minecraftVersion=1.11.2, accessTransforms=bukkit-1.11.2.at, classMappings=bukkit-1.11.2-cl.csrg, memberMappings=bukkit-1.11.2-members.csrg, packageMappings=package.srg, minecraftHash=e576e5eb43cd176158917585200cb37d, decompileCommand=java -jar BuildData/bin/fernflower.jar -dgs=1 -hdc=0 -asc=1 -udv=0 {0} {1}, serverUrl=https://launcher.mojang.com/mc/game/1.11.2/server/f00c294a1576e03fddcac777c3cf4c7d404c4ba4/server.jar)
    Found good Minecraft hash (e576e5eb43cd176158917585200cb37d)
    Found good Minecraft hash (e576e5eb43cd176158917585200cb37d)
    Final mapped jar: work/mapped.22de4839.jar does not exist, creating!
    Exception in thread “main” java.lang.OutOfMemoryError: Java heap space
    at org.objectweb.asm.tree.MethodNode.visitVarInsn(MethodNode.java:433)
    at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1343)
    at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1017)
    at org.objectweb.asm.ClassReader.accept(ClassReader.java:693)
    at org.objectweb.asm.ClassReader.accept(ClassReader.java:506)
    at net.md_5.ss.repo.JarRepo.getClass0(JarRepo.java:38)
    at net.md_5.ss.repo.ClassRepo.getClass(ClassRepo.java:22)
    at net.md_5.ss.repo.AggregateRepo.getClass0(AggregateRepo.java:30)
    at net.md_5.ss.repo.ClassRepo.getClass(ClassRepo.java:22)
    at net.md_5.ss.remapper.EnhancedRemapper.findMethodDeclarer(EnhancedRemapper.java:67)
    at net.md_5.ss.remapper.EnhancedRemapper.mapMethodName(EnhancedRemapper.java:33)
    at net.md_5.ss.remapper.MethodRemapper.visitMethodInsn(MethodRemapper.java:120)
    at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1429)
    at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1017)
    at org.objectweb.asm.ClassReader.accept(ClassReader.java:693)
    at org.objectweb.asm.ClassReader.accept(ClassReader.java:506)
    at net.md_5.ss.model.ClassInfo.remap(ClassInfo.java:120)
    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.11.2.jar, -m, BuildData/mappings/bukkit-1.11.2-cl.csrg, -o, work/mapped.22de4839.jar-cl]
    at org.spigotmc.builder.Builder.runProcess(Builder.java:561)
    at org.spigotmc.builder.Builder.main(Builder.java:319)

    1. Can you type “free” and report on the result?

  75. Jem says:

    Set up a Pi3 with your instructions a few months ago and everything worked beautifully. Thank you for the detailed instructions! Did a new build recently with latest version of Raspbian and Minecraft 1.11.2. The server came together fine and we have been able to play Minecraft from our local network but I had to set up everything with monitor/keyboard attached. I was never able to access via SSH. SSH was enabled and a port scan showed port 22 is open. Using Putty it seemed to contact the Pi and I got a login prompt but when I entered password is came back with “access denied”. Any suggestions on how to get SSH access to work? Using monitor/keyboard is fine but isn’t very convenient for maintaining the server. Thanks!

    1. I got a login prompt but when I entered password is came back with “access denied”.

      What is your user name and password?

  76. Alexander larsen says:

    Hey Daniel

    tried your guide last night on a raspberry3 and was delighted when i got the server up and running 😀 Great guide.

    But i did have trouble connecting to the server… but after some debugging i found that the fault was on me.
    I did´t know that the server was for minecraft desktop only :-S

    Tried to install a Minecraft PE server called pocketmine using a different guide, but still using elements of your guides (script, screen ,mem setup… )
    I did succeed to get the server up and running, But there were no mobs and i think it was low performance i terms of graphics (lagging when i run fast and loading slowly)

    Do you have any advice regarding PE servers ??

    1. Do you have any advice regarding PE servers ??

      I do not have any experience with PE servers, sorry.

      1. Alexander larsen says:

        Its okay 🙂

        I took the easy way out.
        Had a almost broken android (asus transformer TF701) were the screen was broken.
        plugged it in and turned down the light on the screen. Started up a minecraftPE game and shared it.
        NOT pretty but it worked for now.

  77. Artur says:

    Amazingly done, followed your guide and now I have a home server, thnaks a lot for the time you put into it!

  78. Alex says:

    Thank you so much for the help with this!

    One question though: is it okay to drink tea in the steps where you said to drink coffee?

    1. One question though: is it okay to drink tea in the steps where you said to drink coffee?

      I make my coffee from green beans that I have to roast and then grind. This is necessary to make sure that I can be sufficiently patient. I don’t know what the equivalent would be with tea.

      1. Alex says:

        yeah good point it’s pretty quick to steep some tea…

        I actually have a quick question or two:

        1. I noticed that I need to be able to SSH into my Pi for the server to become available, but as soon as I’m in I can disconnect it and it still works. Why is this?

        2. A good 70% of my ssh attempts end up with this error:
        “ssh: Could not resolve hostname raspberrypi.local: nodename nor servname provided, or not known”,
        and sometimes this error:
        “ssh: connect to host raspberrypi.local port 22: Host is down”
        Is there any specific reason behind this? I’m on University wifi (both Pi and MacBook Pro) and the connection seems solid (although I realize this would be much nicer and secure on a personal network). For example, when I’m actually on the server or in the just in my Mac terminal with the ssh, connection is steady. But as soon as I exit it and start trying to ssh again, it becomes stubborn. One thought is it may have something to do with other Pis on my university’s network or something like that. I’m not sure though- just a networking noob here.

        1. I noticed that I need to be able to SSH into my Pi for the server to become available, but as soon as I’m in I can disconnect it and it still works. Why is this?

          Minecraft does not use ssh. We use ssh just to manage the server. Without ssh, you would need to connect to the Raspberry Pi physically to manage it (which means actually use a keyboard and a screen connected to it).

          A good 70% of my ssh attempts end up with this error (…) I’m on University wifi (both Pi and MacBook Pro)

          I draw your attention to the following segment in my instructions:

          If you are going to use the Raspberry Pi, it is best to connect it directly to your router: wifi is slower, more troublesome and less scalable. I have had no end of trouble trying to run a Raspberry Pi server using wifi: I don’t know whether it is possible.

  79. John says:

    Daniel,

    I came across a Raspberry Pi 3 Model B on-the-cheap at MicroCenter. Grabbed it and scoured for a good Minecraft Server guide. Yours was the best I came across.

    I currently have it up and running perfectly! No issues with the guide! Thank-you.

    Even have a free No-Ip service established. The Pi is plugged into a Kill-o-Watt…I’m curious how much power it will consume over time. So far it hangs around 1.7–>1.9 watts. Big whoop!

    Cheers 🙂

  80. Andy says:

    Hi Daniel, thanks for these instructions. Worked like a dream and I learned lots too. Also managed to extend it to working with Mods which my boy was very pleased about. Thank you.

  81. John says:

    Daniel,

    I wrote a quick cron job to do a nightly Raspbian reboot at 4AM. Seems to help free some lost RAM.

    Realized I’m not “stop”ing the server with that… So it’s not doing a proper shutdown. How could I tie your scripts together with an idea like this to ensure it’s always running, yet reboots nightly?

    Thank-you!

    1. I am not sure that rebooting periodically is generally a good idea. It is should be possible to let a Linux machine run for days, weeks, months… without problem. Certainly, I would not force a reboot as you may corrupt your data files. If you must reboot automatically, consider setting up minecraft as a service (e.g., https://github.com/Ahtenus/minecraft-init). Doing so is beyond the scope of my tutorial, however.

  82. ced says:

    Very precise tutorial ! Works fine with lastest version of Minecraft (1.11.2).
    I have just a problem with hostname of the raspberry : i connect it with the IP adress.
    It’s not a big problem and not linked with Minecraft (SSH connection work’s also uniquely with IP Adress).

    Thank you again for your tuto !

  83. Minimon says:

    Hey

    Just created a server using your tutorial and made it available on the internet for my friends (by openning port 25565).
    I had a question tho, is it possible to use a world we already used before? I was thinking about just copy pasting the world folder on the sd card but it looks like a bad practice.

    And thanks a lot for the tutorial.

    1. I had a question tho, is it possible to use a world we already used before? I was thinking about just copy pasting the world folder on the sd card but it looks like a bad practice.

      I think that if you shut down the server before doing what you suggest, it should work fine.

  84. Eduardo says:

    Hello. Thanks for your job, its a awesome tutorial.

    What do you suggest to do for restarting the server if it crash?
    I mean, some script that runs periodically your initial script or something more fine-tuning?

    thanks

    1. Eduardo Moñino Esteban says:

      Thanks for your quick answer.

      Can you explain me why it would restart?

      The script checks if there is a “screen” named minecraft, and if there isn’t it launch minecraft in a new screen named minecraft and breaks the loop if it has launched ok.

      After that, the script ends, it’s not running any more. So if minecraft crashes or if the screen get deleted, it wouldn’t relaunch because the script it’s not running anymore.

      Plus, if minecraft crashes, you still have the “minecraft screen” created, so even if the script is still running (don’t know how), it wouldn’t relaunch mincraft because it would find the screen named “minecraft”

      Thanks in advance, I hope you can find few minutes to answer.

      Nice day

      1. I think you mean: what happens if the java command starts the server successfully, but later the server crashes.

        I have not put it to the test, but I think that the following should do:

        until java ... ; do
            sleep 5
        done
        

        This should be called by screen, of course.

        Plus, if minecraft crashes, you still have the “minecraft screen” created, so even if the script is still running (don’t know how), it wouldn’t relaunch mincraft because it would find the screen named “minecraft”

        I don’t think it is true. If the Java command terminates somehow, the screen thread will terminate as well.

  85. Greg says:

    Daniel,

    Just bought my daughter an raspberry, does installing minecraft on rp3 give you additional tools/experiences different from Minecraft other traditional platforms? Or is it a similar experience but it’s just cool that you created a new platform to play on?

    1. I think that I answer this question in the last paragraph of the post. It is not going to provide you with a more powerful Minecraft server, obviously. The benefits, if any, are elsewhere.

      I just did it as a fun demonstration of what could be done.

  86. Jay says:

    Great post Daniel, works a treat. Would be great to add an edit/update at the end of the article on how to update the server to the latest build.

  87. Tim Na says:

    Great article, easy and everything worked out good. I do have question on maximum capacity of the player. I see currently it is set to 20 and my son asked if it can be higher. Have you seen the limit with setting you suggested above? I am using Pi 2.

    1. You should expect higher latency and less stability as the number of simultaneous players increase. I have not tested the server with anything close to 20 simultaneous players. I have run out of children.

  88. Ron Levenberg says:

    My son just asked me to set up a Minecraft server for him to use with my 7-year-old grandson. This well-written tutorial sounds like just the thing, especially since I just set up a home file server on a Raspberry Pi and I love the platform. Thanks for these instructions and also for your patience and sense of humor. I’m just glad I’ve been using Unix/Linux since 1978!

  89. Ron Levenberg says:

    I just received the Raspberry Pi 3 that I want to set up as a Minecraft server. I followed your instructions and everything worked fine. The server (spigot-1.11.2) is running fine.

    I did have one minor hiccup: If I connect to my server, which is called “mineserver”, using PuTTY, the server is not found. If I connect to its IP address, PuTTY finds it. If I connect to mineserver.local, PuTTY finds it. OK, that’s what your instructions said. However, I use PuTTY to connect to my first Raspberry Pi (my home file server) as “raspberrypi” and PuTTY finds it, but PuTTY does not find “raspberrypi.local”. I suspect this is due to the installation of avahi-daemon (per your instructions) on the Minecraft server but not on my home file server. Further detail is given at https://www.howtogeek.com/167190/how-and-why-to-assign-the-.local-domain-to-your-raspberry-pi/.

    Anyway, I’m ready to bring the new Minecraft server to my son’s house to try it out. It should nestle very nicely next to his router!

    Thanks.

  90. Wiseaxe says:

    Thanks so much- an excellent article! My 1.11.2 server is running great on my rasberrypi!

  91. Ross says:

    I have followed all steps, when I type ./minecraft.sh I get a message saying line 1 and line 3 command not found, any clues?

    Other than that, all works a dream!

    1. Please post the full error message.

  92. Hey. I couldn’t get PuTTy to connect to my raspberry pi (running Pixel in GUI mode). So I decided to do the rest on the TV my pi was plugged into without making it headless. I typed java -jar BuildTools.jar into the command line on the Pi and it was downloading working fine. I walked out of the room and I walked in 10 minutes later and the screen was just black. It had a signal and was on, but black. Im scared to do anything because the green light on the Pi 3 is still blinking so I think it is still downloading. Im not sure. What do I do? Please help.

  93. M. Veen says:

    Thanks for these great instructions! We followed every step carefully and the server now works very well on a Raspberry pi 3 with Spigot -1.11.2. As a final step we copied multiple worlds, settings-files and plug-ins etc. from our original laptop based craftbukkit server to the pi and it all seems to work perfectly well with the Spigot server. My son and his friends can now play on where they left off before the transfer to the pi. And they are very happy. Thanks again.!
    BTW: We use a 32 Gb class 10 sd card.

    1. M. Veen says:

      Update: soon after above post, the server started crashing. On bukkit.org we found a fix : change the Xms to -Xingcgc and reduce the Xmx value. We randomly tried -Xmx800M and It worked. Don’t ask why. I’m in no way a computerguy. Source: https://bukkit.org/threads/xms-and-xmx-setup.14601/

      1. The incremental garbage collector (-Xingcgc) may or may not be a wise choice. It has been deprecated and will no longer be supported in future Java versions. I do not think it is expected to be useful.

        The Xms flag should not harm you if all you are doing on the machine is to run the server.

        Reducing the value passed to “-Xmx” may or may not improve the stability.

  94. OrangePi says:

    Used this tutorial to make Minecraft Server on Orange Pi PC. As for now seems to work well for 2~4 players with view distance of 4.

  95. Adam says:

    Daniel,

    I’ve successfully established a server on a local network but I’m having a lot of difficulty trying to get the server to work online. I’ve been pulling my hair out trying to wrap my head around port-forwarding, dynamic DNS, and creating a static IP address for the pi. Any chance you might expand on these topics in the blog post?

    Additionally, if anyone has gotten their server to work online please let me know!

    Thanks

    1. I’ve been pulling my hair out trying to wrap my head around port-forwarding, dynamic DNS, and creating a static IP address for the pi. Any chance you might expand on these topics in the blog post?

      No. No chance.

      Exposing a server on your home network to the Internet involves configuring securely your router/firewall as well as securing the Raspberry Pi to prevent remote exploits.

  96. Andrew says:

    Not sure if this was addressed in an earlier comment, but do you have any tips on running the server with more RAM (or oppositely why I shouldn’t/why the default is enough). From researching on google, I believe that I would have to just edit the minecraft.sh script and add a larger RAM value in the .jar execution, but I’m not too sure. Any help would be greatly appreciated.

    1. Not sure if this was addressed in an earlier comment, but do you have any tips on running the server with more RAM (or oppositely why I shouldn’t/why the default is enough).

      There is no Raspberry Pi with more than a gigabyte of RAM at this time.

  97. Jerry says:

    This tut is amazing everything has worked until:

    “Java -jar -Xms512M – Xmx1008M spigot-1.11.2.jar nogui”

    Returns the error

    “Unable to access jarfile Xmx1008M

    1. You typed Java -jar -Xms512M – Xmx1008M spigot-1.11.2.jar nogui according to your comment. The tutorial specifies java -jar -Xms512M -Xmx1008M spigot-1.9.2.jar nogui. These are not the same strings.

  98. Appi says:

    Hey Daniel,
    thank you for this tutorial it helped me very much, but I need your help. Everything worked until I entered the command to start the server with screen.

    So i wrote this command:
    ./minecraft.sh

    and then this showed up:
    -bash: ./minecraft.sh: Permission denied

    hope you can help me, thanks in advance.

    PS:
    The command pwd works, now I am hacking into the NSA’s database.

    1. There is a whole bunch of commands to type before you got to ./minecraft.sh. Please follow the tutorial step by step, don’t skip anything.

  99. Griffon says:

    Trying to update to 1.12, the kids tell me clients have stopped working but getting an error getting the new spigot. Tried a couple different ways.

    pi@pi-mine:~/minecraft $ java -jar BuildTools.jar –rev 1.12
    Loading BuildTools version: git-BuildTools-7f7e531-60 (#60)
    BuildTools
    [email protected]
    Exception in thread “main” org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: /home/pi/minecraft/BuildData
    at org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:582)
    at org.eclipse.jgit.api.Git.open(Git.java:117)
    at org.eclipse.jgit.api.Git.open(Git.java:99)
    at org.spigotmc.builder.Builder.main(Builder.java:223)

    Directory seems ok and Bulddata is there.

    pi@pi-mine:~/minecraft $ ls
    apache-maven-3.2.5 commands.yml plugins walkerworld_the_end
    banned-ips.json CraftBukkit server.properties whitelist.json
    banned-players.json eula.txt Spigot work
    BuildData help.yml spigot-1.11.2.jar world
    BuildTools.jar logs spigot.yml world_nether
    BuildTools.log.txt minecraft.sh usercache.json world_the_end
    Bukkit ops.json walkerworld
    bukkit.yml permissions.yml walkerworld_nether

    Appreciate any suggestions, hate to scorch earth. Hopping I’m just missing something simple.

    Thanks!

    1. Griffon says:

      Looks like the part I was missing is you need rm -dRf your old Build directory. Guess I wrongly subconsciously thought it would over overwrite any old stuff.
      I removed BuildData, CraftBukkit and Bukkit. Not sure if the other two needed removal or not, but seems to fetching and building now.

  100. Joris says:

    Hey Daniel,
    i’m loving your tutorial but i have run in to a error and can’t seem to fix it.
    when i type screen-r minecraft it says :
    There is no screen to be resumed matching minecraft.
    i have redone all of your steps 2 times now starting again from
    nano /minecraft.sh
    i am in pi@raspberrypi:~/minecraft $
    can u please help me ?
    many thanks.

    1. Have you typed ./minecraft.sh while in the bash shell?

      1. Joris says:

        Hello daniel,
        i was just typing my comment that i couldent get it working.
        But then i saw that i diden’t change 1.9 to 1.12
        again
        many thanks for your great tutorial
        Joris

      2. Loran says:

        Hey Daniel!

        Thanks for this great tutorial. I have gotten to the same part, with the same problem.

        I have quintuple checked my minecraft.sh file, and my jar file (spigot-1.12.2.jar) is named correctly.

        When I start the server with ./minecraft.sh it returns to the prompt as expected, without any errors. However, I can’t connect to the server now. Not with raspberrypi.local, not with it’s local IP address and also not with the global IP address of my router. It seems it doesn’t run.

        When I type screen -r minecraft it returns the same error as Joris is getting: There is no screen to be resumed matching minecraft.

        Could you tell me what’s going wrong? I’m really confident I did everything right.

        Thanks so much in advance,

        Loran

        1. I am confident that I did everything right

          Ok, so you launched the server initially and it worked, you got the server working. Correct, right? Because this is not clear from your comment.

          Note that these instructions definitively work if you follow them.

          1. Loran says:

            Thanks for the response!

            I found the mistake I made. I resumed setting things up right after mkdir minecraft && cd minecraft, so I didn’t realise I wasn’t in /home/pi/minecraft when executing the wget command.

            I was too quick to say I did everything right, but it was a sneaky mistake.

            I’m afraid I’m going to have to wipe my SD clean and start over. Or do you know how to uninstall the spigot package without undoing all the previous settings?

            Thank you,

            Loran

            1. You can move files with the mv command.

              1. Loran says:

                I realised that after I did it the hard way. It’s up and running without problems now, though. 🙂

  101. Casey says:

    Daniel,

    I initially used your tutorial months ago but never put it in play. I wound up having to use it again to rebuild the idea from the ground up. Outstanding work! Thank you for taking the time to make it really easy to build the simple server.

    1. Yes, a Raspberry Pi 4 could definitively help, especially if you get the version with 4GB. The more memory, the better.

      Note however that a Raspberry Pi 4 is not needed.

  102. Stefan says:

    Well hello there. 😉
    After a long time experimenting with the Pi, I finally found a good tutorial for once. Everything worked really well, I didn’t even encounter one problem. Thanks for this guide!
    So, I wanted to ask if you could do/already did/can recommend a good tutorial on how to make the server avaible on the internet?
    Thanks a lot!

  103. Ludvig says:

    I’m with Stefan, that would be great!

  104. Ludion says:

    Hi, I have a little problem.
    When I try to do
    “-list”
    after I did
    “sudo apt-get install netatalk screen avahi-daemon”
    it replies with
    “bash: -list: command not found”
    and I tried reinstalling it… and it did the same thing! If you have any ideas, please reply.

    1. The command is screen -list.

  105. Lucas Owen says:

    is there a way to set this up so i can play with friends from foreign countries? also how can i configure the server (such as creative mode) can I setup commands? such as /gamemode 1 or /kill

    1. TinyZombie says:

      If you only want yourself or certain players to have commands, then just “op” the player.

      From the server command line: op playername[enter]

      That player will now be able to use commands. The server.properties file will let you control what level of commands they can use (game only or server control as well).

      You can also set the game mode from the server.properties file, so if you want the world in creative, that’s where you do it. The default, I believe, is survival on easy (changed mine to hard).

  106. TinyZombie says:

    Oh, and Daniel, thanks for the well written guide.

    I used Raspbian Stretch Lite, which works great.

    For others wanting to use Lite, you’ll need to install Git and Oracle Java. Both are in the repos, but the Java version is older, so I manually installed the latest (although I’m sure the version in the repos would’ve worked fine).

    And if you want to build Spigot for a specific version of Minecraft, add the version after the build command with –rev {version #}. For example, I’m still running 1.12.1, because Optifine is not available for the latest 1.12.2 version yet (and my computer is too slow to play without Optifine), so I built Spigot with this command.

    java -jar BuildTools.jar –rev 1.12.1

    I’m really surprised how well this works. I may just retire the old laptop I’ve been using as a server.

  107. Joris says:

    Hey,
    great tutorial!
    But when I run the command :
    Sudo nano /etc/default/tmpfs
    It just gives me a blank file.
    I used WinSCP to check
    but there is no tmpfs file.
    I made sure I installed all packages.
    can you please help me?
    many thanks

    1. Because you followed the guide step-by-step, you have the latest Raspbian, have you not? Just to confirm, can you type uname -a in a shell and report back on the result?

      1. Joris says:

        I am pretty sure I have the newest version but anyways:

        Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux

        that is the output that I get

        1. Good.

          Open the file /etc/fstab with a text editor such as nano as root (e.g., type sudo nano /etc/fstab). It should look something like this:

          proc            /proc           proc    defaults          0       0
          /dev/mmcblk0p6  /boot           vfat    defaults          0       2
          /dev/mmcblk0p7  /               ext4    defaults,noatime  0       1
          

          Append a new line:

          tmpfs           /tmp            tmpfs   nodev,nosuid,size=1M 0    0
          

          Then reboot. It should do the trick.

  108. TinyZombie says:

    To edit the /etc/fstab file you need to enter:
    sudo nano /etc/fstab

    not

    sudo nano /etc/default/tmpfs
    as that will try to edit the wrong file.

    1. Thank you. You are correct.

  109. Oliver Mullen says:

    When I type in

    if ! screen -list | grep -q “minecraft”; then
    cd /home/pi/minecraft
    screen -S minecraft -d -m java -jar -Xms512M -Xmx1008M spigot-1.9.jar nogui
    fi

    It says it is 5 lines. Is that OK?

    1. If you have correctly copied the script, you will have four (4) lines.

  110. RickG says:

    Daniel,
    First of all, thanks for the great tutorial, it is very easy to follow.

    Everything went well for my setup, except that I cannot connect to the server from either of my daughters’ Android tablets. They are running the full (paid) version of Minecraft and when I try to add/connect to the server, it asks for the server name, IP address and port. I used the set server name, I used the same IP address I used for Putty and used port 25565. After logging into xbox live (required by MS), the tablet does not find the local server (it does see the three partner Internet servers). You mention connecting to “raspberrypi.local”, but can you do that from the client? The only issue I see during the server load is “Java HotSpot(TM) Client VM warning: You have loaded library /tmp/libnetty_transport_native_epoll8344076825937148986.so which might have disabled stack guard. The VM will try to fix the stack guard now. It’s highly recommended that you fix the library with ‘execstack -c ‘, or link it with ‘-z noexecstack'”. Aside from that one warning, the server load appears to complete and is running, but I cannot find a way to connect to it. Stopping the server also works as you outlined. Anything else I have overlooked?

    1. These instructions are for the regular Minecraft, not the Pocket Edition which is entirely different software.

      1. It says so at the beginning of the tutorial:

        We are going to setup a Minecraft server for the regular (desktop) Minecraft. There are other Minecraft versions, such as the Pocket Edition, but they require different software.

      2. RickG says:

        Thanks for the clarification, I did not realize the tablets were actually running PE. Guess I will need to install the full version on their desktops or use additional Raspberry PIs for clients.

  111. TinyZombie says:

    @ Rick G,
    Minecraft PE, along with other versions based on the Bedrock Engine (like the Windows 10 version) are cross-platform compatible now, but they do require a different server.

    Technically there are 2 “Desktop” versions now. The original Java version, which is no longer true Minecraft according to Mojang and Microsoft, and the Windows 10 version, which is one of the true Minecraft versions. All version not using the Bedrock Engine are now considered to be “Editions” (like Java Edition) while all versions based on the Bedrock Engine are now Minecraft (PE, Windows 10, XBox, Ninetendo Switch).

    So “Minecraft” servers are now cross-platform compatible with all versions based on the Bedrock Engine, while the Java Edition server is only compatible with, you guessed it, Java Edition.

    Clear as mud, right?

    As far as I know, Mojang/Microsoft have not released any server software for the Bedrock Engine versions to the public, so you’d have to use a Realm or other commercial server.

    To use the server in this tutorial you’ll have to use the Java Edition of the game, and while it is possible to run that on a Raspberry Pi, it is hard to set up and does not run very well. And for clarity, I’m talking about the game software here, not the server. A Raspberry Pi3 can run a server quite well.

    Running the Java Edition Minecraft game, however, is quite another story. For that you are better off running it on a more typical PC with a powerful CPU, lots of memory and a good graphics card/GPU.

  112. TinyZombie says:

    I’ve been playing around with an ASUS Tinker Board for a week or so, and while the hardware is great, the “Linaro” Debian TinkerOS is a steaming pile of poo. After spending quite a lot of time trying to get it to run as well as Raspbian does on my Pi3, I decided that the Tinker Board might be better used as a Minecraft Server.

    After all, you don’t need video or graphics acceleration, or sound, or any of the other things that are barely functional or just plain broken in TinkerOS. You just need to be able to boot up, connect to a network and install Java, which you can do on TinkerOS. So I installed the latest version of Oracle Java and once again used this tutorial to get the server up and running on the Tinker Board.

    A quick initial comparison did not reveal any significant performance difference between my Pi3 server and Tinker Board server, but we did only have 2 people logged in. I imagine the difference would become apparent with more players online, since the Tinker Board is roughly twice as fast as a Pi3, with twice as much RAM (2GB) and true Gigabit Ethernet that’s not sharing bandwidth with the USB ports.

    Most of the tutorial works the same on the Tinker Board, adjusting for Raspberry Pi specific differences, like Raspbian vs TinkerOS (and the fact that TinkerOS is harder to configure).

    You will have to install Java, git, screen, and even nano (or use something else for editing). I recommend you use the webupd8team PPA for Java, since it will update Java like other packages (also install dirmngr if you are going to use the PPA tutorial).

    Building the Spigot sever is certainly faster, but it still takes quite a while. It also launches the server in about half the time. It’s been pretty stable, so far.

    Just thought I’d share this with your readers.

  113. koen says:

    After a year doing other stuff with my Pi, I installed Minecraft on a fresh installation with this manual. And it’s working like a charm again.
    I made a backup of my old world. Copied it to the new installation. (And started the server again.) It took awile for the game to logon, some error about old achievements, some new created instant. But the best, i am in my own world again.

    Nice to be back. And woooh there is much changed in the game. 🙂

  114. Vortex says:

    Thank you very much ! Works well 😀

  115. Tony H. says:

    Daniel,

    First I’d like to thank you for writing such an in-depth guide on how to get this server running. I’ve been searching the web for almost a year on how to do this and this guide has gotten me the farthest so far. I had used your guide earlier this year to set one up but when more than one person would join, the additional people wouldn’t have any items in their inventory. So now that I’ve gone through pretty much everything else on the web, I’ve come back to your guide. I’ve followed this step for step, verbatim, and can not seem to get this to work. I’ve reformatted my SD card and started from scratch 5 times in the last three days. My problems lies with not being able to connect from my kids android devices. I don’t see the server available and when I try to add it in the server tab it doesn’t see it. Can I send you some logs in order to help my trouble shoot this? Thank you.

    1. My problems lies with not being able to connect from my kids android devices. I don’t see the server available and when I try to add it in the server tab it doesn’t see it. Can I send you some logs in order to help my trouble shoot this?

      I think your comment gives me enough information to troubleshoot this without further information. Let me quote the third paragraph of the guide: We are going to setup a Minecraft server for the regular (desktop) Minecraft. Android devices don’t run what I call the regular (desktop) Minecraft.

      1. Here is the end of the third paragraph:

        To be clear: if you are running Minecraft on a smartphone, a console or a tablet, it is probably not compatible with the regular Minecraft.

        I’m sorry, I don’t know how to deal with these other Minecraft editions.

        1. Tony H. says:

          Thanks… guess I should have taken my time to read that!

  116. Troy says:

    Thank you so much for this! I had a spare RPi3B laying around, and my daughter wanted to setup a server for her friends to play on. So, following your tutorial after installing Noobs(lite) and the Raspian (full) distro, worked a treat. Oh, you weren’t kidding about getting a coffee, that took about 40 minutes!

    We’re up to spigot1.12.2 as of January 2018, and everything is still relevant.

    Regarding the external connectivity.
    1) I have a dynamic IP address assigned by my ISP
    2) I have an Untangle home server, so I have it forwarding a random external port number to the raspberry PI’s default minecraft receiving port. Doing this on any modern modem is pretty simple check out http://www.portforward.com
    3) The daughter turns the PI on, only when they want to play
    4) The daughter types in “Whats my IP” in google, then tells her friends via steamchat.

    Again, thank you for the great post.

  117. Carlos Otero says:

    I already have my server running on a raspberry pi 3 with the last distribution of raspbian, I only had problems accessing the hostname by default, so I’m using the assigned ip.

    I opened the ports of the router and I have the server online also through no-ip.com generate a free dns for my domain and with the dynmap plugin I have generated a vision of the map !!.

    For those interested, they can access the server in the latest version available (1.12.2) and check for themselves how a minecraft server works in a raspberry pi 3 !!!

    IP: shibuya.serveminecraft.net
    Interactive Online Map: shibuya.serveminecraft.net:8123

    Excellent work, thank you very much !.

  118. Dragan says:

    THX. Very much. My children are very happy with the Minecraft Server.

    Good Work.

  119. Torsten says:

    Hi, do you have any proposal for a free Minecraft client?

    1. TinyZombie says:

      The only version of Minecraft that is free is the Raspberry Pi version, which is a really stripped down version designed for educational use. It is not compatible with any other version or multiplayer, so it’s probably not what you want.

      For all other versions you’ll have to pay for it. If you buy the Java Edition (for which this tutorial is written) you will also get the Windows 10 version for free.

      Currently the Java Edition is $26.95, and that’s the one you want to play the server in this tutorial.

  120. Raffi says:

    Nice tutorial very easy to go along and recreate, now i have a Raspberry Pi 3 running a Minecraft Server YAY 🙂
    Some pitfalls to note:

    running: “java -jar BuildTools.jar” did not work for me, the Spigot install stoped with a fatal error, my solution is running the BulidTool.jar with some extra Java arguments e.g. java -jar -Xms512M -BuildTools.jar.

    Also i had some trouble withe the minecraft.sh file, i typed chmod -x, insted of chmod +x, maybe some kind note.

    my 3rd mistake was that i did not set up the Pi for autologin, it seemt that i overred this part in the raspiconfig section. I sugesst some kind of checklist after this section so you can verify your Pi is setup correctly.

    And at last a short question is there a way to check if the /tmp in memory is working ?

    1. Raffi says:

      some kind of note would be helpful

  121. Mike says:

    My 9 year old son and I walked through this guide today.

    I wanted to show him how to setup a server properly. It worked and was very helpful.

    Thank you for this wonderful guide.

  122. Jay says:

    Dr. Lemire,
    I can open the server using “java -jar -Xms512M -Xmx1008M spigot-1.9.jar nogui”. When I give “./minecraft.sh” I get a “no such file in directory” error. Is there any significant difference between these two commands or do they both do the same thing? If there is a difference, do you have any ideas where I am going wrong? Thanks for the brilliant guide!

    1. You created the minecraft.sh file, as per my instructions, right?

  123. Harrison says:

    Thank you for these amazing instructions! I followed them and everything worked. I hit one problem but it turned out I didn’t read your instructions correctly and once I made the correction everything was fine 😉 I had wanted to make a Minecraft server on my Raspberry Pi for a while and you made it a breeze setting everything up.

  124. As I have an eight-year-old grandson who is fond of Minecraft, and a multiplying number of 3D printers with attached and mostly-idle Pi3s, I find your narrative of use.

    Also find interest in your venture into offering instructions to a larger audience. 🙂

  125. Spoigh says:

    Brilliant. I had little hope when I tried this because its 2 years old and I never had good experience with 2 year old tutorials. It all worked like a charm, great stuff man. Thanks for posting this

  126. Zachary says:

    Hey, I just built a Minecraft sever and I noticed that windows has a new update. Now I can’t get into my server. Any suggestions??

    Thank you!!!

  127. Lisa says:

    I set up everything today, but when I try to connect to the server Minecraft shows me a failed message:

    Java.net.connectException: Connection timed out: no further Information

    I can’t figure out where this is coming from…

    1. Zachary says:

      I had the same problem! I think the only option is to redo the whole server.

  128. Bo Mortensen says:

    Hi there

    Thank you for this tutorial, its working good for me, except that I can not get it to starte the server on reboot.

    My question is, however: Is it possible to get the server build latest version of spigot when running “sudo java -jar BuildTools.jar”, latest version is 1.13.1, but the version installed is 1.12.2.

    Thanks in advance

    1. Koen says:

      Same here. 🙁

      Just installed Minecraft server. BuildTools.jar runs perfect building a 1.12.2 file.
      But the Minecraft game is version 1.13.1.

      Hoping Spigot is updating their files as soon as possible.

      1. Koen says:

        Trying build a new jar file with the command:

        java -jar BuildTools.jar --rev 1.13.1

        Going to drink some coffee. 🙂

        1. Koen says:

          It did the trick.

          java -jar BuildTools.jar --rev 1.13.1

          Is forcing to get a new spigot-1.13.1.jar file. This one can be run to finish this hole plan. I tested it and it works. Well not stable, but it could also be possible to the running Domoticz server.

          It was also possible to restore my old november 2017 world backup. :))

  129. Tom Wilson says:

    Hi,
    I’m a little stuck as when I run the command “java -jar BuildTools.jar” a spigot file is not being created meaning I can’t continue with the tutorial. If you have any thoughts as to why I would really appreciate it!
    Tom

    1. Koen says:

      And my server is telling version 1.13.1 is outdated.

      It has to do with a newer version, see: https://www.spigotmc.org/threads/bukkit-craftbukkit-spigot-bungeecord-1-13-2.344189/

      Without required arguments i still get version 1.12.2.
      With required arguments –rev 1.13.2 it was telling me, still file doesn’t exist.

      BUT, this last 15 minutes ago, it does exist. So i am creating a new jar file with: java -jar BuildTools.jar –rev 1.13.2

  130. Jessie Westlake says:

    Can someone tell me what my screen should look like while I’m waiting “forever, coffee run, lunch, etc”?

    After typing sudo java -jar BuildTools.jar --rev 1.12.2 git does its thing, minecraft is built and the server.jar is downloaded, finally my installation is sitting at

    Final mapped jar: work/mapped.cf6b1333.jar does not exist, creating!
    Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true

    I can’t tell if it is froze, errored out, or doing what it’s supposed to. I ctrl+C out of the install a few times, started fresh and did it again, and still the same result. I made sure there were no environment variables named _JAVA_OPTIONS for my user and using sudo. I tried different versions of minecraft and BuildTools, with the same result.

    How do I know if the installation is actually ongoing?

    1. So we are clear, the command you describe is not part of this tutorial.

    2. Koen says:

      Don’t drink coffee for 5 minutes. It can take up to 45 minutes or maybe longer.

    3. Greebo says:

      I made the same experience and after waiting patienty, I can tell you: it’s not frozen.
      Unfortunately the process is running into some errors later.

      ...
      Tests run: 931, Failures: 0, Errors: 0, Skipped: 3
      [INFO]
      [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ bukkit ---
      [INFO] Building jar: /home/pi/minecraft/Bukkit/target/bukkit-1.12.2-R0.1-SNAPSHOT.jar
      [INFO]
      [INFO] --- maven-shade-plugin:3.1.0:shade (default) @ bukkit ---
      [WARNING] Error injecting:org.apache.maven.plugins.shade.mojo.ShadeMojo
      java.lang.NoClassDefFoundError: org/codehaus/plexus/util/xml/XmlStreamWriter
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
      at java.lang.Class.getDeclaredConstructors(Class.java:2020)
      ...

      Last year the instructions from Daniel (thanks a lot!) worked quite well.
      I don’t know what happened in the meantime.
      Maybe something in Raspian was changed, impacting these BuildTools or something in the BuildTools / CraftBukkit?!

      If someone has a solution I would be pleased if it could be published here. Thank you!

  131. Guilherme Baracho says:

    I did everything as said and it worked perfectly
    but what I also wanted to do a modded server on the pi to
    do you have any tutorial on that?

    1. I don’t have instructions on how to add “mods” but that is not difficult.

  132. Darius says:

    When I ran the command, “java -jar BuildTools.jar” everything installs except that I see errors at the end of the command line dump.

    Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at org.objectweb.asm.ByteVector.<init>(ByteVector.java:55)
    at org.objectweb.asm.ClassWriter.toByteArray(ClassWriter.java:554)
    at net.md_5.ss.model.ClassInfo.toByteArray(ClassInfo.java:120)
    at net.md_5.ss.SpecialSource.map(SpecialSource.java:123)
    at net.md_5.ss.SpecialSource.main(SpecialSource.java:46)
    Exception in thread "main" java.lang.RuntimeException: Error running command, return status !=0: [/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/bin/java, -jar, BuildData/bin/SpecialSource-2.jar, map, --only, ., --only, net/minecraft, --auto-synth, -i, work/minecraft_server.1.13.2.jar, -m, BuildData/mappings/bukkit-1.13.2-cl.csrg, -o, work/mapped.72545335.jar-cl]
    at org.spigotmc.builder.Builder.runProcess0(Builder.java:704)
    at org.spigotmc.builder.Builder.runProcess(Builder.java:649)
    at org.spigotmc.builder.Builder.main(Builder.java:393)
    at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:29)

    Then when I type ls, I see no .jar file with spigot in its name. Any recommendations?

  133. Garrett says:

    Hi Daniel,

    Thanks for your tutorial! It’s been very helpful thus far. I’m running into some issues running BuildTools.jar and I haven’t been able to find anything online regarding this issue. My Pi 3 is unable to run this command because it only detects 237MB of memory. Running vcgencmd get_mem arm returns 998MB of memory, so I’m not sure why this is occurring. Do you have any tips?

    1. Justus says:

      Having the same problem! I build a server following this guide step-by-step so I can confirm this guide works!
      Did it on the same raspberry Pi as I’m using now… maybe something with an update on the Pi itself?

      1. Spremusik says:

        Had the same problem on PI
        I tried to build on windows and got the same error.
        It was fixed by installing the 64 bit java 8, now the Buildtools works in windows.
        Will try to install Java_8_64 bit on PI and post the results

  134. Chris says:

    Hi,

    I had the same issue, but I fixed it by running the suggested command in the error to include a specified memory allocation:

    pi@raspberrypi:~/minecraft $ java -Xmx224M -jar BuildTools.jar
    BuildTools requires at least 512M of memory to run (1024M recommended), but has only detected 216M.
    This can often occur if you are running a 32-bit system, or one with low RAM.
    Please re-run BuildTools with manually specified memory, e.g: java -Xmx1024M -jar BuildTools.jar
    pi@raspberrypi:~/minecraft $ java -Xmx512M -jar BuildTools.jar

    Then it worked for me. Didn’t have to install a different version of Java, although I did think about it.

    -Chris

  135. Ty Wilson says:

    Hey. I wanted to start up a server to play with some internet friends on Minecraft. I got to the part where I needed to start up the server and it said it couldn’t access the jar file Also. How does one make this a public server? Thanks!

  136. Artic says:

    Does this work with minecraft sp or just minecraft legacy?
    Because I’ve done everything correctly and the server runs, but I just lose connection when I try to join it.

  137. Graham Merrick says:

    Hi, Just an update for anyone pulling their hair out!, I have just yesterday setup a Pi craft server using many different varying methods posted on the web, I found this thread as the best commentary for the average Pi user. My setup consists of a Raspberry pi 3B+ Raspian Stretch OS latest update from 04-08-2019 (8th of April 2019). Spigot 1.13.2 server installed. I have installed the following:
    – Screen (although helpful Spigot 1.13.2 fails to load in screen I am yet to go through the documentation for Screen to work out how to set it up correctly)
    – I created a plain bash file as the following: (please note going from memory here! beware if copying below!!)
    cd /home/pi/minecraft
    java -Xms512M -Xmx992M -jar spigot-1.13.2.jar

    gave the above .sh file executable permissions (sudo chmod +x)
    created a line before the exit line at the bottom in /etc/rc.local to execute the server at reboot as ./[insertabovefilenamehere].sh.
    (Please note if you are setting this up and want to /OP yourself, you need to have access to the console. In this case prior to rebooting the Pi after you have setup the above start the server by going to the /home/pi/minecraft directory (or wherever you put it) and start the .sh file that you have just created. This will give you access to the console (I cannot get console to work if the server boots on reboot!) I’m sure that Screen may help with this but I have not managed to get it to run in screen mode yet.
    Please note I have changed the above comment in the .sh file from -Xmx1008M to Xmx992M this allows the Pi some memory (16M) for overhead as suggested by many other forum users. Spigot runs freely and I have also had up to two players with no issues view distance is good at 10 with 2 players however I will try and load it up soon and see how it goes.

  138. denver dial says:

    thank you so much this tutorial was great. easy, simple amd straight forward.

    i do however have a couple questions. the spigot file 1.9 that you used. that means your server runs minecratf 1.9 right?

    mine is labled 1.13.2 and my server opened in 1.13.2 but i was hopping for a 1.14.2 server. is their a easy wa to update the server to a newer version of minecraft?

  139. Alex says:

    Hey! thanks for this tutorial but when I try to run java -jar BuildTools.jar it says that command java is not found. Any idea how to fix this?

    1. Quoting from the instructions (first step):

      You need to put the latest version of the Linux distribution for the Raspberry Pi, Raspbian, on the SD card. My instructions assume that you get the full version. For some reason, many people prefer the “lite” version, but then they can’t follow my instructions. Please use the full version (the lite and the full versions are both free).

  140. Per says:

    This works fine on a Pi 4 with 4GB RAM as well.

    I set up a server for my kid for Minecraft 1.12.2 on a Raspberry Pi 2. When I tried to make a new SD-card for the latest stable Spigot server (1.13.2) it complained about too little memory. But the Raspberry Pi 4 just came out, so I got one of those. I skipped the step which assigns the minimum amount of memory to the GPU, because I guessed that there will be enough CPU RAM anyway. Now it works.

  141. Jack Bailey says:

    How can I intergrate
    a) Auto server restarting with a plugin
    b) /restart functionality.

    Using the pi3b

  142. Arjun says:

    How can i set up port forwarding, I tried and it is giving me a error, i also need help setting up a dns

  143. Michael says:

    Thanks for this tutorial. When I try to connect to the server from another laptop for the first time it gives me the “failed to connect to the server” io.netty.abstractchannel$annotatedconnectexpectation”. I tried direct connect to the IP address that came up when I input screen -list and also tried the Add Server. Both returned this error. Laptop is connected via wi-fi and tried it with the Pi on ethernet and wi-fi on seperate occassions. How do I know if the Pi server is running? Your tutorial said to connect to raspberrypi.local…. do I type that in as the IP address? Where do I input that?

    1. Michael says:

      When I disconnect from ethernet and switch to wi-fi, did I stop the server? Do I need to restart it somehow?

      1. Michael says:

        Sorry for allthe comments. How do I do this: “Have a Minecraft player connect to raspberrypi.local” ?

        1. Michael says:

          Disregard! I must have stopped the server when I switched the pi to wifi. It’s working now, but I did not connect to “raspberrypi.local”, instead I added the server by IP address

  144. netherwort says:

    My server is running 1.13.2, and almost every time I try to connect I get a connection timed out message. After I try to connect a few times the server crashes, and for a few seconds before the screen terminates, there is a bit that says it failed because it could not find a file with the name “./start”.
    The pi only has access to 2.1 or so amps, I don’t know if that is relevant.

  145. Rubens says:

    I am setting up a sever on a Pi 4 with 4GB ram and i was wandering if -Xms and -Xmx was the ammount of ram dedicated to the server. If so can i just change it to -Xmx3800M or do i have to do it another way?

    Thanks.

    1. Right. You might be able to increase the memory budget with these flags. Do not increase it too much otherwise Java may hog too much memory.

      1. Rubens says:

        Thanks, could you prehaps give me a margin not to exede when it comes to dedicating memory. Furthermore I will only be running the server on the pi so does it still matter if it hogges all the memory.

        1. If the system runs out of memory and you have partitioned enough disk space, it will go to disk which could seriously hurt the performance. Failing that, the system may fail… Thankfully the Linux kernel and other services should be able to run well with a few hundred megabytes. I would expect that keeping 500 MB for the non-minecraft systems should be more than enough.

          1. Rubens says:

            Thanks so much this has been so helpful!

          2. Rubens says:

            Um when i start the server with “java -jar -Xms512M -Xmx2800M spigot-1.14.4.jar nogui”
            i get this error
            “java.lang.OutOfMemoryError: Metaspace
            at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
            at java.lang.ClassLoader.defineClass(ClassLoader.java:1016) ~[?:?]
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) ~[?:?]
            at jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802) ~[?:?]
            at jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700) ~[?:?]
            at jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623) ~[?:?]
            at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[?:?]
            at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[?:?]
            at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
            at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
            at java.lang.ClassLoader.defineClass(ClassLoader.java:1016) ~[?:?]
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) ~[?:?]
            at jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802) ~[?:?]
            at jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700) ~[?:?]
            at jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623) ~[?:?]
            at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[?:?]
            at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[?:?]
            at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
            at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
            at java.lang.ClassLoader.defineClass(ClassLoader.java:1016) ~[?:?]
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) ~[?:?]
            at jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802) ~[?:?]
            at jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700) ~[?:?]
            at jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623) ~[?:?]
            at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[?:?]
            at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[?:?]
            at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
            at net.minecraft.server.v1_14_R1.RegionFileCache.(RegionFileCache.java:14) ~[spigot-1.14.4.jar:git-Spigot-065a373-763e560]
            at net.minecraft.server.v1_14_R1.IChunkLoader.(IChunkLoader.java:16) ~[spigot-1.14.4.jar:git-Spigot-065a373-763e560]
            at net.minecraft.server.v1_14_R1.PlayerChunkMap.(PlayerChunkMap.java:102) ~[spigot-1.14.4.jar:git-Spigot-065a373-763e560]
            at net.minecraft.server.v1_14_R1.ChunkProviderServer.(ChunkProviderServer.java:48) ~[spigot-1.14.4.jar:git-Spigot-065a373-763e560]
            at net.minecraft.server.v1_14_R1.WorldServer.lambda$0(WorldServer.java:86) ~[spigot-1.14.4.jar:git-Spigot-065a373-763e560]”

            im using a pi 4 4gb

            1. Are you sure that you have access to the 4GB? The OS is 64-bit or 32-bit? Getting Java to use all of the available memory requires support at the kernel level. Typically, 32-bit systems do not give access to a single process to more than 2GB or 3GB.

              Type

              uname -m
              

              If you have a 64-bit system, you should see aarch64 or the equivalent. If you don’t then you probably can’t use 4GB.

              1. Rubens says:

                So I got aarch71 what does that mean?

                1. I do not know what “aarch71” means.

  146. Borja Sangaz says:

    Hello.
    I have been following your tutorial, and everything was installed and started running, on a Raspberry 3b+ with RaspbianBuster (actual version) and Minecraft 1.14.4 (and the same version of the Spigot), almost without problems exept when trying to run java -jar BuidTools.jar where I get the following error:
    BuildTools requires at least 512M of memory to run (1024M recommended), but has only detected 224M. This can often occur if you ar running a 32-bit system, or one with low RAM. Please re-run BuildTools with manually specified memory, e.g: java -Xmx1024M -jar BuidTools.jar“.
    After running it as java -Xmx1000M -jar BuidTools.jar, the rest goes very smoth, exacty as in the tutorial is described (of course, using always the version 1.14.4 instead of the 1.9).
    The real problem comes when I start running the server and playing, as it kicks me out with a “waiting timeout” message (sometimes after 5min or less, sometimes after 20-30min), and it goes offline, not only the MinecraftServer, but also the Raspberry (cannot even log in with VNC), and it does not work at all until it gets manually restarted… but when I come again into the server to play, everything I had in the inventary is lost!! 🙁
    Obviously, after a couple times having to restart manually the server and losing everything (and the time it needs to restart everything), it gets veeeery anoying 🙁
    We are only two persons playing, and the RasPi (as well as both computers) is connected to the router with cable instead of WiFi, as it goes faster.
    Do you have an idea how can this can be solved?? And/or why is it happening??
    Thanks a lot and greetings.

  147. DJ Borowski says:

    Hey, I was trying to set the server up as a Raspberry Pi 4, with a Minecraft PE. I was unable to connect to the server using the configure server setting from within the PE. Also when I tried one of the Pocket Edition (Pokkit-Master) it wasn’t supported by the type of Raspberry Pi OS. I need some help. Thanks!

  148. Austin says:

    Hi Daniel,

    I’m considering buying the Raspberry Pi, either 3 or 4 to host a server as you’ve said. I’m pretty experienced with linux terminal so I may play around with stuff a bit, but I had a question before I start. You mentioned saving tmp files directly to memory instead of writing the files. Does this mean if the Pi loses power (simple power outage or anything) that the world would be lost? Also, I understand this is a low power system, but is there a simple setting change that would allow the server to be turned off when not in use? I’ll likely only use it occasionally, so no need to have it running the other 99% of the time.

    Thanks so much for the guide!

    1. I do not know whether it is possible to put the raspberry to sleep.

      If you want world persistance, then a raspberry pi with an SD card is not the right system.

      1. Austin says:

        What is it that really prevents world persistence with this system? I’ve never messed around with any kind of minecraft server so I don’t really know how they work under the hood, but I understand typically a server can be restarted and everything remains through the restart. If I have to really dig into that part on my own I can, but what really sets a Pi on an SD card apart from any other desktop on an HDD or SSD?

        1. I explain in my post why I recommend not writing the temporary files to the SD card:

          Spigot makes use of temporary files (located in tmp). This can cause performance issues and instabilities on a Raspberry Pi. It may even shorten the life of your SD card. It might be better to have temporary files reside in memory.

          I understand typically a server can be restarted and everything remains through the restart.

          If properly shut down and properly restarted, yes. If your server crashes, then no. Hence the word “instabilities” in my post.

          Some software is robust to system-wide crashes. Certainly, the software running your bank is probably robust to crashes. A Minecraft server is not engineered with this kind of care.

          (…) what really sets an (…) SD card apart from an (…) HDD or SSD?

          A Raspberry Pi with an SD card is not a reliable system. It will crash. In my experience, you can improve the reliability by sparing the SD card.

          1. Austin says:

            What do you mean by “sparing the SD card”? Is the unreliability of the Pi-SD system just the card? If so, is it possible to run the Pi on a small HDD to essentially make it a tiny desktop? Just trying to understand a bit of how the system works.
            As a follow up to the minecraft question, assuming the system works barring crashes, would it be possible to implement save states such that it can be recovered at least to a certain point after a crash?

            1. What do you mean by “sparing the SD card”? Is the unreliability of the Pi-SD system just the card? If so, is it possible to run the Pi on a small HDD to essentially make it a tiny desktop? Just trying to understand a bit of how the system works.

              I expect that the SD card is probably one of the core weaknesses of the system, reliability-wise. However, I have no experience running a Raspberry PI with anything but an SD card so it is hard to know for sure. I have a ROCKPro64 that has its own eMM module and it has a nearly perfect uptime. Much better than a Raspberry Pi. I expect that the SD card is the main difference.

              If you want a more reliable machine, I would probably go with the ROCKPro64. I have a post about how to set one up.

              This being said, if you really care about reliability, then you probably want a genuine server and not a single-card computer.

              it be possible to implement save states

              You will have to investigate this issue with the Spigot documentation. You can request a save or a shut down, but I am unaware of a standard way to generate a safe backup.

  149. m3nda says:

    Thank you so much for this simple but powerfull guide.

    I managed to launch a Minecraft server 1.4 into my mobile phone (a chinesse one i do have for such task, called F9006) using LinuxDeploy for easy chroot, installing Debian on it.

    Sadly … Running 63687ms or 1273 ticks behind.

    I’ve ensured that all cores where ON forcibly using Kernel Auditor, but seems that is not enough or the ram is not sufficient.

    Can’t connect to the server because i don’t have such game, but seems that 1273 ticks behing is not a good value.

    About sdcard, yes, it’s the weakest point of the RPi system. Even with a suddently power loss it could break. I suggest anyone using RPI seriously to attach a big ass 5V capacitor to their usb power wires …

    Usually, people tend to use noatime on fstab, which tends to more chances to crash if you get a power supply interruption.

    And, using the sdcard only for boot is also totally advised. It’s cheap to use an reuse USB memories wich have better NAND controller.

  150. Trentyn says:

    Hey, I followed everything to the T and it works -almost. it detaches itself to a screen but after it finishes loading on the screen, the screen terminates itself for what feels like no reason, and it definitely has me wondering whats wrong.

  151. Matej Manko? says:

    Hello,

    the server works, but when I tried to connect to it, it display “Failed to verify username!”. Can someone help me?

    I use a cracked launcher of Minecraft

  152. James says:

    I am having trouble figuring out how to work ssh. could you please help me?

  153. gc says:

    the reason people prefer the lite version is because it is headless out of the box. you aren’t doing anything that requires a GUI, so the full version is just bloat.

    1. the reason people prefer the lite version is because it is headless out of the box. you aren’t doing anything that requires a GUI, so the full version is just bloat.

      A good fraction of people who can’t make this work are trying to use the lite version and encountering quite bit of difficulties.

      The lite version can be made to work, but it is requires more time and expertise.

  154. Jamie says:

    Thank you very much for this detailed instructions! but I must have goofed up somewhere and I can’t find to retrace the steps to fix it. I installed the “Download the build file for Spigot” and it downloaded in seconds, but once I tried “java. -jar BuildTools.jar” it couldn’t complete the command
    “pi@raspberrypi:~/minecraft $ java -jar BuildTools.jar
    -bash: java: command not found”

    1. You have failed to install Java.

      1. Jamie says:

        how do I go about to reinstall? or is that a step I have to figure out on my own?

        1. Try typing

          sudo apt install default-jdk

          1. Jamie says:

            I’m getting errors:
            Error occurred during initialization of VM
            Server VM is only supported on ARMv7+ VFP
            E: /etc/ca-certificates/update.d/jks-keystore exited with code 1.
            done.
            Errors were encountered while processing:
            ca-certificates-java
            openjdk-9-jre-headless:armhf
            openjdk-9-jdk-headless:armhf
            openjdk-9-jdk:armhf
            openjdk-9-jre:armhf
            E: Sub-process /usr/bin/dpkg returned an error code (1)

  155. Jamie says:

    I restarted the entire process, wiped the SD card and reloaded imager,
    here is my error at the first step
    Errors were encountered while processing:
    ca-certificates-java
    E: Sub-process /usr/bin/dpkg returned an error code (1)

  156. N. S. says:

    This tutorial was very helpful. Thank you for the time you took writing clear and easy instructions!

  157. Gary says:

    Great instructions. I managed to get it going on my Raspberry 3 and the kids are loving it.

    One question, however: At one point, you provide the following instructions to have the server start automatically upon reboot: “enter su -l pi -c /home/pi/minecraft/minecraft.sh right before the exit command.”

    What exactly is the “exit command”. I realize this may be a stupid question, but if you could provide a response, it would be greatly appreciated!

    Thanks!

    1. What exactly is the “exit command”. I realize this may be a stupid question, but if you could provide a response, it would be greatly appreciated!

      I think you are only selecting part of the instructions. The instructions in full are: “We want the server to start automatically when the Raspberry Pi reboots, so type sudo nano /etc/rc.local and enter su -l pi -c /home/pi/minecraft/minecraft.sh right before the exit command.”

      Have you done “sudo nano /etc/rc.local”?

  158. Ilir says:

    Hi Daniel,
    Amazing tutorial, thank you so much. However, my build is stuck after inserting this command: java -jar -Xms512M -Xmx1008M spigot-1.9.jar nogui
    I changed the parameters slightly to java -jar -Xms512M -Xmx700M spigot-1.15.2.jar nogui and it is still stuck (after 36 hours) on: [17:04:35] [Server-Worker-2/INFO]: Preparing spawn area: 87%
    [17:04:35] [Server-Worker-1/INFO]: Preparing spawn area: 90%
    [17:04:36] [Server-Worker-3/INFO]: Preparing spawn area: 94%
    [17:04:36] [Server thread/INFO]: Time elapsed: 10365 ms
    [17:04:36] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [17:04:38] [Server thread/WARN]: Block entity invalid: minecraft:mob_spawner @ BlockPosition{x=-76, y=28, z=-220}
    [17:04:38] [Server thread/WARN]: Block entity invalid: minecraft:chest @ BlockPosition{x=-76, y=28, z=-217}
    [17:09:48] [Server thread/WARN]: Can’t keep up! Is the server overloaded? Running 10589ms or 211 ticks behind
    >
    >
    >
    [21:40:11] [Server thread/WARN]: Can’t keep up! Is the server overloaded? Running 5645ms or 112 ticks behind
    >
    Any help? Am I doing something wrong?

    1. Someone says:

      same problem. and I also have a screen issue. it says
      pi@raspberrypi:~ $ screen -r minecraft
      There is no screen to be resumed matching minecraft.

    2. Andy says:

      Same issue … any resolutions?

      1. Andy says:

        My issue is the same as

        “Can’t keep up! Is the server overloaded?”

        On raspberry pi 3B with 4 gb ram

        Thanks in anticipation

  159. Candace Duffy Jones says:

    Hello, I have followed every step, without exception and only altered the spigot version used (spigot-1.15.2.jar) but I have one issue. When I use the command

    screen -r minecraft

    I get the message

    There is no screen to be resumed matching minecraft

    Everything else works fine. I am using Raspberry Pi 4 with the newest Raspbian desktop.

    1. The script that you are told to run has the following line…

      screen -S minecraft -d -m java -jar  ...
      

      This creates a screen called minecraft. If you have not executed the script, then you will get the error that you describe.

  160. Christopher says:

    How do you find the file after you type “java -Xmx1024M -jar BuildTools.jar

  161. Christopher says:

    I can’t find the file that you called spigot-1.9.jar. How do you find it?

  162. David B says:

    Hello Daniel, Thank you very much for your “perfect” instructions 🙂
    You may like to know I got MC v1.15.2 running on a Raspberry Pi 1b – yep 1b
    I am now waiting for v1.16.1 to be released by the lovely Spigot people.
    I was going to say that I would be interested in you confirming the upgrade process, however, I just saw your final comment on the subject 🙂 .
    Anyway, I think it will be something like:
    1. Get the new build file with “wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
    2. Build the spigot-1.16.1.jar file with “java -jar BuildTools.jar”
    3. Edit the minecraft.sh file to point to the new jar file just built.
    4. I may also do a one-off startup and add “–forceUpgrade –eraseCache” before “nogui”

    1. @David

      Thanks. I wrote that “I tried long and hard to get a stable and fast server running on a first-generation Raspberry Pi, but it was not good.” That’s probably what you meant by “my final comment on the subject”.

      It is great if you are running a stable Minecraft server on an early Raspberry Pi.

      1. David Blake says:

        By “final comment on the subject”, I was referring to upgrading to a new MC version.

        “Extra: What if you have installed the Minecraft server, and now want to upgrade it? Sadly, there is no built-in support for in-place updates in Spigot as far as I know. When the software does not support updates, many things can go wrong if you try to force an update so I simply recommend against updates. ”

        1. Yes. You certainly can upgrade if you know what you are doing. However, please look at the comments I am getting. People have a hard time following instructions starting from a clean system.

  163. Johnnie says:

    Will people that are not on the same network be able to join?

    1. This is a networking issue addressed at the end of the post.

  164. Peterson Daughtry says:

    Hi Daniel, thanks for the post. It was very easy to follow. Now that I have started the server, I have not been able to connect/join the server from my computer. It does not even show up when I search for a server. How would you recommend troubleshooting?

    1. So you are logged into the server from your computer using ssh, and you can see the minecraft console… correct ?

      1. Peterson Daughtry says:

        Yes, I have entered the following line in terminal:

        java -jar -Xms512M -Xmx1008M spigot-1.16.2.jar nogui

        and the server starts. But when I log into minecraft, I can not see the server. I am pretty new to this type of thing and have a lot to learn. It is very possible I am missing something simple.

        1. If you are logging into the minecraft server using sssh from your PC, then your PC ought to see the minecraft server and a Java-based minecraft ought to discover the new minecraft server. You will have to give us more details.

          1. Peterson Daughtry says:

            So I was just able to join the server! Not exactly sure why I was unable to earlier, but thank you for your time and help.

  165. Cedric Haspel says:

    Hi Daniel,
    I wanted to ask if you can help me. When I enter the command: sudo apt-get install netatalk screen avahi-daemon default-jdk in the first step, it writes E: Unable to locate package avahi-deamon.
    What can I do? Please answer

    1. Which Linux distribution did you install on your Pi?

      1. Cedric Haspel says:

        Raspberry Pi OS (32-Bit) Lite

        1. Cedric Haspel says:

          Raspberry pi os 32-bit

        2. So you are using the lite version.

          Have you checked this passage at the beginning of the blog post?

          For some reason, many people prefer the “lite” version, but then they can’t follow my instructions. Please use the full version (the lite and the full versions are both free). You can make things work with the “lite” version and even save a few steps and some storage space, but if you go down the “lite” route, do not complain if my instructions do not work for you.

  166. Cedric Haspel says:

    ok thx I am using the full version

    1. If you are using the full version, it should work (it has worked for hundreds of people).

  167. Shareel C says:

    Hello, I have done this and want to know how to add texture packs and stuff to it, Thanks

  168. Jay says:

    Just wanted to say ‘Thanks’ – I’ve used your guide a few times now and have just upgraded to a Raspberry PI 4B 8GB RAM and everything is up and running again.

    A couple of questions (if you get time):

    Although I can connect directly using the IP address, do you know why the server is never found via scan? It always shows ‘Scanning for games on your local network’ but never finds anything.
    My PI is dedicated to running my Minecraft server, are there any settings to adjust for a PI 4B 8gb? I noticed the warning ‘Can’t keep up – X blocks behind’ a few times when I first started the server.

    1. A Pi4 with 8 GB should be more than enough. Have you tried giving it more memory?

      1. Jay says:

        I’m not actually sure how I’d do this 🙂 The only time I’ve used Linux is through this guide.

        I’m guessing this is changed using “-Xms512M -Xmx1008M” but I’m not sure.

        1. If your Raspberry Pi has a lot of memory (e.g., 4 GB or 8 GB) then you can change the -Xmx1008M to something like -Xmx2048M. The number (e.g., 2048M) should not exceed the available RAM. Giving the server more memory may improve the performance.

          Note that you should expect diminishing returns: 2GB is a lot of memory for a minecraft server. There is really no reason for it to use up much more unless you have expensive plugins.

          1. Jay says:

            Many thanks Daniel

          2. Vlad G. says:

            Very helpful guide Daniel. Although, I see that in a lot of comments you are suggesting you can use 4GB of memory but I’ve been trying to do this using different solutions found online for the last hour and just can’t get it to work. From what I’ve read the problem is that the maximum allocation capacity from java for a single app is 2GB max, not 1MB extra… Could you please try it as well and see if it works for you. It shouldn’t, normally…

            1. On a 32-bit system, the allowable range should be between 2GB to 3GB on a 32-bit Linux system. If you want to use 4GB or more, you need to be on a 64-bit system which you can grab from the raspberrypi site: http://downloads.raspberrypi.org/raspios_arm64/images/

    2. You should be able to refer to the server by its name followed by “.local”.

      1. Jay says:

        I have no problems adding the server manually. I was just wondering why it never appears in the list of ‘local’ servers.

        1. Then you may need to install a plugin…

          https://www.spigotmc.org/resources/lanbroadcaster.5320/

          There are many advanced features that you may want to setup, but my guide focuses on the basics. (It is already long enough.)

  169. Christian says:

    Hey Mr. Lemire! So far, I have a server that can run, but I’ve been having some trouble with the
    if ! screen -list | grep -q “minecraft”; then
    cd /home/pi/minecraft
    screen -S minecraft -d -m java -jar -Xms512M -Xmx1008M spigot- 1.16.1.jar nogui
    fi
    Lines. I’ve copied and pasted them, and changed the .jar file to the most recent release. When I continue following the instructions, and try and run ./minecraft.sh, I try the screen -r minecraft command, and the system sends me, “There is no screen to be resumed matching minecraft.” Any troubleshooting suggestions?

    1. Any troubleshooting suggestions?

      Does it help if I state that if it does not work then you are almost surely not following the instructions as they appear?

      If you run a script with a screen -S minecraft ..., it will create a screen entry with the name minecraft which you can bring up with screen -r minecraft.

  170. wim says:

    Hi Daniel,
    Thank you for these instructions. I did follow it step by step but I ran into problems
    It return the following error:
    exception in thread “main” java.lang.RuntimeException: Error running command return status !=0
    I use a raspberry pi2, java 1.8. SD is 32Gb.
    Is pi2 here the problem?

    1. It is not really feasible to diagnose the problem from your report.

      It should work on a pi2.

      1. wim says:

        Hi Daniel,
        Thank you for the reply . I put in the complete error message.
        Wim
        Final mapped jar: work/mapped.b94c4521.jar does not exist, creating (please wait)!
        Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true -Xmx1024M
        Exception in thread “main” java.lang.RuntimeException: Error running command, return status !=0: [/usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java, -jar, BuildData/bin/SpecialSource-2.jar, map, –only, ., –only, net/minecraft, –auto-lvt, BASIC, –auto-member, SYNTHETIC, -e, BuildData/mappings/bukkit-1.16.3.exclude, -i, work/minecraft_server.1.16.3.jar, -m, BuildData/mappings/bukkit-1.16.3-cl.csrg, -o, work/mapped.b94c4521.jar-cl]
        at org.spigotmc.builder.Builder.runProcess0(Builder.java:819)
        at org.spigotmc.builder.Builder.runProcess(Builder.java:756)
        at org.spigotmc.builder.Builder.main(Builder.java:439)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:34)

      2. wim says:

        Hi Daniel,
        Thank you for the replay . I have posted the complete error message . Maybe this tells you more. I don’t see other error messages in the logfile.
        Thanks in advance. Wim.
        Checked out: 57bbdd8eb797a51960cf9a47f764b68f97d4f18c
        Attempting to build Minecraft with details: VersionInfo(minecraftVersion=1.16.3, accessTransforms=bukkit-1.16.3.at, classMappings=bukkit-1.16.3-cl.csrg, memberMappings=bukkit-1.16.3-members.csrg, packageMappings=package.srg, minecraftHash=51f363d9fdf9caf953c1fec932e50593, classMapCommand=java -jar BuildData/bin/SpecialSource-2.jar map –only . –only net/minecraft –auto-lvt BASIC –auto-member SYNTHETIC -e BuildData/mappings/bukkit-1.16.3.exclude -i {0} -m {1} -o {2}, memberMapCommand=java -jar BuildData/bin/SpecialSource-2.jar map –only . –only net/minecraft –auto-member LOGGER –auto-member TOKENS -i {0} -m {1} -o {2}, finalMapCommand=java -jar BuildData/bin/SpecialSource.jar –only . –only net/minecraft -i {0} –access-transformer {1} -m {2} -o {3}, decompileCommand=java -jar BuildData/bin/fernflower.jar -dgs=1 -hdc=0 -asc=1 -udv=0 -rsy=1 -aoa=1 {0} {1}, serverUrl=https://launcher.mojang.com/v1/objects/f02f4473dbf152c23d7d484952121db0b36698cb/server.jar, toolsVersion=105)
        Found good Minecraft hash (51f363d9fdf9caf953c1fec932e50593)
        Final mapped jar: work/mapped.b94c4521.jar does not exist, creating (please wait)!
        Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true -Xmx1024M
        Exception in thread “main” java.lang.RuntimeException: Error running command, return status !=0: [/usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java, -jar, BuildData/bin/SpecialSource-2.jar, map, –only, ., –only, net/minecraft, –auto-lvt, BASIC, –auto-member, SYNTHETIC, -e, BuildData/mappings/bukkit-1.16.3.exclude, -i, work/minecraft_server.1.16.3.jar, -m, BuildData/mappings/bukkit-1.16.3-cl.csrg, -o, work/mapped.b94c4521.jar-cl]
        at org.spigotmc.builder.Builder.runProcess0(Builder.java:819)
        at org.spigotmc.builder.Builder.runProcess(Builder.java:756)
        at org.spigotmc.builder.Builder.main(Builder.java:439)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:34)

  171. Melody says:

    Hi Daniel,
    I was able to follow the instructions completely until the part where you get someone to login to the server to check it and then type stop.
    Are they logging in from where? My laptop with ssh? the Pi using the monitor and keyboard? or?
    Anyway I continued along and had no error messages (until I got to the no screen part), but before I could recheck the ./minecraft.sh was correct, I ran into an issue that my pi will no longer let me in at all – whether directly or through ssh. I have no idea what went wrong or why. The last thing I did was change the /etc/fstab files to what you had, but I don’t know if that has anything to do with my lockout.
    The message I get on reboot is this:
    Cannot open access to the console, the root account is locked.
    See sulogin(8) man page for more details.
    Press Enter to continue.

    But I never get back to a prompt of any kind. 🙁

    1. The error you are getting probably indicates that you entered incorrect entries in /etc/fstab.

    2. I was able to follow the instructions completely until the part where you get someone to login to the server to check it and then type stop.
      Are they logging in from where? My laptop with ssh? the Pi using the monitor and keyboard? or?

      My instructions are detailed. If you do not understand a specific instruction, please elaborate. Refer exactly to what I have written.

  172. Gerald de la Pascua says:

    Hi Daniel thanks for this tutorial, I’m trying to follow it, but when I try to build Buildtools.jar I get,
    BuildTools requires at least 512M of memory to run (1024M recommended), but has only detected 235M.
    This can often occur if you are running a 32-bit system, or one with low RAM.
    Please re-run BuildTools with manually specified memory, e.g: java -Xmx1024M -jar BuildTools.jar
    Like others I’ve tried to do do the java -Xmx1024M -jar BuildTools.jar

    and that seems to get most of it to work until I get to the applying CraftBukkit bit, here’s the tail of my log, any ideas ?
    I’m running on a pi 3b+ clean install,

    [INFO] Installing /home/pi/minecraft/work/mapped.2fb04798.jar to /home/pi/.m2/repository/org/spigotmc/minecraft-server/1.16.5-SNAPSHOT/minecraft-server-1.16.5-SNAPSHOT.jar
    [INFO] ————————————————————————
    [INFO] BUILD SUCCESS
    [INFO] ————————————————————————
    [INFO] Total time: 5.706 s
    [INFO] Finished at: 2021-02-13T17:30:58Z
    [INFO] ————————————————————————
    Applying CraftBukkit Patches
    Patching with LootTableRegistry.patch
    Exception in thread “main” java.io.FileNotFoundException: work/decompile-2fb04798/net/minecraft/server/LootTableRegistry.java (No such file or directory)
    at java.base/java.io.FileInputStream.open0(Native Method)
    at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
    at java.base/java.io.FileInputStream.(FileInputStream.java:157)
    at com.google.common.io.Files$FileByteSource.openStream(Files.java:120)
    at com.google.common.io.Files$FileByteSource.openStream(Files.java:110)
    at com.google.common.io.ByteSource$AsCharSource.openStream(ByteSource.java:456)
    at com.google.common.io.CharSource.readLines(CharSource.java:311)
    at com.google.common.io.Files.readLines(Files.java:553)
    at com.google.common.io.Files.readLines(Files.java:520)
    at org.spigotmc.builder.Builder.main(Builder.java:539)
    at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:34)

    1. If the build fails with some Java-related error, please report the issue with spigot.
      See https://www.spigotmc.org/forums/spigot-help.40/

      1. Gerald de la Pascua says:

        Thanks Daniel, awesome support you provide, I read elsewhere that the java might not buid correctly on the pi, so I tried it on a pc, and it worked first time, so I copied the spigot file over and it’s all up and running. Great little project, is there a way to create your own world/map’s and select one at boot up / start time rather than have a randomly generated one ?

        Thanks for the help with the project, the pi is a remarkable bit of kit, and as you say, it’s just a bonus that it uses less power. I have a number of pi 3’s around the house, one as a plex server, others as plex clients, and others that I use to do tasks such as this. It’s incredible to have such a low cost, low power device, that can be used for so many little projects, even if it’s just as a test to see what the little thing can do. I’m planning to order a pi 400 to run Minecraft off, and because I’ve been meaning to get a pi 4 for ages, but I’ve been put off by having to get heat sinks, fans etc, and I read the 400 handles the heat passively really well and you get the keyboard thrown in. Anyway thanks again for your help, I’ll be looking through your archives for other project ideas, thanks G

        1. Great little project, is there a way to create your own world/map’s and select one at boot up / start time rather than have a randomly generated one ?

          I am not a Spigot expert per se. You may want to look at how other people have answered this question:

          https://www.planetminecraft.com/forums/help/javaedition/how-do-you-change-map-on-minecra-563017/

  173. Gerald de la Pascua says:

    Thanks Daniel, outstanding support !! Getting back to me on a Saturday ! No doubt lock down is helping, but thank you very much will pursue this, or might try on a pi 4, to see if it works ok on that,

    thank you , G

  174. Devin says:

    Hey so after rebooting my pi the server will not start. It just says it wasn’t able to access jarfile spigot-1.16.5.jar which yes is the name of mine. Why is this happening? Thanks in advanced

    1. The error is probably telling you that either the file does not exist (in the given location) or that you do not have access rights to the file. The steps that I provide are well tested… I suggest you start anew from a clean slate.

      1. Devin says:

        After reinstalling the OS and starting fresh it’s doing the same thing except now it error’s when building and when I try to look for the jarfile it says it’s unable to access it

        1. You are not providing enough information so that people are able to help you. Note that thousands of people have followed my instructions successfully. They definitively work.

      2. Devin says:

        Every time I try to build it gives me the error: INFO: Decompiling class net/minecraft/world/item/Items
        Exception in thread "main" java.lang.RuntimeException: Error running command, return status !=0: [/usr/lib/jvm/java-11-openjdk-armhf/bin/java, -jar, BuildData/bin/fernflower.jar, -dgs=1, -hdc=0, -asc=1, -udv=0, -rsy=1, -aoa=1, work/decompile-d7866d9c/classes, work/decompile-d7866d9c]
        at org.spigotmc.builder.Builder.runProcess0(Builder.java:835)
        at org.spigotmc.builder.Builder.runProcess(Builder.java:772)
        at org.spigotmc.builder.Builder.main(Builder.java:479)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
        I’ve tried everything and have followed your tutorial twice down to the letter and it’s still giving me this error.

        1. You say that the file spigot-1.16.5.jar is not found. Can you start from there?

          I don’t understand how you can be missing the file spigot-1.16.5.jar, or be unable to access it and then get the error message you are reporting.

          1. Matt says:

            I’m having a similar problem with my installation as well:

            pi@raspberrypi01:~/minecraft $ java -Xmx1024M -jar BuildTools.jar
            Exception in thread “main” java.lang.UnsupportedClassVersionError: org/spigotmc/builder/Bootstrap : Unsupported major.minor version 52.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:808)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:443)
            at java.net.URLClassLoader.access$100(URLClassLoader.java:65)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:349)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:348)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:430)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:326)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:363)

            I’m not sure if something didn’t install correctly, but this occurs at the buildTool section (as seen by the command at the beginning) after using the command:

            wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar

            Is there an easy solution? I’m running a pi3 with the newest raspian software available, should I use a different version?

            1. Matt says:

              As an update, I was able to get pass this error by using a version of the BuildTool from the 18 of Dec. 2019, but now I’m running into issues with the Spigot:

              pi@raspberrypi01:~/Minecraft $ ls -lrt
              total 8020
              -rw-r–r– 1 pi pi 3994539 Dec 18 2019 BuildTools.jar.1
              -rw-r–r– 1 pi pi 4179101 Jul 2 23:30 BuildTools.jar
              drwxr-xr-x 2 pi pi 4096 Jul 30 01:02 work
              drwxr-xr-x 4 pi pi 4096 Jul 30 01:07 Bukkit
              drwxr-xr-x 5 pi pi 4096 Jul 30 01:23 CraftBukkit
              drwxr-xr-x 5 pi pi 4096 Jul 30 01:31 Spigot
              drwxr-xr-x 5 pi pi 4096 Jul 30 01:44 BuildData
              drwxr-xr-x 6 pi pi 4096 Jul 30 01:46 apache-maven-3.6.0
              -rw-r–r– 1 pi pi 6636 Jul 30 01:46 BuildTools.log.txt
              pi@raspberrypi01:~/Minecraft $ ls Spigot.jar
              ls: cannot access Spigot
              .jar: No such file or directory
              pi@raspberrypi01:~/Minecraft $ ls spigot.jar
              ls: cannot access spigot
              .jar: No such file or directory
              pi@raspberrypi01:~/Minecraft $

              I’ll add another update, maybe tomorrow, if I figure it out before someone else does, but until that point I will gladly get any help I can get. This is an awesome page!

              1. Please elaborate. Did it successfully build? What error messages did you get?

                1. Matt says:

                  It did successfully build with the older version, but as seen above it wouldn’t do the ls spigot.jar command, as the spigot produced didn’t have a version attached to the name and claimed the file didn’t exist.

            2. The error is telling you that your Java does not support Java 8.

              You say that you are running a Raspberry Pi with the latest software. Can you elaborate? If you are lacking Java 8 support, then it is probably an old setup.

              1. Which Java version are you using?

              2. Matt says:

                I later figured out that the reason that it was having issues is that the latest update to minecraft, 1.17.1, now requires the use of java 16 to run, so I ended up using an old optiplex I had sitting around to run the server with linux mint installed and java 16 forcefully installed (as linux mint 20+ does not yet support java 16) the server worked. It should also be mentioned that I tried running it with java 8 before java 16 and ended up with the same errors as I did on the raspberry pi. As for the version running on my pi versus the optiplex: pi java version 1.8.0_40-internal and optiplex java version 16.0.2

                I still have not figured out how to get java 16 installed on the pi, or use an older version work around, as there I run into issues with the spigot not building properly, or not being recognized as an existing file.

                I’ll continue trying to figure out what my issue is, if I do figure this out I’ll reply to this post with what I have found, but until then I’ll gladly get any and all help possible.

                1. What happens if you type

                  java -Xmx1024M -jar BuildTools.jar  --rev 1.16.5
                  
        2. You are not giving us enough information. If it gets a item/Items, then it did a lot of the work already. Please describe where it fails.

          You say that you tried everything. Please expand. What did you try?

  175. Dasyurid says:

    Minor correction but you can actually join java servers with the bedrock edition found on consoles and Android devices. I actually have a running server with java edition installed and can access it with my phone and Xbox as I have geysermc plugin installed on the server. This has been possible for a year at least that I am aware of and so far I have seen no issues other than with the command blocks as you can’t enter certain commands from your bedrock client even with administration permissions as they do not exist in the game files on bedrock. For anyone interested just Google geysermc Minecraft crossplay for info also just put in bedrock crossplay for alternative plugins and you will see there are now a lot of possible ways to do it.

  176. Samuel Clark says:

    Whenever I run the “java -Xmx1024 -jar BuildTools.jar — rev 1.17.1” command it returns “Error occurred during initialization of VM
    Too small maximum heap”

    So… what did I do? Or rather, not do?

    1. This command you are providing is not in the guide. Please refer to our instructions.

  177. digitalpeer4185 says:

    hi we were wondering were to find the 64 bit version for raspberry pi OS please put a link for the one you used

  178. Ramon Juve Sancho says:

    Hi from Barcelona and nice article, thanks for sharing…
    I followed some points for my rasp-server for the kids…