Creating a Minecraft Server on Microsoft Azure Cloud

azure cloud cloud computing gaming microsoft azure Aug 11, 2023

By: The Bluu Kazi Dev Team


The purpose of this documentation was to learn hands-on with the resources and tools offered by Microsoft’s Azure Cloud provider in order to garner both technical knowledge and cloud experience. I decided to record and document the steps needed to create a Minecraft server and later organize what I learned within this document detailing each step and method used. I became more curious and determined to continue learning as I began to understand more about what I was building and having fun while doing it. The more I delved into creating the server, the more I learned the terms and tools provided by Azure, and the easier it became. I also hope this documentation can help and empower others on this similar path to not only learn about cloud computing but also to get out of their comfort zone and become more innovative.

Introduction

To create and use Azure Cloud services in order to build a Minecraft server, you will need an Azure subscription. Upon signing up, an Azure subscription is created for you. The created subscription will allow you to build and deploy a number of services such as cloud-based applications, artificial intelligence services, and advanced insights from your data – all important for creating and deploying your Minecraft server.

 

Learning Objectives

This document will provide you insights to:

  • Learning about Azure sign-up options including Azure’s free account
  • Creating an Azure Free Account
  • Navigating the Azure Portal
  • Understanding Virtual Machines, Virtual Networks, and Security Groups
  • How to Create a Minecraft Server

 

Prerequisites

  • Knowledge of basic cloud computing terms and concepts.
  • A valid credit card to register for an Azure free account (optional).

 

Creating an Azure Account

You can create an Azure account by purchasing access directly from Microsoft by signing up on the Azure website. However, if you’re new to Azure, Microsoft provides users the ability to sign up for a free account to start exploring services provided at no cost. Once you are ready you can choose to upgrade your account and begin paying for the Azure services not included in the free catalog.

The Azure free account will provide users free access to popular Azure products for 12 months, a $200 USD credit to spend for the first 30 days, and access to more than 25 products that are always free. New users should utilize this method to begin exploring Azure and get more familiar with their resources and services. In order to sign up, the user will need to input their phone number, credit card, and their Microsoft or GitHub account.

NOTE: You will not be charged for any services with Microsoft Azure until you decide to upgrade your account. 

 

Create an Azure Cloud Account

  1. In a web browser, go to https://azure.microsoft.com/free.
  2. Select the Start free green button at the center of the Azure home page.
  3. Sign in with your Microsoft or GitHub account. If you do not have either, create a free Microsoft account.
  4. After signing in, on the About you page, select your correct country/region. Enter your full name, email address, and phone number in the required field areas.
  5. On the Identity verification by phone page, input your country code and phone number. Select a preferred method of verification between a call or text message. This method will provide you with a verification code. Input the code in the Verification code box, and select Verify code.
  6. Upon verification, you will be asked to provide valid details of your credit card. The credit card information is used as an alternative verification method. You will NOT be charged unless you upgrade your account.
  7. Lastly, review the privacy and usage agreements and then select Sign up.


Congratulations! You have successfully created and set up a free Microsoft Azure account and should be directed to the Azure portal home page. Now you can begin creating the Minecraft Server.

 

Azure Subscription

When you sign up, your Azure subscription is created by default. An Azure subscription is a logical container used to provision resources in Azure. For more information on subscriptions click here.

 

Creating a Minecraft Server with Azure Cloud Services

After successfully creating your free Microsoft Azure account you will have the opportunity to begin utilizing the services provided for creating the Minecraft Server. The Minecraft server you will be making will cost up to $31 per month*. However, there are far cheaper options which we will explore.


* You will keep being charged $31 for the Minecraft server every month only if you keep it up and running for the entire duration of the month or the following months. It is important to stop or delete the services after completion in order to avoid being charged.

The above illustration depicts the virtual network we will be creating for our Minecraft server. It may look daunting and complex, but the process of creating this network is incredibly simple. This network is essentially only a VM, or virtual machine, with a firewall. The NIC, or network interface card, allows users to connect our VM to the Internet, and the public IP address allows users to reach the Minecraft server from the Internet. Both of these components as well as the subnet and virtual network, are created when the VM is created. The security group can also, and will, be created when we create the VM. 

 

Let's begin creating the Minecraft server with Microsoft Azure:

1. Upon signing in, you should be directed to the home page of your Azure portal. 

2. Click on Create a resource located on the top left-hand side of the navigation panel.

  • Clicking Create a resource should redirect you to the portal’s marketplace. In the search bar, type “Ubuntu Server 18.04 VM” and press enter. Your search results will now appear. Make sure to select the correct VM.
  • By clicking on the correct Ubuntu Server 18.04 VM, the portal should redirect to another page illustrating the option to create the VM and an overview of the product. Select Create.

3. Now we are at the stage of creating a virtual machine where we will configure the VM that will host the Minecraft server. Now remember, upon signing up your subscription was created for you. Select your created subscription which will cover how much you plan on spending to run the Minecraft server.

  • After choosing the proper subscription, you need to choose which Resource group to use, which is the container that holds every component of your Minecraft network. Since you do not have one yet, click Create new and then create a name for this new Resource Group.

  • In the Instance details section, we need to give the VM a name. I recommend making the name something obvious and easy to remember, like MinecraftServerVM.
  • Then choose the region that you are in to ensure the lowest possible latency between you and your server. To choose a region select the drop-down menu and select the region. In this case, if you are on the East Coast select (US) East US.
  • Keep the availability options and image options the same/unchanged.
  • Choose in the drop-down menu what size you’d like your server to be. I recommend the B2s as the absolute minimum size for your server. If you cannot find the B2s in the drop-down menu make sure to click on Select size and choose the correct B2.

  • Next, in the Administer Account section, you will need to choose what kind of authentication you would like to utilize in order to log into your VM. You can choose between SSH public key or Password. Azure will now generate an SSH key pair for you and allow you to store it for future use. It is a fast, simple, and secure way to connect to your VM.
  • The last thing to complete on this page is to open the SSH port for remote login so you can access the server remotely. In the Inbound port rules section, select Allow selected ports and then select the SSH port.

4. Now go into the Networking tab which can be found at the top of the page. Here you will attach the VM to a virtual network, assign a public IP address, and create a network security group to keep the network safe from unauthorized users.

  • A virtual network is a remote computer network – meaning your virtual computers or VMs, can attach themselves to this network in order to communicate with one another and computers on networks that are also connected with your virtual network. The next step will be to create a virtual network. Click Create new and give the network a name, I would recommend something obvious and easy to remember again like MinecraftVNet, and click OK.
  • Go to the Public IP form field and click Create new. Assign the public IP address a name, I would recommend something obvious and easy to remember again like MinecraftPublicIP, and then click OK.
  • In the next field called NIC network security group, you will configure a security group for the network. This security group will prevent unwanted and unauthorized traffic to enter and leave your network, as well as allow express permissions to allow people to play Minecraft on your server. Click the Advanced selection and click Create new under the Configure network security group drop-down that appears.
  • A small panel will open on the left-hand side of the screen. Click add an inbound rule to add an Allow rule to give access to people to be able to connect to and play Minecraft on your server. Continue by selecting Service tag for the Source, Internet for Source service tag, 25565 for the Destination port ranges, TCP as the Protocol, Priority to 1010, and the name to something obvious and easy to remember like AllowMinecraft. Finally, click Add to create the inbound rule. And click OK to finish creating your network security group.

5. Click Review + create at the bottom of the page to create your VM and all of the components for your network.

6. Lastly, you need to configure a DNS name for your VM so it can connect to the Minecraft server from the Minecraft login clients.

  • Click on All Resources on the left-hand side’s navigation panel and select your public IP address.
  • After selecting your public IP address, click on Configuration on the left-hand side’s navigation panel. Choose Dynamic under the Assignment section and then provide a DNS name under the DNS name label field.
  • Once this is complete, you can now log into your VM and download the Minecraft server remotely. 

7. The final step will be to log into your remote VM and follow the instructions listed on Linuxize to successfully install a Minecraft server onto your remote VM.

 

Conclusion

With this documentation, you are provided with a template to follow step-by-step assisting you with creating a free Azure Cloud subscription as well as a Minecraft server. In completion, you should have all of the resources discussed at the beginning of this document: a Microsoft account, a free Azure Cloud account, a VM, an NSG, a VNet, a subnet, a NIC, and a public IP address. Upon completion, you should also have a good understanding of how to navigate the Azure portal and where to find and utilize Azure services and tools.

New Things Update Regularly