Skip to content

Instantly share code, notes, and snippets.

@AndrewJByrne
Last active March 27, 2016 01:43
Show Gist options
  • Save AndrewJByrne/d0339f3a14c6020fc9c4 to your computer and use it in GitHub Desktop.
Save AndrewJByrne/d0339f3a14c6020fc9c4 to your computer and use it in GitHub Desktop.
Note to myself on how to update my Minecraft server VM hosted in Azure to use the latest version of Minecraft (1.9)
  1. Log into your server. I use putty
  2. Stop Minecraft sudo stop minecraft-server
  3. Go your your minecraft_server directory
  4. βœ‹ 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.
  5. βœ‹ Rename server.properties to server.properties.orig
  6. βœ‹ Rename the world directory to world.orig. This is very important because it is your original world.
  7. Go to the minecraft site and find the section that mentions server download. Here it is highlighted:
  8. 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
  9. 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
  10. 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.
  11. 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.
  12. Stop the server again with sudo stop minecraft-server
  13. 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.
  14. 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. πŸ‘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment