Hello everyone! It has been a crazy 2020 so far and I’m way behind on articles, pull requests, issues, etc. But even in these crazy times I do have some good news: the 1.16 Minecraft update has been released and I have updated my Minecraft setup/server management script for Raspberry Pi!
Installation
I highly recommend using Docker over the standalone version for most people. Installing Docker is as simple as sudo apt install docker.io. There are 3 Docker options available:
- The Docker version that has Geyser + Floodgate installed (allowing people running Minecraft Bedrock Edition such as on iOS, Android, and console to connect)
- The Docker version that runs the Purpur Minecraft server with Geyser + Floodgate installed (allowing people running Minecraft Bedrock Edition to connect)
- The Docker version that only includes the Paper Minecraft server (the same as this standalone version)
If you don’t yet have my Raspberry Pi Minecraft setup script visit the Raspberry Pi Minecraft Server Installation Script / Setup Guide to get it!
You can change the version here to whatever you want as long as it’s supported by the Paper Minecraft server.
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://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!
Installation
curl https://raw.githubusercontent.com/TheRemote/RaspberryPiMinecraft/master/SetupMinecraft.sh | bash
Support
The best place for support is the comments section of my post at my main post here. There’s a ton of awesome and helpful people in the comments section and hundreds of existing comments that may answer your questions.
There is also the GitHub repository at the RaspberryPiMinecraft GitHub project page where you can open an issue. This is especially good if you thing you have found a bug or have a new feature to contribute!
Backup problem: Today my SDD was full. Hundreds of backups in the backup folder.
# Rotate backups — keep most recent 10
Rotate=$(ls -1tr dirname/minecraft/backups | head -n -10 | xargs -d ‘\n’ rm -f –)
This doesnt seem to delete anything. Maybe you could take a look and fix it?
OS: Linux minecraft 5.10.17-v7l+ #1421 SMP Thu May 27 14:00:13 BST 2021 armv7l GNU/Linux
Thanks
Olli
Hey Olli,
Thanks for reporting this. I’ve fixed it on GitHub if you want to run update.sh or SetupMinecraft.sh again. The line should be:
# Rotate backups -- keep most recent 10
Rotate=$(pushd dirname/minecraft/backups; ls -1tr | head -n -10 | xargs -d '\n' rm -f --; popd)
and I had already fixed this in the Bedrock version of the script but hadn’t fixed it in this one yet. Thanks for bringing it to my attention!
Quick question, I need shutdown the pi sooner than later, is there a command to perform a server backup? I set the auto to do it weekly and dont want to wait four more days, not sure what to do.
Hey Jonn,
Restarting the server will do the trick! The backups are taken during a full restart and put in the backups folder. Can you take a look and see if you see one in there?