Learn how to set up your Minecraft server on your PC, allowing you to play with friends even if they're on a different network. This guide uses the Minecraft Java edition and is completely free.
Download the Server:
server.jar
.File Management:
server.jar
from the Downloads folder to a new folder named "Minecraft Server" on your desktop.Command Prompt Setup:
CMD
in the address bar.java -version
.winget install microsoft.openjdk.21
Agree to EULA:
eula.txt
and set eula=false
to true
.Create a Batch File:
start.bat
.start.bat
and add code to specify RAM allocation and server launch:
@echo off
java -Xms2G -Xmx4G -jar server.jar nogui
pause
Modify Server Properties:
Server.Properties
with Notepad to set game details such as game mode and difficulty.Start the Server:
start.bat
to launch your server.In-Game Commands:
/op [your_in-game_name]
to make yourself a server operator for executing in-game commands.From the Same Computer:
localhost
.From Another Computer on the Same Network:
ipconfig
in Command Prompt to get your IPv4 address.:25565
with others on your network.From an External Network:
25565
.:25565
to allow external players.Congratulations on setting up your Minecraft server. Remember, your external IP may change, so keep your friends updated. If this tutorial was helpful, consider subscribing for more content!