DIY Entertainment

How to Set Up a Minecraft Server on Raspberry Pi

Christian Cawley Updated 16-12-2019

Want to play Minecraft on your own terms? Set up your own server, create your own worlds, perhaps build in them with friends and family?


It’s remarkable, but true: you can do all of this on a Raspberry Pi.

My son is a big fan of Minecraft and is always wanting me to play alongside him. It’s not easy to do while he’s playing on his tablet. As he’s only young, allowing him online seems inappropriate.

The solution is simple: set up a Minecraft server on a Raspberry Pi. It’s easy to set up!

What You Will Need

To build a Minecraft server on your Raspberry Pi, you will need:

  • A Raspberry Pi 3 (or later) and power cable. We’re assuming your Pi is in a case.
  • Ethernet cable (preferable to wireless networking).
  • 8GB or larger microSD card.

Although earlier Pi models can be used for this, the results aren’t as good. These instructions for the Raspberry Pi 3 and 4 will give you the best Minecraft server possible.


All of the above, when used with a remote SSH connection will let you set up your Pi as a Minecraft server. If SSH isn’t an option, you will also need:

  • USB keyboard
  • USB mouse (or a combination of both)
  • 1 x HDMI cable
  • A monitor or other compatible display

Connect these peripherals before powering on your Raspberry Pi.

You will also, of course, need a copy of Minecraft on your computer. Note that the system spec of the Raspberry Pi means that you won’t be able to host too many people. For the Pi 3, certainly don’t attempt to host more than 10.


What Sort of Minecrafter Is This For?

Minecraft hosted on a Raspberry Pi server

Several versions of Minecraft are available.

Creating this server will give you a world that you can access from any device running Minecraft, except, curiously, MinecraftPi. So, versions of Minecraft on a Windows PC, game console, Android, iOS, and Amazon Fire tablets and TV devices will work with this server.

As such, if you have several devices on your local network, these could all access the Minecraft server.


In short, you’ll need the main Minecraft open world game from Mojang.

Step 1: Install Raspbian and Configure Your Pi

Start off with a fresh copy of Raspbian. You’ll find the latest version at Follow our guide to installing a Raspberry Pi operating system How to Install an Operating System on a Raspberry Pi Here's how to install an OS on your Raspberry Pi and how to clone your perfect setup for quick disaster recovery. Read More  for the full steps. If this seems too complicated, then try the NOOBS installer How NOOBS For Raspberry Pi Can Help First Time Users There is something about the Raspberry Pi that might just put people off: until now, setting it up has not been particularly user friendly. NOOBS aims to change that! Read More instead.

Prefer to stick with your existing copy of Raspbian? Simply upgrade to the latest version and update your packages:

sudo apt update

sudo apt upgrade

Next, configure the Raspbian environment for running the Minecraft server. Did you set it up with a monitor and keyboard? If so, simply open the Raspberry Pi Configuration tool in the Preferences menu on the desktop.


If you’re accessing via SSH, use sudo raspi-config to open the text-based configuration tool.

Here, make the following changes:

  • Go to Advanced Options > Memory Split and change the setting to 16MB. This will free more memory resources for the server.
  • Next, go to Boot Options > Desktop/CLI and select Console. (No need to do this on Raspbian Lite.)
  • If you’re trying this with a Raspberry Pi 1 or 2, find Overclock on the main menu and set this to High. (Raspberry Pi 3 and 4 users can skip this step.)
  • Enable SSH in Advanced Options > SSH.
  • Finally, go to Advanced > Expand Filesystem.

With these changes made, go to Finish and reboot Raspbian at the prompt. Once done, login again, and find the IP address of the device with:

sudo hostname -I



Make a note of the IP address before continuing.

Step 2: Install the Minecraft Server

Installing Minecraft on the Raspberry Pi relies on the Nukkit server software. Developed specifically for Minecraft: Pocket Edition, Nukkit can be easily installed on the Pi via the command line.

Start by installing Java. This is required for Nukkit to run:

sudo apt install oracle-java8-jdk

Next create a new directory (labelled “nukkit”) then open it:

mkdir nukkit

cd nukkit

With that done, download the Nukkit server software. Be sure to enter this accurately—it’s easier to copy and paste into an SSH session.

wget -O nukkit.jar

(You can find the most up-to-date builds at the project page.)

Once downloaded, run Nukkit:

sudo java -jar nukkit.jar

This prompts Nukkit to set up the server. When prompted, choose your language (we used eng) then watch as the Minecraft server is generated.

Step 3: Configure Your Minecraft Server

Once you know the server is setup correctly it’s time to configure it. Two configuration files are included with Nukkit: nukkit.yml and

To edit these, simply open them in your preferred text editor. On Raspbian, nano is preinstalled, so use

sudo nano nukkit.yml


sudo nano

Various changes are recommended. Whatever you change here, keep in mind that the Pi is a modest device that cannot handle too much processing.

Configure your Minecraft server

A list of server properties can be found in the Minecraft wiki, but several should be edited right away. Start off with:


Older Raspberry Pi models will struggle with more than 10. You might be okay with 5-6 players. Several other options are available to configure that you might be interested in, such as:


This is for player vs. player action. There’s also a difficulty setting:


Here, the easiest setting is 0.

When you’re done, press Ctrl + X to save and exit, then run:

sudo java -jar nukkit.jar

This will restart the Minecraft server software.

Step 4: Connect to the Raspberry Pi Minecraft Server

Your Minecraft server should now be online on your local network. Check this using a ping command Networking 101: Ethernet, LANs, and How They Work Even for modern users, the language surrounding home networking can be a little confusing. What's a LAN? Why do I need an Ethernet cable? Isn't it all the same? Read More from another device, using the IP address you noted down earlier. If the ping returns a response from your Raspberry Pi then you’re fine to continue.

All you need to do is launch Minecraft on your computer or tablet, then click Play > Servers. Here, Add Server, inputting the new server details, giving it a name, and adding the IP address. The port number should match the one listed in the server properties. If not, change it!

Connect to your Raspberry Pi Minecraft server

Your server should then be listed as an option to connect to. Simply select the server to start playing.

Step 5: Extend Your Minecraft Server Functions With Nukkit Plugins

The default configurations for the Nukkit server might not be wholly to your liking. Tweaking nukkit.yml and is one option, but will only get you so far.

Plugins have been developed for Nukkit that allow you to enhance the basic gameplay. This adds features to the online session that have been omitted, such as the inclusion of animals.

Suggested Nukkit plugins include:

  • MobPlugin: adds mobs and animals to the Minecraft environment
  • WorldEssentials: enables different game modes
  • EssentialsNK: includes additional game modes, multiplayer management tools, and more

These can be installed simply by downloading to your Raspberry Pi and moving them to the plugins directory.

For example, the MobPlugin can be moved with:

sudo mv MobPlugin- plugins

Head to the website and click Resources to choose from over 250 plugins for your Raspberry Pi Minecraft server.

Minecraft Server Running on Your Raspberry Pi!

Minecraft can be installed on the Raspberry Pi

That’s all there is to it. Your very own Minecraft game server running on the Raspberry Pi. If you leave it up and running, you’ll have an always-on Minecraft world that you can connect to and use. A great solution for Minecraft-loving children, self-hosting the server on your local network keeps their online activity safe—at least as far as playing their favorite game goes.

For more fun with the game, check out the best Minecraft seeds for cool worlds The 8 Best Minecraft Seeds for Cool Adventures Want to explore the world of Minecraft but don't know where to begin? Here are the best Minecraft seeds to explore. Read More and how to use Minecraft command blocks The Minecraft Command Blocks Guide Learn what a Minecraft command block is, how to get a Minecraft command block, and how to use Minecraft command blocks. Read More .

Related topics: DIY Project Tutorials, Minecraft, Raspberry Pi.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

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

  1. Christopher Foti
    July 5, 2020 at 3:29 am

    23:27:16 [ALERT] java.lang.RuntimeException: java.lang.NoClassDefFoundError: cn/ nukkit/event/entity/CreatureSpawnEvent
    at cn.nukkit.plugin.PluginManager.enablePlugin(
    at cn.nukkit.Server.enablePlugin(
    at cn.nukkit.Server.enablePlugins(
    at cn.nukkit.Server.(
    at cn.nukkit.Nukkit.main(
    Caused by: java.lang.NoClassDefFoundError: cn/nukkit/event/entity/CreatureSpawnE vent
    at java.base/java.lang.Class.getDeclaredFields0(Native Method)
    at java.base/java.lang.Class.privateGetDeclaredFields(
    at java.base/java.lang.Class.getField0(
    at java.base/java.lang.Class.getField(
    at cn.nukkit.entity.Entity.registerEntity(
    at cn.nukkit.entity.Entity.registerEntity(
    at nukkitcoders.mobplugin.MobPlugin.registerEntities(
    at nukkitcoders.mobplugin.MobPlugin.onEnable(
    at cn.nukkit.plugin.PluginBase.setEnabled(
    at cn.nukkit.plugin.JavaPluginLoader.enablePlugin( 113)
    at cn.nukkit.plugin.PluginManager.enablePlugin(
    ... 4 more
    Caused by: java.lang.ClassNotFoundException: cn.nukkit.event.entity.CreatureSpaw nEvent
    at cn.nukkit.plugin.PluginClassLoader.findClass( 4)
    at cn.nukkit.plugin.PluginClassLoader.findClass( 8)
    at java.base/java.lang.ClassLoader.loadClass(
    at java.base/java.lang.ClassLoader.loadClass(
    ... 15 more
    i get this error after i copied the mobplugin and ran the server. What did i do wrong?

  2. Iain4Dystopia
    May 6, 2020 at 4:20 am

    FYI, errors on a clean install on Pi 4 B+.

    pi@pi4:~/nukkit $ wget -O nukkit.jar

    2020-05-05 21:11:32 (7.51 MB/s) - ‘nukkit.jar’ saved [12758159/12758159]

    pi@pi4:~/nukkit $ sudo java -jar nukkit.jar

    21:14:03 [INFO ] Welcome! Please choose a language first!
    21:14:03 [INFO ] eng => English
    > eng
    21:14:10 [INFO ] Loading nukkit.yml ...
    21:14:10 [INFO ] Loading ...
    21:14:10 [INFO ] Selected English (eng) as the base language
    21:14:10 [INFO ] Starting Minecraft: BE server version v1.14.60
    21:14:10 [INFO ] Selected Zlib Provider: 2 (cn.nukkit.utils.ZlibThreadLocal)
    > WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
    21:14:10 [INFO ] Opening server on
    21:14:10 [INFO ] This server is running Nukkit version git-a71c352 "" (API 1.0.9)
    21:14:10 [INFO ] Nukkit is distributed under the LGPL License
    21:14:13 [INFO ] Loading recipes...
    21:14:14 [INFO ] Loaded 1320 recipes.
    21:14:14 [INFO ] Successfully loaded 0 resource packs
    21:14:14 [WARN ] Level "world" not found
    > WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by io.netty.util.internal.PlatformDependent0$1 (file:/home/pi/nukkit/nukkit.jar) to field java.nio.Buffer.address
    WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.PlatformDependent0$1
    WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release
    OpenJDK Server VM warning: You have loaded library /tmp/ 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'.
    21:14:14 [INFO ] Preparing level "world"
    21:14:14 [WARN ] Level "nether" not found
    21:14:14 [INFO ] No level called "nether" found, creating default nether level.
    21:14:14 [INFO ] Preparing level "nether"
    21:14:14 [INFO ] Epoll Status is false
    21:14:14 [INFO ] Starting GS4 status listener
    21:14:14 [INFO ] Setting query port to 19132
    21:14:14 [INFO ] Query is running on
    21:14:14 [INFO ] Default game type: Survival Mode
    21:14:14 [INFO ] Done (11.528s)! For help, type "help" or "?"

  3. Magicshark
    April 27, 2020 at 5:38 pm

    2 errors now you have to install the default-jdk version
    And for the wget bug try with 8081 instead of 8080

  4. Jared
    March 16, 2020 at 12:24 pm

    I'm typing the `wget -0 nukkit.jar....` command but it keeps dumping me out at a 404 : NOTOK response. I'm not sure how to find an updated command. Thank you for your help! I'm new at this!

    • Gratag
      April 5, 2020 at 5:29 pm

      I'm having the same issue. I tried going to the website and copying the link to the file, but it kept timing out on the connection as well.

  5. Ric
    December 13, 2019 at 7:06 pm

    Command below but stuck at [INFO] Epoll is unavailable. Reverting to NioEventloop.
    $sudo java -jar nukkit.jar

    Please help!

    • B
      December 18, 2019 at 11:52 pm

      I'm also having this same problem. I'm not sure if this is the problem or not but I can't connect to the server on my laptop it just loads and then times out

  6. J
    November 27, 2019 at 7:32 pm

    I'm getting "logged out due to Outdated server". Is there an update for this server?

  7. Sam
    September 1, 2019 at 5:12 am

    Hi there!

    Thanks so much for this tutorial! Can someone please help me upload a world from my iPad to my new rPI server? I was able to download the world folder to my computer, but when I add it to the world folder on the rPI, I get the following error:

    04:05:32 [INFO ] Old level data found for "lovely land", converting format
    04:05:33 [ERROR] Could not load level "world_lovely_land2": From type can be only McRegion or LevelDB
    04:05:33 [FATAL] No default level has been loaded

    I can see that the server made a duplicate of the folder and called the original one ".old". it contains a level.dat file, but the region folder is empty.

    Any help would be greatly appreciated!

    Thank you!

  8. Nick G
    August 21, 2019 at 2:11 am

    This guide no longer works, installing the minecraft server or step 2 always fails.
    Does not work past

    sudo apt install oracle-java8-jdk

    i get an error package is not available but referred to by another package.

    • Karl Y
      September 28, 2019 at 2:29 pm

      Hi Nick G,

      Try this instead:

      sudo apt install default-jdk

    • Karl Y
      September 28, 2019 at 2:30 pm

      Hi Nick G,

      Try this:

      sudo apt install default-jdk

      • Brad
        April 23, 2020 at 1:16 am

        thank you!!

  9. Alex
    July 29, 2019 at 11:29 pm

    Maybe it's just my tired brain that can't comprehend the guide at 01:03 AM, but after I followed the steps I tried connecting to the server with my usual minecraft installation (JE 1.14).

    I tried configuring the server for about 15 minutes until I noticed that the server is for the Bedrock Edition, not the Java Edition. Maybe an indicator like that in the guide would be cool.

    Otherwise, a great tutorial. After I found my problem, I connected with a Bedrock Edition I had lying around and it worked like a breeze. The only two problems I have now seem to be
    a) Mob Spawning seems to be disabled, although I enabled it in the Settings
    b) When I spawn a mob with commands, it seems to have no AI and no entity-collision. e.g. Zombies only stand around, doing nothing. I can hit them, but at the same time, I can walk right through them

    • Mark Rages
      October 12, 2019 at 10:45 pm

      Isn't there a "MobPlugin" that helps spawn mobs?

  10. Stephen E Hahn
    July 21, 2019 at 5:33 pm

    Can this be hooked up to the internet so I can play online with a few friends?

  11. Steve Hahn
    July 21, 2019 at 3:37 pm

    after entering the command ‘sudo java -jar BuildTools.jar’ i type the ‘ls’ command and see no spigot with a version number listed. Did something go wrong? How can I fix it?

  12. Steve Hahn
    July 21, 2019 at 3:32 pm

    After I build the .jar file, i type the ls command and there is no spigot with a version number. Did the build not happen successfully? What can I do to fix it?

  13. Sam Williams
    June 29, 2019 at 7:12 am

    Hey! i know this post if really old but i hope its still active. Does this still work for the 1.14.3 version? And will my friends at their house be able to join the server? Also will i be able to use the Raspberry pi for anything else other then a Mine craft server after i follow all the steps?

  14. Stressed
    March 24, 2019 at 6:34 pm

    My server will not recognize the "sudo chmod +x" command, or boot up without manually being forced to. Does anyone have any expirience with fixing this problem?

    • foxdarkmaster
      June 25, 2019 at 9:39 pm

      That's because of the current directory you're in. Right now you should be on /home/minecraft while the script was created on /home. You need to move to the script directory:

      cd /home

      and then run the script

  15. Hunter BIggs
    February 25, 2019 at 2:28 am

    Once I get to Preparing Spawn Area 84% it sats java.lang.OutOfMemory thrown from the UncaughtExceptionHAndler in thread "SErver console handler" can someone help Im completely stuck

  16. Michael A. Robinson
    January 23, 2019 at 3:10 am

    I downloaded the NoSpawnChunks.jar file and stuck it the the plugins folder, but when I start the server, I get an invalid plugin.yml exception. How can I get around this?

  17. Smouk
    December 31, 2018 at 12:57 pm

    I got stuck at the step where I was supposed to execute the java file. First thing's first, I'm using a Raspberry Pi 3 B+ and when I execute the command:
    sudo java -jar BuildTools.jar

    It prompts me the next message:
    "BuildTools requires at least 512M of memory to run (1024M recommended), but has only detected
    237M. 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".

    Sure enough I'm using Raspbian and it is a 32-bit OS but I don't think this is the problem since this tutorial was made using Raspbian too. I tried some methods to free up RAM and it showed that there were at least 800M of RAM free so I don't see the problem there either.

    Another "problem" I found was that it wouldn't allow me to overclock the Pi as if the function to do it is not available, it just says:
    "This Pi cannot be overclocked".

    I don't know why that is either, might be because it's not available to the last version since the 3 B+ is the last one but I didn't give it much importance. Anyway, I just hope someone can help me out with this.

    Thanks for your attention.

    • Smouk
      December 31, 2018 at 1:07 pm

      Well, that was quite easy to fix. I just needed to use the next command:
      sudo java -Xmx1024M -jar BuildTools.jar

      With that command ad the prompt suggested you can use the amount of memory you specify, I just didn't think I would be able to use more memory than what it detected. Guess I was wrong, I just used 800M instead of the 1024M of the command above, executed it and it worked just fine.

      I hope this can be of help to someone.

    • Lovsaphira9
      February 15, 2019 at 6:40 pm

      I found that it started working when I allocated some memory space using the command 'sudo java -Xmd512M -jar BuildTools.jar' Not sure why, but it just wanted a specified amount of ram to be allocated to fetching the tools, but I had roughly 812 MB of ram available

  18. Glenn hodges
    December 30, 2018 at 8:04 pm

    I am getting stuck at the java -jar BuildTools.jar. after running it. I get the error. BuildTools requires 512m of memory, only detecting 276m.

    What am I doing wrong?
    Pi3 b+


  19. Anonymoose
    December 9, 2018 at 10:17 pm

    i followed all the steps but when i try to run the .sh file it doesnt show a console

  20. gosplunk
    November 10, 2018 at 3:12 pm

    Fantastic guide! Thanks so much!!!

  21. splunkninja
    November 10, 2018 at 3:11 pm

    Fantastic tutorial! Thanks so much!

  22. Zack
    October 12, 2018 at 3:47 pm

    This is a great tutorial but I have an issue. When I typed the "ls" command, I saw that I had the 1.12.2 version of spigot, but when I type the sudo java -Xms512M -Xmx1008M -jar /home/minecraft/spigot-[version].jar nogui command, it just says "Error: Unable to access jarfile /home/minecraft/spigot-1.12.2. jar"

    What should I do to fix that?

  23. Blake
    October 11, 2018 at 8:01 pm

    Can you setup for it to work on your ps4?

  24. Bo
    September 22, 2018 at 6:23 pm

    Does anyone know how to update spigot to version 1.13.1?

    • HTMLars
      October 5, 2018 at 9:57 am

      Spigot 1.13.1 is not out yet, but im sure it will by this month :)

  25. Please help me
    August 13, 2018 at 1:48 pm

    Okay, I’m having a huge problem, and I know this post is roughly over a year old, but I need help.
    So everything works fine until I get to the:
    sudo java -jar BuildTools.jar
    part. Okay here’s what it does. The code runs fine, and goes to work, until it gets to this this part of it:
    Final mapped jar: work/mapped.cf6b1333.jar does not exist, creating!
    And then it hangs on that message for a few minutes, and just goes to a black screen.
    Like no warning, nothing it just black screens. The lights on the pi are still there, but the screen just goes black.
    It’s definitly not overheating, because I attached a fan to it and monitored the temperature. It didn’t get over 45 degrees Celsius and yet it still just black screened after a while. Any help please?
    Raspberry pi 3 model B, forgot to mention.
    Please help!

    • Ed
      August 31, 2018 at 10:39 pm

      Move the mouse or hit a key, is it not the screensaver kicking in?

    • HTMLars
      October 5, 2018 at 9:58 am

      I am pretty sure the blackout thing is just you'r PI going to sleep...
      For me it took 2,5 hours to install, so just wait :)

  26. CosminPerRam
    July 3, 2018 at 12:06 pm

    This is the best tutorial of how to of this topic! I got it to work on my Raspberry Pi 3 b+ it works flawlessly! The only thing i had problem with was when building with the 'java' command, i didn't had java installed, solved with 'sudo apt-get install oracle-java8-jdk'! Thanks!

  27. John
    May 16, 2018 at 2:34 pm

    I can't get the step 6 to work. It I create the .sh file and save it, but when I try to run the "" line, it says "no such file or directory" -- but I can navigate the and it certainly exists.

  28. Ian
    January 22, 2018 at 2:27 am

    "All you need to do is launch Minecraft on your computer, then click Play > Servers."

    Great tutorial. But do you need to purchase a license for a Minecraft client that can connect to the Raspberry Pi Minecraft server? Or where do you download this client?