How to spin up your own Minecraft server at home

Spinning up your own Minecraft server may seem like a daunting task, here at Aussie Server Hosts, we can manage all the back-end stuff for you!

However in this guide, we can show you how you too, can spin up your own Minecraft server at home, just like how we do it, as well as break down some more important details required for this endeavour.

Requirements Overview

  • A machine to run your server on (duh!)

  • Enough CPU and Memory resource for the amount of players you intend to have

  • A publicly addressable internet connection, not CGNAT (we’ll explain what this is down below)

Hardware Requirements

Here is a simple breakdown requirements outlined by the Gamepedia Minecraft Wiki

Players CPU RAM Internet Speed
1-3 Practically any CPU from the last 10 years 512MB 3Mbit/s Download 2Mbit/s Upload
3-5 Practically any CPU from the last 10 years 1GB 6Mbit/s Download 3Mbit/s Upload
5-8 Practically any CPU from the last 8 years 3GB 8Mbit/s Download 4Mbit/s Upload
8-12 A CPU from the last 6 years, at least 3.6Ghz 5GB 14Mbit/s Download 7Mbit/s Upload
12+ A modern CPU in the last few years running 4Ghz+ 6GB+ 30Mbit/s Download 15Mbit/s Upload

Network Requirements

This is an important part. You will need to have a publicly addressable internet connection, without carrier grade NAT, to be able to host a Minecraft server that can be played across the Internet (not required if you only want to play it on your LAN).

What does this mean?

Well, for people to be able to play on your server, they must first be able to access your server.

cgnat-diagram (1).png

As you can see, the diagram on the left, people on the internet can directly hit your edge firewall/router, this is what you want as people will need to be able to connect to your IP address that your server will be listening on.

The diagram on the right represents what a CGNAT (carrier grade NAT) network would look like. As you can see, you and your neighbours would be behind your carrier (internet provider)’s firewall and all share a single public IPv4 address. With this sort of setup, you would not be able to host your own server, as there isn’t a way to know whether the incoming traffic is meant for you or your neighbours as, to the public internet, you are one shared IPv4 address.

How can I find out if I have a publicly addressable internet connection?

There are two things will you need to check:

  • What the IP address the internet sees is

  • What the IP address is on your edge firewall/router

You can easily check your public facing IP address by any of the multitude of results on Google, one such site is https://find-ip.net/

Here is your public IPv4 address for your convenience:

Next you will need to compare it do the IP address that your edge firewall/router has

Operating System Setup

At Aussie Server Hosts, we run all our servers on a mix of Clear Linux and Ubuntu Linux for higher performance. Now we know not everyone is proficient at Linux, so we have included both guides for both your favourite Linux distro as well as Windows and MacOS.

For Windows, you should add about 2GB extra RAM and a faster CPU to your requirements to that above.

For MacOS, you should add about 1GB extra RAM and a faster CPU to your requirements to that above.

The guide below will be based on the documentation on the Docker Minecraft Server README

Clear Linux

Install docker with

sudo swupd bundle-add containers-basic

Enable and start docker with

sudo systemctl enable docker --now

Make a data directory to attach to

sudo mkdir /mcdata

Run the Minecraft container

sudo docker run -d -v /mcdata:/data -it -e EULA=TRUE -p 25565:25565 --name mc itzg/minecraft-server

Find your server's IP address with

hostname -i

You can now edit the configuration of your server in /mcdata and connect to your server on it's IP address

That's it! You now have a server you can play on your local network! Read on to find out how you can allow people to connect to your server over the internet.

Ubuntu/Debian

Install docker with

sudo apt update -y && sudo apt install docker.io -y

Make a data directory to attach to

sudo mkdir /mcdata

Run the Minecraft container

sudo docker run -d -v /mcdata:/data -it -e EULA=TRUE -p 25565:25565 --name mc itzg/minecraft-server

Find your server's IP address with

hostname -i

You can now edit the configuration of your server in /mcdata and connect to your server on it's IP address

That's it! You now have a server you can play on your local network! Read on to find out how you can allow people to connect to your server over the internet.

CentOS/RHEL

Install podman with

sudo yum install podman-docker -y

Make a data directory to attach to

sudo mkdir /mcdata

Run the Minecraft container

sudo docker run -d -v /mcdata:/data -it -e EULA=TRUE -p 25565:25565 --name mc itzg/minecraft-server

Find your server's IP address with

hostname -i

You can now edit the configuration of your server in /mcdata and connect to your server on it's IP address

That's it! You now have a server you can play on your local network! Read on to find out how you can allow people to connect to your server over the internet.

If you run into permission issues starting the container, you may need to configure selinux properly, which we will cover in another blog! For now, you can setenforce 0, but this is not good practice.

Windows

WIP

MacOS

WIP

Network Setup

To be able to allow your friends to connect to your server over the internet, you will need to have the game ports exposed on the internet.

With this, we will use NAT/Port Forwarding (Network Address Translation + Port Address Translation), which takes your Public IP and Port, explained above, and pass it through/remap it to your internal machine which is running Minecraft. What this does is, when someone tries to access your public IP on that designated port, it instead forwards that connection into the internal address on the specified port.

nat-diagram.png

First we will need to access your edge firewall/router’s interface and find the NAT or Port Forwarding functionality.

WIP

Previous
Previous

Valheim 0.146.8 Update