This Debian guide installs a Vanilla Minecraft Java server from SSH. If you have bought our Minecraft server hosting, you do not need these Linux steps; use How to create a Minecraft Server for the control panel method.

Minecraft 1.21 and newer needs Java 21. Debian versions do not all ship the same Java packages, so this guide uses the Temurin repository before downloading the Minecraft jar.

If you are hosting it yourself, use a server with enough CPU and RAM for your players. Our Gaming VPS, VPS, and Dedicated Server ranges can all be used for this kind of setup.

Install Java 21 on Debian

  1. Log in to the Debian server over SSH.
  2. Install the tools needed to add the Java repository and download Minecraft:
    sudo apt update
    sudo apt install -y wget gpg apt-transport-https curl jq screen
  3. Add the Temurin repository:
    wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | sudo tee /etc/apt/keyrings/adoptium.gpg >/dev/null
    echo "deb [signed-by=/etc/apt/keyrings/adoptium.gpg] https://packages.adoptium.net/artifactory/deb $(. /etc/os-release; echo ) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
  4. Install the Java 21 runtime:
    sudo apt update
    sudo apt install -y temurin-21-jre

Download the Minecraft server

  1. Create a folder for the server:
    mkdir -p ~/minecraft
    cd ~/minecraft
  2. Download the latest Vanilla server jar:
    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"
  3. Run it once to create eula.txt and the first set of files:
    java -Xms1G -Xmx2G -jar server.jar nogui
  4. If you agree to the Minecraft EULA, accept it:
    sed -i 's/eula=false/eula=true/' eula.txt

Run and connect

  1. Start the server inside screen:
    screen -S minecraft java -Xms1G -Xmx2G -jar server.jar nogui
  2. Use CTRL + A, then D to detach from the console without stopping Minecraft.
  3. If this Debian server uses UFW, open the default Minecraft port. Your firewall may be different, especially if your VPS provider has its own firewall controls:
    sudo ufw allow 25565/tcp
  4. Open the console again later with:
    screen -r minecraft

Players can connect using the server IP address. If server.properties still uses the default port, that port is 25565.

Debian gives you a clean base for Minecraft, but you still need to handle jar updates, Java updates, backups, restarts, and firewall changes manually.

  • 0 Utilizadores acharam útil
Esta resposta foi útil?

Artigos Relacionados

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...