Jump to content

How to deploy your free private Minecraft server with Azure for Student?


Recommended Posts

Guest cyruswong
Posted

Introduction

 

 

Student students love to play Minecraft! They can build a free private server if they join Azure for Student and have a basic knowledge in Azure. This post, we will guide you on how to setup a free private Minecraft server that is good for 6-7 players in Azure for free, as student can have $100 USD of credit every year. On the other hand, students can taste, learn, and build some in Azure thought the server building process or even get into AI with Minecraft and GPT3 OpenAI or reinforcement learning with Minecraft using Microsoft Research Project Malmo.

 

Full Demo

 

 

 

 

 

Deploy an Azure VM instance

 

 

1. Your Azure console. In the search bar type Virtual Machine and click on it.

 

 

largevv2px999.png.fb1933cb917d2c301fcebc3eedb6edb2.png

 

 

2. Click Create an Azure virtual machine

 

 

largevv2px999.png.92222c35037b541aacb384efd9bc67ee.png

 

 

3. In this page, to configure the virtual machine, you need to setup a resource group that the virtual machine belongs to, if “no” please create a resource group and choose the resource group that created. Please enter the virtual machine name and choose the region that closest to your country as the region. Also pick the availability zone that need to deploy for the virtual machine, you can also keep it as default if you don’t have any preferences.

 

 

largevv2px999.png.92d5eb74bb4f0945d94c789dc5b4a995.png

 

 

4. For the image, please choose Ubuntu Server 20.0.4 LTS – Gen 2 as the image for the virtual machine. The size of the virtual machine please choose Standard_D4s_v3 – 4 vcpus, 16 GIB memory. This specification of instance can allow 6-7 players in the server to play. The username can leave it as default as azure user. In the SSH public key source please select generate new key pair, and type in the key pair name. This key later will be used to connect to the virtual machine. Finally, in the public inbound port select allowed selected ports. In the select inbound ports, choose SSH (22), to allow SSH connection of virtual machine. Click next to disk section.

 

 

largevv2px999.png.c1c6d51ca3ca918a8ee38841241657cd.png

 

 

5. In the next section of disk section, in the OS disk type, it can leave it as default to use Premium SSD (locally-redundant storage). Please select create and attach a new disk.

 

 

largevv2px999.png.fe06cacf8c3c585e0779bad13bcd0d34.png

 

 

6. In the create new disk page, it is optional to enter a new disk name for better identification, in the source type please choose None (empty disk). In the size section please select change size.

 

 

largevv2px999.png.813f9d64da027645397f33cb209e64cc.png

 

 

7. In select a disk size section please choose Standard SDD. And select the size as 40 GIB. This is use for storing the server file and player data. Click ok.

 

 

largevv2px999.png.0becdb14d241db9ef3aa2c357391d873.png

 

 

8. Please choose Read/write as host caching section. Click Next to networking section.

 

 

largevv2px999.png.ddd88b7e627b41fffe3c3c786b2a11d1.png

 

 

9. In the networking section, you can leave it as default value, click Review + create.

 

 

largevv2px999.png.dc3e417b44b4172e75fd12844c957605.png

 

 

10. Please review the virtual machine and click create.

 

 

 

largevv2px999.png.e3cf89f0eb04f6f9d6c04f5905b50d91.png

 

11.Click download private key and create resource. After that click return and create a virtual machine.

 

 

largevv2px999.png.5d58df062abd553068a9a036602f2b01.png

 

 

12. Go to virtual machine page, click on the virtual machine you create. Select network.

 

 

largevv2px999.png.2348040bc6fd5f5aa2394ff2eba9efcc.png

 

largevv2px999.png.fdb959aa50560906c88099acb092f983.png

 

 

 

13. Add two customs inbound rule with specific value. Port 25565 is for Java edition of Minecraft and 19132 is for bedrock version.

For Port 25565 rule:

 

 

largevv2px999.thumb.png.042eed5179e8ad01c556d9afa83dff56.png

 

 

For port 19132

 

 

largevv2px999.thumb.png.f54e05169ba9d535bb314f9c4d50ac17.png

 

After finish setting up the rule, click save.

 

Connect to virtual machine and install Minecraft server.

 

  1. In the virtual instance page click to the virtual instance you created.

 

largevv2px999.jpg.112d352b719a3e598bb7f26ed292c1e6.jpg

 

  1. Click connect, select SSH and open cloud shell clicking the right hand corner cloud shell symbol

 

largevv2px999.thumb.jpg.0123de39ad99f9ceea85a4d09716248a.jpg

 

  1. After boot up the cloud shell click upload button to upload the key you created. Select the key click open.

 

largevv2px999.jpg.4ca7a1c6e4a8b80e1fd7ca6476d113fd.jpg

 

  1. Successfully upload

 

largevv2px999.jpg.1aff51cdf66cdc9d51e770738e0d190e.jpg

 

  1. After uploaded, run "ls" command to verify. Type "chmod 400 <your_key_name.pem>" to change the permission. In this case, my command is "chmod 400 minecraft-server_key.pem"

 

largevv2px999.thumb.jpg.e84da94e66c5400d8c9f5f49521dc9c1.jpg

 

  1. Type "pwd" to get the path of the private key file. And add the private key name at the end of the path. Type it in the private key path. In this case the path is /home/leung/Minecraft-server_key.pem.

 

largevv2px999.jpg.eec41139d296372cdcd5a038b2ff0c14.jpg

 

  1. Copy the ssh command and ctrl+shift+v paste to the cloud shell and press enter.

 

largevv2px999.jpg.bb9ef0c5a8dfb97f5a600393175db027.jpg

 

  1. Successfully connect to the cloudshell.

Install java version of Minecraft Server

 

 

 

1, type “sudo -s” to enter as root user, type apt-get update to update packages.

 

 

largevv2px999.png.84db3826c7a8bae141aedd4d946d0137.png

 

 

2. Type "apt-get install openjdk-17-jdk -y" to install openjdk-17-jdk.

 

 

largevv2px999.png.3c18ea005ab9ef9d784ceda37cc0c7f0.png

 

3. Type “apt-get install wget screen unzip” to get unzip package.

 

 

largevv2px999.png.16f310e281b52b549c9e0d00b977eec1.png

 

 

4. Type mkdir server and cd server, to create a folder to store server file and change directory to server

 

 

largevv2px999.png.76103e795230751ee090b27e6baea2d6.png

 

5. You will need to type wget [game_server_download_link], you can find all stable release version download URL in MCVersions.net - Minecraft Versions Download List, please download according to your version. In this case I will use version 1.19. On the website right click download.

 

largevv2px999.png.f971ecccb1405e770eca9c406c16f01b.png

 

 

Right click copy Download Server jar link.

 

 

largevv2px999.png.e360f72bde88704526c381a9d0287b2d.png

 

The command will be

 

"wget https://piston-data.mojang.com/v1/objects/f69c284232d7c7580bd89a5a4931c3581eae1378/server.jar" To download the 1.19.2 server.

 

6. Type “vi eula.txt”, change to insert mode with “i”, change eula=false to eula=true. Type :wq to save and quit. (You may use other editor such as Nano.)

 

 

largevv2px999.png.d5ea845faec6b001c29a22c5db0a0702.png

 

largevv2px999.png.6cb8773d6cea1aaafa18ff49b2858320.png

 

 

 

7. Type java -Xmx1024M -Xms1024M -jar server.jar nogui to start the server. You are completed set up a Java version Minecraft server.

 

largevv2px999.png.d6bdf08a248fca63f6847db491e90a1e.png

 

 

 

Install a bedrock version server.

 

 

To set up a Minecraft bedrock version server, the steps are pretty similar.

 

 

1. Type wget [bedrock Edition download link] to download the server version that you need. Link is Minecraft Bedrock Server Download | Minecraft. Select MINECRAFT DEDICATED SERVER SOFTWARE FOR UBUNTU (LINUX) and check the box I agree to the Minecraft End User License Agreement and Privacy Policy. Right click copy the download link

The command will be wget https://minecraft.azureedge.net/bin-linux/bedrock-server-1.19.41.01.zip

 

largevv2px999.png.472dca76d23dd1b17686012f2cc64bf1.png

 

largevv2px999.png.2016337b3e3162bcf329d45c2c2ad59d.png

 

 

2. unzip the server file, type unzip bedrock-server-% Bedrock Edition%.zip (If you don't know the name, you can search it through "ls".)

 

 

largevv2px999.png.63fd1cb547453c6c9d6d8c38de82354b.png

 

 

3. Type “./bedrock_server” to start the minecraft bedrock server, now you are completed to set up a minecraft bedrock version server.

 

 

largevv2px999.png.e425d9050cff89d40f1732993acdac53.png

 

 

Connect to Minecraft Bedrock edition.

 

 

1. In the Minecraft Launcher click Minecraft for Windows. Then click play.

 

largevv2px999.png.bc14bd4bc968d55ad43cec559b2efa15.png

 

 

2. After enter the game click Play

 

 

largevv2px999.png.f01b21093f16d2bc2fd92ca4854ead44.png

 

 

3. Click Server and click Add Server

 

 

largevv2px999.png.016f34b504c28d55312bde52ec436e8a.png

 

 

4. Enter Server name, Server Address (Your Virtual Instance IP), Port is 19132. And click save to save the server information

 

 

largevv2px999.png.cfef2c6780f4bed484182da1bf7c7062.png

 

 

5. Scroll to the bottom, in the Additional server, click the server’s name you saved. Click join Server.

 

 

largevv2px999.png.19c23decc2d79cc979fd6c91a5e3e64d.png

 

 

6. Click “Proceed”

 

 

 

largevv2px999.png.9a9c59cf2b214e709b7489f54ed972d1.png

 

 

7. Successfully enter the server, you should also see in the terminal, that it shows a player has been joined to the server.

 

 

largevv2px999.png.9db7cfcc6c0957d8b68cd05b80a987bb.png

 

Connect to Minecraft JAVA edition

 

 

 

1. In the Minecraft launcher select Java Edition

 

 

largevv2px999.png.f2e41ad53b0cfaa659ed7537da85a65a.png

 

 

2. Select Installation click new installation

 

 

largevv2px999.png.36e25afa6b9e99beb9b4c33fe27d567d.png

 

 

3. Enter the installation name, select the version that the game server installs from the drop-down menu, and select the game directory. Click “Create”.

 

 

largevv2px999.png.da60d203c91e79bbd6bbea8dca7270c5.png

 

 

 

4. Successfully installed new version.

 

largevv2px999.png.c1f8e112277760812f9b1e812a4fadb1.png

 

 

5. Go back to play and select the installation on the menu. Click “play”

 

 

largevv2px999.png.8def1d9427aac4d4d5cc7cc69051ab3f.png

 

 

6. Click “Multiplayer”

 

 

largevv2px999.png.6eb81ee2e229c54bec166c0f70372d91.png

 

 

7. Click “Proceed”

 

 

largevv2px999.png.650b3ceeae60202fc59d8c4a8e4fe5fd.png

 

 

8. Click “Add Server “

 

 

 

largevv2px999.png.cb05202d9c8ba8ca18d68861e961bb77.png

 

 

 

9. Enter Server Name, Server Address. Click “Done”

 

 

 

largevv2px999.png.862b10c8a2601ed458688fd29d498dd4.png

 

 

 

10. Select the server added, click “Join Server”

 

 

 

largevv2px999.png.90b335713e0ed446a45c461d4673a527.png

 

 

 

11. Successfully Joined, In the virtual instance terminal, you can also see a player joined to your server.

 

 

 

largevv2px999.png.90e3e09af85aaf5b41805b854f8df004.png

 

 

Conclusion

 

 

Instead of playing Minecraft, students can also try and learn a bit Azure by setting up the private Minecraft server for free with Azure for student. In future blogs we will also be exploring GPT-3 and Minecraft with microsoft/MinecraftCodex: OpenAI Codex demo using Minecraft GameTest API (github.com) This prototype uses GPT-3 Codex to power a Non-Player Character (NPC) in Minecraft. Through the discipline of "prompt engineering", exploring Minecraft SimulatedPlayer API and how to write code to navigate the worlds within minecraft and even carry out conversation.

 

Thank you for my student ZENG Haoxuan, Kam Ting Kwok, and Wan Loi Kwan from Higher Diploma in Cloud and Data Centre Administration to prepare for this guide. Also, my colleague Leo helps them to review the process.

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...