Raspberry Pi Minecraft Server Setup Script w/ Startup Service

Minecraft 1.16 Nether Update
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!
***END UPDATE

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.

Features

  • 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

Requirements

  • 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 8GB

Raspberry Pi 4 8GB

StarTech 2.5″ SATA to USB 3.0 Adapter -AND- Kingston A400 SSD 120GB SATA 3 2.5โ€ Solid State Drive

Kingston A400 SSD

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

SanDisk Extreme Pro 128GB USB SSD

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

SanDisk Extreme A1 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!

Installation

SSH into your Raspberry Pi and paste the following commands:

wget https://raw.githubusercontent.com/TheRemote/RaspberryPiMinecraft/master/SetupMinecraft.sh
chmod +x SetupMinecraft.sh
./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:

https://papermc.io/api/v1/paper/

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
./start.sh
./stop.sh
./restart.sh

-OR-

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
ls

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
./stop.sh
rm -rf world world_nether world_the_end
tar -xf backups/2019.02.15.22.06.30.tar.gz
./start.sh

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.

Upgrading

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:

#!/bin/bash
# Minecraft Server Installation Script - James A. Chambers - https://www.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
Version="1.16.1"

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.

Downgrading

PLEASE RESTORE USING A BACK UP FROM THE VERSION YOU ARE DOWNGRADING TO

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:

https://github.com/TheRemote/RaspberryPiMinecraft#update-history

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

  1. Avatar for Offgridpro

    I followed your post , pie 3b+ set mem to recomended in script at 851.
    Seams to be running,
    My router modem sets a static address for the pi at 192.168.1.101 i can see the pie when logged into router at 192.168.1.1
    I can ssh to pi@192.168.1.101 after reboots,
    From my laptop through ethernet, ./start.sh says server is running.
    But i cant log into minecraft server from android minecraft pe.
    Cannot connect to server.
    Server name: mincraft1
    Server address 192.168.1.101
    Port 25565
    What am i missing ?
    New to lan.
    My new lynksys e2500 router is not connected to internet but android is logged to it by wifi
    I want private 2 person server for my daughter no internet available at rural location
    There are no wifi signals in my area wifi free zone. Nearest neighbors are miles away.

    1. Avatar for Harrison

      Pocket edition is vastly different to the Java servers the raspberry pi can run, unfortunately they are not compatible and will be unable to connect

  2. Avatar for Josh

    how would it be possible to setup the minecraft server to be accessible from anywhere in the world, not just the local network?

    1. Avatar for jamesachambers

      Hey Josh,

      Port forwarding from your public IP address via your router is the way to make it accessible anywhere in the world. If you have access to your router you should have everything you need for this!

  3. Avatar for Hammer

    Hi James, me and my friend were looking into getting a raspberry pi to run a minecraft server, but were wondering how feasible it would be to run a mod like RLCraft, which is substantially more resource intensive as I understand it. Wondering if you had any experience with trying to get modded minecraft to run on a server as you described, we were looking to pick up a raspberry pi 4 4gb to use as the base. Any tips or advice you could give would be great, appreciate the work you’ve done to bring minecraft to small groups running pi servers.

    Link to RLCraft https://www.curseforge.com/minecraft/modpacks/rlcraft for reference.

    As RLCraft seems to require Forge, wondering if the methods used here would work, or what, I’m a bit lost as to what to do. Your guide to setup vanilla seems easy enough to follow, though.

    1. Avatar for jamesachambers

      Hey Hammer,

      Your confusion is understandable! Basically when people talk about doing client-side modifications (rather than just stuff running on the server and a vanilla client) they are talking about Forge. Long ago there used to be multi mod loaders that let you load a bunch of different client side mods from one place. Those days are sadly gone as Forge took over and is the only game in town right now.

      That doesn’t mean you are out of luck with the Paper / Spigot / Bukkit server though. They have incredible plugin support (thousands of them!) but these are never called “mods” and are called “plugins” in the Spigot world. However, the methods I use in this tutorial wouldn’t work for Forge. I’m not sure how much work it would take since I haven’t done much Forge hosting stuff as the Paper branch is much faster and uses less resources. That’s why I have used it for years with my Pi project and seen it really grow from a novelty but not that useful to a full blown server that can host a whole group of people on the Pi 4.!

      My guess is that with Pi 4’s extra RAM in there you would be okay on memory but I’d be worried about the CPU usage as there is a *ton* done to the Paper Minecraft server to make it use as much as it does (which is still quite a heavy load for a Pi in 1.14.4). I’d do some searching and see if anyone has wrote up anything on setting up a Forge server on there!

      1. Avatar for Ben Jones

        This isn’t related but me and many others have been getting crashes from server can’t catch up after about a minute anytime I load into the server. Any fix to this?

        1. Avatar for jamesachambers

          Hey Ben,

          I will take a look at it for sure. If it’s the message that I’m thinking of it’s just a warning even though it spits out a million red lines. Is your server actually just crashing or throwing ugly warnings?

          There’s a few other things I need to test for people on there. I’d like to do a little more optimization for it. I’ve been finishing up my Ubuntu image project and am ready to pivot back to my other projects like this!

          1. Avatar for Ben Jones

            It says server is running behind twice and 10000ms and then it stops running. The server is still online but the Minecraft is not running anymore.

              1. Avatar for jamesachambers

                This is definitely the right way to go. I’ll try to explain why here.

                Basically the Minecraft server, even the Paper one, will use as much memory as you allow it to. I used to have a hard limit of I think 2600 (it might have been 2700) built right into the script but the problem is not everyone’s machine uses the same memory.

                Some people will have extra packages installed that have processes running that add up to hundreds of MB really quickly. This means if I set a really low limit it would hurt everyone’s server performance just for the one guy with 100 other processes running to not crash without tuning their system.

                I decided to give you guys the control and let you do the tuning so you can get as much extra juicy RAM goodness out of your devices. The downside is if you overdo it you may crash. A good rule of thumb is to leave ~200 MB extra than what your system reports it is using in the command “top” and increase/decrease from there!

                1. Avatar for Ben Jones

                  I did use the recommended amount which was somewhere around there on my Raspberry Pi 4, but I’ll try change it that manually.

  4. Avatar for hi_pat_trick

    So after playing this for a while, it seems like it crashes due to out of memory errors whenever trying to load a new chunk. I’ll have to investigate further.

    Otherwise, it is stable with two players and runs AOK!

  5. Avatar for Mason

    Is there a way I can choose a previous patch for my server. like 1.12.1 or something of the sort? Just getting a lot of lag and then crash with the current patch.

  6. Avatar for Max

    Hi James! 2 questions:
    1) I got a benchmark score of 8026 and still my server is lagging sometimes, with the usual warning “… running xx ms behind” (mostly between 4000 and 20000ms). I guess 8000 is a quite good score, so why is it still lagging (even with just 1 or 2 players online)? Could my network connection be an issue? I have 2 plugins installed: Set.Homes and PermissionsEx

    2) Despite of some little lagg everything works fine so far until we reached the Nether. Unfortunately there are no Ghasts and no Nether Fortresses over there. I tried to look into the server.properties, paper.yml and spigot.yml if they would maybe been disabled somehow, but I couldn’t find any entry. Could that just be bad luck or could it be related to the minecraft file somehow?

    thanks!

  7. Avatar for SayAndre

    I constantly get โ€žcant keep upโ€œ errors even though it runs okay. Can I fix that ? When we are 2 players the mobs lag a Bit and shooting with arrows lags as well.

  8. Avatar for Mako

    Hi James
    We have a Issue with a Zero tick XP Farm. When I build it in my local Singleplayer World it works well. When I build it on my raspberry Pi 4 Server it does not work. Can you please help me with that?

    1. Avatar for jamesachambers

      Hey Mako,

      I think you are having the same issue as Martin so see my reply to that below. I think the key setting for you is going to be the merge-radius configuration item from spigot.yml. This is what makes all of the experience orbs merge into one and should probably be disabled to start with.

  9. Avatar for MartinMartin

    Hey, im running 1.14.4 server on my raspberry pi 4b with my 2 friends(so there is three of us at the same time playing on that server), and there is no issues at all, max 1gb of ram is being used and one core is on 100%(it jumps from 100% on one core to another, other cores are on about 5-45%), also connection is perfect since Pi is connected via Ethernet cable. But… We’ve got some issues with one of our redstone contraptions and with one particular farm… First let me explain problem with redstone contraption which is 0-tick sugarcane farm which does not work after we moved our world to raspberry pi. Secondly, our nether gold/xp farm based on pigmans does not work properly, to be precise, pigmans are pretty much laggy and experience orbs obtained from them don’t fly out. I’d love to know if it’s Pi’s performance problems or it is just caused by the fact that it uses now spigot/bukkit server files(before we moved our world to Pi we used to use mojang official server files). Other than that i’m amazed how well this server works, and thank you for sharing this guide. ๐Ÿ™‚

    1. Avatar for jamesachambers

      Hey Martin,

      I can say for certain it is the Paper/Spigot configuration files as they have optimizations that affect these that are enabled by default. Here’s some off the top of my head:

      In paper.yml:

      mob-spawner-tick-rate: 1 (try changing to 0 for a 0 tick)
      experience-merge-max-value: -1 (try changing to 0 or 1, not sure which will give it vanilla behavior off the top of my head but just experiment with some)
      max-entity-collisions: 8 (this may be affecting your farm, try raising the values and observing effects)

      In spigot.yml:
      merge-radius – Def: item:2.5, exp:3.0 (This is what is causing your experience orbs to merge, try setting to 0 for exp)
      nerf-spawner-mobs – make sure this is false
      entity-activation-range – Def: animals:32, monsters:32, raiders: 48, misc:16 (entity activation range may be modifying the behavior of your pigmen, try increasing and see if they start moving normally)

      There are a bunch of other options that can affect these behaviors. There’s even grow limits for sugarcane in there!

      Check out the Paper Minecraft Server optimization guide here. This will explain which settings do what. Pay special attention to any that say they can affect monster farms.

      After you’ve gone through that guide things should be improved but to fix the rest of them check out the official Paper Minecraft configuration documentation. There are also links for spigot.yml and bukkit.yml at the top of that page and these give you more detailed explanations on what the settings do.

      Between these two links you should be able to solve all of them! It’s definitely a lot of information to go through so don’t hesitate to use Ctrl+F to search for certain keywords like spawn, monster, etc. to help cut down how much you need to read.

      If you get stuck and can’t find a setting to fix something in there then I can create one of these farms myself and test if you have a tutorial/guide I can follow to reproduce what you’re doing as well!

      1. Avatar for MartinMartin

        Hello! Thank you for your response.

        At the moment im experimenting with all of the settings in paper.yml and spigot.yml. I did also watch how is our world behave for last two days and i’ve noticed that not only pigman farm does not work properly but our iron golems farm does not seem to work either (it is probably the same problem i suppose). I’m going to spend some time with both .yml files and let you know about results! But if you are interested what’s the deal with my problems i can send you our world (instead of creating these farms by yourself from scratch) so you can better understand issues with some of the complex contraptions we’ve build! I will be so glad if our contraptions could work again properly.

        Once again, thank you for response and I hope to hear from you soon:)

        1. Avatar for MartinMartin

          Quick update!

          XP orbs problem is now fixed! Thank you for help:)
          I’m gonna do some more experiments. I hope that all of my issues are related to the configuration files.

  10. Avatar for KLH

    Hi,

    So the script runs fine and boots, and I can connect. And then within a couple minutes it crashes… and there is no sign of Minecraft directory. No sign anywhere on the SD card in fact. How is that possible?

    1. Avatar for jamesachambers

      Hey KLH,

      I can only think of one way: SD card corruption on a failing card. Do you have any spare SD cards to test on? I have seen this twice before and both times it was the SD card.

      I’m assuming that you are checking for the folder in your home directory (cd ~) but figured I’d mention it just in case as that is where the folder will be.

  11. Avatar for Brayden

    It seems the server is running correctly however when i connect with the I.P adress I get from typing hostname -I, i get a timeout error in the minecraft launcher. In the ssh window I can see the timings reset comment. Also I see no servers appear when i let minecraft scan the local network. Any idea on why i am getting a timeout error?

    1. Avatar for jamesachambers

      Hey Brayden,

      Can you try with the IP you get from the ifconfig command instead? Hostname may be resolving differently than we expect but ifconfig should spit out eth0’s IP address directly from the interface.

  12. Avatar for Markus

    Hello and thanks for your tutorials. Everything runs great on my raspberry pi 3b+. I am now thinking about switching to the raspberry pi 4. Do you have a comparison concerning the performance? Is the change worth it? I would like a stable server for about 5 players.
    Many greetings

    1. Avatar for jamesachambers

      Hey Markus,

      It definitely makes a huge difference having more than the 1 GB of RAM and I highly recommend it!

  13. Avatar for Max

    Hi there!
    Everything is working fine so far for my server, but I also have the issue with the “frozen screen”. When I log in via SSH from my notebook everything is fine, but I can’t use my mouse or keyboard, that are directly connected to my Pi. No problem so far, as I’m only using SSH Login, but once my Wifi does not work I would have no chance to log into the Pi. The screen connected to the pi also doesn’t show me the screen I’m having on the SSH. So I guess via SSH I see the SSD boot and at the screen connected to the Pi I see the SD-boot. Could that be right?
    I read in the comments that this is due to the upgrade progress of the SD-card and the SSD. Is there a solution how to solve that issue without re-installing everything from the start?
    thanks!

  14. Avatar for pedro44

    hello,
    I have 1170 score but when I launch the server he tell me “Can’t keep up! Is the server overloaded? Running 27597ms or 551 ticks behind”… Can I solve this ?

    1. Avatar for jamesachambers

      Hey pedro44,

      This is normal in 1.14. Even if you are using a solid state drive you will usually see this message once or twice upon startup.

      What is happening is that when the server starts it is loading and crunching a ton of data. If you run the command “top” you will see that the Pi is at something like 400% CPU usage for about the first minute as all of this data is loaded and processed. After that it will drop dramatically (you can leave top open while the server loads to observe this behavior).

      I spoke to the Paper Minecraft server devs about this and they said that this was happening before in previous versions but that warning was silenced. Basically the warning is telling you that it is 27 seconds behind. This is pretty much just the time to load the server. You may see a second warning that is a much shorter time a few minutes after that (it will say something around on average 700ms to a few thousand ms for the second warning, if you see it at all).

      It’s common to see this warning once on startup even on server grade hardware (although the amount of time it falls behind is much shorter than a Pi since they are so much more powerful). The server is just doing its job and telling you that it fell behind where the timers say it should have been since it was busy loading.

      Unless you are seeing this error continuously instead of just once or twice after starting up the server it is safe to ignore as it is just a warning for your information and not an error! If you are seeing it continuously (every few minutes even after startup has completed) then that means the Pi is likely fighting with other processes for resources and you’d want to check the top command and see what is fighting with the Minecraft server for CPU cycles and close those other processes.

  15. Avatar for cornichonBeurre

    Hi,
    I have start a server with the official minecraft server 1.14 and I wonder if I can backup my world into this server you exposed ?
    Thanks.

    1. Avatar for jamesachambers

      Hey michael,

      As a server operator you can do the following command to change the game mode:

      Survival – /gamemode 0
      Creative – /gamemode 1
      Adventure – /gamemode 2
      Spectator – /gamemode 3

      You can also open the server console (screen -r minecraft) and type the command in there but you need to specify a name, so:

      gamemode 1 playername

      Bonus command:

      From the console you can also make people a server operator without having to edit ops.txt or any files:

      op playername

  16. Avatar for Icesword

    Hey How you doing sir, I would like to ask you if you could make a guide on how to make a Minecraft FTB server guide. I am running an overclocked raspberry pi 4 with 4 GB of ram using raspbarian buster. And if you could include a way to increase the maximum available ram from 2700 to 4000. I would really appreciate it. Thanks in advance.

Leave a Comment

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

Type here..