Setting up a Minecraft server on Linux (in this case, Ubuntu 24.04) is quick and straight­for­ward. Once your hosting hardware is ready, you only need a current Java version and the latest server files for the Java Edition of the game, both of which can be installed easily via the terminal.

Free VPS Trial
Try a virtual server risk-free for 30 days

Try out your VPS for 30 days. If you're not satisfied, you get your money back.

Minecraft server on a Linux basis with IONOS hosting options

Many hosting providers—including IONOS—offer server plans that allow you to choose between Windows and Linux as the operating system. If you want to get started easily with a smaller Minecraft server on Linux for just a few players, a vServer or VPS (Virtual Private Server) is a practical choice. For a low fixed monthly fee, you gain access to vir­tu­al­ized hardware resources that can be scaled up or down at any time. A suitable option with suf­fi­cient computing power is the VPS M plan.

In the table below, you’ll find three specific use cases for a Minecraft server on Linux, including matching IONOS server options.

Minecraft server scenario Suitable IONOS plan (with Linux as the OS)
Small game world for 1–2 players IONOS VPS Linux M
Medium-sized game world for 3–5 players IONOS VPS Linux L
Large game world for 6+ players IONOS VPS Linux XL

How to set up a Minecraft server on Linux step by step (Ubuntu 24.04)

If you want to run a Minecraft server on Linux, you have a wide range of options to choose from. Popular dis­tri­b­u­tions such as Debian and Ubuntu are just as suitable as OpenSUSE, Arch Linux, Solus, Gentoo Linux, or other, less commonly used Linux dis­tri­b­u­tions. In the tutorial below, we’ll guide you step by step through the setup of a Minecraft server on Linux, using Ubuntu 24.04 as an example.

Tip

Of course, you can also create and set up your own Minecraft server on Windows if you prefer working with the Microsoft operating system.

Step 1: Install ad­di­tion­al software com­po­nents

Connect to your Linux server by setting up a remote desktop con­nec­tion. Once the con­nec­tion is es­tab­lished, your first step is to install the ad­di­tion­al com­po­nents required to run a Minecraft server on Linux via the terminal.

First, update the package index of the APT package manager:

sudo apt update
bash

In the next step, install the minimal OpenJDK Java im­ple­men­ta­tion, which is mandatory for running the Minecraft server ap­pli­ca­tion written in Java:

sudo apt-get install openjdk-21-jdk
bash

You can then use the sudo java -version command to check whether the Java kit was installed suc­cess­ful­ly. If so, the terminal will display the installed version of OpenJDK.

Image: Ubuntu 24.04: Check the Java version in the terminal
Ubuntu 24.04: Check the Java version in the terminal

To keep your Minecraft server on Linux running even after you close the terminal, install the screen window manager:

sudo apt install screen
bash

Step 2: Open the Minecraft server port

After you have installed the basic com­po­nents for your Minecraft server on Linux, the next step is to open TCP port 25565. The server ap­pli­ca­tion uses this port by default to com­mu­ni­cate with clients, which is why a cor­re­spond­ing firewall rule is essential. Use the following command to add the new policy:

sudo ufw allow 25565
bash
Image: Port opening (25565) in Ubuntu 24.04
Port opening (25565) in Ubuntu 24.04

Step 3: Install the Minecraft server ap­pli­ca­tion (Java Edition)

You can now download and install the server software for the sandbox game. For the best com­pat­i­bil­i­ty, use the Java Edition and make sure you’re running the latest available version.

To do this, open the official download page for Minecraft: Java Edition Server and copy the download link. You can then use wget to download the server files via the terminal:

wget https://piston-data.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar
bash
Note

The link shown in the code example is only a place­hold­er. Replace it with the link you copied from the official website.

Step 4: Run the server ap­pli­ca­tion for the first time

Once the server.jar file has been down­loaded, you can start the server ap­pli­ca­tion at any time. To do this, use the screen window manager installed in the first step and start it with the following command:

screen
bash

Confirm that you want to start the session by pressing the spacebar. You will then see the familiar terminal interface, which is now ready to launch the Minecraft server. Run the following command:

sudo java -Xms1G -Xmx2G -jar server.jar nogui
bash

The Minecraft: Java Edition Server is launched without a graphical interface (nogui). During startup, 1 GB is allocated as the initial memory (Xms1G), while the maximum memory usage is limited to 2 GB (Xmx2G). These values can be adjusted as needed.

When you run the command for the first time, you will see the following two error messages at the end of the startup process:

Image: Minecraft server on Linux showing an error on first start
Minecraft server on Linux showing an error on first start

First, the eula.txt file could not be loaded. In addition, the Minecraft server is missing con­fig­u­ra­tion settings that must be defined in the server.prop­er­ties file by default.

The file used to accept the End User License Agreement (EULA) is then created directly in the current directory. You can open it with the following command:

sudo nano eula.txt
bash

You will find a link to the agreement, which you can copy and open in your browser. After reading the terms, change the entry eula=false to eula=true. Save and close the text file.

Image: Minecraft server EULA confirmation in the Ubuntu terminal
Minecraft server EULA con­fir­ma­tion in the Ubuntu terminal

Step 5: Configure the server

Once you have accepted the license agreement, you can move on to the con­fig­u­ra­tion file server.prop­er­ties. This file is also created in the current directory when the server is started for the first time. Open it using the nano text editor:

sudo nano server.properties
bash

Inside the file, you’ll find a basic default con­fig­u­ra­tion that defines settings such as the dif­fi­cul­ty level (difficulty) and game mode (gamemode). Adjust these options to suit your needs, then save the file.

Image: Minecraft server on Linux default configuration in server.properties
Minecraft server on Linux default con­fig­u­ra­tion in server.prop­er­ties

Step 6: Start the Minecraft server on Linux

After accepting the EULA and saving your custom server con­fig­u­ra­tion, enter the same command you used in Step 4 to start the Minecraft server on Linux again:

sudo java -Xms1G -Xmx2G -jar server.jar nogui
bash

Once the startup process has completed suc­cess­ful­ly—which may take a moment—the terminal displays the following message:

[Server thread/INFO]: Done (….s)! For help, type "help"
bash

Now type help, and you will get a list of the available server commands.

Step 7: Keep the server session running

Once you have gotten the Minecraft server on Linux up and running, you will of course want it to remain active when you dis­con­nect the remote con­nec­tion to the server. To make this happen, first leave the screen session using the key com­bi­na­tion [Ctrl] + [A] + [D].

Then run the following command to display all active screen sessions:

screen -list
bash

You will get a list in which you can also find the pre­vi­ous­ly es­tab­lished con­nec­tion for your Minecraft server, including the preceding session ID. In our case, the ID is “6060”:

Image: List of active screen sessions with screen
List of active screen sessions with screen

To keep the session running even after you log off the server, enter the following command in the terminal and replace 6060 with the ID of your screen session:

screen -r 6060
bash

You can now close the screen window at any time using the key com­bi­na­tion [Ctrl] + [A] + [D] and log off your server without stopping the Minecraft server.

Step 8: Connect to the Minecraft server

Your server is running, and you can now connect to the generated game world at any time. To do this, proceed as follows:

  1. To do this, start the Minecraft client (Java Edition).
  2. Select “Mul­ti­play­er”.
  3. Click “Direct Con­nec­tion”.
  4. Enter the IP address of your Minecraft server.
  5. Finally, click “Join Server”.
Image: Joining a Minecraft server via the multiplayer menu
Joining a Minecraft server via the mul­ti­play­er menu

Once the con­nec­tion is es­tab­lished, you can start playing on your own Minecraft server on Linux.

Image: Screenshot from Minecraft (Java Edition)
Screen­shot from Minecraft (Java Edition)
Tip

Make a statement with your own .gg domain and let the games begin.

Domain Checker

Author

Go to Main Menu