How to Make a Minecraft Server (Java)
Your own world, your rules - in about 15 minutes.
Quick answer: download the server jar from minecraft.net (or Paper for plugins), run
java -Xmx2G -jar server.jar nogui, accept the EULA in eula.txt, run it again, and share your public IP. Can't port forward? Use playit.gg and skip the router entirely.1. Vanilla or Paper?
- Vanilla (official server.jar) - exactly the singleplayer game, multiplayer. No plugins, minimal RAM.
- Paper - the standard for anything beyond a few friends: much better performance, plugin support (LuckPerms, EssentialsX...) and lag-tuning options. Mods still need a Fabric/NeoForge server instead.
2. First run
- Make an empty folder and put the jar inside.
- Run:
java -Xmx2G -Xms2G -jar server.jar nogui(2-4 GB for a friends server). - It stops immediately: open the generated
eula.txtand seteula=true(you accept Mojang's EULA). - Run it again. The world generates and the console says "Done".
3. Basic configuration (server.properties)
motd=- the name friends see in the server list.difficulty=,gamemode=,max-players=,view-distance=(lower it to 6-8 if laggy).white-list=true- strongly recommended: only players you add with/whitelist add <name>can join.- Make yourself operator from the console:
op YourName(no slash in the console).
4. Let friends in
- Same network: they connect to your local IP, port 25565.
- Port forwarding: forward TCP 25565 to your PC's local IP in your router, then friends connect to your public IP.
- No router access / CGNAT (most mobile and many fiber ISPs): use a free tunnel like playit.gg - run their agent, get a public address, share it. No router config at all.
5. Bedrock players on a Java server?
Install the GeyserMC plugin (with Floodgate) on a Paper server and console/mobile players can join your Java world. It is the standard cross-play bridge.
Safety basics
- Always enable the whitelist on a public IP - scanners find open Minecraft ports within hours.
- Never share your server folder or ops.json;
/opgives full control. - Back up the world folder weekly, with the server stopped.