Build & run your own Minecraft server

We walk-through how to build your own Minecraft server & run it for under €10 a month. This video was inspired by one of our kids that required a Minecraft server to play on with friends.

We have hosted the following open Minecraft server should you want to test before building. https://hendcraft.com/hcaws/

Note: The aim is to show you how to build a minecraft server. What we don’t cover in this setup is how to secure the server. Highly recommend that you always follow industry security & hardening standards.

Steps. PDF or follow below.

We walk-through how to build your own Minecraft server & run it for under €10 a month. This video was inspired by one of our kids that required a Minecraft server to play on with friends.

We have hosted the following open Minecraft server should you want to test before building. https://hendcraft.com/hcaws/

Note: The aim is to show you how to build a minecraft server. What we don’t cover in this setup is how to secure the server. Highly recommend that you always follow industry security & hardening standards.


–Start–


URL’s used

Hetzner Cloud – https://accounts.hetzner.com/login

Minecraft Server Download – https://www.minecraft.net/en-us/download/server/


–Steps–

  1. Navigate to https://accounts.hetzner.com/login and commision your selected ubuntu server.
  2. Open your ssh client and ssh to the server you just commissioned.

ssh root@your-server-ip

  1. Enter the password that was provided to you in the mail from Hetzner. It will prompt you to select a new password. input your password and again to confirm it.
  2. update your server instances software

apt-get update

apt-get upgrade

  1. Next install Java as Minecraft version we installing requires it. When prompted if you want to continue select yes.

apt-get install openjdk-14-jdk

  1. Validate the JDK install

java –version

  1. Create a directory for the Minecraft server to run.

cd /opt

mkdir minecraft

cd /opt/minecraft

  1. Download the “server.jar” from the minecraft.net site.

wget https://launcher.mojang.com/v1/objects/a412fd69db1f81db3f511c1463fd304675244077/server.jar

  1. Install screen. Screen provides the ability to run multiple shell sessions from a single ssh session. This will allow us to launch the minecraft server and detach from the session allowing the Minecraft server to continue to run.

apt-get install screen

  1. Launch the Minecraft server for the first time.

cd /opt/minecraft

java -Xmx2GB -Xms1G -jar server.jar -nogui

  1. You will be prompted to agree to the eula. Open the eula file with a file editor like vi or nano.

vi eula.txt. (Update the line “eula=false to eula=true“)

  1. Once the eula has been accepted. Launch the Minecraft server again. Once running you can disconnect from the screen session with Ctrl+a+d

cd /opt/minecraft

java -Xmx2GB -Xms1G -jar server.jar -nogui

  1. Launch your minecraft client. Select Play.
  2. Select Multiplayer
  3. Select Add Server
  4. Input the details of your server. Provide a name and enter your server public IP. The select done.
  5. Select the server entry you just added and click on “Join Server”

Blocking https sites with IPFire

Got a request from “dedu mihail” & “Amandeep Singh” on how to block https sites. In this quick walk-through we show how to use the proxy with manual settings which is needed to block https urls / sites. It does not work via transparent mode. (We could not find a simple way to make it work via transparent mode).

1. Configure the end user machine to use the proxy.

2. Configure the proxy on IPFire to use the url filter capability.

3. Configure the url filter to block the https url 4. Configure the url filter to allow restriction bypass for listed IP’s.