With your own Minecraft server, you and your friends play on a world that is always online – with your rules, your plugins and your save. You can host it on your own hardware under Windows or Linux, or rent a Minecraft server if you would rather not deal with Java, port forwarding and keeping the machine running.
This guide covers both routes and walks the self-hosted path end to end: installing Java 25, choosing vanilla or Paper, the EULA, server.properties, ports, running permanently via systemd, whitelist, backups and the most common errors. It applies to the current Java Edition 26.2 ("Chaos Cubed", released 16 June 2026).

Last checked against the official Minecraft and Paper documentation, as of August 2026 (version 26.2).
What you will learn
- whether renting or self-hosting fits you better
- which Java version each Minecraft version needs – and why 26.x demands Java 25
- how to install and start the server on Linux and Windows
- what belongs in
server.propertiesand which ports have to be open - how to keep the server running permanently with systemd, restarts included
- how to handle whitelist, operators, backups and updates cleanly
Quick summary
- Decide: rent a ready-made server or host it yourself.
- Check the hardware: at least 2–3 GB of free RAM for small groups.
- Install Java 25 (mandatory from Minecraft 26.1).
- Download the
server.jarfrom the official Minecraft page – or go straight to Paper. - Start the server once and accept the EULA in
eula.txt. - Configure
server.properties: name, player count, view distance. - Open port 25565/TCP in your firewall and router.
- Set up permanent operation – systemd on Linux, a start script on Windows.
- Enable the whitelist and make yourself an operator with
/op. - Plan backups of the world folder with the server stopped.
UnsupportedClassVersionError – simply means your Java runtime is too old.Table of contents
- Rent or self-host?
- Requirements and hardware
- Installing Java
- Vanilla or Paper?
- Installing the server and first start
- On Linux
- On Windows
- Configuring the server (server.properties)
- Ports and firewall
- Keeping the server running
- Connecting to the server
- Whitelist and operators
- Backups and updates
- Troubleshooting
- Frequently asked questions
- Related articles
- Summary
Rent or self-host?
| Rent a server | Self-host | |
|---|---|---|
| Effort | a few clicks, ready immediately | installation, configuration, maintenance |
| Technical knowledge | none needed | command-line basics |
| Availability | 24/7, automatic | machine must keep running, public IP required |
| DDoS protection | included | organise it yourself |
| Control | panel with versions, modpacks, plugins | full control over system and files |
| Cost | fixed monthly price | power or server costs, no rental fee |
If you just want to play, renting is the shorter route: with a Minecraft server from DeinServerHost you pick RAM and slots, and the server runs about two minutes later – versions, modpacks and plugins are switched in the panel, no console required.
The rest of this article belongs to the self-hosted path – worth it if you want full control or already run a root or virtual server anyway.
Requirements and hardware
For a self-hosted Minecraft server you need:
- a machine that runs continuously (Linux with SSH access, or a Windows system)
- enough free memory – on top of what the operating system itself needs
- a publicly reachable IPv4 if friends should join over the internet
- the Java version matching your Minecraft version
How much RAM?
The values below are planning and experience figures for servers without large modpacks:
| Players | Recommended server RAM |
|---|---|
| 1–5 | 2–3 GB |
| 5–15 | 4–6 GB |
| 15–40 | 6–10 GB |
| Modpacks | 8 GB and more |
More RAM is not automatically better: an oversized Java heap makes garbage collection pauses longer. The details live in optimizing Minecraft server performance.
Which Java version?
| Minecraft version | Required Java |
|---|---|
| 1.17–1.20.4 | Java 17 |
| 1.20.5–1.21.x | Java 21 |
| 26.1 and newer | Java 25 |
Since December 2025, Minecraft uses the year.drop.hotfix versioning scheme – current versions start with 26. Java 25 became mandatory with 26.1; an older runtime will not start the server.
Networking: a public IPv4
When hosting at home, classic port forwarding needs a public IPv4 address. With DS-Lite or CGNAT, your line often has no directly reachable IPv4 for incoming connections – and then no amount of firewall configuration helps. Clarify this with your provider first, or fall back to a rented server.
Installing Java
On Linux (Debian/Ubuntu)
sudo apt update && sudo apt upgrade -y
sudo apt install -y openjdk-25-jre-headless
java -version
If java -version reports a 25.x version, you are set. If your distribution does not ship a Java 25 package yet, install Eclipse Temurin 25 from the Adoptium repository – the most widely used free Java distribution.
On Windows
Download Eclipse Temurin 25 from the Adoptium website and run the installer. Then check in the command prompt:
java -version
UnsupportedClassVersionError, your start script is almost certainly invoking an old Java – point it at the full path of the Java 25 installation.Vanilla or Paper?
Mojang's server.jar ("vanilla") is the official server. Paper is a performance-optimised server core that behaves like vanilla but runs considerably faster and supports plugins:
| Vanilla | Paper | |
|---|---|---|
| Source | minecraft.net (official download page) | papermc.io |
| Performance | baseline | considerably better optimised |
| Plugins | no | yes (Bukkit/Spigot compatible) |
| Game behaviour | reference | nearly identical, fine-tunable |
| Current version | 26.2 | 26.2 (stable builds available) |
For almost every server, Paper is the better choice – even without plugins, purely for the performance. Stable Paper builds for 26.2 are available. The setup below works identically with both jars; just swap the file name.
Both downloads are free. Get the vanilla server.jar only from the official Minecraft download page and Paper only from papermc.io – not from third-party mirrors.
Installing the server and first start
On Linux
Create a directory and place the jar there (the download link comes from the official page and changes with every version):
mkdir -p /opt/minecraft && cd /opt/minecraft
wget -O server.jar "<official-download-link>"
First start – it aborts on purpose and creates eula.txt:
java -Xms2G -Xmx2G -jar server.jar --nogui
Accept the EULA and start again:
sed -i 's/eula=false/eula=true/' eula.txt
java -Xms2G -Xmx2G -jar server.jar --nogui
The server now generates the world and reports Done shortly after. Typing stop in the server console shuts it down cleanly.
-Xms and -Xmx set the memory – put both on the same value and size them according to the table above.
On Windows
Create a folder (e.g. C:\minecraft) and save the jar there. In the same folder, create a file called start.bat:
@echo off
java -Xms2G -Xmx2G -jar server.jar --nogui
pause
Double-click start.bat – the first run aborts and creates eula.txt. Open it in a text editor, change eula=false to eula=true, save, and start again. After Done the server is live; stop in the console shuts it down cleanly.
-Xms/-Xmx parameters – they reduce lag spikes considerably. The ready-made start command is in optimizing Minecraft server performance.Configuring the server (server.properties)
The first start creates server.properties in the server directory. The most useful values to begin with:
motd=My Minecraft Server
max-players=20
difficulty=normal
view-distance=8
simulation-distance=6
white-list=true
motdis the text shown in the server list.view-distance=8andsimulation-distance=6save noticeable load compared to the defaults, without anyone noticing in game.white-list=truemakes sure only listed players can join (setup below).
Edit the file only with the server stopped and without spaces around the equals sign. The complete reference of every entry with its default lives in Minecraft server.properties explained – and what no longer belongs in the file at all (e.g. pvp) is covered in Minecraft game rules.
Ports and firewall
| Purpose | Port | Protocol |
|---|---|---|
| Minecraft Java (game connection) | 25565 | TCP |
Query (optional, enable-query) | 25565 | UDP |
RCON (optional, enable-rcon) | 25575 | TCP |
Linux with ufw
sudo ufw allow 25565/tcp
Windows firewall
Create an inbound rule for TCP port 25565 (Windows Security → Firewall → Inbound Rules → New Rule → Port).
Router
When hosting at home, additionally forward 25565/TCP in your router to the internal IP of the server machine. Give that machine a fixed local IP address, or the forwarding rule will point at nothing after the next reboot.
Keeping the server running
Linux: systemd (recommended)
A systemd unit starts the server on boot and restarts it after a crash. Example /etc/systemd/system/minecraft.service (adjust paths and user):
[Unit]
Description=Minecraft Server
After=network.target
[Service]
Type=simple
User=minecraft
WorkingDirectory=/opt/minecraft
ExecStart=/usr/bin/java -Xms2G -Xmx2G -jar server.jar --nogui
Restart=on-failure
[Install]
WantedBy=multi-user.target
Enable it:
sudo systemctl daemon-reload
sudo systemctl enable --now minecraft
Watch logs with journalctl -u minecraft -f, restart with systemctl restart minecraft.
Linux: screen (quick alternative)
screen -S minecraft
java -Xms2G -Xmx2G -jar server.jar --nogui
Detach with Ctrl + A, then D – the server keeps running; return with screen -r minecraft. For permanent operation, systemd is the more robust option because it survives crashes and reboots.
Windows
start.bat has to keep running for as long as the server should be online. For automatic start on boot, create a task in Task Scheduler that runs the script at system startup.
Connecting to the server
Start Minecraft → Multiplayer → Add Server and enter the address:
YOUR-SERVER-IP:25565
With the default port you can leave out the :25565. On the home network your friends use the internal IP of the server machine; from outside, the public IP or your domain. If you test your own public IP from inside the same network, NAT loopback can skew the result – test over a mobile connection when in doubt.
Whitelist and operators
With the whitelist enabled (white-list=true), only listed players get onto the server. In the server console:
whitelist add PLAYERNAME
whitelist list
Operators may use commands such as /gamerule or /whitelist in the game as well:
op YOUR-PLAYERNAME
Hand out operator rights sparingly – the default level 4 can do practically everything, including /stop. Which game rules you can set afterwards (PvP, keep inventory, sleep percentage) is covered in Minecraft game rules.
online-mode=true switched on. With false, the server no longer verifies Mojang accounts – anyone could connect under any name, including yours.Backups and updates
Backups
The entire save lives in the world folder (world/ by default). For a consistent backup:
- Stop the server (
stoporsystemctl stop minecraft). - Copy the world folder and
server.properties. - Store the backup off the machine.
- Start the server again.
Do not copy the world while the server is running – half-written chunks can make the backup unusable.
Updates
When Minecraft updates, download the new jar from the official source (vanilla) or the new build from papermc.io (Paper), stop the server, replace the jar and start again. Always back up first – worlds migrate forwards, never backwards.
Server and clients have to match: a 26.2 client cannot join a 26.1 server, and vice versa.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
UnsupportedClassVersionError on start | Java too old for the Minecraft version | install Java 25 and point the start script at the right Java path |
Server exits immediately, mentions eula.txt | EULA not accepted | set eula=true in eula.txt |
Address already in use / FAILED TO BIND TO PORT | port 25565 already taken | stop the old server process or change server-port |
| Friends cannot join, works locally | firewall or router forwarding missing | open 25565/TCP in the firewall and the router |
| "Outdated server/client" when connecting | versions do not match | bring server and client to the same version |
OutOfMemoryError or crashes under load | too little RAM allocated | raise -Xmx, sized to free RAM and player count |
| Server lags with few players | view distance/entities too high, chunks generated live | lower view-distance and simulation-distance, measure with spark |
| Unreachable from outside despite port forwarding | DS-Lite/CGNAT without public IPv4 | ask your provider for a public IPv4 or rent a server |
| Own public IP fails from the home network | NAT loopback | test over mobile data, use the local IP internally |
| Strangers connect under arbitrary names | online-mode=false | set online-mode=true and restart |
Frequently asked questions
How much does a Minecraft server cost?
The server software itself is free – vanilla and Paper alike. Self-hosting costs you power or the price of your root/virtual server; a rented game server has a fixed monthly price including operation and DDoS protection.
Which Java version do I need for a Minecraft server?
Minecraft 26.1 and newer need Java 25. Older versions: 1.20.5–1.21.x run on Java 21, 1.17–1.20.4 on Java 17. A runtime that is too old fails with UnsupportedClassVersionError.
How much RAM does a Minecraft server need?
2–3 GB covers 1–5 players, 4–6 GB covers 5–15; modpacks want 8 GB or more. Set -Xms and -Xmx to the same value and never allocate all of the system's memory.
Which port does a Minecraft server use?
Port 25565 over TCP by default. UDP is only needed for the optional query protocol; RCON defaults to port 25575/TCP.
Vanilla or Paper – which should I pick?
Paper. It runs considerably faster than vanilla, behaves practically identically in game and supports plugins. Stable Paper builds for the current version 26.2 are available.
How do I make my server friends-only?
Set white-list=true in server.properties and add your players with whitelist add PLAYERNAME. Keep online-mode=true as well, so names are verified against Mojang accounts.
Why can't my friends join my server?
Most of the time the port is not open: 25565/TCP has to be allowed in the firewall and forwarded in the router. Other usual suspects are mismatched game versions and DS-Lite lines without a public IPv4.
Related articles
- Minecraft server.properties explained – every entry with its default
- Minecraft game rules – all rules, including PvP and keep_inventory
- Optimizing Minecraft server performance – Aikar's flags, TPS, spark
- Paper configuration explained – the Paper files in detail
- Optimize your Paper server – fixing lag properly
- The best Minecraft seeds – starting worlds for the new map
Servers for other games
Much of this guide – port forwarding, systemd, backups – applies to other games just as well:
- How to create a Rust server
- How to create a Palworld server
- How to create a Valheim server
- How to create a DayZ server
- How to create a Factorio server
Summary
Creating a Minecraft server comes down to five core steps: install Java 25, download Paper (or vanilla), accept the EULA, adjust server.properties and open port 25565/TCP. For permanent operation, a systemd unit does the job on Linux, Task Scheduler on Windows.
After that it is about the finish: a whitelist against uninvited guests, online-mode left on, regular backups of the world folder with the server stopped – and when lag hits, measure first, configure second.
If you would rather hand off operation, updates and DDoS protection, a rented Minecraft server at DeinServerHost is ready in about two minutes – versions, modpacks and plugins are switched right in the panel.