You can run a server on your own computer for free, or rent one from a Minecraft host. Running it yourself is great for playing with friends; for a public server that should be online all the time, a host is usually the better choice.
Java or Bedrock?
Most public servers run Java Edition, because it has a large plugin ecosystem. If your friends play on phones or consoles, you can still use Java and add Geyser so Bedrock players can join too. See Java vs Bedrock servers for the details.
A Java server on your own computer
- Install Java. Recent Minecraft versions need Java 21 or newer. Check with
java -versionin a terminal. - Get the server software. The official server is on minecraft.net (Download → Server). Most public servers use Paper instead (papermc.io): it is faster and supports plugins.
- Make a folder for the server, put the .jar file in it and start it once:
java -Xms2G -Xmx2G -jar server.jar nogui
It stops right away and createseula.txt. - Accept the EULA: open
eula.txt, changeeula=falsetoeula=trueand start the server again. It now builds the world. - Join it yourself on the same computer with the address
localhost.
How much RAM?
As a rough guide: 2 GB for a few friends on vanilla or Paper, 4–6 GB for 10–30 players with plugins, and 6–10 GB or more for modpacks. More RAM than needed doesn't make a server faster; a fast CPU matters more.
Let friends join
Players on the same Wi-Fi can use your computer's local IP. For players elsewhere, open (forward) TCP port 25565 on your router to your computer, then give them your public IP address. Be aware that sharing your home IP tells people roughly where you are. Tunnelling services and hosts avoid this. Check that it works from outside with our server status checker.
First things to set
server.properties:motd(the text under your server name; make a colourful one with our MOTD generator),max-players,difficulty,white-listfor a private server.- Make yourself an operator with
op YourNamein the console. - Take backups of the world folder regularly.
A Bedrock server
Mojang offers the Bedrock Dedicated Server for Windows and Linux on minecraft.net. It uses UDP port 19132. It has no plugin system like Paper, which is why many owners prefer a Java server with Geyser.
Going public
Once your server is stable, add it to CraftRank for free and read how to get players for your server.