- Log into your server. I use putty
- Stop Minecraft
sudo stop minecraft-server
- Go your your minecraft_server directory
- β Rename all .json files to .json.orig. For example,
mv ops.json ops.json.orig
. These are your current game settings/configuration and you'll want to restore them later on. - β Rename server.properties to server.properties.orig
- β Rename the world directory to world.orig. This is very important because it is your original world.
- Go to the minecraft site and find the section that mentions server download. Here it is highlighted:
- Hover over the link, right-click and select copy shortcut. The link will look something like https://s3.amazonaws.com/Minecraft.Download/versions/1.9/minecraft_server.1.9.jar
- Download this version of Minecraft server using the command
wget -O minecraft_server.1.9.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.9/minecraft_server.1.9.jar
- Open the script you use to start Minecraft on your server. On my machine it is located at etc/init/minecraft-server.conf. Edit the last line in the file (exec ...) as highlighted below, which basically updates the server to the newer version.
- Start the server again with
sudo start minecraft-server
to make sure it starts fine and also to let the jar file unpack the various user files/settings and its world. Now you know why we renamed the files in steps 4,5 and 6. Had we not done so, the first run of the new server would have repaced them and we'd have lost our world and settings. Let's get them back now. - Stop the server again with
sudo stop minecraft-server
- Rename all files from step 4 back to their extension without the .orig, e.g., ops.json.orig -> ops.json You'll be asked to replace the new files that were created when the new server first ran. Confirm this overwrite.
- Renaming your world.orig file back to worl is a little trickier. Despite stopping tyhe server, I wasn't able to overwrite it. I could probably use
chmod
to change the access permissions on the file, but instead I did the following
mv world world.new
mv world.orig world
You can now restart the server, launch Minecraft on your deskto, connect and see the server running the latest version of Minecraft you downloaded here. π