How to Create a Minecraft Server: Step-by-Step Guide (Paper)
From picking where to host it to the router settings that stop friends connecting. A full Paper server setup for Java Edition, with the problems people actually hit.
How to Create a Minecraft Server (Java Edition, Paper)
Setting up the server takes about twenty minutes. The parts that eat an evening are the decisions you make before it and the router settings after it. This guide covers both, and ends with a list of what usually goes wrong, because something usually does.
We use Paper throughout. It is a fork of the vanilla server that runs plugins and fixes a long list of performance problems, and it is what most public servers run.
Three decisions before you download anything
Who is it for? A server for five friends and a public server are different projects. For friends, turn on the whitelist and a home PC is fine. For strangers, you want a VPS or a managed host, because a home connection exposes your IP address and usually has a weak upload speed.
Where will it run?
- Your own PC. Free, and the world is only online while your PC is. You will need to do port forwarding yourself, and gaming on the same machine while the server runs gets annoying quickly.
- A VPS. Roughly $5 to $20 a month. It's online all the time and you control everything, which also means you handle updates, backups and security.
- A managed Minecraft host. You pay more per GB of RAM and get a control panel and support. It's the easiest option if you don't want to touch Linux.
How much RAM? For a handful of friends, 2 to 4 GB. For 10 to 30 players and a dozen plugins, 4 to 8 GB. Buy more only after you have measured a problem. RAM is rarely the first thing to run out. The main game loop runs on a single thread, so the speed of one CPU core matters more than how many cores you have.
Step 1: Install Java
Paper needs a recent Java, and the version depends on the Minecraft version. Check the requirement on the Paper downloads page for the version you pick. Minecraft 1.21 needs Java 21, and newer releases can need newer. Run this to see what you have:
java -versionIf it's too old, install the current Temurin build from Adoptium, or on Linux a headless Java package from your distro if it carries the right version.
Step 2: Download Paper and make a start script
Download the jar for your Minecraft version from papermc.io, put it in an empty folder, and rename it paper.jar. Then create a start script in the same folder.
Windows, start.bat:
java -Xms4G -Xmx4G -jar paper.jar --nogui
pauseLinux or macOS, start.sh (run chmod +x start.sh once):
#!/bin/bash
java -Xms4G -Xmx4G -jar paper.jar --noguiSet -Xms and -Xmx to the same number, and keep it below your total RAM. The operating system and Java itself need memory outside the heap. On a 4 GB machine, 3 GB is a sensible -Xmx.
Step 3: First run and the EULA
Run the script. It generates files and stops almost immediately, which is expected. Open eula.txt, read the Minecraft EULA, and change eula=false to eula=true. Run the script again. This time it builds the world and stays up. When the console shows Done, the server is running.
Step 4: The settings in server.properties that matter
Stop the server (type stop in the console) before editing server.properties. Most of the file you can ignore. These you shouldn't:
online-mode=trueis the default and you should keep it. Setting it to false lets anyone join under any username, including yours. The only normal reason to turn it off is running behind a proxy that handles authentication.view-distance=10controls how many chunks are sent to each player, and it's the biggest lever on memory and network use. On modest hardware, 6 to 8 feels almost identical to players.simulation-distance=10controls how far from a player mobs move and crops grow. Dropping it to 4 to 6 cuts load noticeably.max-players=20should be a number your CPU can actually carry, not the number you hope for.white-list=trueandenforce-whitelist=truefor a friends-only server. Add people withwhitelist add namein the console.motdis the line shown in the server list.
Step 5: Let other people connect
Players on your own network can join with your machine's local IP. For anyone on the internet, you need three things:
- Reserve a fixed local IP for the server machine in your router, so the forwarding rule doesn't break when the address changes.
- Forward TCP port 25565 in the router to that local IP.
- Allow the port through the firewall. On Linux with ufw,
sudo ufw allow 25565/tcp. On Windows, allow Java through Windows Defender Firewall.
Then give players your public IP address. A domain pointing at that IP is nicer, and an A record is all it needs while you use the default port.
One catch trips up many people. Lots of home ISPs put customers behind carrier-grade NAT (CGNAT), and port forwarding cannot work behind it. To check, compare the WAN IP shown in your router's status page with what a "what is my IP" site reports. If they differ, you are behind CGNAT. Your choices are to ask the ISP for a public IP, rent a VPS, or use a tunnel service.
Step 6: Keep it running
On a VPS, closing your SSH session kills the server unless you run it somewhere persistent. The simplest way is screen:
screen -S mc
./start.shPress Ctrl+A then D to detach and leave it running, and screen -r mc to come back. For something sturdier that restarts after a crash or reboot, write a systemd service instead.
Step 7: Install a few plugins, not thirty
Stop the server, drop .jar files into the plugins folder, and start it again. Check the console for load errors. A sensible first set:
- LuckPerms for ranks and permissions
- EssentialsX for homes,
/tpa, kits and basic commands - CoreProtect for logging block changes and rolling back griefing
- WorldGuard and WorldEdit if you need a protected spawn or want to build quickly
Every plugin is one more thing to update and one more thing that can conflict. Add them as you hit a real need.
Back up before you invite anyone
Stop the server and copy the whole folder somewhere else. That's the entire first backup strategy, and it will save you the first time a plugin corrupts a world.
When it doesn't work
- Friends get "connection timed out" but you can join. Port forwarding, the firewall, or CGNAT. Work through step 5 in that order.
- It works with
localhostbut not on your LAN. A firewall on the server machine is blocking the port. - "Outdated client" or "outdated server". Version mismatch. Players must run the same version as the server, unless you add a compatibility plugin like ViaVersion.
Failed to bind to port. Something already uses 25565, often a second copy of the server you forgot was running.UnsupportedClassVersionErroron startup. Your Java is older than the Paper jar needs. Install the newer Java.OutOfMemoryError.-Xmxis too low for the world and plugins, or a plugin is leaking memory.- "Can't keep up! Is the server overloaded?" The server is taking more than 50 ms per tick. Lower
view-distanceandsimulation-distancefirst, then profile with the spark plugin to find what is eating the time.
Once the server is stable, the next jobs are permissions, backups on a schedule, and performance tuning, in roughly that order.