Running your own Minecraft server is the difference between renting a world and owning one. Instead of paying a monthly bill and accepting someone else’s rules, you control the hardware, the player list, the plugins, the backups, and the security posture. This tutorial walks through how to make a Minecraft server from scratch on Linux, Windows, or macOS in roughly 30 minutes of hands-on work, then hardens it so it survives contact with the public internet. Updated June 26, 2026.

We will build a Minecraft: Java Edition server, configure it correctly, forward the right port, and lock it down against the abuse that every exposed game server eventually attracts. By the end you will have a complete, working, self-hosted Minecraft server running 24/7 as a background service, backing itself up on a schedule, and protected by a whitelist and firewall. Whether your goal is a small survival world for friends or a foundation for a larger community, the same twelve steps apply.

Minecraft remains the best-selling video game of all time, with more than 300 million copies sold across all platforms, and its Java Edition is still the version of choice for self-hosting because of its open ecosystem of server software and plugins. That popularity is exactly why a public Minecraft server is a target: bots scan for open ports on 25565 constantly. Treat this guide as both a setup manual and a security checklist.

Why Self-Host a Minecraft Server in 2026?

The pitch for managed Minecraft server hosting is convenience: you pay, you click, you play. The pitch for self-hosting is everything else. When you run the server on your own machine or a virtual private server you control, you decide how much RAM it gets, which mods load, who is allowed to connect, and how your players’ data is handled. There are no artificial slot limits, no upsells for “premium” plugins, and no third party with shell access to your world files.

Cost is the most common motivation. Managed hosting for a server with enough memory to run plugins and a handful of friends typically lands between $5 and $30 per month, which adds up fast for a hobby world. As homelab educator NetworkNinja puts it in a 2025 deployment tutorial, the goal is to “Stop paying $20/month for Minecraft hosting” and instead “deploy a production-ready Minecraft server” on hardware you already own. A spare laptop, a Raspberry Pi 5, or a $5-per-month VPS can comfortably host a small group.

Control and privacy are the second motivation, and they are squarely in our wheelhouse. A self-hosted Minecraft server means your chat logs, IP records, and world data live on infrastructure you own. It also means the security is your responsibility, which is a feature, not a bug, if you care about doing it right. The same discipline that protects a web API protects a game server: least privilege, a default-deny firewall, authenticated access, and rate limiting. If you have followed our guide to rate limiting in Node.js, the mental model here will feel familiar.

Self-hosting is not the right call for everyone. If you cannot keep a machine powered on, cannot tolerate exposing your home IP address, or do not want to manage updates, managed hosting is a legitimate choice. But for anyone comfortable in a terminal, the level of control you gain is enormous, and the skills transfer directly to running any other internet-facing service. For broader gaming context, our gaming coverage tracks the wider platform landscape, including the PS5 versus Xbox Series X hardware race and Switch 2 sales.

What You’ll Need: Prerequisites and Versions

Before you download anything, confirm your machine meets the requirements. A Minecraft server is mostly bound by RAM and single-thread CPU performance, not by storage or bandwidth. The table below lists the components and versions this tutorial assumes. Where a specific version matters for compatibility, it is called out explicitly; everywhere else, prefer the latest stable release.

ComponentMinimumRecommendedNotes
Java runtimeJDK/JRE 21Eclipse Temurin 21 (LTS)Minecraft 1.20.5 and newer require Java 21
Operating systemUbuntu 22.04 / Windows 10 / macOS 13Ubuntu 24.04 LTS or Debian 12Headless Linux is ideal for 24/7 servers
RAM (1-5 players, vanilla)2 GB free3-4 GB freeNever allocate all system RAM to Java
RAM (5-10 players, Paper + plugins)4 GB free6-8 GB freePlugins and mods raise the floor quickly
CPU2 cores4+ modern coresMinecraft favors high single-thread speed
Storage5 GB free SSD20+ GB SSDWorlds grow; backups need headroom
Network10 Mbps upStable wired connectionLatency matters more than raw bandwidth

You also need a legitimate copy of Minecraft. A Microsoft account is required to own and play Minecraft: Java Edition; the old Mojang account migration is long finished, so every player who connects to an online-mode server must authenticate against Microsoft’s servers. The desktop bundle, sold as Minecraft: Java and Bedrock Edition for PC, is priced at $29.99 on the official store and includes the Java Edition you and your players will use to connect. Note that owning the game is required to play; the server software itself is a free download.

Finally, you need administrative access to your machine (the ability to run sudo on Linux or an Administrator shell on Windows) and, if you intend to let friends connect from outside your network, access to your router’s configuration page for port forwarding. Keep that router login handy; we will need it in Step 6.

Java Edition vs Bedrock Edition: Which Server to Host

Minecraft ships in two editions, and they run completely different server software. Choosing the wrong one is the most common mistake new server owners make, so settle this before you download anything.

Java Edition runs on Windows, macOS, and Linux desktops. Its server uses TCP on default port 25565 and supports the enormous Spigot, Paper, Fabric, and Forge ecosystems. If you want plugins, datapacks, mods, or fine-grained control, Java Edition is the answer, and it is what this entire tutorial targets.

Bedrock Edition runs on consoles, mobile, and Windows. Its Bedrock Dedicated Server (BDS) uses UDP on default port 19132 and enables cross-platform play between phones, tablets, consoles, and Windows PCs. Bedrock supports add-ons but not the Java plugin ecosystem, and its server software is more limited. If your players are primarily on consoles or phones, Bedrock is the right call, but the steps differ from this guide.

The two editions cannot connect to each other without a bridging proxy such as Geyser, which translates Bedrock clients onto a Java server. For most self-hosters, the cleanest path is a Java server with Geyser added later if cross-play becomes necessary. We will build the Java server first; treat Geyser as an advanced extension.

Step 1 – Install Java 21

Modern Minecraft server software requires Java 21. As WiseTech notes in a 2025 PC hosting walkthrough, you “double click on that server.jar, and it will generate these files and folders” only once the correct Java runtime is present; the wrong version is the single most common reason a server refuses to start. Install Java 21 first and verify it before going any further.

On Ubuntu 24.04 or Debian 12, install the headless JRE directly from the package manager. The headless package skips the desktop GUI libraries you do not need on a server:

# Ubuntu 24.04 / Debian 12
sudo apt update
sudo apt install -y openjdk-21-jre-headless

# Verify the version
java -version

On older distributions, Windows, or macOS, download a prebuilt Java 21 from Eclipse Temurin, the free, production-grade OpenJDK build maintained by the Adoptium project. Install it, then confirm the runtime from a terminal. You should see output similar to this:

$ java -version
openjdk version "21.0.5" 2024-10-15 LTS
OpenJDK Runtime Environment Temurin-21.0.5+11 (build 21.0.5+11-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.5+11 (build 21.0.5+11-LTS, mixed mode, sharing)

The exact patch level (21.0.5, 21.0.7, and so on) does not matter, only that the major version reads 21. If java -version reports 17 or 8, you have an old runtime ahead of Java 21 on your PATH; uninstall it or adjust your path before continuing. On Windows, the Temurin installer can set JAVA_HOME for you during setup, which avoids most path headaches.

Step 2 – Download the Minecraft Server JAR

With Java in place, create a dedicated directory for the server and download the official server software into it. Keeping everything in one folder makes backups and upgrades trivial. On Linux, run:

# Create a home for the server and enter it
mkdir -p ~/minecraft-server
cd ~/minecraft-server

# Download the official vanilla server jar from minecraft.net
# Always copy the current link from the official download page
wget -O server.jar "https://piston-data.mojang.com/v1/objects/.../server.jar"

The download URL changes with every release, so do not hard-code an old one. Open the official Minecraft server download page, copy the current server.jar link, and paste it into the wget command, or simply download it in a browser and move it into your minecraft-server folder. Downloading server software only from minecraft.net or, for Paper, from papermc.io is itself a security control: third-party “server jar” sites are a known vector for tampered binaries.

You have a choice of server software at this point. The official vanilla jar gives you pure, unmodified Minecraft and is the right starting point for learning. Paper is a drop-in replacement that is dramatically faster and supports plugins; it is the most popular high-performance server software in 2026 and the one most communities run. We will start with vanilla to keep the mechanics clear, then upgrade to Paper in Step 8. Whatever you download, name the file server.jar so the rest of the commands match.

Step 3 – Accept the EULA and Run the First Launch

Minecraft servers will not start until you accept Mojang’s End User License Agreement. The mechanism is unchanged in 2026: the first launch generates an eula.txt file, and you must edit it to confirm agreement. Run the server once to generate the files:

# First launch - allocate 2 GB and run headless
java -Xms2G -Xmx2G -jar server.jar nogui

The server will print a notice, generate several files including eula.txt, and immediately stop. That is expected. Open eula.txt in any text editor and change the last line from eula=false to eula=true. On a headless Linux box you can do it in one command:

# Accept the EULA, then launch again
sed -i 's/eula=false/eula=true/' eula.txt
java -Xms2G -Xmx2G -jar server.jar nogui

This time the server generates the world and starts listening. You will see console output similar to the following (your version string will reflect whatever you downloaded):

[Server thread/INFO]: Starting minecraft server version 1.21
[Server thread/INFO]: Loading properties
[Server thread/INFO]: Preparing level "world"
[Server thread/INFO]: Preparing spawn area: 100%
[Server thread/INFO]: Done (12.345s)! For help, type "help"

When you see the Done line, the server is live and listening on port 25565. Type stop in the console to shut it down cleanly before the next step; never kill the process with Ctrl+C mid-save, which can corrupt the world.

The -Xms2G -Xmx2G flags set the minimum and maximum heap to 2 GB. Setting them equal avoids the performance cost of the JVM resizing its heap. Scale this to your hardware: 2-3 GB suits a small vanilla world, while a Paper server with plugins is happier at 4-6 GB. Crucially, never allocate all of your system’s RAM to Java; the operating system and Minecraft’s off-heap memory both need headroom.

Step 4 – Configure server.properties

The first successful launch created server.properties, the plain-text file that controls almost everything about your Minecraft server. Stop the server before editing it, make your changes, then restart. The defaults are sensible but rarely what you want for a curated server. The table below lists the settings that matter most, their stock defaults, and how to think about them.

PropertyDefaultRecommendationWhy it matters
server-port2556525565The TCP port clients connect to; change only if needed
gamemodesurvivalsurvivalDefault mode for new players
difficultyeasynormal or hardEasy is forgiving; raise it for a challenge
max-players20Match your RAM and audienceEach slot consumes memory and CPU
online-modetruetrue (always)Verifies players against Microsoft auth; never disable on a public server
white-listfalsetrueThe single most effective access control
view-distance108-10Lower values cut CPU and RAM load
simulation-distance106-8Biggest single lever on server tick performance
spawn-protection160 or 16Blocks non-ops from building near spawn
enable-rconfalsefalseRemote console; leave off unless firewalled and password-protected

A minimal, security-conscious server.properties for a private survival server looks like this:

server-port=25565
gamemode=survival
difficulty=normal
max-players=10
online-mode=true
white-list=true
enforce-whitelist=true
view-distance=8
simulation-distance=6
enable-rcon=false
motd=Welcome to our hardened survival server

Two settings deserve emphasis. Keep online-mode=true at all times: it forces every connecting client to authenticate with Microsoft, which prevents username impersonation and is the foundation of every other access control. The “cracked” servers that set online-mode=false to allow pirated clients also allow anyone to log in as anyone, including your operators. Second, set both white-list=true and enforce-whitelist=true so the whitelist is checked immediately, even for players already connected. The full reference for every property lives in the Minecraft Wiki server.properties documentation.

Step 5 – Whitelist, Operators, and Access Control

A whitelist is the cheapest, most effective defense a Minecraft server has. With it enabled, only explicitly approved usernames can join, which instantly eliminates random bots, griefers, and opportunistic scanners. Because you set online-mode=true, the whitelist matches verified Microsoft accounts, not spoofable names.

With the server running, add players from the console. Each command takes the exact in-game username:

# Run these in the server console
whitelist on
whitelist add Alice
whitelist add Bob
whitelist reload

# Grant yourself operator (admin) rights
op YourUsername

# Review who is on the list
whitelist list

Operators bypass spawn protection and can run administrative commands, so grant op sparingly and only to people you trust completely. Minecraft defines four operator levels, from 1 (bypass spawn protection) to 4 (full server control, including stop). For most servers, one or two level-4 operators is plenty. Avoid granting op to convenience accounts you do not actively monitor.

If a player misbehaves, you have graduated controls: kick removes them from the current session, ban blocks their account permanently, and ban-ip blocks an address range. The banlist command shows current bans. These tools, combined with the whitelist, give you complete authority over who occupies your world, which is precisely the control that managed hosting cannot match.

Step 6 – Firewall Rules and Port Forwarding (25565)

So far the server is reachable only from the machine it runs on or, at best, your local network. To let friends connect over the internet, traffic on port 25565 has to reach your server, and that means touching two layers: the host firewall and your router. This is also where the security stakes rise, so proceed deliberately.

First, open the port on the host firewall. On Ubuntu with UFW, allow only the Minecraft port and nothing else:

# Allow Minecraft Java traffic, then verify
sudo ufw allow 25565/tcp
sudo ufw enable
sudo ufw status verbose

Next, the router. Log into your router’s admin page and create a port-forwarding rule that sends external TCP traffic on port 25565 to your server’s local IP address (for example, 192.168.1.50) on the same port. Assign that machine a static or reserved DHCP address first, or the forward will break whenever the lease changes. Your players then connect using your public IP address, which you can find by searching “what is my IP.”

Be deliberate about this step. Exposing a port on your home router exposes your home IP address and creates an inbound path into your network. Mojang’s own documentation is blunt about the tradeoff: the official Minecraft Support guide notes that “doing this requires changing your home network’s configuration” and is not something to do casually for public access. A whitelist mitigates most of the risk, but the network exposure is real.

If you would rather not forward a port at all, you have safer options. A small VPS moves the public exposure off your home network entirely. Alternatively, a mesh VPN lets a fixed group of friends reach the server without opening anything to the public internet at all; our comparison of Tailscale versus WireGuard covers exactly this pattern. For a friends-only server, a private overlay network is often the better and more secure choice.

Step 7 – Connect and Test Your Server

Time to verify the whole chain works. Launch Minecraft: Java Edition on a client machine, go to Multiplayer, and click Add Server. The address you enter depends on where the client is:

  • Same machine as the server: connect to localhost or 127.0.0.1
  • Same local network: connect to the server’s LAN IP, for example 192.168.1.50
  • Over the internet: connect to your public IP address (the one your router forwards)
  • Non-standard port: append it, for example 203.0.113.10:25566

If the server icon shows green bars and your message of the day, you are connected. As WiseTech describes the successful first launch, “your server will start and it’s joinable by you and only you at this point” until you add others to the whitelist. That whitelist-first default is exactly the behavior you want.

If the connection fails, isolate the layer. Connecting fine on localhost but not over the internet points to a firewall or port-forwarding problem, not a server problem. A quick way to test the public path is an online “Minecraft server status” checker that pings your public IP and port from outside your network; if it reports the server as offline while local clients connect, the issue is in the firewall or router, and Step 6 is where to look. We will revisit specific errors in the troubleshooting section.

Step 8 – Upgrade to Paper for Performance and Plugins

Vanilla is great for learning, but Paper is what most real Minecraft server deployments run. Paper is a high-performance fork of Spigot that fixes countless vanilla inefficiencies, closes exploitable bugs, and supports the Bukkit/Spigot plugin API. The migration is painless because Paper reads the same world and server.properties you already have.

Download the latest Paper build for your Minecraft version from the official PaperMC downloads page, drop it into your server folder, and point your launch command at it. Paper recommends a tuned set of garbage-collection flags, commonly known as Aikar’s flags, for smoother performance:

# Launch Paper with recommended GC tuning (adjust -Xmx to your RAM)
java -Xms4G -Xmx4G \
  -XX:+UseG1GC -XX:+ParallelRefProcEnabled \
  -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions \
  -XX:+DisableExplicitGC -XX:+AlwaysPreTouch \
  -jar paper.jar nogui

On first launch Paper creates a plugins folder. To add functionality, download a plugin’s .jar into that folder and restart the server. A sensible starter set for a small community is a permissions manager such as LuckPerms, a world-protection plugin such as WorldGuard, and a core utility plugin such as EssentialsX. The full setup workflow and tuning guidance live in the PaperMC getting-started documentation.

One caution: only install plugins from sources you trust, such as the official Hangar, SpigotMC, or Modrinth listings, and read recent reviews. A plugin runs arbitrary code inside your server process with full access to your world and player data. Treating plugins like any other dependency, vetting the source and keeping them updated, is the same supply-chain hygiene you would apply to npm packages.

Step 9 – Run 24/7 with systemd

Launching the server by hand in a terminal works until you close the terminal. For a server that stays up, you want it managed by the operating system so it survives logouts, restarts on crash, and starts on boot. On Linux, systemd is the clean way to do this. First, create a dedicated unprivileged user so the server never runs as root:

# Create a locked-down service account and move the server under it
sudo useradd -r -m -d /opt/minecraft minecraft
sudo cp -r ~/minecraft-server/* /opt/minecraft/
sudo chown -R minecraft:minecraft /opt/minecraft

Now define the service. Create /etc/systemd/system/minecraft.service with the following content:

[Unit]
Description=Minecraft Server
After=network-online.target
Wants=network-online.target

[Service]
User=minecraft
WorkingDirectory=/opt/minecraft
ExecStart=/usr/bin/java -Xms4G -Xmx4G -jar paper.jar nogui
Restart=on-failure
RestartSec=10
NoNewPrivileges=true
ProtectSystem=full

[Install]
WantedBy=multi-user.target

Enable and start it, then check the status:

sudo systemctl daemon-reload
sudo systemctl enable --now minecraft.service
sudo systemctl status minecraft.service

The hardening directives matter: User=minecraft drops root privileges, NoNewPrivileges=true prevents privilege escalation, and ProtectSystem=full makes most of the filesystem read-only to the service. To send commands to a systemd-managed server you will want a console wrapper such as mcrcon or a tmux/screen-based setup; on simpler installs, many admins run the server inside a detached screen or tmux session instead of systemd, which keeps an interactive console at the cost of the automatic restart-on-crash behavior systemd provides.

Step 10 – Automate Backups

A Minecraft world represents hours of work, and corruption from a bad shutdown or a buggy plugin is a question of when, not if. Automated, off-server backups are non-negotiable. The simplest reliable approach is a timestamped archive of the world directories on a schedule. Create /opt/minecraft/backup.sh:

#!/usr/bin/env bash
set -euo pipefail

SERVER_DIR="/opt/minecraft"
BACKUP_DIR="/opt/minecraft-backups"
STAMP="$(date +%Y-%m-%d_%H-%M-%S)"

mkdir -p "$BACKUP_DIR"
tar -czf "$BACKUP_DIR/world_$STAMP.tar.gz" \
  -C "$SERVER_DIR" world world_nether world_the_end

# Keep only the 14 most recent backups
ls -1t "$BACKUP_DIR"/world_*.tar.gz | tail -n +15 | xargs -r rm --

Make it executable and schedule it with cron to run nightly at 4 a.m., a low-traffic hour:

chmod +x /opt/minecraft/backup.sh

# Add to the minecraft user's crontab: crontab -u minecraft -e
0 4 * * * /opt/minecraft/backup.sh

For a busy server, archiving the world while it is being written can produce an inconsistent snapshot. The robust pattern is to issue save-off and save-all to the server console before the tar runs, then save-on afterward, so the world files are flushed and frozen during the copy. Whichever method you use, the rule that actually saves you is the 3-2-1 principle: keep at least one backup copy on different hardware or in object storage, because a backup sitting on the same disk as the server does not survive a disk failure.

Step 11 – Harden Against DDoS, RCON Abuse, and Log4Shell

A whitelist stops unauthorized logins, but a public IP on port 25565 still attracts connection floods, exploit probes, and protocol abuse. This step is where a Minecraft server stops being a toy and starts being a properly administered service. Work through the following controls.

  • Keep online-mode on. It is your authentication layer. Disabling it to allow non-premium clients hands attackers the ability to log in as any operator.
  • Leave RCON disabled unless you truly need it. RCON is an unencrypted remote console on default port 25575. If you must enable it, set a long random password, bind it to localhost, and never forward its port. Treat an exposed RCON port like an exposed admin panel.
  • Disable the Query protocol (enable-query=false) unless a monitoring tool needs it; it leaks server details over UDP.
  • Rate-limit and absorb floods at the network edge. A small server cannot out-muscle a volumetric DDoS; that is what a TCP proxy or a provider’s mitigation is for. The same connection-throttling logic from our rate limiting guide applies, and tools like fail2ban can ban IPs that hammer the port.
  • Run the server as a non-root user with the systemd hardening from Step 9, so a compromise is contained.
  • Protect the accounts, not just the server. Your operators’ Microsoft accounts are the keys to the kingdom; require them to enable two-factor authentication.

There is one historical vulnerability every server owner should understand. In December 2021, the Log4Shell flaw (CVE-2021-44228) in Apache Log4j 2 turned Minecraft into one of the highest-profile victims of a software supply-chain bug: a malicious chat message could trigger remote code execution on unpatched servers. The affected Log4j versions ran from 2.0-beta9 through 2.14.1, and Minecraft releases up to 1.18.1 were exposed before Mojang shipped a fix. Current server builds bundle a patched Log4j, so a server running modern software is not vulnerable, but the lesson endures: if you ever run an old Minecraft version, apply Mojang’s mitigation, and never assume a game server is too small to be a target. Incidents like this are why we cover how data breaches happen in detail.

Step 12 – The Complete Working Project: A Hardened Paper Server

Here is everything above assembled into a single, reproducible setup for a hardened Paper server on Ubuntu. Read it, adjust the memory and version values for your hardware, and you have a complete working project you can run end to end. It assumes you have already downloaded paper.jar into ~/minecraft-server.

#!/usr/bin/env bash
set -euo pipefail

# 1. Install Java 21
sudo apt update
sudo apt install -y openjdk-21-jre-headless

# 2. Create a locked-down service user and stage files
sudo useradd -r -m -d /opt/minecraft minecraft || true
sudo cp -r ~/minecraft-server/* /opt/minecraft/

# 3. Accept the EULA
echo "eula=true" | sudo tee /opt/minecraft/eula.txt

# 4. Write a hardened server.properties
sudo tee /opt/minecraft/server.properties > /dev/null <<'PROPS'
server-port=25565
gamemode=survival
difficulty=normal
max-players=10
online-mode=true
white-list=true
enforce-whitelist=true
view-distance=8
simulation-distance=6
enable-rcon=false
enable-query=false
motd=Hardened survival server
PROPS

sudo chown -R minecraft:minecraft /opt/minecraft

# 5. Open the host firewall (port forwarding is done on the router)
sudo ufw allow 25565/tcp
sudo ufw --force enable

# 6. Install the systemd service
sudo tee /etc/systemd/system/minecraft.service > /dev/null <<'UNIT'
[Unit]
Description=Minecraft Server
After=network-online.target
Wants=network-online.target

[Service]
User=minecraft
WorkingDirectory=/opt/minecraft
ExecStart=/usr/bin/java -Xms4G -Xmx4G -XX:+UseG1GC -jar paper.jar nogui
Restart=on-failure
RestartSec=10
NoNewPrivileges=true
ProtectSystem=full

[Install]
WantedBy=multi-user.target
UNIT

sudo systemctl daemon-reload
sudo systemctl enable --now minecraft.service
sudo systemctl status minecraft.service --no-pager

Run that, add your friends with whitelist add, schedule the backup script from Step 10, and you have a production-quality, self-hosted Minecraft server. Everything else, plugins, additional worlds, proxies, is a layer on top of this foundation.

Common Pitfalls to Avoid

Most failed Minecraft server setups trip over the same handful of mistakes. Recognize them in advance and you will skip hours of frustration.

  • Wrong Java version. Installing Java 17 or 8 and wondering why a modern server will not boot is the number-one issue. Modern Minecraft needs Java 21; verify with java -version before anything else.
  • Allocating all your RAM to Java. Setting -Xmx to the machine’s total memory starves the OS and Minecraft’s off-heap allocations, causing crashes and swapping. Leave at least 1-2 GB for the system.
  • Disabling online-mode. Running a “cracked” server to allow non-premium clients destroys your authentication and lets anyone impersonate your operators. Keep online-mode=true.
  • Forgetting enforce-whitelist. Setting white-list=true alone does not kick players who connected before it was enabled. Add enforce-whitelist=true.
  • Forwarding the wrong protocol or IP. Java uses TCP 25565; Bedrock uses UDP 19132. Forwarding UDP for a Java server, or forwarding to a machine whose DHCP lease has changed, silently breaks external access.
  • Killing the process instead of saving. Hitting Ctrl+C or pulling power mid-save corrupts worlds. Always use the stop command and rely on your backups.

Troubleshooting: 10 Common Errors and Fixes

When something breaks, work from the symptom. This table maps the errors you are most likely to hit to their usual cause and the fix.

Symptom / ErrorLikely causeFix
“Unsupported class file major version”Wrong Java versionInstall Java 21; confirm with java -version
Server stops immediately on first runEULA not acceptedSet eula=true in eula.txt
“Failed to bind to port” / port in useAnother process holds 25565Stop the other server or change server-port
Connects on localhost, not over internetFirewall or port forward missingAllow 25565/tcp in UFW and forward it on the router
“io.netty… Connection refused”Server not running or wrong IPConfirm the service is up and the IP/port are correct
“You are not white-listed on this server”Whitelist enabled, player not addedRun whitelist add Username
Severe lag / low TPSToo little RAM or high view-distanceLower simulation-distance; raise -Xmx; switch to Paper
“Can’t keep up! Is the server overloaded?”CPU saturated for the tick budgetReduce loaded chunks, plugins, or mob caps
OutOfMemoryError in consoleHeap too small for the workloadIncrease -Xmx, but keep OS headroom
World corruption after crashHard shutdown during a saveRestore from backup; always use stop

When the table does not cover it, the server’s logs/latest.log file is your best friend. Most Minecraft errors print a clear stack trace there, and searching the exact error string almost always lands on a fix. For systemd-managed servers, journalctl -u minecraft.service shows the same output.

Advanced Tips: Proxies, Docker, and Mods

Once the basics are solid, several upgrades are worth knowing about as your Minecraft server grows.

Run multiple servers behind a Velocity proxy

If you want a network of linked servers, such as a survival world, a creative world, and a lobby, a proxy like Velocity sits in front and lets players move between them seamlessly while presenting a single connection address. Pair it with BungeeGuard or modern forwarding tokens so that backend servers only accept connections from your proxy, never directly. Misconfigured proxy forwarding is a classic way servers get bypassed, so lock the backends to localhost.

Containerize with Docker

The widely used itzg/minecraft-server Docker image packages Java, version management, and dozens of configuration options into a single container. It is the fastest way to stand up a reproducible server, makes upgrades a matter of changing a version tag, and isolates the server from the host. For homelabbers already running Docker or Kubernetes, it slots neatly into existing tooling and backup routines.

Add mods with Fabric or Forge

Plugins (Paper) modify server behavior; mods (Fabric or Forge) change the actual game and require every player to install matching client mods. Fabric is lightweight and updates quickly; Forge suits large, complex modpacks. Only run mods from reputable sources such as Modrinth or CurseForge, and remember that every client must run the identical mod set, which raises the coordination cost compared to server-side plugins.

Self-Hosting vs Managed Hosting: 2026 Cost Comparison

Is self-hosting actually cheaper than paying for managed Minecraft server hosting? It depends on what hardware you already own and how you value your time. The table below compares the realistic options for a small server.

OptionTypical monthly costEffortBest for
Spare PC / old laptop at home~$0 plus electricityHigh (you run everything)Learning, friends-only worlds
Raspberry Pi 5 (8 GB)~$0 after one-time hardwareMedium-highTiny, always-on vanilla servers
Budget VPS (2-4 GB RAM)$5-$12MediumSelf-hosting without home exposure
Mid-tier VPS (8 GB RAM)$20-$40MediumPlugin-heavy communities
Managed Minecraft hosting$5-$30Low (click and play)Non-technical owners, instant setup

The honest conclusion: if you already own a capable machine and enjoy the control, self-hosting is close to free and teaches you genuinely useful systems skills. A budget VPS is the sweet spot when you want the server online 24/7 without exposing your home network or leaving a PC running. Managed hosting earns its fee only when you value zero setup over control. GoldGlitter, who set out to benchmark the options, started from the premise that “selfhosting was the way to go when doing Minecraft servers” and put that hunch to the test against cloud providers like Hetzner and Oracle, a conclusion many self-hosters reach once they see the recurring Minecraft server hosting bill.

Frequently Asked Questions

How much RAM does a Minecraft server need?

For a small vanilla survival world with up to five players, 2-3 GB of allocated heap is comfortable. A Paper server running plugins for up to ten players is happier with 4-6 GB. Mods and large modpacks raise the floor sharply, sometimes to 8 GB or more. Always leave at least 1-2 GB of system RAM unallocated for the operating system.

Is it free to run your own Minecraft server?

The server software is a free download from minecraft.net or papermc.io. Each player still needs to own Minecraft: Java Edition, which is $29.99 on the official store. If you host on hardware you already own, the only ongoing cost is electricity; a VPS adds a small monthly fee.

Do I have to port forward to play with friends?

Not necessarily. Port forwarding is the traditional way to expose a home server to the internet, but you can avoid it by hosting on a VPS (which already has a public IP) or by connecting your group through a mesh VPN such as Tailscale, which needs no open ports and keeps the server off the public internet entirely.

What Java version does a Minecraft server need in 2026?

Java 21. Minecraft 1.20.5 and every newer release require Java 21 to run, both the client and the server. Eclipse Temurin 21 is a reliable, free build. Older Java versions will refuse to launch a current server jar.

Should I use vanilla or Paper?

Start with vanilla to learn the mechanics, then switch to Paper for almost any real server. Paper is significantly faster, fixes exploitable bugs, and supports plugins, all while reading your existing world and configuration. Most established communities run Paper or a Paper-based fork.

Can Java and Bedrock players join the same server?

Not by default; the editions use different protocols and ports. You can bridge them by running a Java (Paper) server with the Geyser and Floodgate plugins, which translate Bedrock clients onto the Java server. It works well but adds configuration and is best added after your Java server is stable.

How do I keep my Minecraft server secure?

Enable the whitelist with enforce-whitelist, keep online-mode on, run the server as a non-root user, leave RCON and Query disabled unless firewalled, back up the world off-server, and keep the software updated. Protect your operators’ Microsoft accounts with two-factor authentication, since those accounts are the real attack surface.

Why does my server keep saying “Can’t keep up”?

That message means the server cannot complete its 20 ticks per second within the time budget, usually because the CPU is saturated or too many chunks are loaded. Lower simulation-distance and view-distance, reduce plugin count, cap mob spawns, and switch to Paper, which is far more efficient than vanilla at heavy workloads.

Final Thoughts: You Own the World Now

Setting up a Minecraft server is the rare project that is both a satisfying afternoon and a genuine systems-administration education. In twelve steps you installed a Java runtime, configured a service, opened a firewall, automated backups, and hardened an internet-facing application against real threats. Those are transferable skills that apply to any service you will ever run, not just a game.

The difference between a Minecraft server that gets griefed in a week and one that runs happily for years comes down to the unglamorous parts: the whitelist, online-mode, the non-root service account, the off-server backups, and an owner who treats the box like the internet-facing host it is. Get those right and self-hosting delivers exactly what managed hosting cannot, which is complete ownership of your world. Start with vanilla, graduate to Paper, keep your backups honest, and build something worth logging into.