I created this guide as a father looking for a way for my son to play Minecraft with his friends.
These are instructions to create a free, always-on Minecraft server using Oracle's always-free tier. Using this guide we will create a Ubuntu 22.04 server with a 4 OCPU and 24 gb ram Ampere virtual machine, which is plenty to run multiple Minecraft servers.
This guide assumes you have already created a free account in Oracle, and have the knowledge/ability to connect to a server via SSH.
This guide also provides steps to connect an Xbox Console to the custom server. As well, I've added intructions to install Crafty a neat free server dashboard to make it easier to deploy and manage your Minecraft server(s). Recently, I added instructions for hosting a cross-platform server via Crafty to enable players on both Java and Bedrock players to play together.
- Create your Oracle server
- Ports, security entries, and firewall rules
- Install Minecraft on the server
- Connect to the server on Xbox
- Other Oracle settings: harden your SSH connection, increase storage, reserve static IP, add cloudflare
- Optional: create a server with crossplay enabled for java and bedrock
- Support this project
-
Select Ubuntu 20.04. We're using the full version, not minimal, so that we can select an Ampere shape. This will allow us to have more cores and ram than the default Ubuntu image, which only has 1gb ram.
-
Select shape Ampere.
I used 2 OCPU and 12 gb ram (this is half of the free tier allowance)I switched to 4 OCPU and 24gb ram, which is the max for free tier. Scale down if necessary. -
Make sure that assign public IPv4 is checked in network, and save your public and private SSH keys.
-
Create the instance.
-
After your Ubuntu server is created, go to the instance details, find “Primary VNIC” section, and open the subnet link (or create a new one).
-
Open Default Security List (or create a new one if one doesn’t exist yet)
-
Add Ingress Rules to open UDP ports 19132 for Bedrock, both TCP and UDP ports 25565 for Java edition (or do them both while you're here), and TCP port 8443 for Crafty's webUI. Use CIDR for Source Type, 0.0.0.0/0 for Source CIDR, and the specific port noted for each for the Destination port.
-
Then, go to networking, virtual cloud networks. Select your compartment on the sidebar, then select your VCN from the list.
-
In the VCN settings, on the resources sidebar, select Network Security Groups, create new, and add the same rules exactly as above.
SSH to your server: ssh ubuntu@ip_address
Upgrade all packages:
sudo apt-get update
sudo apt-get upgrade
Let’s reset the firewall rules and open the ssh and Minecraft ports:
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -F
sudo iptables-save
sudo netfilter-persistent save
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw limit 22/tcp
sudo ufw allow 19132/udp
sudo ufw allow 19134/udp
sudo ufw allow 25565
sudo ufw allow 8443/tcp
sudo ufw enable
sudo ufw status
Notes:
netfilter-persistent
should save an empty ruleset to disk so it will be reloaded on reboot, otherwise you'd need to re-run the commands each time the server reboots.- For bedrock I'm opening ports 19132/upd and 19134/upd which will allow me to have two servers, you can open more as needed if you add additional servers
- For Java I'm opening 25565
- Port 8443 is what we'll use to access the Crafty webUI
- I'm using
limit
on 22 to prevent brute force connections to SSH
- Install Minecraft Bedrock directly on the server to play on PC and Xbox, proceed here
- Install Crafty, my preferred option, to manage and deploy different versions of Minecraft. To do so proceed here
If you found this guide helpful, please consider buying me a coffee by clicking the link below. I'll do my best to keep this guide up to date and as user-friendly as possible. Thank you and take good care!