Categories
blog-entry

How to update paper minecraft server at command line in linux/ubuntu

You’ll need wget, so make sure it’s installed.

sudo apt install wget

Navigate to your minecraft server directory (modify this command as needed!)

cd ~/minecraft

Create a shell script with nano, naming the file “update.sh”

nano update.sh

Press <Enter> and when nano opens, paste the following code

#/bin/bash
paperver=1.16.5

wget -v https://papermc.io/api/v1/paper/$paperver/latest/download -O server.jar

Make sure the second line is correct. You want it to match the version of your game. In my case, it’s 1.16.5, but you can choose any released version.

Also note, this script will save the update as “server.jar”. You can change this as needed to fit your start script.

When you’re done, press <Control> + O to save the file

then <Control> + X to exit nano.

One more step — make the file executable!

chmod +x update.sh

Now you’re finished. You can add this to your cron jobs for a regular update, or insert it into your startup script (recommended), or call it manually whenever you want.

to execute, simply type

./update.sh

If you have any trouble operating your paper minecraft server and can’t find the solution online, reach out to me and I’ll help you. I’m trying to give back to the community as they seem to be lacking enough experts. Which is fine, as minecraft is a game for kids who are often just now learning how to code! I was just like you at one point.