How to Make a Minecraft Server: Java, Paper and Bedrock
Download the free server software, accept the EULA and open a port. How to make a Minecraft server with server.jar, Paper or Bedrock, and get past CGNAT.
To make a Minecraft server, download the free official server software from minecraft.net (server.jar for Java, the Bedrock Dedicated Server for Bedrock), run it on a computer that stays on, accept the EULA, and open the right port so friends can reach it. On your home network it takes about fifteen minutes. Letting people in from the internet is the harder part, and in some homes it isn’t possible without a workaround.
This page is the self-hosting walkthrough. If you’d rather not run anything yourself, compare free server hosting and Minecraft Realms first.
Java Edition server
1. Install the right Java
The game launcher bundles its own Java for playing, but the server uses whatever is installed on the system. Servers for 1.20.5 through 1.21.x need Java 21 or newer. The 2026 releases, which switched to year-based numbers like 26.1, need Java 25. A newer Java runs older servers fine, so installing Java 25 (Eclipse Temurin and Microsoft’s OpenJDK builds are both free) covers everything. Run java -version in a terminal to confirm.
2. Pick the server software
- Vanilla:
server.jarfrom the official server download page. Exact Mojang behavior, no plugins. - Paper: a free, faster fork that runs Bukkit/Spigot plugins such as WorldEdit, land claims and permissions. It’s what most community servers run. Get it only from papermc.io. (Not to be confused with the browser fan game; see what Paper Minecraft is if that’s the one you meant.)
- Fabric or NeoForge: if your group wants to play a modpack, install the matching server version of the loader. See Forge vs Fabric for the difference.
3. First run and the EULA
Put the jar in its own empty folder and start it with a command like this (Windows users can save it as start.bat):
java -Xms2G -Xmx4G -jar server.jar nogui
-Xmx4G sets the maximum memory. The first run creates files and then stops. Open eula.txt, change eula=false to eula=true (that’s you agreeing to the Minecraft EULA), and run the command again. The world generates and the console says “Done” when it’s ready.
4. Basic settings
server.properties holds the important options: difficulty, gamemode, max-players, view-distance, white-list and online-mode. PvP is no longer in that file on current versions; it’s a game rule, covered in how to turn off PvP. Leave online-mode=true. Turning it off skips account checks, which lets anyone join as any username, including yours. For a friends-only server, turn on the whitelist and add people with whitelist add <name> in the console. Give yourself admin rights with op <yourname>.
5. Let friends connect
On the same Wi-Fi, friends join using your PC’s local IP address (something like 192.168.0.25). From the internet, they need your public IP and your router has to forward TCP port 25565 to your PC. Port forwarding lives in your router’s admin page, usually under “NAT” or “Virtual Server”. Also allow Java through your PC’s firewall when Windows asks.
Bedrock Dedicated Server
Download the Bedrock Dedicated Server (Windows or Ubuntu Linux) from minecraft.net, unzip it, and run bedrock_server.exe (Windows) or bedrock_server (Linux). Settings are in its own server.properties, and the allowlist works the same way, except that since Bedrock 26.30 it’s switched on by default: add your friends to it, or turn it off, before anyone can join. Bedrock uses UDP port 19132, which is the one to forward. Mobile and Windows players can add the address in the Servers tab; console players can’t add custom servers, so a Realm suits mixed console groups better.
When port forwarding doesn’t work: CGNAT
Many internet providers put customers behind carrier-grade NAT, which means your router doesn’t have its own public IP address. Mobile data almost always works this way, and plenty of home broadband connections do too, including many in Bangladesh. Port forwarding can’t work in that setup.
To check, compare the “WAN IP” shown in your router’s status page with the address a site like “what is my IP” reports. If they differ, or the router’s WAN IP starts with 100.64 to 100.127, 10. or 192.168., you’re behind CGNAT. Your options:
- Ask your ISP for a public IP. Some offer it, sometimes for a small fee.
- Use a tunnel. Services such as playit.gg give your server a public address without port forwarding. Ping goes up slightly because traffic passes through their relay.
- Rent hosting. A cheap game host or VPS in a nearby region avoids the problem and keeps the world online when your PC is off. The free hosting page linked above compares the options.
Keep it healthy
Back up the world folder before every update and at least weekly. Update the server only after any plugins or mods you rely on support the new version. If players complain of rubber-banding, our lag guide explains how to tell server lag from player-side problems. For the bigger picture of multiplayer options, the servers hub has the rest.
Common questions
What Java version does a Minecraft server need?
Java 21 for 1.20.5 through 1.21.x, and Java 25 for the 26.x releases that started in 2026. Installing Java 25 covers both. Check with java -version in a terminal.
Should I use Paper or the vanilla server?
Paper if you want plugins or better performance with several players; vanilla server.jar if you want the exact official behavior, which some technical redstone players care about.
How much RAM does a Minecraft server need?
For a small vanilla or Paper server with a handful of friends, 2 to 4 GB is a reasonable start. Modpacks need more, and the count of players and loaded chunks matters more than the number on the box.
Sources & verification
- Minecraft: Java Edition server download
- Minecraft: Bedrock Dedicated Server download
- Minecraft Wiki: Setting up a server
- PaperMC
Facts on this page are checked against these references and in-game behavior for the stated edition(s). how we verify.
Keep reading