Creating and Operating a Minecraft Server in Microsoft Azure

This article takes you through the steps of running a Minecraft server in Microsoft’s Azure public cloud; from creating the VM to basic set-up tasks such as making yourself an operator and configuring server properties.

Update: 2/11/2017

The new Minecraft Server solution in the Azure Marketplace is here: The new template is easier to use and allows for more customization than the old one.

The new instructions for creating an operating a Minecraft Server in Azure can be found here:

Some of the reasons you might want to run a Minecraft server in Azure instead of running on your own machine are:

  • You can choose a preconfigured Minecraft server virtual machine to launch from the Azure Marketplace – no installation required.
  • Choose from a range of a VM sizes to meet your performance and cost requirements.
  • Running a server on your own physical machine means choosing between limiting access to your home network, or dealing with the security risk of exposing your home network to the internet.
  • Avoid hardware costs – pay for a VM when you need it and shut it down when you don’t.
  • Whitelist trusted players to connect from anywhere without wrestling with firewalls and port forwarding.
  • Freedom from worry about losing data to hardware failure with disks backed by Azure Storage Service.
  • If you mess up the whole machine no big deal, delete it and deploy another. If you back up your world from time to time you can restart from where you left off.
This entry was posted in Cloud, Games and tagged , . Bookmark the permalink.

33 Responses to Creating and Operating a Minecraft Server in Microsoft Azure

  1. Pingback: Creating a Minecraft server using an Azure Resource Manager template | MSFT Stack

  2. Jeff Stucker says:

    How can I install a 1.7.10 server?

  3. Jeff Stucker says:

    How do I create a 1.7.10 server?

  4. sendmarsh says:

    Hi Jeff, see this example for a 1.7 server (in this case, Scriptcraft):

  5. Vivian says:

    Can I shut down the VM when I’m done playing? Is my data going to be saved?

    • sendmarsh says:

      Hi Vivian, yes you can shutdown the VM, and the data will be saved. I would add just one note of paranoia though.. if the world data is important to you, take backups as well. I.e. regularly shutdown the minecraft_server service, save the world folder, gzip it and scp it to a local machine or onedrive/dropbox etc.. This way you are protected from both user errors, and Minecraft bugs that corrupt the world. The nice thing about the cloud environment is that if you’ve saved the world it’s very easy to deploy a VM and reconstruct it.

      • Michael says:

        How do I back-up my Minecraft server world? Is there a step by step tutorial on how to do it?

      • sendmarsh says:

        TI don’t know of step by step tutorial for this unfortunately. My comments about outline one possible set of steps: – shutdown the minecraft_server service
        – save the world folder
        – gzip it
        – scp it to a local machine or onedrive/dropbox etc..
        It would also be quite simple to script a sequence like that and then set up a cron job which executes it daily.

  6. Tom says:

    Where can I adjust the amount of RAM allocated to the server? Have it on a 12gb box and want to allocate most of that.


    • sendmarsh says:

      Hi Tim, SSH to the virtual machine and edit this file: /etc/systemd/system/minecraft-server.service. e.g.
      sudo vi /etc/systemd/system/minecraft-server.service

      You’ll see a line like:
      ExecStart=/usr/bin/java -Xms1024m -Xmx1024m -jar /srv/minecraft_server/minecraft_server.1.8.jar nogui
      Increase the -Xms and -Xmx values.Then restart the minecraft-server service:
      sudo systemctl restart minecraft-server

  7. Uwe Falkenberg says:

    How can I update to Server 1.9 ?

    • sendmarsh says:

      Follow these instructions to deploy a 1.9 Minecraft server:
      – updating an existing server from 1.8 to 1.9 would be more complicated. Not sure if Minecraft support that, but the way I’d do it would be to shut down the server, copy over the 1.9 Minecraft server jar file, update the Ubuntu minecraft-server service to point to the new jar file, restart the service, hope the world files are compatible..

      • EJ says:

        I was just forced to update to 1.9.2 :). I just did what you said: download the 1.9.2 jar file, changed the server conf, restarted the server (it prompted me to reload the daemon, but that might have been because I did not stop it first). And off I went. Thanks for all your great support sendmarsh!

  8. Al says:

    Ho to upgrade to server 1.9?

  9. sendmarsh says:

    Follow these instructions to deploy a 1.9 Minecraft server: – see my reply to Uwe for more details.

  10. Cat says:

    For the SSH thing, my public and private port are the same, and it’s not a randomly high number. Is this a problem? Did I follow the instructions correctly? Can I change my public port to any number? Can I continue with the public and private port being the same number?

    • sendmarsh says:

      That’s not a problem. It’s possible the default portal behavior has changed and it no longer assigns a high random port. You can change it if you want, or leave it the same.

  11. Michael says:

    Thanks for your help. I have stopped my VM and when I tried to start it again my Minecraft could not connect to it and it said: ‘ Can’t connect to server’ on the server list. My friends also could not connect to the Minecraft server. I than saw that the VM said it was running and we think the Umbuntu server is running but the Minecraft server on top is not. I am quite new to Umbuntu and server management and any thoughts would be appreciated.
    I have also installed PUTTY but how do I find the port? We do not have a VM Classic and we only have a VM. ‘Endpoints’ don’t seem to be coming up in the all settings of my VM. Help would be appreciated- thanks.

    • sendmarsh says:

      Hi, if you followed these instructions, but don’t have “classic” VMs listed, maybe you’re using the old portal ( Can you confirm you’re using the new portal (

  12. Andrew says:

    How much does this cost, i.e. the minimum you need to spend for 1 hour of game time? How does it compare to realms? Would anyone like to share their costs?

  13. Pingback: Host Game Server On Azure | Information

  14. AndrewS says:

    Was this silently killed? Looks like most links and documentation on has vanished, and of course the minecraft images themselves…
    It’s a shame there’s no notes as to what or why it’s all gone.

  15. pkphlexx says:

    Love it! Thanks for all the instructions, I was able to build a multiworld forge/sponge server. The only issue that I really had was trying to send minecraft commands to the console. I had to use screen then start up the service. Keep up the good work.

  16. Mikerbiker says:

    I am having the same problem. When first creating the Minecraft server and setting the username and password, I should be able to enter whatever values I want for a brand new user/pswd combination, but it always gives the error of an invalid password. What password would it want?

    • sendmarsh says:

      Yes you should be able to enter any valid Linux username and password for the VM configuration. Some things to keep in mind:
      – Don’t use characters in the password that are bash shell special characters, i.e. avoid using “‘`$\#[]!|;{}()~
      – Make the user name at least 6 characters
      – Have a password length of at least 10 chars

      • sendmarsh says:

        If you’re into regex, this is how the password is validated: “regex”: “^(?:(?=.*[a-z])(?:(?=.*[A-Z])(?=.*[\\d\\W])|(?=.*\\W)(?=.*\\d))|(?=.*\\W)(?=.*[A-Z])(?=.*\\d)).{12,72}$”,

  17. Does this work with 1.12.2 Spigot?

    • sendmarsh says:

      It deploys a basic Minecraft server running the latest version. If Spigot works with that then yes, however it doesn’t do anything special for Spigot. You could clone this and create your own Azure Resource Manager template that does.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s