Raspberry Pi Minecraft Server Setup Script w/ Startup Service

Minecraft 1.16 Nether Update

***UPDATE 10/19/2020 – Minecraft 1.16.3 is here! PLEASE make sure you have full backups of your server before attempting to upgrade your server. If you read the older comments you will see that weird things can happen with version upgrades sometimes. 1.15 was an absolute mess at first and a few people without backups in the comments wanted to roll back and had some serious regrets.

1.16.3 has been a very stable experience and is working well. It’s safe to upgrade as long as you’ve made backups!

Minecraft 1.16.3 (Nether Update) is here! This script and guide are written to help you get a great performing Raspberry Pi Minecraft server up and running in only a few minutes.


  • Sets up fully operational Minecraft server in a couple of minutes
  • Raspbian / Ubuntu / Debian distributions supported
  • Installs and configures OpenJDK 11 (or higher if available)
  • Sets up Minecraft as a system service with option to autostart at boot
  • Automatic backups to minecraft/backups when server restarts
  • Updates automatically to the latest version when server is started
  • Easy control of server with start.sh, stop.sh and restart.sh scripts
  • Optional scheduled daily restart of Pi using cron
  • Optional configuration of video memory to 16MB (default 64MB) and overclocking MicroSD reader to 100Hz (default 50Hz) for maximum performance


  • Raspberry Pi model with 1 GB of RAM or higher. Basically a Raspberry Pi 2B or higher. (No Zero unfortunately, 512MB is not enough RAM to do this, I’ve tried!)
  • Headless Linux distribution such as Raspbian Buster Lite, Ubuntu Server 18.04.2, or any Debian based distribution (GUI distros can be used at the expense of available RAM and server performance)
  • Solid state drive highly recommended but not required.
    You can get a SSD setup on a Pi for less than most Micro SD cards cost. See my article here for details
  • If using MicroSD you want to be using a high range card otherwise you will really be hurting on IO when the server is reading/writing chunks of terrain! Click here for MicroSD card benchmarks/recommendations.

Recommended Gear

Raspberry Pi 4 Model B *8*GB*

StarTech 2.5″ SATA to USB 3.0 Adapter* -AND- Kingston A400 SSD 120GB SATA 3 2.5” Solid State Drive*

Or for a compact setup: SanDisk Extreme Pro 128GB USB Solid State Flash Drive*

Best benchmarking Micro SD card: SanDisk Extreme 64 GB MicroSD Card*

Choosing a Linux Distribution

The most important consideration when choosing which flavor of Linux to run the server on is simple: available RAM. Headless Linux distributions such as Raspbian Lite that don’t have a built in GUI have

Our biggest obstacle when running a Minecraft server on the Pi is available RAM since 1 GB is extremely low for this type of server. To have a playable experience you should not be running anything else on the Pi so all memory is available to be used.

After testing on many different distros I am finding Raspbian Lite and Ubuntu Server 18.04.4 32-bit to be the best choices. These distributions come with very few background processes and have rock solid support and performance.

64-bit vs 32-bit

There’s a lot of discussion in the Pi world about the up and coming aarch64 64-bit distributions vs. armhf 32-bit distributions. They have been and continue to improve dramatically. There are already use cases where 64-bit is far superior such as video encoding, advanced compression, etc.

So how about for running a Minecraft server? I have been testing extensively with Ubuntu Server 18.04 64-bit and the Debian Buster 64-bit. I have consistently had worse performance and stability than on 32-bit versions of the exact same distros.

But how can that be? It’s certainly true that Minecraft servers benefit in CPU performance from 64-bit versions of Java. The answer is actually incredibly simple: memory. The server running on a 64-bit Java Virtual Machine uses a minimum of about 100 MB more memory. This makes perfect sense because 64 bits > 32 bits by definition!

The Raspberry Pi’s 1 GB of memory has been the biggest obstacle for this project since the very beginning. Back when I first went into the Paper Minecraft developer IRC room and told them what I was trying to do I was practically laughed out of the chat room for even thinking of trying this. Most Minecraft server branches including vanilla can’t even start on the Pi because of the limited memory.

For a dedicated Minecraft server on the Pi I very highly recommend staying 32-bit. You will have more available memory which means it will be much faster and more stable. Since memory is our bottleneck the increased CPU throughput does not help us and losing *any* of our memory is disastrous!

If the Raspberry Pi 4 has more memory like we all expect it to this recommendation will change completely. Even 2 GB of memory would make the extra memory that 64-bit uses a non-issue and the CPU throughput performance gains very desirable. For now though stay 32-bit for a Minecraft server!

Tested Distributions

Raspbian Lite – It’s Raspbian. It has very low memory usage and is the official distribution of the Raspberry Pi. The server runs very well on this. It’s overall the best choice. The Buster release has made OpenJDK 11 available on it so it’s no longer behind the rest of the distros.

Ubuntu Server 18.04.3 – Ubuntu Server is my favorite Linux distro. I use it for nearly all of my projects. The performance of the 32-bit armhf version is on par with Raspbian. It’s a great choice! Click here for my Ubuntu setup guide for Raspberry Pi. The 64-bit version is not a fantastic choice and not recommended because of the higher memory usage. Stick with 32-bit and you’ll be a happy camper with Ubuntu Server.

Debian Buster 64-bit – Debian is the distribution Raspbian is based on. This version is a preview of Debian “Buster” which is the successor to Stretch and will be the next version of Raspbian when it is released. I like this distribution but it is currently still unofficial and unsupported. Performance and stability was less than Ubuntu and Raspbian.

Benchmark Your Storage

Make sure your storage is running fast enough to be an effective Minecraft server. I wrote a benchmark for this purpose to make this extremely easy. To get accurate results make sure nothing is running when the benchmarking is taking place.

Run the benchmark by pasting/typing:

sudo systemctl stop minecraft
sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash 

Ideally you will score around 1000 for a good quality Micro SD card (and much higher for solid state storage). A low score (< 700) here indicates here that it is probably time to upgrade to a solid state drive or a faster Micro SD card. Click here to view all the existing benchmarks.

You can still run the server if you’d like with a low storage score but be advised when operations like saving the server’s blocks take place the people online may experience quite a big of lag!


SSH into your Raspberry Pi and paste the following commands:

wget https://raw.githubusercontent.com/TheRemote/RaspberryPiMinecraft/master/SetupMinecraft.sh
chmod +x SetupMinecraft.sh

The script will setup the Minecraft sever and ask you some questions on how to configure it. I’ll explain here what they mean.

“Enter amount of memory in megabytes to dedicate to the Minecraft server” – The amount of memory that will be dedicated to the Minecraft server. The more the better, but you must leave some room for the operating system background processes.

If you exceed the total available memory either the server will crash or the Pi will get incredibly slow to the point where your SSH session will start timing out. The setup script will make a recommendation to you which is your available memory – 10% for headroom. If you aren’t sure what to put just go with the recommended amount.

Note for Raspberry Pi 4: Currently on 32-bit Raspbian 2700 MB is the maximum that Linux will let us allocate in a 32 bit environment. The script has been updated to check for this as the server will not start if it is set over 2700M on a 32 bit server. 64 bit operating systems will be able to allocate all available memory as Pi 4 support rolls out for them.

“Start Minecraft server at startup automatically (y/n)?” – This will set the Minecraft service to start automatically when your Pi boots. This is great because whenever you want to play you can just plug it in and go without having to SSH in.

“Automatically reboot Pi and update server at 4am daily (y/n)?” – This will add a cron job to the server that reboots the Pi every day at 4am. This is great because every time the server restarts it backs up the server and updates to the latest version. See the “Scheduled Daily Reboots” section below for information on how to customize the time or remove the reboot.

That is it for the setup script. The server will finish configuring and start!

Check Java Version

Sometimes if you have multiple versions of Java installed the wrong version of Java will be selected as the default. If the server didn’t start check that the right version of Java is selected with this command:

sudo update-alternatives --config java

If you get the message “update-alternatives: error: no alternatives for java” then you only have one version of Java installed and can skip to the next section.

If you are presented with a list of choices then your machine has multiple versions of Java installed. It will look like this:

update-alternatives: warning: /etc/alternatives/java has been changed (manually or by a script); switching to manual updates only
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1101      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1101      manual mode
  2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

You will usually want to just select the newest version of OpenJDK that is listed so you would type 0 and press enter. In some cases on some platforms you may want to switch to the official Oracle JDK although I strongly recommend sticking with OpenJDK!

First Run

The first time you run the server it will take a little longer to start since it is generating all the server data. If you try to log in before it fully starts you will get a connection timeout error. Watch for the line: “Timings Reset”. This is the last line that prints when the server is ready to rock and roll. At this point you will be able to connect successfully.

The very first time you log into the server it will be slow for about 1-2 minutes. This is because since nobody has logged in before the server has to scramble to generate all the chunks within your view distance (10 by default) and send them to you/store them. During this time you may not be able to see very far and if you try to destroy blocks there will be noticeable lag from when they break to when they actually disappear.

Don’t panic! This will go away within a couple of minutes as the Pi catches up with all the first time login stuff it needs to do. Performance stabilizes and it will feel very much like the offline experience after that.

If you are hosting for a few friends I’d recommend logging in for the first time right after you set up the server instead of having several people nail a blank server at first startup. This gets it out of the way and when everyone is ready to log in the starting area chunks will be fully fleshed out and the Pi just has to read them. It’s an order of magnitude faster for the Pi to read chunks than to generate and store chunks.

In my experience after the initial login exploring new parts of the server doesn’t cause any lag even though new chunks are being generated. The reason for this is that when you’re walking it’s really only having to generate a new chunk as you get close to the border instead of a huge square area of chunks in all directions and all at the same time like during the first login.

Changing Minecraft Server Version

If you want to change which version your Minecraft server is running it can be changed by opening SetupMinecraft.sh with any text editor (example: nano SetupMinecraft.sh).

Change the line Version=”1.15.1″ to whichever Minecraft server version you want to run. Note that that version must already exist for Paper Minecraft. You can view all available versions at the following URL:


Changing Minecraft Client Version

If you are wisely running the “stable” branch instead of the “development” branch there will be times where you need to select the version of Minecraft to run otherwise you will get an error message that your client is outdated when you try to log in.

Fortunately this is very easy. Open up the Minecraft launcher and instead of hitting “Play” choose “Launch Options” in the menu at the top of the window. It will look like this:

Minecraft Launcher “Launch Options” Tab

Click the “Add new” button and pick which version you want to add. You can optionally gave it a name or just click save.

Now when you go back to the “News” tab you will see a dropdown arrow where you can select which version of Minecraft you want to play!

Start, Stop and Restart Server

The server can be started, stopped and restarted two different ways. You can use the provided scripts in the Minecraft folder or you can use systemctl. Here are the commands:

cd ~/minecraft


sudo systemctl start minecraft
sudo systemctl stop minecraft
sudo systemctl restart minecraft

Automatic Backups

The server backs up each time it starts. This helps you recover easily if something goes wrong. This system works best if you configured the server to restart daily since it means you will have a backup every day.

To access these backups type:

cd ~/minecraft/backups

When a backup is made the filename will be the date and time the backup was taken. If you need to restore a backup it’s very easy. Substitute the timestamp in my example to the backup you want to roll back to. Type:

cd ~/minecraft
rm -rf world world_nether world_the_end
tar -xf backups/2019.

Your world has now been restored! It’s a good idea to download these backups off the Pi periodically just in case the Pi’s storage fails.

Scheduled Daily Reboots

The daily reboots are scheduled using cron. It’s very easy to customize the time your server restarts.

To change the time that the server restarts type: crontab -e

This will open a window that will ask you to select a text editor (I find nano to be the easiest) and will show the cronjobs scheduled on the Pi. The Minecraft one will look like the following:

0 4 * * * /home/ubuntu/minecraft/restart.sh

There are 5 fields here. The default restart time is set to reboot at 0 minutes of the 4th hour of the day (4 AM). The other 3 fields are left as * to represent every day of every month. Make any desired changes here and press Ctrl+X to exit nano and update the cronjob.

To remove the daily reboot simply delete the line and save.

Installing Plugins

The server supports plugins that are compatible with Bukkit / Spigot / Paper. A popular place that you can get plugins is at where there are thousands of them!

To install a plugin you simply download the .jar to the minecraft/plugins folder and restart the server. For example, WorldGuard is a very popular plugin that lets you add protection to different areas of your server.

To install this plugin on our Minecraft server we would use the following commands:

cd ~/minecraft/plugins
wget https://dev.bukkit.org/projects/worldguard/files/latest
sudo systemctl restart minecraft

The server will restart and the plugin will be installed. It’s that simple! To use the plugin refer to the documentation on the plugin download page to find out which commands you use to configure/interact with it.

Warning: be advised that plugins are the #1 issue for performance degradation on Minecraft servers. This isn’t because all plugins are bad. Some plugins are coded very inefficiently or perform features that require a lot of hooks in the code.

You should be careful about what plugins you install on the server and if you start having bad performance disable your plugins one by one until you find the culprit!

Reconfigure / Update Scripts

The scripts can always be reconfigured and updated by downloading the latest SetupMinecraft.sh and running the installer again. It will update all of the scripts in the Minecraft directory and reinstall the startup service for you.

Running SetupMinecraft.sh again will also give you a chance to reconfigure options such as the memory dedicated to the server, daily reboots, starting the server on boot, etc.

This will not overwrite your world or any other data so it is safe to run!

Port Forwarding

If everyone on your server is on the same LAN or WiFi network as you then you don’t need to do this. If you want people to connect from outside your local network then you need to set up port forwarding on your router.

The process for this is different for every router so the best thing to do is just look at your router and find the model # and put that in google with port forwarding for easy instructions on how to do it for your specific router.

You want to forward port 25565. The type of connection is TCP if your router asks. Once you do this people will be able to connect to your Minecraft server through your public IP address. This is different than your local IP which is usually a 192.x.x.x or 10.x.x.x. If you don’t know what that is just go to google and type “what’s my ip” and Google will kindly tell you!

Wired vs. Wireless

Going with an ethernet (wired) connection is going to be faster and more reliable. There’s so much wireless traffic and other interference in the air that running your server on WiFi is not recommended.

Even if it is working great 99% of the time it can ruin your experience very quickly if the WiFi drops for a couple of seconds and you get blown up by a creeper!

All that being said, the server works fine on wireless. The script will work fine as is with a wireless connection.


PLEASE BACK UP YOUR SERVER FIRST! The server makes automated backups by default for you in the backups folder but I recommend you back up the entire server folder yourself (basically the entire minecraft folder) any time you attempt to upgrade or downgrade. If you need to roll back to older versions it won’t work without a backup from that version or older!

The easiest way to upgrade an installation is to download the latest SetupMinecraft.sh and run it. This will automatically upgrade you to the latest version.

Upgrading and downgrading to versions that aren’t the default the script chooses is pretty simple. Simply change the Version line at the top in the SetupMinecraft.sh script:

# Minecraft Server Installation Script - James A. Chambers - https://jamesachambers.com
# More information at https://jamesachambers.com/raspberry-pi-minecraft-server-script-with-startup-service/
# GitHub Repository: https://github.com/TheRemote/RaspberryPiMinecraft

# Minecraft server version

Edit this file in your favorite text editor (you can use nano or vi on the Pi like nano SetupMinecraft.sh) and change the Minecraft version to what you want.



If you are having problems on a newer version of Minecraft and want to downgrade you can do so using a complete backup of your server before you ran it on a newer version.

The reason you can’t take server data that has been touched by a version such as 1.16.1 and go back to 1.15 is that the new version adds all sorts of new data types/structures for the new content into your server data files. If you try to roll back the old versions of the Minecraft server will not understand these data types since they didn’t exist in that version and will crash.

As long as you use a backup for your server files from that version (or older) it’s as simple as changing the version in SetupMinecraft.sh just like I show in the “Upgrading” section.

You can upgrade any old version of Minecraft to any version, but again make sure you have a backup first as it is a one way street and you will need that backup if you want to roll back!

Version History

To view the version history check out the GitHub README here:


510 thoughts on “Raspberry Pi Minecraft Server Setup Script w/ Startup Service”

  1. EragonOnDragon

    I have a problem since the 1.16 update. The server starts and then immediately stops again. I don’t know what i should do. I already set it up on a new raspberry pi 4 8Gb but it still doesn’t work.

    1. Hey Eragon,

      It sounds like the server is having an error during startup. I would go to your Minecraft directory and just try running it yourself manually without screen so you can see the error.

      cd ~/minecraft/ and then

      java -jar -Xms400M -Xmx4000M paperclip.jar

      as an example. The two parameters control the minimum and maximum amount of memory. I put about 4GB roughly for this example.

      You can see exactly what is happening this way. See which error it is getting and either let us know or the error might be clear enough that you’ll know what to do on your own!

      1. Thanks for the Answer James.
        Sorry i didn’t have any time to try it the last months.
        I did as you suggested and i get with:
        java -jar -Xms400M -Xmx4000M paperclip.jar
        this error:
        Error occurred during initialization of VM
        Could not reserve enough space for 4096000KB object heap.
        I then tried it with higher Xmx values and always get the same kind of error:
        Invalid maximum heap size: -Xmx7000M (here i got the size of what ever value i said)
        The specified size exceeds the maximum representable size.
        Error: Could not create the Java Virtual Machine.
        Error: A fatal exception has occurred. Program will exit.
        If i try it with Xmx3900M i get this error:
        # A fatal error has been detected by the Java Runtime Environment:
        # Internal Error (g1PageBasedVirtualSpace.cpp:43), pid=1078, tid=1079
        # guarantee(rs.is_reserved()) failed: Given reserved space must have been reserved already.
        # JRE version: (11.0.8+10) (build )
        # Java VM: OpenJDK Server VM (11.0.8+10-post-Raspbian-1deb10u1, mixed mode, sharing, g1 gc, linux-)
        # No core dump will be written. Core dumps have been disabled. To enable core dumping, try “ulimit -c unlimited” before starting Java again
        # An error report file with more information is saved as:
        # /home/pi/minecraft/hs_err_pid1078.log
        And with any value under Xmx3900M and it starts the server as usual.
        Sorry again for the late reply and English isn’t my first language.
        Thanks for your work and al the help i really appreciate it.


  2. Hi! I’ve created my Minecraft Server throught yours Tutorials and i’m very glad that you put that on the web. Really, thank you so much for make me and my friends enjoying this game together.
    I’m wondering if you’re going to do the UPGRADE to 1.16.1 of the script, if so please let me know.

    Thank you again!


    1. This is part of James Tutorial:

      Changing Minecraft Server Version
      If you want to change which version your Minecraft server is running it can be changed by opening SetupMinecraft.sh with any text editor (example: nano SetupMinecraft.sh).

      Change the line Version=”1.15.2″ to whichever Minecraft server version you want to run. Note that that version must already exist for Paper Minecraft. You can view all available versions at the following URL:


      So if you change it to 1.16.1 and rerun the Setup its done.

      Have a nice day

    2. Before doing this you should make a backup of your world on the server (something could go wrong updating the world).

      Stop the minecraft server, edit SetupMinecraft.sh (nano SetupMinecraft.sh), change the line Version=”1.16.1″, save, and then rerun SetupMinecraft.sh. The server software should update to the latest version and should update the world.

      1. Yep! I have already an automatic backup system every day, 2 times a day, but thanks for the advice anyway! Very appreciate 🙂

    1. Greg yes, version miss-match. I am experiencing that right now after my Mac was upgraded to 1.16. Now I am not able to connect to my server. I came here hoping to see something from James to find information about Paper 1.16.

      1. You can downgrade your Minecraft Mac client to the previous 1.15.2 release (Its listed as “Changing Minecraft Client Version” in the above directions, though its screenshot looks different from the current Mac Java launcher.). Using the Java launcher client on your Mac go to “Installations” (tab), hit “+ New”, change version to “release 1.15.2”, click create, connect to your papermc server from this newly created “installation” (as its called in the launcher).

        When PaperMC gets updated to 1.16 you would need to edit SetupMinecraft.sh (nano SetupMinecraft.sh), change the line Version=”1.16″, save, and then rerun SetupMinecraft.sh. PaperMC versions can be found here: https://papermc.io/api/v1/paper

        1. Thanks for pointing this out. I completely missed this part of the instructions. Last night I worked on my old world that was upgraded to 1.16. This will come in handy for the future.

  3. Hey. Great tutorial! It’s installed and I can see the port open on a scan, but it won’t connect. What am I missing? Tried on a phone and tablet.

    1. The Android version of Minecraft is Bedrock, this tutorial installed the Java version. The two versions do not “talk” to each other.

  4. Just setup on a RP4 4gb. Super easy/fast install.

    But clients on android phone/tablets won’t see it as online. I’ve restarted, disabled all ad blocking apps, etc. Just shows “current ping” red all the time. What can I check?

    1. this is for the java version of the game while phones use something called bedrock edition which is incompatible with this server that you created

  5. First Surrogate

    Hi, this is really great!

    Question regarding the backup:
    Since the backup runs every time on restart, even though there are no changes, I wanted to ask if anyone can specify a reasonable combination with e.g. ‘rsync’? This way backups should only be done when (world) files have been changed.

    Many thanx in advance!

  6. Jamie Wilkinson

    Hey guys just to let you know.
    I have updated my pi 4 rpi to the 64bit Raspbian os and now I got my server running with 3500mb of ram stable 🙂
    Also usb boot is also in beta so now is the time to get a nice external ssd to help with the chunk loading and reloading the server and plugins etc.

  7. Hi,

    Thanks for this amazing guide! – I ran into an issue, which I’ve seen commented a few times, so though I would share what worked for me.. (I am an extreme noob and took me a while to get this stable…:D) – Im using a RPi 4 with 4gb RAM, 32gb MicroSD card.

    The issue – server would remain up for 5-10 minutes, then crash out (with just me playing).
    Used the “screen -r” command in terminal and could see the error: “java.lang.OutOfMemoryError: Metaspace”

    In terminal: java -version
    (was using 11, read a comment somewhere to change it to 8)

    First I downloaded version 8 by running this: sudo apt-get install openjdk-8-jre
    Then changed the version on the RPi to 8 by using: sudo update-alternatives –config java

    Reboot the RPi – server started and its ALOT more stable, no crashes in the last 2 hours. Hope this helps someone at least (took me all day and lots of googling! :))

  8. I’ve been referring to this guide for a year now, and never dropped by to comment about how thankful I am that you posted this. This project is the best!

    Also I thought I would share my latest and greatest, I’ve been running the latest Java Minecraft using James’s recommended setup for the past year, but with the announcement of the latest 8gig rPi4 I came back and found a comment about upgrading to Ubuntu to better utilize the increased memory headroom. After some consideration I decided to bite the bullet and try it out, and so the past few hours today were used in migrating my server from the old 2gig rPi4 running raspian 32bit to an 8gig rPi4 running the latest Ubuntu 64bit.

    I purchased the new 8gig rPi4 and the chepest aluminum passive cooling shell I could find, then pulled all the Minecraft server files off of the old server using FTP. Then I started the install process all over again.

    First off, I was delighted that getting the latest Ubuntu 64bit running was far simpler than I had feared. The gist of the setup was to flash the same Ubuntu .img file to a crap SD card and the SSD card I wanted to use. I booted up the new rPi4 with the SD card first, logged Ubuntu and shut it down, then updated the config files with the root=/dev/sda2 update mentioned in James’s Ubuntu guide. Then I booted the rPi4 with both the SD card and SSD plugged in, and that was it. From what I can tell the latest Ubuntu is ready to use the SSD with little setup.

    I also took a moment to reduce the graphic memory split as well as drop an overclock in the config file.
    With the aluminum passive cooling case, and the standard power cable I expect this will function just fine without damaging my new rPi4. When I installed Minecraft again off of this guide, the 10% suggested allocation was like 7gigs of memory, so from what I can tell the server was able to find the new memory just fine.

    After the first run, I shut everything down and FTP’ed into the server to replace the world folders, server settings, ops and whitelist files with the versions I saved off from this morning, and then fired the bad boy up again (there was of course the necessary port forwarding wrangling that is always needed when changing devices.

    When I ran the server it was clearly functioning better than before. Mobs are responding more snappily than before, and areas like our cattle farm that used to chug are now operating just fine.

    I would be interested to hear what the experts here think about whether this setup would confer much advantage to the paper Minecraft server, to my novice eye this seems like an improvement to an already awesome project!

  9. Hi. I’ve got everything up and running quite happily apart from I can’t seem to get it to run 1.15.2! I’d previously tried changing the version number, following the instructions you provided, but that didn’t seem to make any difference. I put up with at the time because I knew I was going to be doing some upgrading.
    I’ve now transferred from micro SD to an SSD and have reinstalled everything from scratch (The Pi said that it was downloading 15.2) but when I then when I run it again, it says it is running 15.1!
    I’ve checked the newly installed version of SetupMinecraft.sh which contains the line -> Version=”1.15.2″ as expected, but when the server is started and it says “updating to latest paperclip version …” it goes to “https://paperpmc.io/api/v1/paper/1.15.1/latest/download”
    Does it have anything to do with the world I’m using? I transferred the World files (which must have been 15.1). Does it default back to the world version rather than the desired server version?

  10. The install script put the minecraft directory in the ‘pi’ account home directory which on mine is the sd card. I moved the files to a mount on a usb ssd, then edited the start.sh and the minecraft.service files to match but it is still failing to start. Where else do I need to edit the new directory location? Or else where do I edit the SetupMinecraft.sh and start over?

  11. Will not let me run 1.14.3 always states paper 1.15.2 even after changing the server properties any help would be appreciated as I am trying to run a server for a pvm map called chunk defense.

  12. Hi, I am looking for some guidance. In setting up my Minecraft server on my Raspberry PI 4, I did a Google search that lead me to the MarcTV channel. I followed those instructions. Last night I ran into some issues that had me hard set the IP for the Raspberry PI. In doing so I mistyped the gateway, and the restart script from Marc Tönsing version overwrote Paperclip with a blank file when it could not resolve the wget address. I found your site as a result and realized quickly that you were the original author of the setup scripts.

    Mark’s setup is missing a great deal from your most recent update. Which makes me want to run your SetupMinecraft.sh script. The problem is that I don’t want to overwrite everything I’ve done in the server build. To prevent losing what I’ve done, my thoughts are the following:
    1. Run stop.sh
    2. Move the current Minecraft dir to be minecraft-orig
    3. Run the SetupMinecraft.sh scrip to put your configuration in place.
    4. Copy the world, world_nether world_the_end folders from minecraft-orig to the new minecraft dir.
    5. Run start.sh to ensure my original world ported over.

    Please let me know if that would keep all of the work I did in my Minecraft World. I’ll start over if comes down to it, but
    # V1.1 – Dec 15th 2019

    1. I went ahead and did it since my logic was sound and it worked. Now I am back up and running on your version with the world I started with.

      I can tell you know that the other version would tell me that I was behind X number of milliseconds, and I would have to deal with frequent stutters in the game. Minecraft is running much smoother and frankly faster.

      Interesting point. I only copied over the directory world at first. When I went to go back to the nether, it crashed. Then I realized I quit the game when I was in the nether. To fix this, I stopped the Minecraft server and copied over the other two folders, world_nether, and world_the_end. When I restarted the Minecraft server and rejoined, it put me back in the nether where I ended the other night.

      Thanks for all the great work around this build.


  13. Brandon Weynberg

    I have not been able to get on the server. When I use the command “screen -r minecraft.” I get -There is no screen to be resumed matching minecraft..-

    What could I be doing wrong?

    1. One issue I had was that the script needs sudo permissions to install stuff and configure systemd, but running sudo sets the $UserName field to “root”, instead of whatever your home directory is. So it kept installing stuff in /root/minecraft instead of /minecraft, and all of the systemd files that control starting and stopping the server (and, by extension, the screen sessions) are looking in your /root/minecraft directory. Storing those files there isn’t a super great idea, so i went into the SetupMinecraft.sh script and changed the UserName=$(whoami) variable to UserName=.

      Hope that helps!

  14. hello would anyone be able to help with command lines on the raspberry pi i know how change directory to the minecraft folder but do not know how to get back to the root folder, as you probably can see i am new to this.
    would also appreciate any help being able to see who is on the server at any current time from the pi and also how to enable cheats or change difficulty and also adding a white list.
    basically any command lines for what i have asked for help with.

    1. you type cd again to go back a directory. Also look up linux commands. You can also type dir to see what files are in the directory. You edit the files with nano or vi….ex”nano start.sh”. Also, google nano commands and vi commands.. they are just two different text editors. you have to edit other files


    1. Renaissance Slacker

      No, the Xbox and “bedrock” PC versions are compatible with each other but not with the Java Minecraft version discussed here. The bedrock version may be better optimized but the Java version has truckloads of free user-created content – mods, modpacks, shaders etc.

  15. Hello! This is hugely helpful, many thanks for this!

    I think I’ve managed to get it working, and am able to join locally; however I’d like to change the game to a custom seed. I’ve been editing the server.properties file and changing the specific seed, saving it, and restarting the server using the commands listed above but it doesn’t seem to be pushing changes. Am I missing something here?

    Any help is appreciated! Very new to this stuff…

    1. In my experience, if a world is already generated, changing the seed in settings will not do anything. A simple way is to remove your existing world (rm -rf world world_nether world_the_end) and restart the server (sudo systemctl restart minecraft) to let it generate a new world with the new seed. This will of course resett your world. I’m not aware of any solutions where you can change an existing world to a new seed.

    2. It’s probably not working because it already generated the world. You’ll have to perform the following steps to delete the current world and generate the new one with your seed:
      1. stop the server
      2. exec command “rm -rf /home/pi/minecraft/world/;rm -rf /home/pi/minecraft/world_nether/;rm -rf /home/pi/minecraft/world_the_end/”
      3. start the server

  16. Hey James, any update on using a 64-bit OS for those of us with 4GB Raspberry Pi 4s? I’d really like to take advantage of the 64-bit processor and the additional RAM. Is Ubuntu 64 a valid solution now?

    1. FYI, I jumped in and tried with Ubuntu Server 19.10 64-bit for RPi 4. It’s running like a champ! I have a 4GB RPi 4 and I’m able to use 3GB of memory for the Minecraft Server and I think the 64-bit OS runs a bit faster as well. Timings is showing fewer TPS loss during normal play than before. Getting Ubuntu to use an SSD was as easy as changing one variable in one config file to root=/dev/sda2. (I don’t remember the exact file off-hand and I don’t remember what the variable was initially.)

      I’d highly recommend it.

  17. I am currently running Java 11, per the instructions of the guide, on both the Pi and all connected clients. The server runs for about 15 minutes on average then crashes, with no error message in the servers log file. However, all connected clients get this message:

    Internal Exception: java.io.IOException: An existing connection was forcibly closed by the remote host

    Should I roll back to Java 8 and try again? Doesn’t Java 8 fail to create a virtual machine with as much RAM as Java 11?

    1. I was having a similar issue, with running on a Pi4 with 32-bit OS and OpenJDK Java11. With the scripted Max memory setting of 2700MB (-Xmx2700m), java was running out of native memory because of the large heap.
      Decreasing to -Xmx2300m solved the problem (find the setting in the last line of start.sh).
      Hope it could be of some help.
      Otherwise, you should have hs_err_pidxxx.log files in your minecraft folder that gives more information on the cause of the crash.

Leave a Comment

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

Type here..

Exit mobile version