TL;DR:
- Install Java 25 (Temurin), download the newest stable Paper build, accept the EULA, run Paper under systemd as an unprivileged user, and open TCP port 25565.
- Minecraft 26.1 and newer require Java 25. On October 4, 2026, Paper 26.2 build 129 was the newest stable build, so players join with a 26.2 installation in the Minecraft Launcher.
- Give Java the VPS RAM minus 1 to 1.5 GB, per Paper's documentation: a 2560 MB heap on a 4 GB VPS, 6500 MB on 8 GB.
- The game ticks the world on one main thread with a 50 ms budget per tick, so speed per core matters more than core count.
- UFW allows only OpenSSH and 25565/tcp, and a whitelist limits who can join.
- A systemd timer archives the server daily at 05:00 to
/var/backups/minecraftand keeps 7 days.
Applies to: Ubuntu 24.04 LTS · Paper 26.2 (build 129) · Java 25 (Temurin 25.0.4.1) · checked October 2026
A Minecraft server is a program that hosts one shared world for Minecraft: Java Edition players, who connect on TCP port 25565 by default. Paper is a free, open-source Minecraft server built on Mojang's server code that fixes gameplay inconsistencies, improves performance and loads plugins. This tutorial shows how to make a Minecraft server with free software: it installs Paper on Ubuntu 24.04 LTS with Java 25, runs it under systemd, opens the firewall and schedules daily backups. A VPS keeps the world online when your PC is off and has a public IP address, so nobody sets up port forwarding.
Ways to make a Minecraft server: PC, mobile and VPS
The official server software and Paper are free. The routes differ in who can join and when the world is online.
| Route | Who can join | Online when |
|---|---|---|
| Open to LAN from a single-player pause menu | Players on your home network | You are playing |
| Official server or Paper on your PC | Anyone, after you forward TCP 25565 on your router | The PC is on |
| Realms | Players you invite | Always |
| Minecraft server VPS (this tutorial) | Players on your whitelist | Always |
Phones, tablets and consoles run Bedrock Edition, which cannot join a Java Edition server on its own. The Geyser plugin lets Bedrock players join on UDP port 19132 (open it with sudo ufw allow 19132/udp), and its companion plugin Floodgate lets them join without a Java Edition account. Consoles need the extra steps in Geyser's console guide. For background, read What Is a VPS?
Which Java version does your Minecraft server need?
Each Minecraft release declares its minimum Java version in Mojang's version files. Version 26.1, released March 24, 2026, replaced the 1.x numbering and raised the minimum to Java 25, the current long-term support (LTS) release.
| Minecraft version | Minimum Java |
|---|---|
| 1.16.5 and older | Java 8 |
| 1.17 to 1.17.1 | Java 16 |
| 1.18 to 1.20.4 | Java 17 |
| 1.20.5 to 1.21.11 | Java 21 |
| 26.1 and newer | Java 25 |
Paper's Java guide uses Amazon Corretto and names Eclipse Adoptium's Temurin as an alternative OpenJDK build. Avoid packages with -headless in the name: Paper's documentation says they miss dependencies Paper needs.
How much RAM does a Minecraft server need?
Paper's documentation recommends at least 6 to 10 GB of heap no matter how few players, with 1,000 to 1,500 MB of RAM left for the operating system. The Minecraft Wiki's older requirements table lists 1 GB of server memory for 1 to 4 players, 2 GB for 5 to 10 and 4 GB for more than 10, on a new world at a view distance of 10 or less; large worlds, farms and redstone can more than double that.
The plan columns list Arct Cloud plans with that RAM.
| VPS RAM | Heap (-Xms and -Xmx) | Fits | Cost Optimized | High Performance |
|---|---|---|---|---|
| 2 GB | 1G | Testing, or two or three friends | cvm.nano (1 vCPU) | hvm.nano (1 vCPU) |
| 4 GB | 2560M | A small group, a few plugins | cvm.micro (2 vCPU) | hvm.micro (2 vCPU) |
| 8 GB | 6500M | Paper's recommended heap range | cvm.small (4 vCPU) | hvm.tiny (4 vCPU) |
| 12 GB | 10752M | Larger groups or plugin sets | cvm.large (6 vCPU) | hvm.small (6 vCPU) |
The Minecraft Wiki recommends a CPU with good single-core performance: core world mechanics tick on one main thread, and the server typically uses at most three cores. Each tick must finish within 50 ms to hold 20 ticks per second (TPS). Cost Optimized plans run AMD EPYC Milan 7003 Series up to 3.7 GHz; High Performance plans run AMD Ryzen 9 up to 5.7 GHz or AMD EPYC Genoa 9004 Series up to 4.3 GHz, with DDR5 RAM. The Ryzen VPS hosting guide covers why clock speed matters for game servers.
Prerequisites
- A VPS running Ubuntu 24.04 LTS with root SSH access and at least 2 GB RAM. For higher clock speeds per vCPU, see High Performance VPS.
- A non-root user with sudo privileges who signs in with an SSH key. Generate an SSH key and add the public key when you deploy the server. Then log in as root and run
adduser deploy,usermod -aG sudo deployandrsync --archive --chown=deploy:deploy ~/.ssh /home/deployto give the new user the same key. - Minecraft: Java Edition for each player. The Minecraft Launcher's default Latest release is 26.3, which cannot join a Paper 26.2 server, so each player adds a 26.2 installation (Step 10).
Commands run as the sudo user. Replace values in capitals, such as YOUR_EMAIL, with your own. The Temurin repository also publishes temurin-25-jre for Ubuntu 26.04 LTS; this tutorial was checked against Ubuntu 24.04.
Step 1: Update Ubuntu and install tools
Update the system and install the tools the next steps use:
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl jq wget gpg ufw
Step 2: Enable UFW and allow SSH
Allow SSH before you turn the firewall on, so UFW does not block your next login:
sudo ufw allow OpenSSH
sudo ufw enable
Type y when UFW asks to proceed. UFW now denies other incoming traffic, so the server stays private until Step 9.
Step 3: Install Java 25
Add the Adoptium signing key and apt repository, then install the Temurin 25 runtime. The signed-by option limits the key to the Adoptium repository:
sudo install -d -m 0755 /etc/apt/keyrings
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 $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" \
| sudo tee /etc/apt/sources.list.d/adoptium.list
sudo apt update
sudo apt install -y temurin-25-jre
java -version
The output looks similar to this:
openjdk version "25.0.4.1" 2026-08-18 LTS
OpenJDK Runtime Environment Temurin-25.0.4.1+1 (build 25.0.4.1+1-LTS)
OpenJDK 64-Bit Server VM Temurin-25.0.4.1+1 (build 25.0.4.1+1-LTS, mixed mode, sharing)
If java -version shows an older release, run sudo update-alternatives --config java and pick Temurin 25. The service in Step 8 calls /usr/lib/jvm/temurin-25-jre-amd64/bin/java directly, so the system default does not matter.
Step 4: Create the minecraft service user
Create an unprivileged system user with its home in /opt/minecraft, and a server folder:
sudo useradd --system --create-home --home-dir /opt/minecraft --shell /usr/sbin/nologin minecraft
sudo -u minecraft mkdir /opt/minecraft/server
The server runs as this user, so a faulty plugin cannot change system files.
Step 5: Download Paper
Paper's download API requires a User-Agent with a project name and a contact address. Look up the newest stable build for a Minecraft version:
MC_VERSION="26.2"
USER_AGENT="minecraft-setup/1.0 (YOUR_EMAIL)"
PAPER_URL=$(curl -fsS -H "User-Agent: $USER_AGENT" \
"https://fill.papermc.io/v3/projects/paper/versions/${MC_VERSION}/builds" \
| jq -r 'first(.[] | select(.channel == "STABLE") | .downloads."server:default".url) // empty')
echo "${PAPER_URL:-No stable build for $MC_VERSION}"
The output looks similar to this:
https://fill-data.papermc.io/v1/objects/b1d8f6bfa1b6101fa8e947b53041cb3bdf5540e7b83b6547ca19ba7edefeb083/paper-26.2-129.jar
Paper 26.3 had only experimental builds on October 4, 2026, so MC_VERSION is 26.2. The Paper downloads page shows the newest version with a stable build. The long hex string in the URL is the file's SHA-256 checksum. Download the JAR as the minecraft user and check it:
sudo -u minecraft curl -fsSL -H "User-Agent: $USER_AGENT" -o /opt/minecraft/server/paper.jar "$PAPER_URL"
echo "$(basename "$(dirname "$PAPER_URL")") /opt/minecraft/server/paper.jar" | sudo sha256sum -c
The output ends with OK.
Step 6: Accept the EULA and start Paper once
Read the Minecraft EULA, then record that you accept it:
echo "eula=true" | sudo -u minecraft tee /opt/minecraft/server/eula.txt
Start Paper in the foreground with a 1 GB heap to create the world and config files:
sudo -u minecraft bash -c 'cd /opt/minecraft/server && /usr/lib/jvm/temurin-25-jre-amd64/bin/java -Xms1G -Xmx1G -jar paper.jar --nogui'
On the first start, Paper downloads and patches the Mojang server JAR. The output looks similar to this:
[11:37:17 INFO]: [bootstrap] Loading Paper 26.2-129-ver/26.2@9240f58 (2026-09-23T18:49:01Z) for Minecraft 26.2
[11:37:19 INFO]: Starting Minecraft server on *:25565
...
[11:37:23 INFO]: Done (7.152s)! For help, type "help"
At the console, turn on the whitelist, add your account, make it an operator and stop the server. Replace YOUR_PLAYER with your Minecraft username:
whitelist on
whitelist add YOUR_PLAYER
op YOUR_PLAYER
stop
The console confirms each change with Whitelist is now turned on, Added YOUR_PLAYER to the whitelist and Made YOUR_PLAYER a server operator. Operator status lets you run server commands from the game chat once systemd runs Paper.
Step 7: Edit server.properties
Open the main config file as the minecraft user:
sudo -u minecraft nano /opt/minecraft/server/server.properties
Change these lines:
motd=YOUR_SERVER_NAME
difficulty=normal
max-players=10
enforce-whitelist=true
motd is the text in the server list, and enforce-whitelist=true disconnects players removed from the whitelist. Keep online-mode=true, enable-rcon=false and management-server-enabled=false. view-distance and simulation-distance default to 10 chunks; lower them if TPS drops. Save with Ctrl+O and exit with Ctrl+X.
Step 8: Run Paper as a systemd service
Create /etc/systemd/system/minecraft.service with sudo nano. The unit uses the flags from Paper's Aikar's flags page and the 4 GB heap from the RAM table; change both 2560M values to match your plan:
[Unit]
Description=Minecraft Paper server
Wants=network-online.target
After=network-online.target
[Service]
User=minecraft
Group=minecraft
WorkingDirectory=/opt/minecraft/server
ExecStart=/usr/lib/jvm/temurin-25-jre-amd64/bin/java -Xms2560M -Xmx2560M \
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 \
-XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch \
-XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M \
-XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 \
-XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 \
-XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem \
-XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs \
-Daikars.new.flags=true -jar paper.jar --nogui
SuccessExitStatus=0 143
Restart=on-failure
RestartSec=10
TimeoutStopSec=180
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ProtectHome=true
[Install]
WantedBy=multi-user.target
On systemctl stop, Paper saves every world and Java exits with status 143, which SuccessExitStatus records as a clean stop. TimeoutStopSec=180 gives a large world time to save before systemd kills the process, and Restart=on-failure restarts the server after a crash. Start the service and enable it at boot:
sudo systemctl daemon-reload
sudo systemctl enable --now minecraft
sudo systemctl status minecraft --no-pager
The Active: line reads active (running). Run sudo journalctl -u minecraft -f to follow the log until the Done line appears.
Step 9: Open TCP port 25565
Allow the Minecraft port and check the rules:
sudo ufw allow 25565/tcp
sudo ufw status
The list shows 25565/tcp and OpenSSH with the action ALLOW. If your provider also filters traffic in its control panel, allow TCP 25565 there. Leave RCON port 25575 closed.
Step 10: Connect from Minecraft and verify
The game version must match the server version. In the Minecraft Launcher, open Installations, select New installation, choose release 26.2 and play that installation.
In Minecraft: Java Edition, open Multiplayer, select Add Server, enter the server's IP address (for example 203.0.113.10) under Server Address, and select Done. Join the server and type /tps in chat. The output looks similar to this:
TPS from last 1m, 5m, 15m: 20.0, 20.0, 20.0
20.0 is the target; /spark tps adds tick durations and CPU use. If the game shows Outdated server! I'm still on 26.2, the game is newer than the server: play the 26.2 installation. Outdated client! Please use 26.2 means the game is older than the server.
Back up the Minecraft world
Paper 26.x keeps all three dimensions under world/dimensions/. This script stops the server, archives its folder without downloaded files and logs, starts it again and deletes archives older than 7 days. The archives contain server.properties, ops.json and the whitelist, so umask 077 makes them readable by root only:
sudo tee /usr/local/bin/minecraft-backup > /dev/null <<'EOF'
#!/bin/bash
set -euo pipefail
umask 077
BACKUP_DIR=/var/backups/minecraft
mkdir -p "$BACKUP_DIR"
if systemctl is-active --quiet minecraft; then
trap 'systemctl start minecraft' EXIT
systemctl stop minecraft
fi
tar -czf "$BACKUP_DIR/minecraft-$(date +%F).tar.gz" \
--exclude=./cache --exclude=./libraries --exclude=./versions --exclude=./logs \
-C /opt/minecraft/server .
find "$BACKUP_DIR" -name 'minecraft-*.tar.gz' -mtime +6 -delete
EOF
sudo chmod 755 /usr/local/bin/minecraft-backup
Create /etc/systemd/system/minecraft-backup.service:
[Unit]
Description=Back up the Minecraft server
[Service]
Type=oneshot
ExecStart=/usr/local/bin/minecraft-backup
Create /etc/systemd/system/minecraft-backup.timer:
[Unit]
Description=Daily Minecraft backup
[Timer]
OnCalendar=*-*-* 05:00:00
Persistent=true
[Install]
WantedBy=timers.target
Enable the timer, run one backup now and list the archive:
sudo systemctl daemon-reload
sudo systemctl enable --now minecraft-backup.timer
sudo systemctl start minecraft-backup.service
sudo ls -lh /var/backups/minecraft
The timer follows server time; check it with timedatectl. To restore, stop the server, move the current world aside and extract an archive by date. The archive also restores the configs, plugins and paper.jar from that day:
sudo systemctl stop minecraft
sudo mv /opt/minecraft/server/world /opt/minecraft/server/world.old-$(date +%F-%H%M)
sudo tar -xzf /var/backups/minecraft/minecraft-2026-10-04.tar.gz -C /opt/minecraft/server
sudo systemctl start minecraft
Copy the archives to another machine with rsync or scp, since they share a disk with the server. For platform backups, see VPS backup options.
Update Paper and Java
Paper's update guide says never to replace a JAR while the server runs. Back up, set PAPER_URL with the Step 5 commands, then swap and check the JAR with the server stopped:
sudo systemctl start minecraft-backup.service
sudo systemctl stop minecraft
sudo -u minecraft curl -fsSL -H "User-Agent: $USER_AGENT" -o /opt/minecraft/server/paper.jar "$PAPER_URL"
echo "$(basename "$(dirname "$PAPER_URL")") /opt/minecraft/server/paper.jar" | sudo sha256sum -c
sudo systemctl start minecraft
For a new Minecraft version, change MC_VERSION once Paper has a stable build for it, and have players switch to a launcher installation of that version. If a future release needs a newer Java, install that temurin-<version>-jre package, change the ExecStart path and run sudo systemctl daemon-reload before the restart.
Troubleshoot common Minecraft server errors
| Symptom | Cause | Fix |
|---|---|---|
Minecraft 26.1 and newer requires running the server with Java 25 or above. | An older Java starts the server | Install temurin-25-jre; check the ExecStart path |
You need to agree to the EULA in order to run the server. | eula.txt says eula=false | Repeat Step 6 |
Outdated server! I'm still on 26.2 | The game is newer than the server | Add a launcher installation for release 26.2 |
Outdated client! Please use 26.2 | The game is older than the server | Update the game or add a 26.2 installation |
You are not whitelisted on this server! | Player missing from the whitelist | /whitelist add NAME as an operator |
Can't connect to server | Port 25565 closed or service down | sudo ufw status, systemctl status minecraft |
java.lang.OutOfMemoryError: Java heap space | Heap too small | Raise -Xms and -Xmx within the RAM table |
FAQ
Can I make a Minecraft server for free?
Yes. The official server software and Paper are free to download, and Paper is open source. On your own PC, friends outside your home network need TCP port 25565 forwarded on your router, and the world is online only while the PC runs.
How do I make a Minecraft server with my friends?
Run a server they can reach, add each friend with the whitelist add command, and send them the IP address. In Minecraft they open Multiplayer, select Add Server, paste the address and join on the server's game version.
Will Minecraft run on Java 25?
Yes. Minecraft 26.1 and newer require Java 25, and Paper 26.x refuses to start on an older Java. Servers on 1.20.5 to 1.21.11 need at least Java 21.
Is 2 GB of RAM enough for a Minecraft server?
Only for testing or two or three friends on a new world. A 2 GB VPS leaves a 1 GB heap, below Paper's recommended 6 to 10 GB, so pick 4 GB of RAM or more for regular play, plugins or a large world.
Is 4 GB of RAM enough for a Minecraft server?
Yes, for a small group on a new world with a few plugins. A 4 GB VPS runs a 2560 MB heap and leaves 1.5 GB for Ubuntu. For large worlds, busy farms or many plugins, pick 8 GB of RAM or more to reach Paper's recommended 6 to 10 GB heap.
What port does a Minecraft server use?
Java Edition servers use TCP port 25565 by default. To change it, set server-port in server.properties, open the new port in UFW and have players add it after the IP address with a colon. Geyser uses UDP port 19132 for Bedrock players.
Next steps
- How to Host a Palworld Dedicated Server on Ubuntu 24.04 uses the same service user, systemd and UFW pattern.
- How to Upgrade Ubuntu 24.04 to 26.04 LTS on a VPS.
- Compare Ryzen 9 plan sizes on Ryzen VPS.
- Tune Paper with Paper's next steps guide.
Arct Cloud plans include DDoS protection and NVMe storage, and Linux images deploy in under 30 seconds with root SSH. Compare plans.
This work is licensed under CC BY-NC-SA 4.0.