Family fun with a Minecraft server
A home in Minecraft

Family fun with a Minecraft server

Summary:

We set up our own Minecraft server for use by family and friends. Using a VPS and some time to spare you can do it too! With the right tools, it’s easy to do.

We’re a Minecraft family

The kids play it every moment they can. On top of just playing, my oldest is coding so called mod packs, that are modification and additions to the game. My youngest is playing Pixelmon, which mixes it with Pokémon (his other favourite pastime). He can (and will) tell you all about the numerous creatures and their attributes that appear in the game.

My wife plays as well as she likes to build fancy houses, maintain her garden and her fields and keep her farm animals well cared for. Both she and the kids can tell you about the many recipes that are used to build new things. Recipes is where you combine the materials that you have gathered and mined into new things. For example: wood into planks, planks into sticks. Sticks, with some coal, into torches. The possibilities are virtually endless. Take a look at what you can do with planks alone.

Playing together is fun

Although you can play Minecraft by yourself, when you play the game together it becomes more fun! Regardless if you’re in the same room or not. Wherever you are in the world, you can connect to the same server, go into the same virtual world and play together. The worlds are persistent, meaning it stays after you logout, so you can build and sculpt your own little world!

Pigs in the garden in Minecraft
Do not forget to tend to the pigs

To play together you could connect to the official servers. To have your own little world and scratch your own geeky itch, you could also setup a server for the family to play on.

This is what we are going to do here.

Picking our setup

If you want to setup your own server, you have some options like:

  • A Minecraft hosting service, like Apex Hosting
  • Your own server at home, like an old PC
  • A Virtual Private Server (VPS)

A hosting service is the easiest way to start, as it comes with an interface completely focused on the game. Completely different from setting up your server on an old PC. For this you would have to setup your Operating System, base packages, security, backup and so on.

We chose to go with a VPS, which is a bit of middle ground. It has the following advantages for the provider that we chose:

  • Basic server setup and things like backups are arranged for you.
  • Installation and configuration via a web interface possible (Plesk).
  • Through Docker we can easily run multiple servers (we’ll come to that).
  • You can do other things than just Minecraft, if you’d like to.

Preparing the VPS

Choosing a VPS, with a web interface to set it up and having Docker means however you can keep it relatively simple. Yes, I know, relative is well… relative. Be adventurous and bear with me 🙂

We chose Strato as VPS provider. It’s based in Germany, which means near to us, affordable and covered by the GDPR. We chose a Linux package with sufficient memory to run multiple servers at once (32GB) and with sufficient storage for files (800GB).

As you can see it will cost you a monthly fee. In our case 15 euros per month.

After the package is available, we reinstalled the Operating System (OS). It comes with Ubuntu 18.04. LTS, but as we wanted to focus on hosting and playing on Minecraft servers, we reinstalled Ubuntu 18.04. LTS with Plesk. Plesk is a web interface that makes configuring the server so much easier and the package came with the license.

We attached a domain name to the server. If you don’t have your own domain name, either get one through a registrar that does DNS services as well, or get a dynamic one like spDYN and adjust your DNS settings accordingly.

If Docker is not pre-installed with your server, install it now. In Plesk, you can install or find it under Extensions.

Configuring the Minecraft server

Once Docker is installed, find the appropriate Docker on the Docker Hub. We recommend itzg/minecraft-server as it allows you to install a lot of variants through it’s settings.

Search for “minecraft-server” and select the one from itzg

Other extensions you should install in Plex:

  • Firewall – activate and manage the firewall.
  • Let’s Encrypt – to setup a certificate for secure connections
  • SSL It! – to easily manage TLS/SSL settings

For the firewall, open up TCP port 25565 for incoming connections.

Then in Docker, configure it similar to this:

Under type the default option is “VANILLA”. It’s okay to keep it on that. We use PAPER and PURPUR, but the differences might not be relevant to you.

If memory is on 1G (1 Gigabyte), change it to at least 3GB.

Replace /data/minecraft-data with the location of a writable directory on your VPS server. You need to setup the volume mapping to ensure the data is kept when you restart the server and especially, when you update the Docker container.

Now (re)start your server! It might take a few minutes, so be patient.

Some last steps

That’s it, you’re done! Well almost. You need to “op” yourself in Minecraft. Being op(erator) means you can manage the game and server from within the game. To do this we need to use the command-line interface.

SSH into your server. In Windows you could use Putty, or in Linux and MacOS the command-line / terminal. The root password should’ve been emailed to you when you set up the VPS.

ssh [email protected]

Once you’re logged into the server:

# docker ps

This will be the result (some information will be different):

a394aa162f1f itzg/minecraft-server "/start" 5 days ago Up 8 hours (healthy) 0.0.0.0:25565->25565/tcp, :::25565->25565/tcp, 0.0.0.0:25575->25575/tcp, :::25575->25575/tcp minecraft-server

Note the italic text, that is the Docker container ID. You need it to login to the so-called remote console (the container ID changes every time you restart it). Use the “op” command to make yourself operator:

# docker exec -i a394aa162f1f rcon-cli
> op MINECRAFTUSERNAME
Opped MINECRAFTUSERNAME

Now you’re really done. Time to fire up the game itself!

Go to the game and choose Multiplayer and then Add Server. Enter a fancy name and the domain name that you registered earlier. Should you have changed the port number away from 25565, do not forget to enter this as well and change your firewall settings accordingly.

domainname:port, e.g.:
myserver.spdns.org:25540

If Minecraft can reach your server, you can start the game.

If you experience issues connecting

  • Check the port number (default: 25565)
  • Check the VPS firewall for the right port to open (TCP 25565)
  • Check if you can ping the server (ping domainname.tld), assuming you have not blocked the ping service in the firewall settings.
  • Check if the Docker image started successfully

Make it better

Time for your world to come to life

Although not necessary, there are some plugins you can install for Minecraft, to make it a bit easier to manage. Upload the jar files to the plugins directory and restart the server to install and activate them.

In upcoming posts I’ll explain in more detail how to setup specific parts that I know only described briefly. In the meantime, if you have any questions or need some help, then leave me a comment below or use our contact form.

Join the discussion

Recent Posts

Recent Comments