How to Start Your Own Minecraft Server on Azure Cloud
Playing Minecraft is a lot of fun, but it can be even better when you create your own server, giving you control over game settings, mods, and who joins. Using Azure Cloud to host your server allows you to keep it running 24/7 without relying on your own computer’s resources. In this beginner-friendly guide, we'll walk through how to set up a Minecraft server on Microsoft Azure, from creating a virtual machine to configuring your server for gameplay.
Step 1: Set Up an Azure Account
To start, you'll need a Microsoft Azure account. Azure offers a free account with $200 in credits for the first 30 days, which is more than enough to get your Minecraft server up and running.
- Sign Up for Azure: Go to the Azure website and sign up for an account.
- Set Up Billing Information: You’ll need to enter billing details to access the free tier. Don't worry—you won’t be charged as long as you stay within the free credit limit.
Step 2: Create a Virtual Machine (VM)
Your Minecraft server will run on a virtual machine (VM) within Azure. A VM is essentially a computer in the cloud that we can access remotely.
-
Go to the Azure Portal: Log in to your account at portal.azure.com.
-
Create a Virtual Machine:
- In the left menu, click on Virtual Machines and then click + Create.
- Select Virtual Machine from the options.
-
Configure VM Settings:
- Subscription: Select your Azure subscription.
- Resource Group: Create a new resource group (e.g., "MinecraftServerGroup").
- VM Name: Give your VM a name, like "MinecraftServerVM".
- Region: Choose a region near you to reduce latency.
- Image: Choose Ubuntu Server 20.04 LTS as your operating system.
- Size: For a small server, the B1ms size works well and is affordable.
-
Authentication:
- Under Authentication type, select Password.
- Enter a username and a strong password that you will use to access the server.
-
Review and Create:
- Review your configurations, then click Create to deploy your VM.
- This process may take a few minutes.
Step 3: Connect to Your Virtual Machine
Once the VM is set up, you'll need to connect to it to install the Minecraft server software.
- Find Your VM's IP Address: Go to the Virtual Machines section in the Azure portal and select your VM. Copy the public IP address.
- Connect via SSH: Open a terminal or command prompt and type the following command, replacing
yourusername
with the username you set up, andyour-ip-address
with the IP address of your VM:Bash - Enter Password: Type your password when prompted to connect to your VM.
Step 4: Install Java on Your VM
Minecraft server software is written in Java, so we need to install it on our virtual machine.
- Update the Package List:
Bash
- Install Java:
Bash
- Verify Java Installation:
You should see a version number confirming that Java is installed.Bash
Step 5: Download and Set Up the Minecraft Server Software
-
Create a Directory for the Server:
- Inside the VM, create a folder for your server:
Bash
- Inside the VM, create a folder for your server:
-
Download the Minecraft Server .jar File:
- Get the latest Minecraft server file from the Minecraft server download page and copy the link.
- Download it to your VM:
Bash
- Replace
your_server_file.jar
with the actual server file URL you copied.
-
Start the Server to Generate Files:
- Run the following command:
Bash
- This will create necessary files, including the
eula.txt
file.
- Run the following command:
-
Accept the EULA:
- Open the EULA file and change
eula=false
toeula=true
:Bash - Press
CTRL + X
, thenY
, and then Enter to save.
- Open the EULA file and change
Step 6: Configure Your Server Properties
To customize the Minecraft server settings, edit the server.properties
file.
-
Open server.properties:
Bash -
Edit Settings:
- Set the game mode (e.g.,
gamemode=0
for survival,gamemode=1
for creative). - Adjust max players by changing
max-players=20
. - Leave the default server port (25565) as is, unless you have a reason to change it.
- Set the game mode (e.g.,
-
Save and Exit the file.
Step 7: Allow Minecraft Traffic to the VM
Azure blocks all traffic to VMs by default, so we need to open the Minecraft server port.
- Go to the VM’s Network Security Group:
- In the Azure portal, go to your VM and select Networking.
- Add Inbound Port Rule:
- Click Add inbound port rule.
- Set Destination port ranges to
25565
. - Protocol: Choose TCP.
- Action: Allow.
- Name: Give it a name, like "MinecraftPort".
- Click Add to apply the rule.
Step 8: Start Your Minecraft Server
You’re now ready to start your Minecraft server.
- Run the Server Command:
- In your SSH session on the VM, type:
Bash
- In your SSH session on the VM, type:
- Join the Server:
- In Minecraft, go to Multiplayer and add a server with your VM’s public IP address.
Step 9: Manage and Maintain Your Server
For smooth gameplay, regularly check for Minecraft server updates and back up your world data.
-
Backing Up Your World:
- Copy your world folder periodically:
Bash
- Copy your world folder periodically:
-
Updating the Server Software:
- Download new server versions from the official Minecraft site and replace your old
server.jar
file.
- Download new server versions from the official Minecraft site and replace your old
Running a Minecraft server on Azure gives you the flexibility to keep it online at all times and scale resources as needed. This setup also allows you to customize your server experience fully. Enjoy building and exploring with your friends on your own private Minecraft server!