Published on

Hetzner Minecraft Server: How to Set Up a VPS in 15 Minutes

You can set up a Minecraft server on a Hetzner VPS (Virtual Private Server) in under 15 minutes by choosing a Cloud Server with at least 4GB of RAM and installing the latest Java runtime. For a smooth experience with 5–10 players on Minecraft 1.24+, the CAX21 ARM64 instance offers the best price-to-performance ratio at approximately €5–€7 per month. This setup provides a dedicated IP address and full control over your game world without the high costs of specialized gaming hosts.

Why is a Hetzner VPS better than shared game hosting?

Shared game hosts often limit your plugin choices or charge extra for basic features like automated backups. A VPS (Virtual Private Server—a private slice of a powerful physical computer) gives you "root access," which means you have total control over the operating system. You can install any version of Minecraft, add as many mods as you want, and even host a small website on the side.

Hetzner is particularly popular because they offer high-speed NVMe storage (extremely fast hard drives) and high-bandwidth connections. In our experience, using their ARM64-based servers provides significantly better performance for Java-based games like Minecraft compared to older Intel-based entry-level plans. This ensures that your players won't experience "block lag" when exploring new chunks of the map.

Which Hetzner server plan should you choose?

Minecraft is a "single-threaded" application, meaning it mostly relies on one very fast CPU core rather than many slow ones. You should look for plans that offer high clock speeds and sufficient RAM (Random Access Memory—the "short-term memory" your server uses to run).

For a basic survival world with a few friends, the CAX21 plan is the current sweet spot. It features 4 vCPUs (Virtual Central Processing Units) and 8GB of RAM. If you plan on running a massive modpack with 200+ mods, you might want to step up to the CAX31 for 16GB of RAM.

Avoid the smallest "cx" plans if they only have 2GB of RAM. The Minecraft 1.24+ server engine and the underlying Ubuntu operating system will quickly run out of memory, causing the server to crash. Always aim for at least 4GB of RAM to keep things stable.

What do you need before starting?

Before you begin the installation, make sure you have a few basic tools ready. Don't worry if you haven't used these before; they are standard tools for managing any cloud server.

  • A Hetzner Cloud Account: You will need to verify your identity and add a payment method.
  • An SSH Client: If you are on Windows, you can use the built-in Terminal or a tool like PuTTY. Mac and Linux users can use their native Terminal.
  • SSH Key (Optional but Recommended): This is a digital "key" that lets you log in without a password, making your server much more secure.

Step 1: Create your server in the Hetzner Cloud Console

Log into your Hetzner Cloud Console and create a new project. Click "Add Server" and follow these specific selections to ensure compatibility.

  1. Location: Pick the location closest to you or your players (e.g., Nuremberg, Helsinki, or Ashburn) to reduce latency (the delay between a player's action and the server's response).
  2. Image: Select Ubuntu 26.04 LTS. This is a Long Term Support version of the Linux operating system, meaning it is stable and will receive security updates for years.
  3. Type: Choose "Arm64" and select the CAX21 instance.
  4. SSH Key: If you generated an SSH key, select it here; otherwise, Hetzner will email you a temporary root password.

Once you click "Create & Buy Now," your server will be ready in about 30 seconds. Take note of the IP address (a series of numbers like 123.123.123.123) provided in the dashboard.

Step 2: Connect to your server and update the system

Open your terminal and connect to your server using the IP address from the previous step. Type the following command, replacing your_ip with your actual server IP:

ssh root@your_ip

If this is your first time connecting, your computer will ask if you trust the host. Type yes and press Enter. If you didn't use an SSH key, paste the password Hetzner emailed to you.

Once you are logged in, run these commands to ensure your server has the latest security patches:

# Update the list of available software packages
apt update 

# Install the updates
apt upgrade -y

Step 3: Install Java 25

Minecraft 1.24 and 1.25 require the latest version of Java to run. We will install OpenJDK 25, which is the standard open-source version of the Java Runtime Environment.

Run this command to install Java:

# Install the OpenJDK 25 runtime
apt install openjdk-25-jre-headless -y

Verify the installation by checking the version:

java -version

You should see an output confirming "openjdk 25" is installed. If the command isn't found, it's normal to feel frustrated—just double-check that the apt install command finished without errors.

Step 4: Set up a dedicated Minecraft folder and download the server

It is a best practice to keep your server files organized in their own directory (folder). We will also install wget (a tool for downloading files from the internet) and screen (a tool that keeps your server running even when you close your terminal).

# Install utility tools
apt install wget screen -y

# Create a folder for Minecraft and move into it
mkdir minecraft
cd minecraft

Now, you need to download the server file. You can find the latest download link on the official Minecraft website or use a high-performance version like PaperMC. For this guide, we will use the standard server:

# Download the server launcher (replace URL with the latest version if needed)
wget https://piston-data.mojang.com/v1/objects/latest/server.jar -O server.jar

Step 5: Accept the EULA and start the server

Minecraft requires you to agree to an EULA (End User License Agreement) before the server will start. You must run the server once to generate the file, edit it, and then start the server for real.

# Run the server for the first time
java -Xmx1024M -Xms1024M -jar server.jar nogui

The server will stop immediately and say you need to accept the EULA. Open the newly created eula.txt file with a text editor called Nano:

nano eula.txt

Use your arrow keys to find eula=false and change it to eula=true. Press Ctrl + O, then Enter to save, and Ctrl + X to exit the editor.

Now, start your server inside a "screen" session so it stays online 24/7:

# Create a new screen named "minecraft"
screen -S minecraft

# Start the server with 6GB of RAM
java -Xmx6G -Xms6G -jar server.jar nogui

To leave the server running and go back to your main terminal, press Ctrl + A, then D (for "detach"). Your server is now live!

How do you fix common connection issues?

If you cannot connect to your server using the IP address in your Minecraft client, the most common culprit is the firewall. Hetzner Cloud has a built-in firewall feature in the console, but Ubuntu also has its own called ufw (Uncomplicated Firewall).

You need to open port 25565, which is the default "door" Minecraft uses to communicate. Run these commands:

# Allow SSH so you don't get locked out
ufw allow ssh

# Allow Minecraft traffic
ufw allow 25565/tcp

# Enable the firewall
ufw enable

Another common mistake is not giving the server enough RAM. If you see "Out of Memory" errors, ensure your -Xmx value in the start command is at least 1GB less than your total server RAM. This leaves room for the operating system to breathe.

Next Steps

Now that your server is running, you can start customizing it. You might want to look into installing "Paper" or "Fabric" to improve performance, or setting up automated backups using a simple script. We recommend exploring how to use "SFTP" (Secure File Transfer Protocol) with a program like FileZilla so you can easily drag and drop plugins or world files from your own computer to the server.

For guides on more advanced configuration, visit the official Hetzner documentation.


Read the Hetzner Documentation