How to Host a Minecraft Server on Windows 11
Paying for a Minecraft server gets annoying quickly, especially if you just want to play with a couple of friends on the weekend. The good news is, if you have a decent Windows 11 PC, you can host the server yourself for free. Here's exactly how to get it running.
1. Get the Right Java Version
Minecraft runs on Java. Depending on the version of the game you want to host, you need a specific Java version. For Minecraft 1.20 and above, you need Java 17 or Java 21. Head over to the official Oracle website or Adoptium, download the installer for Windows, and get it installed.
2. Download the Server File
Go to the official Minecraft website and download the server.jar file. Create a brand new folder on your desktop (call it something like "MC Server") and drop that jar file inside.
3. The First Run and EULA
Double-click the server.jar file. It'll run for a second, create some files, and then suddenly stop. Don't panic, this is completely normal. Open the newly created eula.txt file in Notepad, change eula=false to eula=true, and save it. You just legally agreed to their terms of service.
4. Creating a Run Script
You want to give your server enough RAM so it doesn't lag. Create a new text file in the folder and paste this in:
java -Xmx4096M -Xms4096M -jar server.jar nogui
pause
This allocates 4GB of RAM to the server. Save the file as run.bat (make sure it's not run.bat.txt). Double-click this batch file to start your server properly. You should see a command prompt window generating the world data.
5. Port Forwarding (The Tricky Part)
Right now, only people on your local Wi-Fi can join. To let your friends join over the internet, you have to port forward your router. The default Minecraft port is 25565.
- Log into your router's admin panel (usually 192.168.1.1 or 10.0.0.1 in your browser).
- Find the Port Forwarding section in the advanced settings.
- Add a new rule for port
25565(both TCP and UDP) pointing to your PC's local IPv4 address.
Once that's done, just google "what is my IP", give that public IP address to your friends, and they can join your world instantly!