Use this AlmaLinux guide if you want a Minecraft Java server on a RHEL-style system using dnf and firewalld. If your service is one of our Minecraft server hosting plans, follow How to create a Minecraft Server instead, as the control panel handles the server setup for you.

For a manual install, choose hardware based on your world size, view distance, player count, and any plugins you plan to add later. A Gaming VPS, VPS, or Dedicated Server can be used depending on how much headroom you need.

Prepare AlmaLinux

  1. Log in over SSH with a user that can run sudo commands.
  2. Update the system and install Java 21, curl, jq, and screen:
    sudo dnf update -y
    sudo dnf install -y java-21-openjdk-headless curl jq screen
  3. Create the Minecraft directory:
    mkdir -p ~/minecraft
    cd ~/minecraft

Create the server files

  1. Fetch the latest official Vanilla server jar from Mojang:
    LATEST=$(curl -fsSL https://piston-meta.mojang.com/mc/game/version_manifest_v2.json | jq -r '.latest.release')
    VERSION_URL=$(curl -fsSL https://piston-meta.mojang.com/mc/game/version_manifest_v2.json | jq -r --arg VERSION "$LATEST" '.versions[] | select(.id == $VERSION) | .url')
    SERVER_URL=$(curl -fsSL "$VERSION_URL" | jq -r '.downloads.server.url')
    curl -fLo server.jar "$SERVER_URL"

    If you want a specific Minecraft version instead of the latest release, set VERSION to the version you want, then download the matching server jar:

    VERSION="1.21.1"
    VERSION_URL=$(curl -fsSL https://piston-meta.mojang.com/mc/game/version_manifest_v2.json | jq -r --arg VERSION "$VERSION" '.versions[] | select(.id == $VERSION) | .url')
    SERVER_URL=$(curl -fsSL "$VERSION_URL" | jq -r '.downloads.server.url')
    curl -fLo server.jar "$SERVER_URL"
  2. Run Minecraft once so the first files are generated:
    java -Xms1G -Xmx2G -jar server.jar nogui
  3. If you accept the Minecraft EULA, set eula=true:
    sed -i 's/eula=false/eula=true/' eula.txt
  4. Launch the server in screen:
    screen -S minecraft java -Xms1G -Xmx2G -jar server.jar nogui
  5. Detach from screen with CTRL + A, then D. The server stays online after you disconnect.

Open the port

  1. If firewalld is active, open port 25565 for Minecraft. Some AlmaLinux installs use another firewall or upstream filtering, so adjust this to match your setup:
    sudo firewall-cmd --permanent --add-port=25565/tcp
    sudo firewall-cmd --reload
  2. Attach back to the running console when needed:
    screen -r minecraft

Once the server has finished starting, players can join with your server IP. The default Minecraft Java port is 25565.

With AlmaLinux, remember that you are also maintaining the operating system. Keep Java updated, check logs after crashes, and make sure you have a backup plan before changing server files.

  • 0 Kasutajad peavad seda kasulikuks
Kas see vastus oli kasulik?

Seotud artiklid

Colour Codes for Minecraft Multiplayer and Vanilla

This article lists all of the codes you can use with many plugins in Minecraft using Spigot or...

What is the difference between Fabric, Quilt and Forge in Minecraft Modding

Exploring the Distinctions Between Fabric and Forge When diving into the exciting world of...

What is a Grindstone and how is it used?

In this guide, we will teach you what the Grindstone in Minecraft does, and how to use it...

How to Convert Java and Bedrock Edition Worlds

In this guide, we’ll be teaching you how to convert your world from a Java Edition world to a...

Minecraft's New Version Numbers

Minecraft has changed how its version numbers work from 2026 onwards. Instead of carrying on with...